Deploying Using Canary Strategy

Deploy artifacts using Canary release strategy for Container Engine for Kubernetes (OKE) and instance group deployment.

In the Oracle Cloud Infrastructure (OCI) DevOps service the Canary deployment strategy is implemented in the following stages:

  1. Canary deployment stage: In this stage, a canary environment (for instance group or OKE) is selected along with the artifacts to be deployed. Load balancer is selected for the instance group canary traffic shift. For OKE deployment, NGINX ingress controller has to be set up for routing the traffic. During the deployment run, the new version of the application is deployed to the canary environment.
  2. (Optional) Invoke function stage: In this stage, a custom function can be added to the pipeline to validate the deployment in the canary environment. The invoked function tests the new version before moving to the production environment.
  3. Shift traffic stage: In this stage, part of the production traffic is shifted to the canary environment.
  4. Manual approval stage: In this stage, a manual approval step is added to approve the deployment in the canary environment before deploying the application in the production environment.
  5. Production stage: In this stage, a production environment (for instance group or OKE) is selected. The application that is validated in the canary environment is deployed to the production environment during the deployment run.
Figure 1. Canary deployment workflow
Canary deployment workflow

Deployment Rollback

Canary deployment strategy supports pipeline redeployment for both instance group and OKE. You can opt to automatically roll back the deployment to the last successful version if the production stage fails. Single stage redeployment is not supported for canary deployment, traffic shift, and approval stages. For more information, see Rolling Back a Deployment and Deployment Rerun.

For implementing the Canary deployment strategy, see Canary Instance Group Deployment and Canary OKE Deployment.