This Packer configuration builds on top of the Ubuntu 22.04 (Jammy) image from Canonical and includes the following HashiCorp software.
- Vault Enterprise
- Consul Enterprise
- Nomad Enterprise
- Terraform
- Packer
- Consul-Template
- envconsul
- Boundary
- Waypoint
It also includes:
The resulting image provides the foundation for you to run one or some of these tools.
This Packer configuration is written in HCL and has been tested on Packer 1.8.2.
Set your AWS access credentials (AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
environment variables). These credentials should have the ability to create machine images.
variables.pkr.hcl contains the variables needed for our Packer run. Each has a sane default with the exception of owner
. You can override the default by passing it via the -var
command line argument or via a .pkrvars.hcl
file. Please see the Packer documentation on Input Variables for more information.
amazon-ebs.pkr.hcl contains the code for building an Amazon Machine Image (AMI) on AWS. This is the only machine image that this repository currently builds.
builders.pkr.hcl contains the builds and provisioner definitions. If you wanted to use the Open Source Vault and Consul binaries, or add or remove any resources from the image build, you could do so by modifying this file.
Adjust tags in amazon-ebs.pkr.hcl to suit your organization. The tags relate to variables defined in variables-tags.pkr.hcl. You may remove or modify that file if the tags and corresponding variables defined do not apply to your organization.
To create a machine image, run packer from the top level directory of this repository:
packer build -var-file 'owner="<packer variables file>"' .
For example:
packer build -var-file=yash.pkrvars.hcl .