Device Management Server (DMS)¶
When
dhopsis executed using docker, each command needs to be executed from the working directory using the full path to the instance (e.g.dhops config node1/dms1).
Create an instance of the Device Management Server (DMS)¶
We can now create an instance of a Device Management Server (DMS) that will be deployed to its node. Start by creating a new instance using the cli:
1 2 3 4 5 | |
Configure the instance¶
Continue by configuring the instance:
1 | |
Alternatively, you can directly open the
config.yamlfile inside the instance folder.
Configure the instance secrets¶
Then, edit the secrets of the instance using:
1 | |
Alternatively, you can directly edit the
secrets.yamlfile usingsops secrets.yaml
The relative path can be omitted if you are in the corresponding folder.
Template the instance¶
Finally, template the devicehub instance using its configuration and secrets using:
1 | |
You can now find all templated files inside the .output/<node-name>/<dms-instance-name> folder from the
workspace.
Deploy the instance¶
Finally, all templated files can be deployed to the node using:
1 | |
Note that by default, the deploy command automatically template the files
Backup and Restore¶
It is good practice to perform a backup of each instance once a day.
Perform the backup as follows:
1 2 | |
Note that this can be used inside a CRON job
When needed, the backup can be restored using:
1 2 | |
Note that the backup contains only the data stored on the node. Meaning that all configuration files such as
config.yamlandsecrets.yamlare not part of the backup as they are intended to be stored inside a separate repository.
Workspace¶
At the end of this tutorial, your workspace should have the following tree structure:
1 2 3 4 5 6 7 8 9 10 11 12 13 | |