Skip to content

Cloudformation template for the creation of a Spot Instance Fleet for use with the Jenkins EC2-Fleet plugin.

Notifications You must be signed in to change notification settings

matt0x6F/jenkins-spot-instance-agents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Jenkins Agent Spot Instances

Spot Instances are really powerful for short term jobs that require specific resources which makes them perfect for Jenkins Agents. You can read about Spot Instances here. This Cloudformation template was designed for use with the Jenkins EC2-Fleet plugin.

On my Agents I enforce builds to occur in docker so that I don't need snowflake dedicated resources. In order to accomplish this I have the following requirements:

  • Git
  • Docker
  • Java 1.8.0

Considerations

I've parameterized most of the settings, though you might want to edit which instances are used (Line 159).

Weights

I set the weight of each Launch Configuration to 1 because each instance I've selected is around an on-demand cost of $.1/hr and have fairly similar resources, the spot instance price at the time of this writing is $.033/hr. I have 20 instances I need in total, so each gets a weight of 1.

Subnets

Spot instance availability is per region, per AZ. All my instances in the example are in AZ A, but you should vary them both by AZ and instance type.

About

Cloudformation template for the creation of a Spot Instance Fleet for use with the Jenkins EC2-Fleet plugin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages