A Deployment ensures delivery of a Release to one or more devices. A Release can contain one or more Mender Artifacts, where one of the Artifacts is assigned when the device receives the update based on software and hardware compatibility.
At its basics, the definition of a Deployment includes:
Only accepted devices can be part of a Deployment, and any given device finishes the Deployment once. Mender also maintains the order of the Deployments, so the oldest Deployment is the one a given device gets first. Maintaining the order of the Deployments also means that the device will never get a Deployment created before the most recently installed one.
It is possible to create a Deployment targeting one or more specific devices, both using the UI and the APIs, selecting an explicit list of Device IDs. The Mender UI also supports the creation of a Deployment targeting a static device group, to update all the devices belonging to it.
A Deployment to a static group contains a list of devices and finishes once all the devices in the Deployment have finished. Mender uses the group to retrieve the list of the Device IDs at Deployment creation time, so the Deployment will not include any devices assigned to the group afterwards.
Mender Enterprise also supports the creation of Deployments using a dynamic filter to assign a Deployment to an open, variable group of devices matching the filter criteria until the user stops the Deployment.
Deployments to a dynamic group behave very differently than Deployments to a static group. Deployments to dynamic groups will never implicitly finish, but will stay active until the user stops it. However, you can use the maximum number of devices setting to ensure the Deployment finishes when the given number of devices receive an update. Please also note that a device can only be in one static group at the same time, while it can be in multiple dynamic groups.
The calculation for the number of devices in a phases uses the total number of devices in the dynamic group at the moment of deployment creation. The nature of deployments to a dynamic group is that the total number of devices receiving the update can change during the lifetime of the deployment.
If the number of devices in a dynamic group changes during a phased rollout the original rollout calculation won't be recalculated. Depending of the nature of the change the following will happen:
The exact time a specific device receives a deployed artifact is not determined by the server, but the concrete moment the device contacts the server following its polling cycle. This means it is possible that devices which joined the group after the deployment started, get updated as part of the first phase.
A dynamic group has 100 devices during the creation of the deployment. There are two phases 80% and 20%. They will contains 80 and 20 devices. As new devices become part of the group the last phase gets expanded.
A dynamic group has 100 devices during the creation of the deployment. There are two phases 80% and 20%. They will contains 80 and 20 devices. As devices leave the group all devices in the group get updated in the first phase.
Once you create a Deployment, it stays in the pending state until one or more devices targeted by the Deployment have requested the update.
When at least one device running the Mender client is performing the defined update, the Deployment transitions to the status inprogress.
When all the devices included in the Deployment to a static group finished the update, either successfully or not, the Deployment's status changes to finished.
Deployments to dynamic groups behave in a different way as they do not include the explicit list of devices targeted by the update. For this reason, a Deployment to dynamic groups remains in pending status until one of the following conditions is true:
At this point, the Deployment's status transitions to finished, and any other device will not use it.
The above picture shows the Deployment life-cycle with possible device Deployment statuses (see next section) in inprogress and finished states.
Each device, while processing a Deployment and after finishing it, stores the details of the update process defined by a Deployment in a database entity called Device Deployment.
The definition of a Device Deployment includes:
The list of the possible values for the status field of a Deployment in progress are:
The values for the status field for a finished Deployment are:
It is possible that you have chosen the device to be the target for one Deployment or more. When the device is asking for the Deployment, the deployments service looks for the oldest unfinished Deployment for the device (see the picture below). If there is one, the Deployments service creates the instance of the Deployment for the device (Device Deployment) with a pending state and executes the following operations:
© 2023 Northern.tech AS