Using Spotinst Elastigroup


Kublr is able to use Spotinst Elastigroup instead of regular AWS Auto Scaling Groups.

Spotinst Elastigroup is an application scaling service. Similar to Amazon Elastic Compute Cloud (Amazon EC2) Auto Scaling groups, Spotinst Elastigroup is designed to optimize performance and costs by leveraging Spot Instances combined with On-Demand and Reserved Instances.

Using a combination of automated Spot Instance management and the variety of instance sizes, the Spotinst Elastigroup autoscaler scales according to the task resource requirements, instead of cluster resource thresholds, and achieves over 90% resource utilization while keeping your cluster resources as defragmented as possible.

To use Spotinst Elastigroup:

  1. Deploy Elastigroup into your AWS account (Spotinst account is required).
  2. In Kublr:
  3. Create Spotinst credentials.
  4. For your cluster, select the Enable Spotinst Elastigroup option with this credential.

AWS and Spotinst - Deploying Elastigroup

  1. Log into your AWS account.

  2. To choose the AWS Region where you want to deploy Elastigroup, in the navigation bar, use the region selector.

    Note The Elastigroup for Amazon ECS Quick Start supports up to four Availability Zones, but not all Regions provide four Availability Zones. Refer to the AWS Global Infrastructure webpage to see a list of Regions and Availability Zones.

  3. Create a key pair in your preferred region.

  4. Log into your Spotinst account or sign up to create a new one.

    Spotinst Console - Sign Up

  5. Choose AWS as your cloud provider.

  6. Connect Spotinst to your AWS account by using the AWS CloudFormation template to create an IAM role.

    Connecting Spotinst to AWS Account

  7. To create a Spotinst token, on the top right corner, click your account avatar, then from the menu select My Account. Your Spotinst account page is displayed.

  8. Use the API tab.

  9. Click GENERATE TOKEN. Your token is created, the New Personal Access Token dialog is displayed.

  10. Copy and save the Access Token. You will use it as a parameter in the AWS CloudFormation template.

  11. To locate your Spotinst Account ID, use the Account tab.

  12. Copy and save the Account ID as you will use it as a parameter in the AWS CloudFormation template.

  13. Go back to your AWS account.

  14. Deploy Elastigroup into a new or existing VPC using previously created Spotinst credentials. The following will help:

    • Visit the Spotinst Elastigroup for Amazon ECS on AWS

    • Use the How to deploy tab.

    • Refer to step “Launch the Quick Start” with option of new or existing VPC.

    • Use the full deployment guide (click the button to access) for detais.

      Spotinst Elastigroup for Amazon ECS on AWS

  15. Next step.

Kublr - Creating Spotinst Credentials

To create Spotinst credentials:

  1. In Kublr, on the left menu, click Credentials.

  2. Click ADD CREDENTIALS. The credentials dialog is displayed.

  3. In the dialog, from Credentials Type select “Spotinst Credentials”.

  4. Set:

    • Account ID
    • Access Token
    • Credentials Name

    Kublr - Adding Spotinst Credentials


Kublr - Enabling Spotinst Elastigroup for Cluster

To enable Spotinst Elastigroup for your cluster:

  1. In Kublr, access your AWS cluster ADD/EDIT dialog.

  2. Use the INSTANCES tab.

  3. Use the Master Configuration or a corresponding instance group section.

  4. Expand the Advanced Options.

  5. Select the Enable Spotinst Elastigroup checkbox.

  6. From the Spotinst Account Token list, select previously created Spotinst credentials.

    Kublr - Enabling Spotinst Elastigroup for Cluster

  7. Save the changes.