Manage Canary Configs

Use spin to manage the whole lifecycle of your canary configs.

Overview

  1. $ spin canary canary-configs
  2. Usage:
  3. canary canary-config [command]
  4. Aliases:
  5. canary-config, canary-configs, cc
  6. Available Commands:
  7. delete Delete the provided canary config
  8. get Get the canary config with the provided id
  9. list List the canary configs
  10. retro Retro the provided canary config
  11. save Save the provided canary config
  12. Flags:
  13. -h, --help help for canary-config
  14. Global Flags:
  15. --config string path to config file (default $HOME/.spin/config)
  16. --default-headers string configure default headers for gate client as comma separated list (e.g. key1=value1,key2=value2)
  17. --gate-endpoint string Gate (API server) endpoint (default http://localhost:8084)
  18. -k, --insecure ignore certificate errors
  19. --no-color disable color (default true)
  20. --output string configure output formatting
  21. -q, --quiet squelch non-essential output
  22. Use " canary canary-config [command] --help" for more information about a command.

The following instructions assume Spinnaker is running and Gate is listening on http://localhost:8084. If gate is running elsewhere, you can set the Gate endpoint with the global --gate-endpoint flag.

Create and update canary configs with save

  1. $ spin canary canary-configs save --file <path to canary config json>

Note that save accepts the canary config in JSON format. You can quickly export an existing canary config into a valid argument to the --file flag by using the get command.

List canary configs with list

  1. $ spin canary canary-config list
  2. [
  3. ...
  4. {
  5. "id": "canaryConfigId",
  6. "name": "canaryConfigName"
  7. ...
  8. },
  9. ...
  10. ]

Retrieve a single canary config with get

  1. $ spin canary canary-config get canaryConfigId
  2. {
  3. "id": "myPipelineTemplate"
  4. ...
  5. }

Delete a canary config with delete

  1. $ spin canary canary-config delete canaryConfigId

Test a canary config with retro

The retro command runs a retrospective analysis given a canary config. You must also supply the control and experiment group locators and analysis time window.

  1. $ spin canary canary-configs retro \
  2. -f <path to canary config json> \
  3. --control-group app-control-v001 --control-location us-central1 \
  4. --experiment-group app-experiment-v001 --experiment-location us-central1 \
  5. --start 2019-09-17T16:27:19.867Z \
  6. --end 2019-09-17T17:27:19.867Z
  7. Initiating canary execution for supplied canary config
  8. Spawned canary execution with id 01DR9BEP8XTJQDPVFJ41C9MBJ6, polling for completion...
  9. Retrospective canary execution finished, judgement = PASS

Last modified May 4, 2021: more cleanup (0281411)