We'll use Jenkins EC2 plugin (https://plugins.jenkins.io/ec2) to create agent nodes when needed and destroy them after a period of inactivity. The plugin is already installed. However, we'll need to configure it to use a specific Amazon Machine Image (AMI), so creating one is our first order of business.
Before we proceed, please make sure that the environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_DEFAULT_REGION are set. If you followed the instructions for setting up the cluster with kops, the environment variables are already defined in source cluster/kops.
We'll build the image with Packer (https://www.packer.io/), so please make ...