EB Multi-Environment Deployment

I have the same code base (one git repository) that I want to load into multiple elastic beanstalk environments. Is there a way to do this, and if so, how do I set up my repository so that I can use multiple environments?

Environment - these are different language versions of the site that I want to run on different sites. The language is set by the environment.

+10
source share
3 answers

To answer my own question. AWS EB CLI 3+ has a nice interface for deployment in multiple environments. If you add another environment to your application, you can simply install it using

eb deploy <environment-name> 
+17
source

You can make eb cli refer to different environments from different branches by adding config, as shown below, to your .elasticbeanstalk / config.yml file:

 branch-defaults: master: environment: staging production: environment: production 

In this example, when you run eb deploy from the master branch, it deploys in your environment with the name "staging", whereas when you launch it from the production branch, it deploys in your environment with the name "production".

This approach does not allow the use of a single branch in several environments; see @adnan answer: fooobar.com/questions/987372 / ...

+2
source

If you specify a version label, you can use this version in other eb deploy commands:

 eb deploy my-first-env -l version-1 && eb deploy my-second-env --version version-1 
0
source

Source: https://habr.com/ru/post/987372/


All Articles