I need help in order to achieve Blue-Green Deployment.
What I have in My Bucket -
- One Blue Environment hosted on ElasticBeanStalk.
- One Green Environment hosted on ElasticBeanStalk.
- Both Environments are getting created by CF-Template.Both are having their own ELB.
What I am looking for -
- I need to switch traffic from Blue to green.
- First I need to know which Environment is currently live so that I can plan my app deployment to next Environment.
- Once I knew my current Environment(Blue in this case) , I deployed my app to Green-Environment and now this Environment is ready to accept the traffic.
- I need to migrate 25% traffic to Green and do a health check, If health check is okay I will add another 25% and do a health check and so-on.
- At any point if health check fails , I should be able to route entire traffic back to Blue Environment.
I need to implement this solution in my CI-CD Job. My CI job is creating my package and deploying this to S3. My CD job is provision the Infrastructure (ElasticBeanStalk) and uploading the package to newly created Environment.