Deploy Your Canary

It is now time to deploy your application and enjoy the safety of an automated canary analysis.

The sample application has a stable and unstable version to deploy for demonstration. To toggle between the two, will take advantage of Harness Workflow Variables.

Back in the Application, add two Workflow Variables.

Setup -> AWS Canary Lab -> Workflows -> Sample App Canary

On the bottom right, click on the “Workflow Variables” pencil icon.

Workflow Variables

Add a pair of variables.

  • First: verify_canary / Text / yes
  • Second: metric_verification / Text / Prometheus

Add Workflow Variables

Click Save, and your Workflow should look like this.

Canary workflow completed

The last step is to define what happens after a successful Canary, which would be to promote. Can click on the + Add Phase after the Canary in Deployment Phase.

  • Service: Sample App
  • Infrastructure Definition: My EKS Cluster

Add Workflow Phase

Click Submit and return from the Primary phase to the Sample App Canary workflow which should look like this.

Completed Canary Workflow setup

Now you are ready to deploy. Click on Deploy on the top right.

  • Verify Canary: no
  • Artifact Build: Tag # stable

Start new stable deployment

Click Submit and stable/baseline is headed out the door.

Sample App stable Deployment

Now for the fun, you can deploy another version of the application. This can represent a change going into production.

Continuous Deployment -> Deployments -> Start New Deployment

  • Application: AWS Canary Lab
  • Workflow: Sample App Canary
  • Verify Canary: yes
  • Artifact Build: #unstable

Start new broken deployment

Hit Submit and this part will take a few minutes to analyze depending how quickly you redeployed. The learning interval is 5 minutes and the baseline needs to also learn.

As expected, the canary analysis is expected to fail because of the application being unstable. Just like that, you now have an automated canary deployment.

Sample App Deployment unstable

The rollback was completed without any admin or user intervention.

Sample App Deployment rolled back

Happy Deploying!

-The Harness Team