Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple elastic beanstalk environment in one ec2 instance

I am using aws elastic beanstalk to host my django application. We need to setup dev, stage and Prod environment of the application. But whenever I am using eb create command, it is also launching a new ec2 instance for the new environment.

Is it possible to set up multiple elastic beanstalk Environment in single ec2 instance. Also if I want to host a WordPress website in one of these instance can I do so by ssh logging into your the system and putting website in public web directory ?

like image 791
r.bhardwaj Avatar asked Dec 15 '22 08:12

r.bhardwaj


2 Answers

If you can host your application within a docker container then you can use Multicontainer Docker Environment and run multiple docker containers on the same environment.

Read about multi-container docker environments in ElasticBeanstalk here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_ecs.html

like image 89
Rohit Banga Avatar answered Jan 21 '23 09:01

Rohit Banga


No.

Elastic Beanstalk create EC2 instances per environment. U can have single instance or elastic instance setups.

Yes you can SSH onto an EB Instance.

No you can't expect your changes to remain. The message when you SSH onto the EB Instance says as much.

Its a managed service for you.

The concept of having your EB Elastic destroys your capability for baking the EC2 instance it makes.

Use your GIT repository to put the Wordpress site on the EB and use a Database to pre-define it.. however you'll have state and media issues to overcome...

like image 20
Paul Dunlop Avatar answered Jan 21 '23 09:01

Paul Dunlop