You can import equipment into the platform using the migration script. Read more about migration in Migration from DCImanager 5 to DCImanager 6.
Import consists of the following steps:
- Preparing a JSON file with a description of the equipment.
- Preparing a configuration file for the migration script.
- Running the script in import mode.
Import procedure
- Connect to the server with DCImanager 6 via SSH with superuser permissions.
-
Enter the migrator container:
docker exec -it migrator bash
-
Enter the migration service directory:
cd /opt/ispsystem/migrate
-
To import servers, create the /opt/ispsystem/migrate/server.json file in the following format:
Example of file[ { "name":"Server 1", "platform":"Platform 1", "configuration":"i9-9900K-64Gb-1024NVMe-2048NVMe", "mac":"AA:BB:CC:DD:EE:FF", "owner":"admin@example.com", "blocked":false, "installed_os":"", "note":"Some comment", "rack": "Rack 1", "unit":1, "chassis": null, "slot": null }, { "name:"Server 2", ... ]
Comments -
To import switches, create the /opt/ispsystem/migrate/switch.json file in the following format:
Example of file[ { "name": "Switch 1", "device": "arista_eapi", "ip": "192.0.2.100", "rack": "Rack 1", "unit": 1, "size": 1, "note": "Some comment", "couple_switch": null, "snmp_params": null, "netconf_params": null, "telnet_params": null, "nxapi_params": null, "eapi_params": {"password": "secret", "username": "admin"} }, { "name:"Switch 2", ... ]
CommentsTo get the internal name of the handler, open the Swagger interface → Equipment service → execute a GET request supported_switch. The response to the request will contain the names of the handlers in the handler parameter. Read more about switch handlers in Supported devices.
To get the switch connection settings, open the Swagger interface → DCI Back → copy the required data from the POST request parameter switch. For example, for eapi_params, you need to specify:"eapi_params": { "password": "<password>", "username": "<username>" }
For telnet_params, use the data from ssh_params:
"ssh_params": { "password": "<password>", "port": <port>, "user": "<username>" }
-
Create import_settings.yaml configuration file for the migration:
action: import platform: dci6 data: - server - switch transport: - type: dci6_http - type: dci6_auth_http location: 1 format: json debug: false log_file: /var/log/migrate.log report_file: import_report_{datetime}.txt report_view: plain
- Specify the location id in the location parameter.
- If you do not plan to import servers, delete the "- server" line from the file.
- If you do not plan to import switches, delete the "- switch" line from the file.
-
Run the script to import the data:
python3 migrator.py -p import_settings.yaml
Diagnostics
Migration logs are written to the /var/log/migrate.log file in the migrator container on the server with DCImanager 6. The migration report is saved to the file specified in the report_file parameter of the migration configuration file.