Cross-deploying device images to a different account
For our recommended production workflow, you will need to move device images from one account to another from time to time—for example, sending a development build you’re happy with to the QA team, or sending that build to the deployment team once it’s passed QA. We provide a tool called
garage-deploy for doing just that.
If you’ve rotated your signing keys already,
garage-deploywill already be installed, and you can skip this step.
On a debian machine, download the
garage-deploypackage and install it:
wget https://github.com/advancedtelematic/aktualizr/releases/download/2018.8/garage_deploy.deb sudo apt install ./garage_deploy.deb
credentials.zipfiles for both accounts
These can be found on the provisioning keys page. We’ll assume you named them
Select an image and commit ID to deploy, and the hardware ID(s) to deploy it to
The image name is the one that appears in your ATS Garage account—it will be the same as the
MACHINEsetting in Yocto by default, or the
OSTREE_BRANCHNAMEoption if you set it. The commit ID is the hash of the OSTree commit, visible in the package details. The hardware IDs are for the destination account, and are equivalent to the
MACHINEsetting in your yocto build.
You can see the available options with
$ garage-deploy --help garage-deploy command line options: --help print usage --version Current garage-deploy version -v [ --verbose ] verbose logging (use twice for more information) -q [ --quiet ] Quiet mode --commit arg OSTree commit to deploy --name arg Name of image -f [ --fetch-credentials ] arg path to source credentials -p [ --push-credentials ] arg path to destination credentials -h [ --hardwareids ] arg list of hardware ids --cacert arg override path to CA root certificates, in the same format as curl --cacert
For example, to deploy an image called
001ee11a28e3e08f3e93e31425f0721a7fb44946919284b629ca85a1cc3073cband make it installable on all Raspberry Pi devices on your target account, the command would be:
garage-deploy --commit 001ee11a28e3e08f3e93e31425f0721a7fb44946919284b629ca85a1cc3073cb \ --name acme-modelB -f source-credentials.zip -p dest-credentials.zip -h raspberrypi3
Log into the destination account, and verify that your image has been deployed