Reputation: 1896
I have read the docs for zero downtime on aws but cant seem to understand what happens in this scenario?
If it pushes to red, I have a process for zero downtime. If it pushed to blue, does that mean I have to eb init again?
If I have to eb init again it means
This does not seem to be correct at all. I may be missing something. What is the correct way to do zero downtime on ebs? I have read lots but cant seem to get these points. Thanks!
Upvotes: 1
Views: 455
Reputation: 1345
When you setup aws.push using aws.config you setup the application and the environment you want to push to, see below:
AWS Access Key [default to ]:
AWS Secret Key [default to ]:
AWS Region [default to eu-west-1]:
AWS Elastic Beanstalk Application [default to your-application]:
AWS Elastic Beanstalk Environment [default to red]:
All you'd need to do is run, git aws.config again and change your AWS Elastic Beanstalk Environment to equal blue.
What I suggest you do is create a red2 environment by copying your current red environments config (under actions >> save config) and then applying the config when you build red2. Then push you code using git aws.push into the blue environment, test and then using the Application Versions page promote the code running on blue onto red2.
Meanwhile all live traffic is still hitting red.
You can then use your hosts file or just test the red2 elastic beanstalk URL make sure everything is in order and then hit the URL swap.
You'll swap RED and RED2
Upvotes: 2