In March 2016, we have released our initial Elastic Beanstalk integration with our Elastigroup product which allowed our customers to save 80% on their Beanstalk environments.
Since then a lot has changed, both in Elastigroup and in Beanstalk, that’s why we are happy to announce our upgraded integration with Amazon Elastic Beanstalk.
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, it is necessary to keep those intact.
Once Beanstalk integration is turned on, Elastigroup takes over control on the automatic actions and decision making regarding instance provisioning, scaling and rolling updated. The Amazon AutoScaling Group becomes passive and the resources should from this point be managed through Elastigroup.
Once a group is created, 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)
When a configuration change (That requires roll update) needs to be made, The Elastigroup must first enter Maintenance mode.
Maintenance mode allows you to perform configuration changes to infrastructure related resources which require a rolling update. This includes changing the instance type, image, block device mappings, security groups and VPCs.
While in Maintenance mode:
- Your service remains available and your instances will still be running
- Your ASG will be drained from instances
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.
What are Rolling Updates?
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 an instance type, key pair settings and changes to VPC settings. In a rolling update, a blue-green deployment is launched and all the group’s instances are gracefully replaced to apply changes.
A complete list of attributes changes that require roll update:
|Namespace: aws:autoscaling:launchconfiguration||Namespace: aws:ec2:vpc|
Existing customers who want to add this integration should update their policy to the latest version.
Things to Consider
- Beanstalk’s provisioned resources are also managed by the Elastigroup and are automatically modified when needed
- Following the previous note, When in maintenance mode or at initialization, you may see that your ASG is running 0 instances or in error state, but no worries – your service remains available during this time period.
- Roll update is made using a blue-green deployment that gracefully replaces your Elastigroup instances, with no service disruption.
- Elastigroup integrates Elastic Beanstalk environments as a whole, to clarify, once configured, the integration manages the entire specified Beanstalk environment
- Our previous Beanstalk integration is deprecated. Already configured groups will still work using the previous methodology, new groups cannot use the previous integration.