Set up Canary Analysis Support

Set up Automated Canary Analysis to perform Canary deployments with Spinnaker.

Setting up automated canary analysis in Spinnaker consists of running a bunch of Halyard commands, as described in this doc. Before you can use the canary analysis service, you must configure at least one metrics service, and at least one storage service. The most common setup is to have one metrics service configured (e.g. Stackdriver, Atlas, Prometheus, Datadog or New Relic) and one storage service (e.g. S3, GCS or Minio) configured. For further details, here’s a comprehensive reference .

Quick start

If you’d prefer to just get up and running quickly now, this set of sample Halyard commands will enable Kayenta and configure it to retrieve metrics from Stackdriver and use GCS for persistent storage:

  1. hal config canary enable
  2. hal config canary google enable
  3. hal config canary google account add my-google-account \
  4. --project $PROJECT_ID \
  5. --json-path $JSON_PATH \
  6. --bucket $MY_SPINNAKER_BUCKET
  7. hal config canary google edit --gcs-enabled true \
  8. --stackdriver-enabled true

In the commands above…

$PROJECT_ID is your GCP project ID

$JSON_PATH points to your service account JSON file—don’t include quotes

$MY_SPINNAKER_BUCKET points to a GCS bucket that accepts your credentials.

These can be the same values you used when configuring your other Spinnaker services (like Clouddriver).

Note All canary-specific Halyard commands require Halyard version 0.46.0 or later.

sudo update-halyard

or

sudo apt-get update && sudo apt-get install halyard

Next, set the Spinnaker version to v1.7.0 or higher:

hal config version edit --version 1.7.0

Lastly, update your Spinnaker deployment to include Kayenta:

hal deploy apply (to Kubernetes) sudo hal deploy apply (to local VM)

Enable/disable canary analysis

  1. hal config canary enable
  1. hal config canary disable

Specify the scope of canary configs

By default, each canary configuration is visible to all pipeline canary stages in all apps. But you can change that so each canary config can be used only within the Spinnaker application in which it was created:

  1. hal config canary edit --show-all-configs-enabled false

Set it to true to revert to global visibility.

Set the canary judge

The current default judge is NetflixACAJudge-v1.0. The behavior of this judge is described here .

If there are any other judges available in your world, you can set Spinnaker to use it:

  1. hal config canary edit --default-judge JUDGE

Identify your metrics provider

  1. hal config canary edit --default-metrics-store STORE

STORE can be…

  • atlas
  • datadog
  • stackdriver
  • prometheus
  • newrelic

Provide the default metrics account

Add the account name to use for your metrics provider. This default can be overridden in canary configuration .

  1. hal config canary edit --default-metrics-account ACCOUNT

Provide the default storage account

Add the account name for your storage provider . This default can be overridden in canary configuration .

  1. hal config canary edit --default-storage-account ACCOUNT

Set up canary analysis for AWS

Configure your canary analysis to use the AWS platform—S3 in particular.

Enable/disable AWS support for canary

  1. hal config canary aws enable
  1. hal config canary aws disable

Manage or view AWS account information for canary

You can add, edit, and delete multiple accounts for AWS service integrations.

Add an account to your AWS service integration

  1. hal config canary aws account add ACCOUNT --bucket --deployment --no-validate
  2. --root-folder

See the command reference for more about these parameters.

Enable S3 for your canary

  1. hal config canary aws edit --s3-enabled true

View your AWS canary account details

  1. hal config canary aws account get ACCOUNT

List your canary AWS accounts

  1. hal config canary aws account list

Set up canary analysis to use Datadog

If your telemetry provider is Datadog, use these commands to set up your canary to work with your Datadog metrics.

Enable/disable your Datadog service integration

  1. hal config canary datadog enable
  1. hal config canary datadog disable

Manage or view Datadog account information for canary

You can add, edit, and delete multiple accounts for Datadog service integrations. For details on the parameters for these commands, see the Halyard reference documentation .

Add an account to your Datadog service integration

  1. hal config canary datadog account add ACCOUNT --api-key --application-key
  2. --base-url

See the command reference for more about these parameters.

Edit your Datadog account information

  1. hal config canary datadog account edit ACCOUNT --api-key --application-key
  2. --base-url

Delete your account

  1. hal config canary datadog account delete ACCOUNT

View your Datadog canary account details

  1. hal config canary datadog account get ACCOUNT

List your canary Datadog accounts

  1. hal config canary datadog account list

Set up canary analysis for Google

Configure your canary analysis to work with Google, including Stackdriver and GCS .

Enable/disable your Google service integration

  1. hal config canary google enable
  1. hal config canary google disable

Manage or view Google account information for canary

You can add, edit, and delete multiple accounts for Google service integrations. For details on the parameters for these commands, see the Halyard reference documentation .

Add an account to your Google service integration

  1. hal config canary google account add ACCOUNT --bucket --bucket-location
  2. --json-path --project --root-folder

See the command reference for more about these parameters.

Edit your Google account information

  1. hal config canary google account edit ACCOUNT --bucket --bucket-location
  2. --json-path --project --root-folder

Delete your account

  1. hal config canary google account delete ACCOUNT

View your Google canary account details

  1. hal config canary google account get ACCOUNT

List your canary Google accounts

  1. hal config canary google account list

Set up canary analysis to use Prometheus

Configure your canary analysis to use Prometheus as your telemetry provider.

Enable/disable your Prometheus service integration

  1. hal config canary prometheus enable
  1. hal config canary prometheus disable

Manage or view Prometheus account information for canary

You can add, edit, and delete multiple accounts for Prometheus service integrations. For details on the parameters for these commands, see the Halyard reference documentation .

Add an account to your Prometheus service integration

  1. hal config canary prometheus account add ACCOUNT --base-url

See the command reference for more information.

Edit your Prometheus account information

  1. hal config canary prometheus account edit ACCOUNT --base-url

Delete your account

  1. hal config canary prometheus account delete ACCOUNT

View your Prometheus canary account details

  1. hal config canary prometheus account get ACCOUNT

List your canary Prometheus accounts

  1. hal config canary prometheus account list

Set up canary analysis to use New Relic

If your telemetry provider is New Relic, use these commands to set up your canary to work with your New Relic metrics.

Enable/disable your New Relic service integration

  1. hal config canary newrelic enable
  1. hal config canary newrelic disable

Manage or view New Relic account information for canary

You can add, edit, and delete multiple accounts for New Relic service integrations. For details on the parameters for these commands, see the Halyard reference documentation .

Add an account to your New Relic service integration

  1. hal config canary newrelic account add ACCOUNT --api-key --application-key
  2. --base-url

See the command reference for more about these parameters.

Edit your New Relic account information

  1. hal config canary newrelic account edit ACCOUNT --api-key --application-key
  2. --base-url

Delete your account

  1. hal config canary newrelic account delete ACCOUNT

View your New Relic canary account details

  1. hal config canary newrelic account get ACCOUNT

List your canary New Relic accounts

  1. hal config canary newrelic account list

Last modified May 4, 2021: docs(nav): collapse left nav (696c72c)