Deploying Using Blue-Green Strategy
Deploy artifacts using Blue-Green release strategy for Kubernetes Engine (OKE) and instance group deployment.
In the Oracle Cloud Infrastructure (OCI) DevOps service the Blue-Green deployment strategy is implemented in the following four stages of which two are optional:
- Blue-Green deployment stage: In this stage, the two environments (for instance group or OKE) are selected along with the artifacts to be deployed. Load balancer is selected for the instance group blue-green traffic shift. For OKE deployment, NGINX ingress controller must be set up for routing the traffic. During the deployment run, the new version of the application is deployed to the standby environment.
- (Optional) Invoke function stage: In this stage, a custom function can be added to the pipeline to validate the application in the standby environment. The invoked function tests the new version before shifting the production traffic.
- (Optional) Manual approval stage: In this stage, a manual approval step is added to approve the deployment in the standby environment before shifting the production traffic.
- Blue-Green traffic shift stage: In this stage, after the deployment is validated in the standby environment, 100% of the production traffic is shifted from the current active environment to the standby environment that's running the validated new version of the application.
Deployment Rollback
Blue-Green deployment strategy doesn't support pipeline redeployment for both instance group and OKE. Single stage redeployment is allowed only for the blue-green traffic shift stage through manual rollback.
In the single stage redeployment process, after a deployment is complete, you can roll back the failed stage to the previous successful release version. For example, during an instance group blue-green deployment, if the new version deployed to the production environment (green or earlier standby) fails, then the production traffic that's pointing to this environment is shifted to the standby environment (blue or earlier production). For more information, see Rolling Back a Deployment.
For implementing the Blue-Green deployment strategy, see Blue-Green Instance Group Deployment and Blue-Green OKE Deployment.