Edge workflows are sent from the Losant platform down to edge devices through scheduling edge deployments. An edge deployment is a scheduled rollout of a workflow version to one or more devices. It is treated as a separate resource within the Losant REST API.
Edge deployments can be managed on a per-device basis or a per-workflow basis.
After selecting a device from your device list, click “Edge Compute” in the top navigation. This will bring you to a page where you can view the Edge Agent version currently deployed to the device, as well as a list of all workflows deployed to the device and their version status.
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.
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.
You may view the Live Look for certain deployments by clicking the “More Options” icon in the last column of the row of the deployment you wish to view. Note: you will only be able to view deployments that are up-to-date.
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.
To create a new deployment from a workflow, click the “Deploy …” button on 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). Note that only “Edge Compute” devices are able to receive an edge workflow.
If you are viewing the “develop” version of your workflow, you will also have to create a new version to deploy. 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 Edge 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.
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.
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.
You may view the Live Look for devices that are up-to-date. The Live Look allows you to see the workflow version deployed to a device as well as the debug messages, workflow metrics, storage, and globals, all scoped to the selected device.
Multiple workflows can be deployed to an Edge Compute 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 edge 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 Edge Agent is incompatible with the 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.
The per-device deployment manager has a “Device Deployment Logs” tab in which you can see a list of scheduled, succeeded and failed edge deployments for that device. This list allows you to see who scheduled edge deployments, if those scheduled deployments were overridden by later deployments, and if any deployment failed, why the error occurred.