This tutorial covers how to create a stateful elastigroup using the Stateful Creation Wizard, that is able to persist Volumes, Elastic IPs, Private IPs and more, across spot interruptions. Using Stateful Elastigrops, allows you to run a variety of stateful workloads using managed and SLA driven Spot Instances.
First, we’ll start by creating a new Elastigroup, selecting ‘Stateful’ under the Use Cases tab.
Step 1: General Settings
- Enter a Name for your Elastigroup and select a Region.
- Set the initial capacity for your group.
You can choose to measure capacity either in number of instances or via a total count of vCPUs
- Select your desired VPC to run your Elastigroup in, as well as the Product type and the Image you wish all instances to be instantiated from.
- Select the security groups to be attached to the instances and the key-pairs associated with them.
- Lastly, you can optionally choose to add tags to your stateful group’s instances.
Step 2: Instance Type
- Select the On-Demand instance type you would like to be used in case there aren’t any spot instances found for your instance type.
- Select the Availability Zones you’d like Elastigroup to consider when launching your instances. To maximize your savings Elastigroup calculates the cost of launching Spot instances in the selected Availability Zones. We recommend selecting multiple Availability Zones to increase the number of Spot instance markets available for Elastigroup to consider.
- Select the instance types you would like Elastigroup to consider when launching your spot instances. We recommend selecting multiple instance types to provide Elastigroup with as many Spot instance market options as possible.
Step 3: Persistence
In this step, you are required to choose which type of persistence you would like your elastigroup to maintain.
Choose whether you would like elastigroup to persist your instance root volume or data volumes, upon interruption.
You can also pick the type of method in which data volumes are maintained, connected, and backed up.
Choose whether you would like elastigroup to persist network settings, such as Instance private IPs.
Step 4: Instance Details
- Select launched instance details, like IAM role, tenancy, whether to apply detailed monitoring EBS optimization or EC2 Autohealing.
- Fill in any userdata or shutdown scripts you would like to run upon instance starting or terminating.
Step 5: Scaling policies (Optional)
Optionally create a Target Scaling Policy or a Simple Scaling Policy. For more on Scaling with Elastigroup see the documentation here.
Step 6: Review (Optional)
You can now review your Elastigroup configuration, and finish the creation process.