App42 Blue Green Deployment
Introduction to App42 Blue Green Deployment
The App42 Blue-Green deployment approach does this by ensuring that you have two identical production environments. At any point of time, let’s say your production environment (blue) is live. Now let’s say if you prepare a new release of your application and you deploy it on your idle production environment (green) and you do the complete testing of that application in the green environment. Once you are satisfied with the new application build and if your application is working perfect in the green environment, you can switch the production live URL to point to the new tested production environment so that all incoming requests now go to the green production environment. The Blue environment or the earlier production environment will now be idle. In case of any issue, you can switch back your app live URL back to blue environment.
Once you have switched your live production URL to point to your tested production environment and if it is stable, then you can use the blue environment as your testing environment for the final testing step for your next release. Again in the next release you can switch from green to blue in the same way that you did from blue to green earlier. In this way both production environments are switched between themselves.
App42 Blue-Green Deployment Example
- Assume you have 2 Apps Deployed on App42 PaaS, both on identical Production environments and you have mapped custom URL to live App
- As shown in the graphic below:
- Production App is live on Blue
- App42 router sends all traffic for http://produrl1.example.com traffic to Blue.
- Deploy the updated application on the production Environment(green) which is idle:
- Production App is idle on Green
- App42 router sends all traffic for http://produrl2.example.com traffic to Green
- Switch Original Production Custom URL to new Production Environment
- App42 router sends all traffic for http://produrl1.example.com traffic to Green now
- Now your original production Environment becomes idle and your live Prod URL is switched to new Production environment
How to Switch Custom URLs between Different Apps on App42 PaaS?
- Login to https://paashq.shephertz.com/
- Go to App > Custom URLs
- Check the custom URLs mapped to specific Environment Applications
- Now suppose you want to switch your Blue Production Custom URL to point to Green Production Environment, in this case Click on Switch Icon in front of ProductionAppBlue
- A pop up opens, select the ProductionAppGreen and click on submit
- You can check that the Custom URL of ProductionAppBlue is switched and now it points to ProductionAppGreen