650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/73/0A/wKioL1Xynz6xYDhJAAGmoq1Gjno601.jpg "title=" Cmdb.png "alt=" Wkiol1xynz6xydhjaagmoq1gjno601.jpg "/>
CMDB project, above is flowchart ~
Ps:
Based on the physical machine model, the granularity of virtual machine is much smaller than the physical machine.
1, need to first through the background management system input server basic information (such as host name, SN number, machine room cabinet contract, hardware information does not need to input, will automatically get), this is the system's entrance.
2, did not use Saltstack or puppet, because the company is not used at present, directly do a central control machine, so that you do not have to install agent on each server. Acquisition of hardware information through the central control machine, and submit to the corresponding interface
detailed :
One, backstage management system
1, enter the assets, through the background management system input server basic information.
Second, the API, the central control machine through the call API to get the host list, or submit the collected hardware information
1, defining the interface
A, Get host list interface:/api/untreated_server/
b, submit the server hardware information interface:/handle_server_info/
2, configure the API validation key (in the settings.py file)
A, verification is necessary, involving all assets of the company, very confidential
b, encrypt by key+ timestamp + expiration + usage times
Three, the central control machine (only one), according to the host list to collect hardware information and submit to the API
Configuring interfaces
--Set the background management ip:127.0.0.1 in the configuration file
--Set the background management port in the configuration file: 8000
--configuration file set to get host list:/api/untreated_server/
--Set the sending host information in the configuration file:/api/handle_server_info/
Configure Paramko
--Create a pair of keys and save the private key to the program root directory (save the public key to server A, server B ...). )
--Set the private key path in the configuration file
Configuring error log files
--Set error log file in config file (default: Error.log under Program root)
Configuring API validation using the key
--config file set API validation key
Server, need to configure the public key and the acquisition of information tools (commands)
1. Save the public key to server A, Server B ...
2, install on server
--Dmidecode used to capture memory information
--MEGACLI for capturing hard disk information
The above is a brief analysis of the system structure and the required configuration,
The following is the code part, not to be continued ....
cmdb--structure