Spotinst raises $15M Series A Led By Intel Capital and Vertex Ventures Read The Official Press Release

Updated! Beanstalk integration

Spotinst updated Beanstalk integration takes over control on the automatic actions and decision making

Aviv Shukron
Product Manager, Elastigroup

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.

image2

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.

Group Initialization

Once a group is created, the following procedure takes place:

  1. Launching Elastigroup instances
  2. Changing Beanstalk configuration to minimum 0 instances
  3. Removing Auto Scaling Group scaling policies
  4. Detaching existing instances
  5. Suspending Auto Scaling Group Processes:
    • Launch
    • Terminate
    • HealthCheck
    • ReplaceUnhealthy

image4

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

image1

 

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.

image3

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
EC2KeyName
IamInstanceProfile
ImageId
InstanceType
MonitoringInterval
SecurityGroups
SSHSourceRestriction
BlockDeviceMappings
RootVolumeType
RootVolumeSize
RootVolumeIOPS

VPCId
Subnets
ELBSubnets
ELBScheme
DBSubnets
AssociatePublicIpAddress

 

Policy Update

Existing customers who want to add this integration should update their policy to the latest version.

Things to Consider

  1. Beanstalk’s provisioned resources are also managed by the Elastigroup and are automatically modified when needed
  2. 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.
  3. Roll update is made using a blue-green deployment that gracefully replaces your Elastigroup instances, with no service disruption.
  4. Elastigroup integrates Elastic Beanstalk environments as a whole, to clarify, once configured, the integration manages the entire specified Beanstalk environment
  5. Our previous Beanstalk integration is deprecated. Already configured groups will still work using the previous methodology, new groups cannot use the previous integration.
Aviv Shukron
Product Manager, Elastigroup

Stay current

Sign up for our newsletter, and we'll send you the latest updates on Spotinst, tips, tutorials and more cool stuff!