As far as possible to achieve more universal configuration and management of IT resources
- Preview online: CMDB
- username: demo
- password: 123456
ATTENTION: branch
master
may be unstable as the result of continued development, please pull code from releases
The CMDB is a universal project that can define and manage almost all IT resources, even every resource as long as you want to, which treat all IT resources as resource objects. Objects has both attributes and relationship.
CMDB's main distinguishing features as compared to other resource systems are:
-
Define attributes of resource objects dynamically,you don't need to define all the attributes at the beginning.
-
Define relationship of resource objects dynamically and simply, even you can draw the relationship through the web.
-
Three view:
- Resource view: model instance data that users can subscribe
- Tree view: the model is hierarchical by field, shown in a tree diagram, and users can subscribe
- Relational view: relationships between models, shown in a tree diagram, are configurable by the administrator
-
Authority management
There are various ways of installing CMDB.
- Prepare: install docker and docker-compose
- In directory cmdb
docker-compose up -d
- View: https://127.0.0.1:8000
- database: mysql
- cache: redis
- python: python2.7, >=python3.6
-
Start mysql, redis
-
Create mysql database: cmdb
-
Pull code
git clone https://github.com/pycook/cmdb.git cd cmdb cp cmdb-api/settings.py.example cmdb-api/settings.py
set database in config file cmdb-api/settings.py
-
Install library
- backend:
cd cmdb-api && pipenv run pipenv install && cd ..
- frontend:
cd cmdb-ui && yarn install && cd ..
- backend:
-
Create tables of cmdb database:
in cmdb-api directory:
pipenv run flask db-setup && pipenv run flask init-cache
-
Suggest step: (default: user:demo,password:123456)
source docs/cmdb.sql
-
Start service
-
backend: in cmdb-api directory:
pipenv run flask run -h 0.0.0.0
-
frontend: in cmdb-ui directory:
yarn run serve
-
worker: in cmdb-api directory:
pipenv run celery worker -A celery_worker.celery -E -Q cmdb_async --concurrency=1
-
homepage: https://127.0.0.1:8000
- if not run localhost: please change ip address(VUE_APP_API_BASE_URL) in config file cmdb-ui/.env into your backend ip address
-
-
Start mysql,redis
-
Create mysql database: cmdb
-
Pull code
git clone https://github.com/pycook/cmdb.git cd cmdb cp cmdb-api/settings.py.example cmdb-api/settings.py
set database in config file cmdb-api/settings.py
-
In cmdb directory,start in order as follows:
- enviroment:
make env
- start API:
make api
- start UI:
make ui
- start worker:
make worker
- enviroment:
- Fork it
- Create your feature branch (
git checkout -b my-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-feature
) - Create new Pull Request
Welcome to join us through QQ group(336164978)