Before we start presenting content on the different use cases for EC2 Spot instances through the lens of CI/CD workloads, you’ll need to prepare the AWS account that you’ve come to this workshop with. Specifically, this workshop involves working with a large number of AWS resources as well as a deployment of Jenkins that if manually configured, would leave you little time to discover how to use EC2 Spot instances in the most effective manner. To address that, you will deploy an Amazon CloudFormation template that does a lot of the heavy lifting of provisioning these resources for you.
You will need to access the SSH interfaces of some Linux EC2 instances created in this workshop. To do so in a secure manner, please create a new EC2 key pair with a name of Spot CICD Workshop Key Pair in the EU (Ireland) region (all activities for this workshop will be carried out in this region).
So that you can concentrate on the aspects of this workshop that directly relate to Amazon EC2 Spot instances, there is a CloudFormation template that will deploy the base AWS infrastructure needed for all of the labs within the workshop - saving you from having to create things like VPCs, Security Groups, IAM policies and so forth.
Download and deploy the CloudFormation template: amazon-ec2-spot-cicd-workshop.yaml
Be sure to give it a stack name of SpotCICDWorkshop and ensure that you supply appropriate parameters when prompted.
It’s good security practice to ensure that the web and SSH services being used in this workshop are not accessible to everyone on the Internet. In most cases, limiting access to the /24 CIDR block that you IP address is in provides a reasonable level of access control - but this may still be too restrictive in some corporate IT environments. If you have trouble accessing resources, additional instructions within this lab guide will guide you through what settings need to be manually changed. ↩︎
The stack should take around five minutes to deploy.
Once the CloudFormation is in the process of being deployed, you’ve completed all of the preparation required to start the workshop, you may proceed with Lab 1.