fbpx

Getting Started with Elastigroup on Google Cloud Engine

In this tutorial, you will learn how to create an Elastigroup using Google Cloud Platform as a cloud provider. Once imported, Elastigroup will manage and provision your workload on Preemptible VM’s. With Preemptible VM’s, you can achieve substantial cost savings (up to 80%) without compromising on performance or availability.

Prerequisites:

Step 1: Connect your Google Platform Account

Login to Elastigroup and launch the Cloud Provider Wizard

Follow the instructions on this screen and click Save. Once complete, Elastigroup will attempt to validate your GCP account, establish a connection, and analyze your resources for potential savings.

Step 2: Creating an Elastigroup

Login to the Elastigroup Console and navigate to the Creation Wizard by clicking on the Create button in the Elastigroups tab. Choose Empty Template.

Enter a name and description for this exercise and click Next.

On the General tab, you can configure the deployment strategy.  The Preemptible percentage allows you to choose the percentage of Preemptible VM’s or On-Demand instances to use. For maximum cost savings, it is best to use the default setting.  With Fallback to On-Demand enabled, Elastigroup will switch to On-Demand instances when Preemptible VM’s are not available to ensure that the desired capacity is met.  Some workloads such as databases require more stability and a hybrid group of Preemptible VM’s and On-Demand Instances can be used by lowering the Preemptible percentage to less than 100%.

In the CAPACITY section, you can specify the target and maximum scaling capacity for this exercise. In the image below, you can see that Elastigroup will start deploying 1 instance and can scale up to a maximum of 5 instances as needed. Click Next to proceed.

Now you can configure the Compute settings. Fill out BASIC SETTINGS to choose the appropriate Region, Network, On-Demand Type, and Subnet for your GCP account. The On-Demand Type is used when Elastigroup is using a hybrid of Preemptive VM’s and On-Demand instances. When Preemptive VM’s are not available, Elastigroup will fall back to the specified On-Demand Type.

Scroll down a little bit more and configure the LAUNCH SPECIFICATION. Under Zones, choose as many as possible to widen the cost savings and availability of Preemptive VM’s.  Under PREEMPTIBLE TYPES, choose the appropriate types to use. It is important to select multiple PREEMPTIBLE TYPES and Zones because Elastigroup will have more options to launch replacement instances in the event of a preemption. This will also help Elastigroup choose more cost-efficient instances.

Under the BOOT DISK section, fill in the appropriate Project and Image to use. Please note that for GCE’s global images such as Debian and Ubuntu, you need to fill in the global project.  For example, centos-cloud. For a list of available public image projects, see here.

Scroll down a little bit more and you will see the STARTUP SCRIPT section. This section enables you to customize the instance via shell script to format and mount block devices, install software, etc. Click NEXT to proceed.

Below the STARTUP SCRIPT section is a place for you to specify METADATA and NETWORK TAGS.  METADATA allows you to specify custom data attributes to the instances. NETWORK TAGS are used to create firewall rules and routes for the instances.

Now you should be in the Scaling tab. Here you can set policies on when to scale instances up or down. Adjust accordingly to your needs. Click NEXT to proceed followed by CREATE.

Step 3 – Viewing and Scaling the Elastigroup

Now that the Elastigroup is created, you will now be returned to the Elastigroup page where you can see the number of instances running, costs, and savings.

You will also be able to manage the capacity by increasing the number of Preemptible VM’s. To do this, click on Actions followed by Manage Capacity.

To have Elastigroup spin up more instances, increase the Target and Minimum values and set Maximum to a larger value. Click UPDATE to proceed.

Per the image below, you can see that Elastigroup increased the number of instances.

Look at that savings already!

Congratulations!

You have now learned how to create an Elastigroup using Google Cloud Platform as a cloud provider With that out of the way, running your workloads on Preemptive VM’s will have the following benefits:

  • Cut your costs by up to 80%, while maintaining high availability.
  • Run on Preemptive VM’s with zero overhead, and no servers to manage – The Spotinst Elastigroup platform manages your infrastructure for you.
  • Capacity Management – Simply scale the instances in your environment with Elastigroup to meet the needs of your workloads.

Learn more about using Elastigroup on Google Cloud Platform in our documentation.