Argo Rollouts Deployment
In this guide, you learn how to use Argo Rollouts with Armory CD-as-a-Service.
- Create a CD-as-a-Service deployment config file
- Add your Rollout manifest
- Deploy your app
- Extend deployment functionality to use webhooks and to deploy multiple rollouts
Before you begin
Make sure that you have performed the following steps:
- Connected to your Kubernetes cluster and deployed an app using the CLI. See Quickstart Kubernetes Deployment.
To complete this guide, 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 apiVersion: argoproj.io/v1alpha1 kind: Rollout metadata: name: example spec: 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> targets: staging: account: <cluster-name> # Name of the cluster you entered when installing the RNA. namespace: <namespace> production: account: <cluster-name> namespace: <namespace> constraints: dependsOn: [staging] beforeDeployment: - pause: untilApproved: true manifests: - path: <path-to-app-manifest>
This example includes multiple targets. You can remove or add targets to match your environment.
Be sure to replace
<namespace> placeholders with your own values.
See Deployment Reference if you want to create a more robust deployment config file.
Add your Rollout manifest
Go to the
manifestssection in your deployment config file.
Add your Argo Rollout manifests in the
# armoryDeployment.yaml version: v1 kind: kubernetes ... manifests: - path: rollout.yaml
Deploy your app
Ensure you have logged into CD-as-a-Service:
Start your deployment using the Armory CLI:
armory deploy start -f armoryDeployment.yaml --watch
--watchflag 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:
This example employs cmd-hook, which is an open source service deployed in the cluster to execute
kubectl commands. CD-as-a-Service employs RNA to execute
kubectl commands for monitoring the state of rollout objects. You can view the source code for
cmd-hook in the public repository.
Deploy multiple Argo Rollouts
To deploy multiple Argo Rollouts together, you can add more paths to the
manifests section of the deployment config file:
manifests: - path: rollout-1.yaml - path: rollout-2.yaml - path: rollout-3.yaml
Was this page helpful?
Thank you for letting us know!
Sorry to hear that. Please tell us how we can improve.
Last modified October 17, 2023: (6147f9d)