This repo is a template to build an AWS Ubuntu AMI using Packer, with Ansible used to provision Jenkins.
- Ansible and Packer both need to be installed on your local machine.
- An AWS account with an Access Key for your user. Instructions here.
- A way to authenticate with AWS when running the Packer script, see here. I prefer to use the shared credentials file method.
To create the AMI:
-
Install the required Ansible-Galaxy roles:
ansible-galaxy install -r requirements.yml
-
Run the Packer script:
packer build jenkins.json
Big thanks to Jeff Geerling for providing lots of awesome Ansible scripts. I used his Jenkins role for this project.