Set Phased Rollout
Configure a phased rollout for deploying software with JFrog Connect.
JFrog Connect enables you to create a software deployment and divide it into phases. In each phase, Connect deploys software based on tags that you have assigned to the devices. You can define the success criteria required to move on to the next phase and configure a rollback in case a phase has failed.
Two-Phase Rollout
When you configure the deployment, just like in a regular deployment, you will create a filter that includes all the devices to be deployed. Then you will choose a tag (e.g., phase-1
) that tells Connect which devices to include in Phase 1. For the second phase, Connect automatically deploys to the remaining devices in your deployment filter. (You do not have to tag devices for the last phase.)
Three-Phase Rollout
A three-phase rollout is like the two-phase rollout, except that you choose tags for both phase 1 and phase 2. For the last phase, Connect automatically deploys to the remaining devices in your deployment filter.
Prerequisite
Create an Update Flow that you intend to use in the phased rollout.
Parts of the Setup
Setting up a phased rollout includes the following procedures (to be completed order):
Tag Devices
(Optional) Configure Rollback Update Flow
Choose a Deployment Filter
Configure Phases and Deploy
The procedures are described in detail below.
Step 1: Tag Devices
The phased deployment configuration uses tags to identify the devices to be updated in each phase. Therefore, before you can set up the phased deployment, you need to create appropriate tags and tag the devices that will be deployed in each phase.
You can use only one tag per phase.
Each phase must use a unique tag.
For example, in a three-phase rollout you need to tag the devices for the first two phases. You might use the tags phase-1
and phase-2
, but other tag names you create are acceptable as long as they comply with the rules above. In a two-phase rollout, you would only need to tag the devices to roll out in phase 1.
Step 2: (Optional) Configure Rollback Update Flow
In case one of the rollout phases fails, you can opt to have a rollback flow take place. The rollback flow is a set of any action blocks you wish to run when a deployment phase has failed. You configure the action blocks in an ordinary update flow.
If a phase fails, then Connect:
Aborts the current phase and the previous phases, i.e., devices in pending state are aborted.
Triggers a rollback deployment on all the devices in the current and previous phases.
If you plan to use Rollback, do the following:
Go to the Create Update Flow tab and create a flow that you will use as a rollback procedure.
Give the update flow a name that will make it easily identifiable as a rollback flow. You will need to find it later on when you add the rollback to your deployment configuration.
Tip: If you decide not to use this rollback feature, you can still configure a rollback on failure within the Update Flow that you intend to deploy.
Step 3: Choose a Deployment Filter
To configure a phased deployment, do the following:
Go to the Update Flows tab on the Deployments page and start a New Deployment.
In the New Deployment form, click Select Devices and create a filter that defines a set of all the devices to be updated. (See examples below.)
Step 4: Configure Phases and Deploy
(Optional) In the New Deployment form, enter the Deployment Configuration specifications, such as an Application Name and Version, a Deployment Schedule, an Alert on Deployment Failure), and a Comment.
Click Set Phased Rollout.
In the Phased Rollout form, enter the information below for each phase. If you want only two phases, leave the Phase 2 row blank.
Target Devices: Choose the tag that marks the devices to be included in each phase. (This is not required for the last phase.) The tags that appear in the dropdown lists are only the tags that are available within the deployment filter that you defined in Step 3 above.
Success Rate: Specify the minimum portion of devices to succeed, expressed as a percentage, before the deployment goes on to the next phase. The success rate must be a whole number from 0 through 100.
Timeout: Set the maximum amount of time for the deployment to complete in each phase and choose the units in the dropdown (hours or days).
(Optional) If you want a rollback to run in case a deployment phase fails, mark Set Rollback.
(Optional) In the Rollback Deployment Configuration, select an update flow to run as a rollback when a phase fails. Complete the other parts of the rollback configuration (Set App Version, Alert on Update Failure, and Comment).
Save the configuration and run the deployment.
The following are some examples that illustrate different ways to use the tags and filters for phased rollouts.
Example A: Group A in Two Phases
You want to update all devices in Group A and roll out the update in two phases.
Tag Devices: In the Devices table, tag the devices in
Group A
that you want to be in Phase 1 with tagphase-1
.Choose Deployment Filter: In the New Deployment form, in the Groups list, choose
Group A
as your filter.Configure Phases: Choose the
phase-1
tag for Phase 1. For phase 2, all the rest of the devices in Group A will be updated.
Example B: HomeAssist version 5 in Three Phases
You want to update all devices that have application HomeAssist version 5 and roll out the update in three phases:
Tag Devices: In the Devices table, filter for all devices that have HomeAssist v5 for the Application. Tag devices to be rolled out in Phase 1 and Phase 2, e.g., using tags
phase-1
,phase-2
.Choose Deployment Filter: In the New Deployment form, in Additional Filters, choose Application as the criterion, and choose
HomeAssist
andv5
from the dropdown boxes.Configure Phases: Choose the
phase-1
tag for Phase 1 and thephase-2
tag for Phase 2. For phase 3, all the rest of the devices having application HomeAssist v5 will be updated.
Example C:
You want to update all devices that have tags Alabama, Arkansas, and Iowa, and deploy each tag in a separate phase.
Tag Devices: Create a new tag, e.g.,
the-whole-deployment
, and assign it to all devices that have tagsAlabama
,Arkansas
, andIowa
.Choose Deployment Filter: In the New Deployment form, in Additional Filters choose Tags and
the-whole-deployment
as the tag.Configure Phases: Choose
Alabama
for Phase 1 andArkansas
for Phase 2.
What’s Next?
Last updated