The Challenge

In software development, applications commonly go through a lifecycle in isolated environments such as development, testing, and production. A common way to help automate testing and deploying code in each environment is by using CI/CD tools such as Jenkins. With Jenkins, you can have a cluster of machines ready to test and deploy code. The downside is that each environment can consume large amounts of compute infrastructure which can be costly and difficult to manage.

ETAS uses Terraform to deploy their infrastructure Jenkins for their CI/CD Pipeline. Their infrastructure consists of flexible build infrastructure with scalable build agents which get instantiated and sunset on demand. In an effort to simplify scaling their CI/CD infrastructure, ETAS turned to AWS Auto Scaling Groups and found that the auto-scaling mechanisms were difficult to maintain, especially when they tried on their own to use AWS spot instances to reduce their ongoing cloud computing cost.

Why Spot

ETAS was looking for a solution that reduces cost, integrates with Terraform to auto-deploy instances, and could help them simplify the management and scaling of Jenkins environments to improve CI/CD workflows. After evaluating several options, ETAS decided to implement Elastigroup by Spot.

Elastigroup is a service that allows you to deploy and scale EC2 instances reliably and efficiently, maintaining SLA for production and mission-critical applications while saving up to 90% of the compute costs by leveraging spot instances. Elastigroup predicts the behavior, capacity trends, pricing, and interruption rates of EC2 spot instances, and automatically shifts workloads across spot instances, on-demand or reserved capacity as appropriate.

With a simple import from the Spot console, ETAS was able to import existing Auto Scaling Group on AWS and have those workloads run on spot instances and start reducing costs. When spot instances are terminated, Elastigroup will choose the most cost-effective instances available at the time. After using Elastigroup, ETAS ended up saving 50% on their cloud computing costs.

To reduce the costs of deploying machines on AWS with Terraform, ETAS leverage the Spot/Terraform plugin for their development environments. With the Terraform plugin, ETAS was able to deploy their workloads onto spot instances and reduce costs without developers changing their workflows. In addition to reducing costs in their development environment, ETAS was also able to improve ETAS’s CI/CD workflow.

By using the Spot Plugin for Jenkins, ETAS was able to revolutionize its CI/CD workflow with automation. When there are jobs in the Jenkins queue waiting to run, the Spot Plugin will automatically scale up and down instances based on the queue size.  Administrators no longer have to think about adding new nodes to the cluster or how to connect them because they contain a startup script that will automatically connect to the main node. Finally, ETAS was able to reduce its CI/CD costs because the Spot Plugin deploys Jenkins agents on spot instances rather than expensive on-demand instances.

Here is how Elastigroup helped ETAS reduce costs and operate more efficiently:

  • Seamless Integration – With deep support for AWS EC2, Elastigroup was able to easily import ETAS’s existing Elastic Load Balancer configurations.
  • Intelligent Auto-Scaling – Elastigroup provides tailor-made auto-scaling for your application. Metric-based or Event-driven, Elastigroup will always make sure that you have the optimal mix of Right-sized VMs running to meet your workloads needs.
  • Spot Market – Elastigroup reliably leverages the spot instance market to optimize your underlying infrastructure for cost without compromising availability.
  • Always Up – Elastigroup uses predictive algorithms to identify and drain VMs that are about to be preempted. Prior to VM termination, Elastigroup seamlessly launches a new VM and replace it seamlessly. Elastigroup will also make sure to distribute your VMs across different sizes and types to optimize cost reduction and VM longevity.
  • Jenkins Plugin – Elastigroup will automatically scale up and down agent instances on spot instances to reduce costs.
  • Terraform Plugin – Use Elastigroup to provision new instances on AWS EC2 using spot instances to reduce costs compared to on-demand.

 

The Results

In the end, ETAS was able to easily import existing AWS Auto Scaling Groups into Elastigroup to take advantage of spot instances to reduce operating costs by 50%. Using the Elastigroup Terraform plugin, ETAS developers did not need to make any changes to their workflow to start reducing costs while deploying workloads. With the Spot Jenkins Plugin, ETAS was able to improve its CI/CD workflow because it enabled Elastigroup to manage the creation and termination of new Jenkins agent instances. Going further, ETAS is investigating Elastigroup’s integration with Kubernetes and is eager to further leverage Elastigroup in production to reduce costs and operate even more efficiently.

ETAS provides innovative solutions, engineering services, consulting, training, and support for the development of embedded systems for the automotive industry and other sectors of the embedded industry.  Established in 1994, ETAS GmbH is a subsidiary of the Bosch Group, with international subsidiaries and sales offices in 12 countries in Europe, North and South America, and Asia.

https://www.etas.com/en/