What is Elastic Beanstalk?
AWS Elastic Beanstalk is an easy-to-use service for deploying and scaling web applications and services developed with Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker on familiar servers such as Apache, Nginx, Passenger, and IIS.
You can simply upload your code and Elastic Beanstalk automatically handles the deployment, from capacity provisioning, load balancing, auto-scaling to application health monitoring. At the same time, you retain full control over the AWS resources powering your application and can access the underlying resources at any time.
Elastic Beanstalk Architecture
Elastic Beanstalk automatically provisions the resources required to run application deployment. AWS resources created for an environment includes Route53 entry, an Elastic Load Balancer (ELB), an Auto Scaling Group (ASG), and one or more instances.
Once configured, the beanstalk environment is highly dependent on its provisioned resources which are used for scaling and load balancing purposes.
How The integration works?
Due to the reason that the Elastic Beanstalk environment is dependent on its provisioned resources (i.e. ASG and ELB), it is necessary to keep those intact.
Once Beanstalk integration is configured, Elastigroup takes control on the automatic actions and decisions made regarding instance provisioning, scaling activities and initiate update deployments. The ASG becomes passive and the instances in the Beanstalk environment should be managed exclusively by Elastigroup.
Once an Elastigroup is created with Beanstalk integration, the following procedure takes place:
- Launching Elastigroup instances
- Changing Beanstalk configuration to minimum 0 instances
- Removing Auto Scaling Group scaling policies
- Detaching existing instances
- Suspending Auto Scaling Group Processes:
Maintenance Mode (Rolling Update)
Rolling updates occur when changes are made in settings that require new EC2 instances to be provisioned. This includes changes to the Auto Scaling group configuration such as instance type, key pair settings and changes to VPC. In a rolling update, a blue-green deployment is launched and all the group’s instances are gracefully replaced to apply changes.
Before changing your Elastic Beanstalk configuration, it is crucial to put the Elastigroup in a "Maintenance Mode".
Maintenance mode allows you to perform configuration changes to your infrastructure related resources which require a roll update. This includes the following changes:
It is important to mention that during the Maintenence Mode the service remains available and your instances will still be running!
Once Maintenance is completed and beanstalk configuration changes are made, a blue-green deployment is forced on which the existing instances are replaced with new instances (that contains the new configuration change).
Existing customers who want to add this integration should update their policy to the latest version