I need to create a scaleable infrastructure of ec2 instances, which will be Windows services that can run some processes.
How can I automate the deployment (including installation of this service) to each ec2 instance?
To make the same thing work for my web application I use the EB (Elastic Beanstalk) deployment tool:
C:\Program Files (x86)\AWS Tools\Deployment Tool\awsdeploy.exe
The EB service ensures both the installation and update of all EC2 instances that it manages.
Is there one simple way to spin up Windows services, similar to how Elastic Beanstalk works for instance creation?
Related
I am rather new to LocalStack and I am finding it to be extremely useful. The LocalStack GitHub page does not list Elastic Beanstalk as a supported service. Is there any information on whether this will be rolled out anytime soon?
Elasticbeanstalk automatically creates the infrastructure necessary to deploy and run your application in the cloud. For example. it creates EC2 instances, load balancer etc for you.
if you look at localstack, it supports the standalone services such IAM, S3, Dynamodb etc. Therefore I don't think the localstack will ever support elasticbeanstalk as a service.
If you want to simulate running the elasticbeanstalk application locally, you can try running the following the eb cli command. It will run the application in docker.
eb local run
I am trying to deploy my Spring Boot microservices on using Elastic Beanstalk from AWS. It provides preconfigured environment for deployment. I have one Ubuntu machine with EBS with 80 GB(free tier option). I have some doubts. I am adding as points
When I am deploying using Elastic Beanstalk, where it actually deploying? In my EBS storage ? Or any other space which belongs to AWS ?
Is it possible to deploy anything without creating an EC2 instance? If possible, then where will it actually physical space occupy?
When I deploy my microservices, I choose Tomcat option. So under the box there is a sentence that Java Tomcat server environment is in Amazon Linux or something like that. I have Ubuntu machine; if Beanstalk using my EC2 instance, then why it showing message related to Amazon Linux 2017? Since my machine is Ubuntu?
And I found docs saying BeanStalk is not charging payments. Payment is going according to the AWS resources that we choose. So how I can relate this point with my 3rd point?
I'll start with #4 Elastic Beanstalk is a service you are NOT charged for, just the resources you consume, so EC2, EBS, ELB's.
When you deploy an Elastic Beanstalk application you select what version of Tomcat you want and with it the version of Linux
64bit Amazon Linux 2017.09 v2.7.2 running Tomcat 8 Java 8
64bit Amazon Linux 2017.09 v2.7.2 running Tomcat 7 Java 7
64bit Amazon Linux 2017.09 v2.7.2 running Tomcat 7 Java 6
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html#concepts.platforms.java
#1 - It is deploying to an environment on EC2, which is why there is an AMI in the platform you provision.
When you launch an environment, you choose a platform configuration.
We update platform configurations periodically to provide performance
improvements and new features. You can update your environment to the
latest platform configuration at any time.
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.ec2.html
#2 You can deploy your application on Docker, but that still needs EC2 hosts to run, you can manage them or you can use Multi Container platform, which provisions them to ECS .
https://docs.aws.amazon.com/elasticbeanstalk/latest
/dg/create_deploy_docker.html
#3 Elastic Beanstalk likes to keep resource under it's control, When you provision an Environment, it will provision the resources needed, no need to provision a machine outside of Elastic beanstalk.
You can create a custom platform if you want too based on Ubuntu.
Note
Modify the resources in your environment only by using Elastic Beanstalk. If you modify resources using another service's console,
CLI commands, or SDKs, Elastic Beanstalk won't be able to accurately
monitor the state of those resources, and you won't be able to save
the configuration or reliably recreate the environment. Out-of
band-changes can also cause issues when terminating an environment.
Some other points about Elastic Beanstalk from a great answer on Stack Overlfow
I am trying to develop a Spring Cloud microservice and need to deploy in AWS cloud. I am new to Spring Cloud and AWS. I would like to open a EC2 instance and like to deploy using Elastic Beanstalk environment wizard.
When I am exploring how to create EC instance and configuration, I found that the documentation explaining EC2 and EC2 container service. Here I need to deploy my service in Java environment and Tomcat as service structure. So I am confused about EC2 and EC2 container service. Which one is suitable for my criteria and requirement? EC2 or Ec2 container service for deploying my service?
EC2 container service is to be used if you want to run container systems like Docker. Are you comfortable using Docker containers?
If you want to use standard virtual machine; use EC2 instance. Your requirement of deploying microservice can be achieved using any of EC2 instance or EC2 container service. What is important is your comfort level.
I am having trouble installing a specific dependency in my elastic beanstalk environment via a .config file in the .ebextensions directory.
Are there any issues caused by instead installing it directly onto the instance via "eb ssh"? If my application was auto-scaled or if I wanted to change the instance type, will the dependency be missing from these new instance(s)?
There will be issues when the application get's auto-scaled. An EC2 instance provisioned by Elastic Beanstalk has the following MOTD:
This EC2 instance is managed by AWS Elastic Beanstalk. Changes made via SSH
WILL BE LOST if the instance is replaced by auto-scaling. For more information
on customizing your Elastic Beanstalk environment, see our documentation here:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html
Use the custom container approach suggested if you're aiming to create a highly customized beanstalk environment.
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 ?
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
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...