ThoughtWorksStudios / eb_deployer

AWS Elastic Beanstalk blue-green deployment automation from ThoughtWorks Mingle Team
MIT License
400 stars 94 forks source link

Question: How does it work as Blue Green deployment? #101

Closed mpyw closed 7 years ago

mpyw commented 7 years ago

My current method for ELB-based Blue Green deployment on Elastic Beanstalk:

Setup

  1. Make two environments myapp-env-blue myapp-env-green
  2. Detach ELB from myapp-env-green

Note that ELB of myapp-env-green is never used. I only use ELB of myapp-env-blue.

Deployment

  1. Detect which environment is working (At first myapp-env-blue)
  2. Attach ELB to myapp-env-green
  3. Detach ELB from myapp-env-blue

This method is based on the article: Auto Scaling環境でのBlue-Green Deploymentの切替がAWS ELBでできるようになりました。 | Developers.IO

bg-dev_03

However, eb_deployer seems to work without cloning environment. Would you describe how it works?

mpyw commented 7 years ago

Sorry, now I noticed Elastic Beanstalk automatically upload new files onto /var/app/ondeck and rapidly move that into /var/app/current. My method is verbose if I don't require 100% availability. It seems to get down only while:

rm -rf /var/app/current
mv /var/app/ondeck /var/app/current