The vfarcic/cloud-provisioning (https://github.com/vfarcic/cloud-provisioning) repository already has the Packer and Terraform configurations we'll use. They are located in the terraform/aws directory:
cd terraform/aws
The first step is to use Packer to create an Amazon Machine Image (AMI). To do that, we'll need AWS access keys set as environment variables. They will be the same as those you already created in this chapter. Feel free to skip the next set of commands if you still have the same terminal session open:
export AWS_ACCESS_KEY_ID=[...]export AWS_SECRET_ACCESS_KEY=[...]export AWS_DEFAULT_REGION=us-east-1
Please replace [...] with the actual values.
We'll instantiate all Swarm nodes ...