Build Update Flow for Reuse
This page describes the detailed procedure for creating an Update Flow that delivers one or more Docker images and uses a Docker Compose YAML file.
Last updated
This page describes the detailed procedure for creating an Update Flow that delivers one or more Docker images and uses a Docker Compose YAML file.
Last updated
The examples presented are suggested as best practices and make up part of the process described in Software Update Process & Procedures.
Before starting the procedures below, you need the following:
One or more Docker containers created and uploaded to your Artifactory repository
A Docker compose.yaml file created and uploaded to your Artifactory repository
(Optional) A release bundle created in Artifactory (if you are using a Release Bundle action block, as in Example A)
In the Connect web UI, go to Deployment in the left menu and click the Create Update Flow tab.
Add a Flow Name, e.g., update-app-docker-images.
The examples on this page describe update flows that use Docker Compose, i.e., the flow uses either the Deploy Container or the Release Bundle action block. Complete the procedure in either Example A or Example B below.
If you do not have Artifactory Enterprise+ edition, we recommend using the Deploy Container action block.
Drag and drop the Deploy Container action block into the update flow and click the Edit (pencil) icon.
Complete the configuration as described below. For some of the fields, we recommend entering parameters instead of values. This will enable you to reuse the update flow many times over.
Enter the configuration as shown below.
Action Name: Enter a name for action block (e.g., my-app-containers).
Registry Account: This is the account where your container images are stored. Choose one of the following:
JFrog Default: The default Artifactory account you received when you registered JFrog Connect.
Other Registry: Any other account, JFrog or other, where you store container images.
Deployment Type: Choose Docker Compose. You can use this option whether you deliver a single or multiple Docker containers. The information in the compose.yaml will specify which container image(s) to pull.
Destination Path on Device: Enter a parameter for this, e.g., {{path-on-device}}
.
Artifactory Path: Enter a parameter for this, e.g., {{artifactory-compose-yaml-path}}
.
If you use JFrog Artifactory Enterprise+, we recommend using the Release Bundle action block. (Release Bundles are available only in the Enterprise+ edition.)
Drag and drop the Release Bundle action block into the update flow and click the Edit (pencil) icon.
Complete the configuration as described below. For some of the fields, we recommend entering parameters instead of values. This will enable you to reuse the update flow many times over.
Enter the configuration as shown below.
Action Name: Enter a name for your release bundle block (e.g., cool-app-bundle).
JFrog Account: Choose the name of the JFrog account. This is the Artifactory account where your release bundle is stored.
Name: You may want to deliver a different release bundle each time you run this flow, so enter a parameter, e.g., {{release-bundle-name}}
.
Version: The release bundle might have different version numbers for different deliveries, so enter a parameter, e.g., {{release-bundle-version}}
.
Destination Path on Device: Enter a parameter for this, e.g., {{bundle-artifacts-device-path}}
.
Custom Paths: (Optional) Mark this option if need to deploy files to destinations on the device other than the destination path of the compose.yaml.
Release Bundle Path: This is the Artifactory path for a release bundle that will be deployed to a location different from the destination path of the Docker Compose YAML. We recommend making this a parameter, e.g., {{custom-bundle-path-01}}
. You can deliver multiple bundles with custom paths.
Destination Path on Device: Enter a parameter for the custom path on the device, e.g., {{custom-device-path-01}}
.
Docker Compose: Mark this checkbox.
Release Bundle Path: Enter a parameter for your release bundle path in Artifactory, e.g., {{artifactory-bundle-path}}
.
Destination Path on Device: Enter a parameter for the device path where the Docker Compose YAML file will be delivered, e.g., {{compose-yaml-device-path}}
.
After completing the Configuration tab of the action block, click On Failure and complete the information in this tab. The On Failure configuration defines your policy of what should happen if a delivery failure should occur. Once you have a well-defined on-failure policy, you will know exactly what should happen at each stage of the deployment process.
For the action blocks described on this page, we recommend using the default on-failure configurations as described below.
The default and recommended settings are marked as follows:
Run General Rollback
Do Actions
Trigger when Whole Update fails
Revert Docker Compose File
The default and recommended settings are marked as follows:
Run General Rollback
Do Actions
Trigger when Whole Update fails
Revert All Files
Of course, you can configure On Failure differently according to your use case requirements. For more detailed information about on-failure and rollback configuration, see the Rollback page.
After completing the On Failure policy, save the action block and complete the rest of the information required for the update flow.
Once you have configured the action blocks you need, complete the steps below.
If you would like the device to reboot after the action blocks have completed, mark Reboot after Update.
Click Rollback, enable the General Rollback, and choose how the rollback will run. The rollback can run either according to a command you enter or a script that you upload.
Save the Update Flow.
You will be able to use this update flow from the web UI, where it appears in the list under the Update Flows tab, or by using the Deploy Update request in the Connect API. Whichever method you choose, you will be able to reuse this flow tens or thousands of times to deploy software updates to the IoT devices.
Learn how to use this update flow to Deploy Docker Images to Device.