Update Image
In JFrog Connect, you can use the Update Image action to update edge device images at scale.
Last updated
Was this helpful?
In JFrog Connect, you can use the Update Image action to update edge device images at scale.
Last updated
Was this helpful?
The Update Image action enables you to easily update device images at scale. JFrog Connect integrates functionality to provide a robust and scalable method of deploying image updates.
Connect uses only as the image repository and employs update flow mechanisms such as on-failure and rollback, retries, and status monitoring.
When you create a that uses Update Image in an update flow, you can configure the deployment to update the image on a single device or use Connect’s robust filter mechanism to update images on any subset of devices in your fleet.
Availability: This feature is available to some customers by feature flag.
SWUpdate installed on the devices.
Familiarity with the SWUpdate methodology described in and .
SWUpdate image file (*.SWU) uploaded to the Artifactory repository. The SWU file includes the IMG file and sw-description file.
The default upload limit in Artifactory is 100 MG. You may need to change this if your IMG file is larger.
The following is an example of an SWU file configured for a double-copy update.
filename
: The name of your compressed IMG file.
compressed
: String to indicate that the file indicated by filename
is compressed and must be decompressed before being installed. The value denotes the compression type. The currently supported values are zlib
and zstd
.
device
: device: Device node as found in /dev
or a symlink to it. This can be specified as an absolute path or a name in the /dev
folder. For example, if /dev/mtd-dtb
is a link to /dev/mtd3
, then mtd3
, mtd-dtb
, /dev/mtd3
, and /dev/mtd-dtb
are valid names. For Raspberry Pi, the rootfs is usually /dev/mmcblck0p2
. Usage depends on the handler. For files, this attribute indicates on which device the filesystem
must be mounted. If not specified, the current rootfs will be used.
To install double-copy using this file, you would need to run the command:
swupdate - i stable,copy1
or
swupdate - i stable,copy2
To include the Update Image action in your update flow, do the following:
Go to Deployment in the left menu and click Create Update Flow.
Drag the Update Image action and drop it in the workflow. It must be the last action in the workflow.
Click the action to open and configure it.
Enter a name for the action.
Enter the Artifactory Path (.swu file), for example, generic-repo/1.0/file.swu
. You can also make all or part of the path a parameter. For example, you could make the version folder a parameter: generic-repo/{{version}}/file.swu
. Then you enter the version value when the actual deployment is run.
Complete the following information for agent installation and registration:
Retain Device Credentials: Mark this to keep the current device credentials in the new image. If you leave it unmarked, you will need to register the device again after the deployment is completed. This option is recommended if you want to install a new agent version and keep the previous device credentials.
Install Agent: Mark this to back up your current agent and reinstall it in the new image. When you choose this, the device credentials will also be backed up and used with the new image. You don't need to mark this if the agent is embedded in the new image.
Partition Name: Enter the name of the new partition. (The name will look like a path, as shown below.)
To check the progress of the software update, do the following:
Go to Deployment in the left menu. In the Deployments tab, click in the Status column of the relevant deployment.
In the list of devices that appears for that deployment, choose the device you want to see and open the Update Image action.
sha256
: The sha256 attribute of the IMG file. This can be obtained by running sha256sum <path_to_img>
on linux machines. You can find a description of the attribute in the table.
type
: SWUpdate has several options for the handler. (See .) The type is the string identifier for the handler, as it is set by the handler when it registers itself. For example: ubivol
, raw
, rawfile
. The type you use depends on the handler you choose.
For additional examples and explanations, see .
Choose the JFrog Registry where your new image is stored. If the registry does not appear in the list, go to to add yours to the list. Then return to this configuration and the added registry will appear in the list.
Tip: If you need help finding the Artifactory Path in JFrog Platform, see
If you want the action to pull content from an account, complete the procedure in , and then choose that registry as your JFrog Registry in Step 2 above.
Install Agent is the recommended setting for most cases. Generally, a recommended best practice is to use a separate partition () for the image update. If you do the image update using a single partition, the agent and its credentials will not be backed up.
The action runs like the default command shown below. You can enter additional commands and run options for the action to run on the device. For each additional command, click the + and choose the command and run option. The display at the bottom enables you to review the full command that will be run before you save the action.
Learn more about and find out how they can be useful in your workflows.