Creating an Elastigroup in Azure
This tutorial covers creating an Elastigroup from scratch in Azure.
- Please make sure to connect your Spotinst and Azure accounts. For more on connecting your Azure account to Spotinst please see: Spotinst Azure – Getting started with Elastigroup.
Opening The Creation Wizard
- In the Elastigroups view, select Create to open the Creation Wizard.
Step 1: General Configurations
Import an Existing Elastigroup or Scale Set (Optional)
- The Creation Wizard can optionally import an existing configuration for Elastigroup on Azure or an existing Scale Set group. This is done via the blue import button on the bottom left side.
- Choose a name for the Elastigroup. We recommend using a naming convention based on the specific workload the Elastigroup will manage.
- Select an Azure Region the Elastigroup will run in.
- Target: The number of Low Priority VM’s in your Elastigroup.
- Minimum: In the case of a ‘scale down’ policy action, this is the minimum number of running Low Priority VM’s in the group.The minimum acceptable value is 0.
- Maximum: In the case of a ‘scale up’ policy action, this is the maximum number of running Low Priority VM’s in the group. The minimum acceptable value is 0.
- Select the percentage of Low Priority VMs in the Elastigroup. The remaining percentage will be On-Demand instances.
- Set the Draining Timeout – the amount of time (in seconds) that Elastigroup will take to de-register and drain VMs before termination.
Configure Scheduling Policies (Optional)
- Optionally configure a variety of scheduled scaling activities using Cron Expressions under Scheduling.
- Scheduling is useful when you have anticipated changes in the required capacity, such as scaling down ahead of weekend slowdowns and scaling up ahead of a morning traffic spike.
Step 2: Compute
Product & Resource Group
- Select a Product (OS). Can be either Linux or Windows.
- Elastigroup launches Virtual Machine Scale Sets (VMSS) to manage your Low priority VMs. Select the Resource Group for Elastigroup to launch these VMSS’s into.
- On-Demand Sizes: Select the Regular Priority VMs sizes within the Elastigroup. These are used in the event that no Low-Priority VMs are available in the sizes requested. Make sure the selected VMs are available in the desired Region.
- Select the Low Priority VM sizes to be available for the Elastigroup. Make sure the selected VM size is available in the desired Region.
Select one of the two options:
- Marketplace: Choose one of the Images available in the Azure Marketplace.
- Custom: Choose on of your custom made VM Images.
- Vnet Resource Group: Select the Vnet Resource group you want your Elastigroup Scale Sets to be a part of.
- Virtual Network: Select the specific Virtual Network (VN) for your Elastigroup.
- Subnet ID: Select the specific Subnet inside your VN.
- Assign Public IP: Mark this checkbox for VMs in this Elastigroup to launch with a Public IP.
- User Name: Specify the User you wish to SSH the VM’s with.
- Authentication type: Choose your authentication method: SSH Key/Windows Password:
- The SSH Public Key for the specified User. If Windows is the selected VM product, this will be a password.
Warning: A valid SSH Public Key is required to create an Elastigroup.
Additional Configuration (optional)
- Managed Identity: Select the Managed Identity for your VMSS instances.
- Add Tags
- Configure User Data: User data is useful for launching VMs with all required configurations and software installations. Elastigroup can load user data (a.k.a custom scripts) during the provisioning of VMs.
- Configure a Shutdown Script. This requires an agent to be installed on the instance Learn more.
Load Balancers (optional)
Add one or more Load Balancers. Elastigroup will automatically register new VMs to the configured Load Balancers.
Setup an integration from the list of available integrations:
- HPC Grid Engine. For prerequisites and more info click here. Specify the following details:
- Cluster ID
- Queue Names
Step 3: Scaling
Optionally create up scaling or down scaling Policies for your Elastigroup, based on Azure Monitor metrics.
To create a policy (up scaling or down scaling) perform following steps:
- Click on ‘Add Policy’.
- Set policy name.
- Specify Namespace (default is Microsoft.Compute)
- Set scale based on values: Choose Trigger (Metric Name), Behavior.
- Set Duration to determine amount of tests (and duration between them) to activate the policy.
- Choose the action type:
- Adjustment: will Add instances on up scaling and Remove on down scaling policies. You need to set the amount of instances.
- Set min Target
- Update Capacity: In terms of Target Minimum and Maximum.
- Percentage Adjustment: Add or Remove a percentage of the group active capacity, for Up and Down scaling respectively.
- Cool-down: Wait Period is the time (in seconds) that all scaling activities will be suspended after the scaling policy is triggered.
Step 4: Review
Review your configuration in JSON format in the Review tab. You can edit the JSON directly by switching on “Edit mode”.
To create the Elastigroup click Create.