Get Started with Argo Rollouts Deployment

Use Armory CD-as-a-Service to deploy Argo Rollout Objects across multiple environments.


In this guide, you learn how to use Argo Rollouts with Armory CD-as-a-Service.

  1. Create a CD-as-a-Service deployment config file
  2. Add your Rollout manifest
  3. Deploy your app
  4. Extend deployment functionality to use webhooks and to deploy multiple rollouts

Before you begin

Make sure that you have performed the following steps:

To complete this quick start, you need the following:

  • Access to a Kubernetes cluster where you have installed the Remote Network Agent (RNA). This cluster acts as the deployment target for the sample app. (Optional) You can connect multiple Kubernetes clusters to deploy to multiple environments

  • One or more Argo Rollout manifests. For example:

       # rollout.yaml
       kind: Rollout
         name: example
           replicas: 5

Create a CD-as-a-Service deployment config file

Create a file called armoryDeployment.yaml with the following contents:

# armoryDeployment.yaml
version: v1
kind: kubernetes
application: <app-name> 
    account: <cluster-name> # Name of the cluster you entered when installing the RNA. 
    namespace: <namespace>
    account: <cluster-name> 
    namespace: <namespace>
      dependsOn: [staging]
        - pause:
            untilApproved: true
     - path: <path-to-app-manifest>

This example includes multiple targets. You can remove or add targets to match your environment.

Be sure to replace <app-name>, <cluster-name>, and <namespace> placeholders with your own values.

See Create a Deployment Config File for Armory CD-as-a-Service if you want to create a more robust deployment config file. The Deployment Config File Reference for CD-as-a-Service page contains explanations of the fields.

Add your Rollout manifest

  1. Go to the manifests section in your deployment config file.

  2. Add your Argo Rollout manifests in the manifests[].path section:

       # armoryDeployment.yaml
       version: v1
       kind: kubernetes
         - path: rollout.yaml

Deploy your app

  1. Ensure you have logged into CD-as-a-Service:

       armory login
  2. Start your deployment using the Armory CLI:

       armory deploy start -f armoryDeployment.yaml --watch

    Remove the --watch flag if you don’t want to output deployment status in your terminal.

If you are only deploying Argo Rollouts, CD-as-a-Service ignores any strategy you configure in your deployment config file. The Rollout follows the strategy defined in the Rollout manifest.

Extend functionality for Rollout deployments

Run integration tests using webhooks

You can use webhooks in afterDeployment constraints to add specific logic for Argo Rollouts to finish deploying before starting integration tests. For example:

 # armoryDeployment.yaml
version: v1
kind: kubernetes
application: my-application
    account: staging
    namespace: default
        - runWebhook:
            name: Refer to Argo Rollouts for status
  - path: rollout.yaml
   - name: Refer to Argo Rollouts for status
     method: POST
     uriTemplate: http://cmd-hook.default:8081/cmd
     networkMode: remoteNetworkAgent
     agentIdentifier: <cluster-name>
     retryCount: 3
        inline:  >-
        "cmd": "kubectl",
        "arg": "wait -n=default rollout/example --for=condition=Completed --timeout=30m",
        "callbackURL": "{{armory.callbackUri}}/callback"

Deploy multiple Argo Rollouts

To deploy multiple Argo Rollouts together, you can add more paths to the manifests section of the deployment config file:

  - path: rollout-1.yaml
  - path: rollout-2.yaml
  - path: rollout-3.yaml

What’s next

Last modified February 1, 2023: (3bd43b4)