Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to configure eb cli with eb env that is already running

I have taken over a project that has been deployed to elastic beanstalk. I would like to configure my eb cli to deploy to the existing environment without modifying that environment. From my research I get the impression that eb init is the proper command, however when I started going through the interactive session it seemed like it was going to use my entries as the configuration settings (e.g. platform version). I want to make sure that I maintain the settings that are already in use (I was unable to determine what platform version my running environment is using) and I want to make sure that the running ec2 instance will not be replaced or terminated for any reason. Does anyone know the best way to go about doing this? Thanks in advance for any help.

like image 996
laertiades Avatar asked Mar 02 '15 23:03

laertiades


2 Answers

During eb init make sure select an existing application and environment. As long as you do this it will pull down the settings from the environment.

However, that being said, the settings that eb init creates are default setting used for future environments. It will not overwrite any settings on any running environments.

As far as instances, Elastic Beanstalk can terminate or create instances at anytime based on health and autoscaling. However, if we assume your instances are healthy and no autoscaling events occur, then eb deploy will never cause instances to be replaced.

I am however a little curious as to why you are so worried about your instances being replaced.

As far as determining your current platform, you can get that information from eb status.

like image 114
Nick Humrich Avatar answered Nov 20 '22 04:11

Nick Humrich


Better way is to configure you aws cli using aws configure or manually create -

~/.aws/config with

[profilename]
region = ap-south-1

~/.aws/credentials with

[profilename]
aws_secret_access_key = abc
aws_access_key_id = pqr

and then use -

eb init --profile profilename
like image 23
Aniket Thakur Avatar answered Nov 20 '22 05:11

Aniket Thakur