Deploy with Argo Rollouts

4 minute readDeveloper productivityAutomation

CloudBees CD/RO includes the ability to use Argo Rollouts to provide advanced deployment capabilities to Kubernetes, such as:

  • Blue-green

  • Canary

  • Canary analysis

  • Experimentation

  • Progressive delivery features

For more information, refer to Model and deploy microservice applications.

Example: Canary deployment using advanced microservices strategies with Argo Rollouts

In this example, an application is deployed with two versions, using a canary strategy with Argo Rollouts and a manual step.

To deploy an application using a canary strategy with Argo Rollouts:

  1. From the CloudBees CD/RO main menu, select Deployment Automation  Applications. The Applications list displays.

  2. Select New application. The New Application dialog displays.

  3. Complete the fields, defining microservices for Helm. For more information, refer to Modeling and deploying microservice applications.

  4. Create a release. For example, Argo Test Release v0.1.

  5. Select your application. The Application editor displays.

    Application editor example
    Figure 1. Application editor
  6. Select the three dots menu for the microservice, then select Details. The Edit microservice dialog opens.

  7. Under Additional options update the image.tag with your new version. For example, 0.2.

  8. Select Save changes.

  9. Navigate back to the Argo test release.

  10. Select Run pipeline. The New run dialog opens.

  11. Select Run. The Pipeline runs view displays the pipeline run deployment status.

    For advanced deployment strategies with Argo Rollouts, the summary includes the type of Deployment strategy.

    Task summary displayed during pipeline run requiring manual approval
    Figure 2. Task summary in a pipeline run manual approval required

    In this example, the pipeline is paused and waiting for manual approval. Default rollout options allow you to set the default assigned approvers and turn on/off email notifications if you configure rollout deployments with manual approvals.

    If approvers are not specified, the user who launched the deployment is auto-assigned as the approver and must approve the task. You can overwrite the default values during process runs, in pipeline tasks, or in the release deployer configuration. For more information, refer to Define rollout parameters.
  12. Select the link in task to open the Steps view, which includes process run details.

    Canary deployment process run details manual approval required
    Figure 3. Canary deployment process run details
  13. Navigate to Environment inventory, and expand the application and microservice details to view the In progress details. The Version column displays v0.1 and v0.2, with an icon denoting the canary deployment.

    Canary deployment environment inventory with two versions
    Figure 4. Environment inventory with two versions

    For more information, refer to Environment inventory.

    You can also view the two versions on the Path to production tab for the release. For more information, refer to Path to production view.

  14. Navigate back to the Pipeline runs tab for the release, and approve the task.

    Your canary deployment using advanced microservices strategies with Argo Rollouts is complete.

Define rollout parameters

Default rollout options allow you to set the default assigned approvers and turn on/off email notifications if you configure rollout deployments with manual approvals. You can define rollout parameters when you start a microservice application process, in a pipeline task application type, or as part of your release configuration.

Define rollout parameters when you start a microservice application process

CloudBees CD/RO allows you to pass actual parameters for ec_rolloutApprovers and ec_rolloutNotificationEnabled when you start a microservice application process. When you select Deploy to run a microservice application deploy process, you can provide values for the process parameters. CloudBees CD/RO stores values you pass in the job processes, and the values are available for the plugin.

To define rollout parameters when you start a microservice application process:

  1. From the CloudBees CD/RO main menu, select Deployment Automation  Applications. The Applications list displays.

  2. Select your application. The Application editor displays.

  3. Select Deploy.

  4. Select the process from the Select process list.

  5. Select the environment form the Select environment list.

  6. Select Parameters View details. The Rollout parameters dialog opens.

    Define rollout parameters during application deployment
    Figure 5. Define rollout parameters
  7. Define your approvers.

  8. (Optional) Turn on notifications.

  9. Select OK.

  10. Repeat the steps above for all applicable process runs.

Define rollout parameters in a pipeline task

When you create or modify an Application process for a pipeline with a microservice process, you can specify rolloutApprovers and rolloutNotificationEnabled rollout parameters.

The rolloutApprovers rollout parameter is similar to manual task approvers. Options include Users, Groups, and Property reference.

If approvers are not specified, the user who launched the deployment is auto-assigned as the approver and must approve the task. You can overwrite the default values during process runs, in pipeline tasks, or in the release deployer configuration. For more information, refer to Define rollout parameters.

You can define rollout parameters for Deploy Application tasks.

To define rollout parameters in a pipeline Deploy Application task:

  1. From the CloudBees CD/RO main menu, select Release Orchestration  Releases. The Releases list opens.

  2. Select your release. The Release editor opens.

  3. Select the applicable task in the stage. The Edit Task dialog opens.

    Select input parameters in a pipeline task
    Figure 6. Select Input Parameters
  4. For Input Parameters, select View details. The Parameters dialog opens.

    Define application rollout parameters in a pipeline task
    Figure 7. Define Application process rollout parameters
  5. Enter the Rollout parameters.

  6. (Optional) Turn on notifications.

  7. Select OK. The Edit Task dialog opens.

  8. Select OK.

To pass new values, you can use modifyTask with rolloutApprovers and rolloutNotificationEnabled arguments. To clean up rolloutApprovers, you can use clearActuals=true or provide a new argument.

Define rollout parameters in your release configuration

You can configure values for ec_rolloutApprovers and ec_rolloutNotificationEnabled for the same microservice application for different stages in a release.

To define rollout parameters in a pipeline Deployer task:

  1. From the CloudBees CD/RO main menu, select Release Orchestration  Releases. The Releases list opens.

  2. Select your release. The Release editor opens.

  3. Select Envs & Configs. The Environments and Configurations dialog opens.

    Environments and Configurations for release
    Figure 8. Environments and Configurations
  4. Select your application or stage(s).

  5. Select Parameters. The Configurations dialog opens.

    Environments and Configurations for release
    Figure 9. Environments and Configurations
    You can set rollout parameters for each stage and application in the release.
  6. Enter the Rollout parameters.

  7. (Optional) Turn on notifications.

  8. Select OK. The Environments and Configurations dialog opens.

  9. Select OK.

Update rollout parameters for an existing microservice application process

You can update rollout parameters for an existing microservice application process from the Application editor.

To update rollout parameters for an existing microservice application process:

  1. From the CloudBees CD/RO main menu, select Deployment Automation  Applications. The Applications list displays.

  2. Select your application. The Application editor displays.

  3. Select the process link for the application. The process definition dialog opens.

  4. Select the process link, then select Details. The Edit Application process: Deploy application dialog opens.

    Edit application process default rollout options
    Figure 10. Update default rollout options
  5. For Default rollout options, select Edit View details. The Default rollout options dialog opens.

  6. Enter your default Rollout approvers.

  7. (Optional) Turn on notifications.

  8. Select OK. The Edit Application process: Deploy application dialog opens.

  9. Select OK.

    When you run the application process, the default Rollout approvers display in the dialog. You can add additional approvers or remove approvers as necessary.