blue-green-deployment

App42 Blue Green Deployment

App42 PaaS Dev Center

Introduction to App42 Blue Green Deployment

One of the challenges with frequent releases and deployments is the downtime while taking stable application build from the one production environment to another environment. You usually need to do this activity very quickly in order to minimize downtime while deploying the test passed build to another production environment. By Using App42 PaaS Blue-Green Deployment technique you can switch between your production environments (switch URLs) at any time without any downtime.

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

For using the App42 Blue-Green Deployment functionality for your identical Production environments, check the below 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.
      App42 PaaS Dev Center
  • 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
      App42 PaaS Dev Center
  • Now your original production Environment becomes idle and your live Prod URL is switched to new Production environment
    App42 PaaS Dev Center

How to Switch Custom URLs between Different Apps on App42 PaaS?

To switch Custom URLs between Apps (deployed for different environments) follow the below steps:
  • Login to https://paashq.shephertz.com/
  • Go to App > Custom URLs
  • Check the custom URLs mapped to specific Environment Applications
    App42 PaaS Dev Center
  • 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
    App42 PaaS Dev Center
  • You can check that the Custom URL of ProductionAppBlue is switched and now it points to ProductionAppGreen
    App42 PaaS Dev Center