Deployments to AWS
With just the bare images and no virtual machines to run them on, our previous Packer work has not gotten us yet fully into an automated working state. To really get there, we will now need to tie everything together with more Ansible glue to complete the deployment. The encapsulation hierarchy of the different stages should conceptually look something like this:
As you can see from the diagram, we will take a layered approach to deployments:
- In the innermost level, we have the Ansible scripts to take a bare machine, VM, or an AMI to the configuration state we want it to be in.
- Packer encapsulates that process and produces static AMI images that are further usable on Amazon EC2 cloud offerings.
- Ansible then finally encapsulates everything mentioned previously by deploying machines with those static, Packer-created images.
The road to automated infrastructure deployment
Now that we know what we want, how can we do it? Luckily for us, as hinted in the previous list, Ansible can...