I tried to find some popular open source CMDB system, I succeed.
And then I tired to pick up one which should be easy to handle, I failed.
I am not sure why, and I do not want to figure it out. Since I decide to make one all by myself.
As you see, the name of this project is 'AICMDB', but I still want to name it 'MiniCMDB' as a product
name, and I will call it with this name below...
- Flask
- SQLAlchemy
- Extensions: flask-sqlalchemy/flask-wtf/flask-migrate/flask-bcrypt...
You may find these extensions in
requirements.txt
file.
- Clone this project;
- Install python3(at least python3.5.2) on your host;
- Install all dependencies in requirements.txt:
pip install requirements.txt
; - Make sure you have Mysql installed on your host, and database(configured in config.py) exists ;
- Make sure you have Redis installed on your host or the right machine,
and port configured as 6379 which could be modified in
globalenums.py
; - Initial database: changing directory into project of AICMDB,
execute
python manager.py db init
to initial migration repository, thenpython manager.py db migrate
to identify differences between database and its definition in code(models.py), at lastpython manager.py db upgrade
to make synchronization; - After preparation above, you may start this web application by
python manager.py [server]
, browser it throughhttp://ip:6688
(which configured in enums/globalenums.py);
Yes, you are right. If you want to use this project as production solution, some extra measures will
be needed. Follow descriptions and steps below:
- MiniCMDB could execute asynchronous tasks, but under the help of
Celery
, which is the most famous distributed asynchronous task framework in Python world. So you must startcelery worker
first. If you have installed all dependencies inrequirements.txt
, then you already have celery installed on you host. All you need is start it on console:$celery -A manager.celery_task_queue worker -l info
. - Still on the way...
GPL license,
which means you must keep it as open source project no matter what and keep the same license in your project.