This repository contains configurations for building machine images using Packer.
The following softwares must be present on your local system before you can use Packer to build the Vagrant box file:
This will also require some Ansible roles installed so they can be used in the building of the VM. To install the Anisble Roles:
- Run following command in to this directory to install the roles:
`$ ansible-galaxy install -r requirements.txt`
- Provisioning directory contains
playbook.yml
which is the main file for ansible to provision the server with required packages and it has defined default variables to use for that roles which resides in/provisioning/vars/main.yml
If you don't have Ansible installed (or you're using a Windows PC?), you can simply clone the required Ansible roles from GitHub directly (use Ansible Galaxy to get the GitHub repository URLs for each role listed in requirements.txt
), and update the source
to match the location of the cloned roles.
Make sure all the required software (listed above) is installed, then cd to the directory containing this README.md file, and run:
$ packer build demo.json
After a few minutes, Packer should tell you the box was generated successfully.