Create a release
Before creating a deployment, we must first create a software release that the deployment will belong to.
Begin by navigating to the Releases page .
Click the New Release button in the top right, supply a version for the release, select the Mobility config type, and click Create.
By default, the latest Mobility schema version is used, but you can select any schema version via the dropdown on the right side of the dialog.
Stage a deployment
Click into the release you just created. You’ll find yourself in the release’s staging area—a place to create deployments before deploying them to devices.
The staging area is useful for preparing deployments for an upcoming software release while the device is currently running a different software release.
To stage a deployment, click the Stage Deployment button in the top right. A dialog will appear, allowing you to input the config instances to stage.
The config instances are autopopulated with the default values from the release’s config schemas. If you’re taking the schemaless approach or don’t include any defaults in your schema, the config instances will be empty.
Whatever your starting point, you can edit the config instances exactly as you’d like.
Once you are satisfied with the config instances, click Continue and select the device(s) to stage the deployment to.
We’re selecting a single device here, but selecting multiple devices would stage an identical deployment for each of the selected devices. To complete the staging process, click Stage.
You’ll find a deployment staged for each device selected in the staging process.
Deploy
To deploy a staged deployment:
- Hover the deployment
- Select the checkbox to the left of the deployment
- Click the Deploy button at the bottom of the page
Once a deployment has been deployed, it is removed from the staging area.
To view the deployment for this device, navigate to the Devices page
Then, click into the device that was deployed to.
You’ll be brought to the device’s editor page—a place to view and edit the config instances for a device. You’ll find the config instances we deployed to this device from the release’s staging area available in the editor.
Verify the deployment
To verify the config instances seen in the editor are deployed to the device, drop down the deployed config instance (the one with the green dot) in the editor.
The File Path field shows the file path that the config instance is deployed to on the device relative to the /srv/miru/config_instances directory. Since our File Path is mobility/schema_v2/instance.json, the config instance is located at /srv/miru/config_instances/mobility/schema_v2/instance.json.
To verify the config instance is deployed to the device’s file system, open a terminal on the device and navigate to the /srv/miru/config_instances directory.
cd /srv/miru/config_instances
Then cat the config instance by copying the File Path displayed in the editor.
cat <path>/<to>/instance.json
You should find that the content of the editor is identical to the content of the config instance on the device.
Edit a deployment
To edit a config instance, make some changes to the current config instance. As edits are made, a log on the right maintains a list of all changes, categorizing them by their type: added, deleted, or modified.
Only the latest config instance for a config type may be edited. All other config instances are read-only.
Once you are satisfied with the edits, click Deploy in the top right.
A dialog will appear to confirm the deployment. Add a description for the deployment, confirm the robot, and optionally alter the target file path. Finally, click Deploy.
Congratulations! You’ve successfully deployed and edited a config instance to a device with Miru!