Deployments
Edge Workflows and Embedded Workflows are sent from the Losant platform down to devices through deployments. A deployment is a scheduled rollout of a workflow version to one or more devices. Edge Deployments and Embedded Deployments are treated as separate resources in the Losant API.
Managing Edge Deployments
Deployments can be managed on a per-device basis or a per-workflow basis.
Managing Per Device
After selecting a device from your device list, click “Edge Compute” or “Embedded” (depending on the class of device selected) in the device’s tabbed navigation. This will bring you to a page where you can view the agent version currently deployed to the device, as well as a list of all workflows deployed to the device and their version status.
Creating New Per-Device Deployments
To create a new device deployment, click the “Deploy” button at the top right of the table in the “Deployed Workflows” section. A dialog will appear that will allow you to select a workflow, and then select an existing version of that workflow to deploy to this device. If you choose a workflow that is already deployed (or is scheduled to be deployed) to the device, you will have the option of changing the version of the workflow to use as if you had clicked the “Settings” icon for that workflow in the list below the button.
Editing Existing Per-Device Deployments
To edit an existing deployment, click the “More Options” icon in the last column of the row of the deployment you wish to edit. Select the “Change Version …” option. A dialog will appear that will allow you to change the workflow version or cancel a scheduled rollout.
Managing Per Workflow
You can manage workflow deployments right from the workflow editor. You may view all current deployments of the workflow you’re viewing in the “Devices” tab on the right side panel in the editor.
Setting a Workflow Test Device
Edge workflows have a unique feature that allows for a test device to be configured if the workflow and device both utilize GEA version 1.39.0 or greater. When there is a test device for a workflow, any saved changes to the “develop” version will be automatically deployed to that device. This method of testing as you iterate over your workflow will save you from needing to create a new version to deploy when you want to test a change.
To deploy the “develop” version of a workflow to a single device for testing, click on the down arrow button on the right side of the “Save” button. When the workflow meets the minimum GEA version requirement, the dropdown will contain a short form for configuring a test device.
It is required to check the box acknowledging that “develop” will be automatically deployed to the testing device on save. Once that field is satisfied, the device dropdown will become enabled and you can choose which of your edge devices to use as the test device.
If the edge device selected in the form already has a version of the workflow running on it, the form will require you to acknowledge that the version will be removed and replaced with the “develop” version of the workflow.
Creating New Per-Workflow Deployments
To create a new deployment from a workflow, click the “Deploy …” button next to the “Save” button in the top right corner of the workflow editor. A dialog will appear that will allow you to roll out a deployment of the workflow version you are currently viewing. Select the devices using a device query (by name and/or by tag).
Notes:
-
Deployments that target devices by tag only consider the tags on your devices at the moment the deployment is scheduled. In other words, given a workflow version deployed to all devices with the tag
myTag = My value
…- Only devices with a tag of
myTag = My value
at that moment will receive the deployment. - A device edited to include that tag, or a new device that includes the tag, will not automatically receive the deployment. To deploy the workflow version to those devices, a new deployment must be scheduled.
- Any device with that tag at the time of deployment will not have the workflow removed if the tag is removed in the future. Removing the workflow from such a device requires scheduling a new deployment to remove the workflow version from that device.
- Only devices with a tag of
- Only Edge Compute Devices are able to receive Edge Workflows, and only Embedded Devices can receive Embedded Workflows. Devices matching the ID / tag query that have an invalid device class for the given workflow class will be ignored.
If you are viewing the “develop” version of your workflow, you will also have to create a new version to deploy if not using a test device. You may name your new version anything you’d like as long as it does not conflict with an existing workflow version. You may alternatively leave the name as the generated string of the current date and time that populates the dialog input by default.
When selecting your devices, you will also be presented with a preview of the devices matching your query, including their current deployment status for the selected workflow. If the version you are deploying is incompatible with the agent version on a device, the preview table will warn you of the issue; however, you will still be allowed to proceed with the deployment.
After you press “Deploy Version,” the dialog will change to show the deployment status of each device:
For each new deployment that is up to date, you may view the Live Look by clicking the eye icon next to the selected deployment. Live look is enabled for a deployment if the icon is blue; otherwise, the icon will be grayed out and disabled. Note that some deployments may take longer to actually deploy to the device—the list of deployments will update every 5 seconds to stay current.
Editing Existing Per-Workflow Deployments
In the workflow editor, click the “Devices” tab to view a list of all devices to which any version of this workflow is deployed or is scheduled to be deployed. Each of these deployments can be edited individually by clicking the “Settings” icon in that row; the version can be changed, the rollout can be canceled, or the workflow can be removed from the device.
Viewing Existing Deployments
You may view the Live Look for certain devices by opening the “Devices” tab and clicking the “More Options” icon in the last column of the row of the device you wish to view. Note: You will only be able to view devices whose deployment status is up to date.
Deployment Status
Multiple workflows can be deployed to a device; however, only one version of each workflow may be on the device at one time.
When viewing a list of deployments, the “Version” can be in one of three states:
- Up to date, signaled by a green checkmark alongside the version name. This indicates that the version of the workflow running on the device matches what should be on the device per your scheduled deployments.
- Pending, signaled by a gray clock. The version currently on the device is listed first, and the version that is scheduled to be deployed to the device is on the right side of the arrow. The rollout should occur the next time the device connects.
- Error, signaled by a red tick. For whatever reason (usually because a device’s agent version is incompatible with the workflow version you are trying to deploy), the deployment of a new version failed, and therefore the version listed to the left of the arrow is still running on the device. We will attempt to roll out the version listed on the right the next time the device connects.
Deployment Logs
The per-device deployment manager has a “Device Deployment Logs” tab in which you can see a list of scheduled, succeeded, and failed deployments for that device. This list allows you to see who scheduled a deployment, if scheduled deployments were overridden by later deployments, and if any deployment failed, why the error occurred.
Was this page helpful?
Still looking for help? You can also search the Losant Forums or submit your question there.