Packer templates to create cloud images.
- Packer >= 1.7.0
Clone the repository:
$ git clone https://github.com/flaudisio/bootcamp-packer-templates.git
$ cd packer-templates/
Choose a template and set credentials according to its builders:
$ cd templates/ubuntu-base/
$ export AWS_ACCESS_KEY_ID=<ACCESS_KEY>
$ export AWS_SECRET_ACCESS_KEY=<SECRET_KEY>
Validate and build the images:
$ packer init .
$ packer validate .
$ packer build .
If applicable, use -only
to build specific images:
$ packer build -only amazon-ebs.amd64 .
-
Packer manifest filenames end with
.pkr.hcl
-
Templates are organized using the following files:
versions.pkr.hcl
: required Packer version and plugins (if applicable)variables.pkr.hcl
: template variablesbuild.pkr.hcl
: locals, data sources, sources and builds