fbpx

Deploying/Rolling An Elastigroup

This tutorial covers executing a Blue/Green deployment for an Elastigroup. Deployments can be performed from the Spotinst Console by selecting Deploy under the Actions menu in the Management view of the desired Elastigroup.

Using the Deploy option you are able to initiate a Deployment or review previous Deployments.

To start a new Deployment simply click the “Deploy” button

When a deployment process is running, no update can be applied to the group (i.e – capacity update).

You can now set the deployment parameters:

Batch Size – The size of each Batch in the deployment as a percentage of the total number of instances in the group, meaning a group with 20% will have 5 separate batches.

Grace Period – The limit of time to wait for an instance to be deemed healthy according to the health check setting before the deployment starts the next batch.

Please note: If there is no “Health check” setting set in the Elastigroup, each batch will wait for entire grace period to end.

This will trigger a Blue/Green deployment. Elastigroup spins up new instances (green) into your cluster, and monitors their status using the configured “health check” (EC2, ELB, MLB etc..). Once the instances are registered as healthy the old instances (Blue) will be scaled down. This process is split into configurable portions each representing a Batch.

 

 

When can a roll be failed? 

1. A problematic version of your application (new AMI, or codebase).
2. The Roll grace period was too short.
3. A blue-green deployment will fail if more than 50% of the instances in a specific batch are unhealthy after the grace period.
Please note that your Elastigroup won’t perform new rolls or any scale down activities until the failed roll will be completely stopped or resolved.
When Should I roll my Group? 

A roll is required once the update may affect the instance configuration, specifically, while modifying the following parameters:

General Tab

Advanced: 

* Cluster orientation

* Strategy (Spot Instances Percentage, OnDemandCount, utilizeReservedInstances)

Compute Tab: 

Availability Zones

On-Demand Type

Spot Types 

Launch Specification (Image, Security group, key pair, tags)

Additional Configurations:

* IAM role

* EbsOptimized

* Detailed monitoring

* Public IP

* Tenancy

* User Data

* Signal and Signal timeout

Stateful:

* Assign specific Private IPs only

 Please note:

* One failed batch is enough to fail the deployment! Make sure you provide ample “Grace Period” for the instances to become healthy.

* Your Elastigroup won’t perform new rolls or any scale down activities until the failed roll will be completely stopped or resolved.

* Scaling behaviour – The scaling down policy will be suspended until the deployment is finished, We have created this mechanism to allow you scaling up in case needed and avoid losing servers at the same time.