Save up to 90% on Spinnaker-deployed applications costs using Spot’s Elastigroup integration

Spinnaker is an open source multi-cloud continuous delivery platform for releasing software changes with high velocity and confidence. It is a leading CI/CD tool and provides core feature sets for cluster and deployment management. Created by Netflix and Google, it combines a powerful and flexible pipeline management system with integrations to the major cloud providers.

As Spinnaker developed new features and integrations, many of Spot by NetApp customers adopted it as part of their DevOps stack. Enabling these customers to use Spinnaker with Elastigroup helps them to build fast, reliable delivery and deployment processes on top of optimized, automated cloud infrastructure. 

How does Spinnaker work?

For application management, Spinnaker users can manage their resources inside of an object called a server group. A server group can be an autoscaling group (ASG) in AWS EC2; it can also be an Elastigroup run by Spot. Server groups are a key concept of Spinnaker, and make up clusters for applications. Applications can contain any number of server groups, which users can manage together, associate to the same load balancer, create and build pipelines and configure resource settings. Resources can be managed manually with capabilities to resize server groups, terminate individual instances, create new server groups, load balancer, security groups, and more.

Within the application, users can automatically build, test, and deploy their code into different environments, including production. Spinnaker will automatically deploy code through pipelines made up of stages set by the user, while allowing for more control with the option of manual judgement. 

How does Spinnaker work with Elastigroup?

Resources inside a server group can be managed with Spinnaker, and when it is integrated with Elastigroup, users can extend their infrastructure management capabilities even further. Elastigroup is an infrastructure scaling service that is designed to optimize performance and costs by leveraging spot instances reliably, while also efficiently using on demand and reserved instances. With Elastigroup, users can run even production environments on spot instances with guaranteed availability and up to 90% cost savings. 

When integrated with Spinnaker, Spot acts as the cloud provider, and Elastigroups represent server groups, which contain sets of instances that have the same launch configurations. Elastigroup uses predictive rebalancing algorithms and machine learning models to predict spot instance interruptions in advance, gracefully draining at-risk instances and migrating them to new instances to avoid disruption and maintain required capacity. Elastigroup models both the resource needs and cloud capacity, demand and pricing by instance type, size, OS and location. In the case that spot instances are not available, Elastigroup can be configured to fallback to on demand instances, and even launch reserved instances, to ensure complete reliability. When spot instances are once again available, Elastigroup can automatically replace on demand instances with the right spot instance to continuously optimize costs. 

Saving with Elastigroup by leveraging spot instances

Spot instances give organizations a way to use compute resources at a lower cost if they can manage and mitigate the risk of termination. With Elastigroup, users have a worry-free way to leverage spot instances, even in production, and lower their cloud bill significantly. Take this example: 

As of July 2021, the price of an m5.12xlarge instance is 2.304$ per hour. Running ten of these instances as on demand for a year would cost $201,830. In contrast, if users were managing this server group through Spot’s Elastigroup, and using spot instances instead, they could save over $120,000/year. For organizations running hundreds or thousands of instances, the savings is exponential. 

Create your first pipeline in Spinnaker with Spot

Follow the detailed steps in this documentation in order to install Spot.io as your cloud provider with Spinnaker.

After you create and connect your Spot account to Spinnaker, you can now have a view of the server groups (Elastigroups) in the application section and start creating pipelines.

In the left toolbar, select “PIPELINES”, then in the top-right corner, select “Create”

Add a new stage from type “Create Server Group”

Paste the new Elastigroup’s JSON you want to create in the “Payload” section.

Below you can find a JSON example for an Elastigroup with these attributes:

  1. 10 running instances at all time (minimum/maximum/target = 10).
  2. Launch only Spot instances, if possible (risk = 100).
  3. If Elastigroup doesn’t find available instances in the restricted AZs – launch On-Demand instances instead (fallbackToOd = true).
  4. Utilize commitment plans if there are any, Reserved instances and Savings Plans (utilizeCommitments = true).
  5. If Elastigroup launched non-Spot instances because of availability reasons – try to replace the instances back to Spot instances at any time (revertToSpot → performant = always)
  6. Launch general purpose compute instances from type m5.8xlarge or m5.12xlarge (instanceTypes)
  7. Always try to launch m5.12xlarge first (preferredSpot).
{
  "group": {
    "name": "test1-dev-v1",
    "strategy": {
      "risk": 100,
      "onDemandCount": null,
      "availabilityVsCost": "balanced",
      "drainingTimeout": 120,
      "utilizeReservedInstances": true,
      "fallbackToOd": true,
      "scalingStrategy": {},
      "minimumInstanceLifetime": 1,
      "persistence": {},
      "revertToSpot": {
        "performAt": "always",
        "timeWindows": null
      }
,
      "utilizeCommitments": true
    },
    "capacity": {
      "target": 10,
      "minimum": 10,
      "maximum": 10,
      "unit": "instance"
    },
    "scaling": {
      "up": null,
      "down": null
    },
    "compute": {
      "instanceTypes": {
        "ondemand": "m5.8xlarge",
        "spot": [
          "m5.8xlarge",
          "m5.12xlarge"
        ],
        "preferredSpot": [
          "m5.12xlarge"
        ]
      },
      "availabilityZones": [
        {
          "name": "us-west-2a",
          "subnetIds": [
            "subnet-2e2e2465"
          ]
        },
        {
          "name": "us-west-2b",
          "subnetIds": [
            "subnet-db7990a3"
          ]
        },
        {
          "name": "us-west-2c",
          "subnetIds": [
            "subnet-ed8f74b0"
          ]
        }
      ],
      "product": "Linux/UNIX",
      "preferredAvailabilityZones": [
        "us-west-2a"
      ],
      "launchSpecification": {
        "loadBalancersConfig": {
          "loadBalancers": [
            {
              "name": "my-targets",
              "type": "TARGET_GROUP",
              "arn": "arn:aws:elasticloadbalancing:us-west-2:466285426045:targetgroup/my-targets/e5bc214c9c47ec6c"
            }
          ]
        },
        "securityGroupIds": [
          "sg-aa9046f2"
        ],
        "monitoring": false,
        "ebsOptimized": false,
        "imageId": "ami-082b5a644766e0e6f",
        "keyPair": null,
        "tags": [
          {
            "tagKey": "Environment",
            "tagValue": "dev"
          }
        ],
        "healthCheckType": null,
        "tenancy": "default",
        "userData": null,
        "shutdownScript": null
      },
      "elasticIps": null
    },
    "multai": null,
    "scheduling": {},
    "thirdPartiesIntegration": {}
  }
}

In this example, an Elastigroup consists of ten standard instances, used for general purpose. 

Click “Create” for a new pipeline or you can add as many stages to your pipeline as it needs, in any order that makes sense for you.

To start using Elastigroup with Spinnaker, follow the steps in our documentation. To learn more about what Elastigroup can do for your cloud infrastructure, visit https://spot.io/products/elastigroup/