Deployment using AWS Elastic BeanStalk in details - amazon-web-services

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

Related

Microservice deployment using AWS ECS service

I am trying to creating a microservice using spring boot and trying to deploy using AWS ECS cloud service. I Have doubts in deployment using ECS. In ECS there is a facility of EC2 launch type.
Here my doubt is that, when I am using ECS EC2 launch type, can I choose my own Ubuntu machine instances? I need to know whether the ECS provide provision to launch with my own Ubuntu machine?
Yes, you can use your own Ubuntu AMI, but it requires a little bit of work. Here are the requirements:
A modern Linux distribution running at least version 3.10 of the Linux kernel.
The Amazon ECS container agent (preferably the latest version). For more information, see Amazon ECS Container Agent.
A Docker daemon running at least version 1.5.0, and any Docker runtime dependencies. For more information, see Check runtime dependencies in the Docker documentation.
So, apart from installing Docker, you need o install and configure the ECS Agent. You will find the instructions here. See section 'To install the Amazon ECS container agent on a non-Amazon Linux EC2 instance'
Once you have your AMI built, you just create your cluster and then launch the instances into it.

Deploy windows services to EC2

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?

Enterprise Apps with Docker and Elastic Beanstalk

I'm new to Docker and EB but not AWS. I've worked in environments where dedicated tenancy is a requirement, whether due to HIPPA or some other data protection requirements.
So far as I can tell, in order to deploy a Docker image, you must use Beanstalk, which means you aren't able to have a dedicated tenancy. I found this forum question that says if you create a VPC, you can have a dedicated Beanstalk. Is this correct? If so, will it work with Docker? If so any guides would be helpful.
Have you looked at Amazon's ECS service? It is a Docker container service that doesn't use Elastic Beanstalk.
You can also install Docker on any EC2 instance.
If you use a VPC then you can set the default tenancy to dedicated, which will result in dedicated tenancy instances being created by Beanstalk. You should be using a VPC already if you are concerned with HIPAA compliance, or if you want access to pretty much any of the new features released by Amazon in the last year.
Also, EBS stands for Elastic Block Storage, Elastic Beanstalk is usually abbreviated EB.
If you'd like to venture a bit more, you can also use other tools like
Kubernetes
Apache Mesos
RancherOS
For a more comprehensive list of Docker/Container related projects you can see this post:
How to scale Docker containers in production
You can run them all in EC2 with VPC, also using dedicated tenancy if you'd like to.

Elastic Beanstalk Embedded Jetty

I am building bunch of services with embedded jetty. I prefer to deploy those services in Elastic Beanstalk. Elastic Beanstalk supported environments comes with Tomcat which is not required for me. So which environment should I use to run my services in Elastic Beanstalk? I just need a bare-bone EC2 instance with Java and my embedded jetty application are capable to run in different ports. Is Docker container is the best way to run these services, even in that case i am not sure which environment should I use.
Thanks

AWS EC2: Why does ".NET Beanstalk HostManager v1.0.1.1" keep coming back

I keep killing the default instance and it keeps coming back. Why?
This answer is based on the assumption that you are facing a specific issue I've seen several users stumbling over, but your question is a bit short on detail, so I might misinterpret your problem in fact.
Background
The AWS Toolkit for Visual Studio allows you to deploy applications to AWS Elastic Beanstalk, which is a Platform as a Service (PaaS) offering allowing you to quickly deploy and manage applications in the AWS cloud:
You simply upload your application, and Elastic Beanstalk
automatically handles the deployment details of capacity provisioning,
load balancing, auto-scaling, and application health monitoring.
You deploy an application to Elastic Beanstalk into an Environment comprised of an Elastic Load Balancer and resp. Auto Scaling policies, which together ensure your application will keep running even if the EC2 instance is having trouble servicing the requests for whatever reason (see Architectural Overview for an explanation and illustration how these components work together).
That is, your Amazon EC2 instances are managed by default, so you don't need to administrate the infrastructure yourself, but the specific characteristic of this AWS PaaS variation is that you still can do that:
At the same time, with Elastic Beanstalk, you retain full control over
the AWS resources powering your application and can access the
underlying resources at any time.
Now that's exactly what you unintentionally did by terminating the EC2 instance via a mechanism outside of the Elastic Beanstalk service, which the load balancer detects and, driven by those auto scaling policies, triggers the creation of a replacement instance.
Solution
Long story short, you need to terminate the Elastic Beanstalk environment instead, as illustrated in section Step 6: Clean Up within the AWS Elastic Beanstalk Walkthrough (there is a dedicated section for the Elastic Beanstalk service within the AWS Management Console).
You can also do this via Visual Studio, as explained in step 11 at the bottom of How to Deploy the PetBoard Application Using AWS Elastic Beanstalk:
To delete the deployment, expand the Elastic Beanstalk node in AWS
Explorer, and then right-click the subnode for the deployment. Click
Delete. AWS Elastic Beanstalk will begin the deletion process, which
may take a few minutes. If you specified an notification email address
the deployment, AWS Elastic Beanstalk will send status notifications
for the delete process to this address.