Blue Green Deployment
Last updated
Last updated
A blue/green deployment is a deployment strategy in which you create two separate, but identical environments. One environment (blue) is running the current application version and one environment (green) is running the new application version. Using a blue/green deployment strategy increases application availability and reduces deployment risk by simplifying the rollback process if a deployment fails. Once testing has been completed on the green environment, live application traffic is directed to the green environment and the blue environment is deprecated.
operate
command:The above command deploys the my_application
component for service odindemo
in environment bluegreen
using blue green deployment strategy
strategy
string
This field denotes the strategy you want to follow for a specific operation. Following are the available options:
blue-green: Used for blue green deployment strategy.
in-place: Refer to the for the same.
canary
boolean
If this field is set to true, On the successful deployment, the traffic routing will be done in a canary fashion. Canary works in multiple phases,
Phase 1: 20% of traffic will be shifted to the new deployment, and odin will check for the 5XX errors if no errors are recorded, it will move to the next phase.
Phase 2: 100% of the traffic will be shifted to the new deployment, and odin will check for the 5XX errors if no errors are recorded, it will move to the next phase.
--options='{ "auto_routing" : true}'
canary_config
json
This is an optional field which will allow users to set error threshold value for Canary. Needless to say, this will be only applicable if canary is set to true.
Error threshold takes two parameters, both of which are mandatory if you are using canary_config:
metric (string): Can take one of the two values Percent or Absolute.
value (float): Signifies the percentage or absolute no. of errors for the threshold, as defined in metric.
--options='{"canary": true, "canary_config": {"error_threshold": {"metric": "percent", "value": 0.5}}}'
auto_routing
boolean
If this field is set to true, On the successful deployment, the traffic will be routed from the old active stack(old version) to the new active stack (new deployment version). And if this field is set to false, odin will not route traffic to the new deployment. Users will have to shift the traffic manually.
--options='{ "auto_routing" : true}'
passive_downscale
boolean
If this field is set to true, the passive stack will be downscaled once the deployment is successful.
--options='{ "passive_downscale" : true}'