This directory contains Packer files to build Amazon Machine Images (AMI) for the following components in the NGINX ACM demo:
- ACM management
- Devportal
- API gateway
-
Create
variables.pkrvars.hcl
in this directory with the following variablesVariable Description version
Suffix to append to AMI names. If not provided, current timestamp is used instead. region
AWS region in which Packer builds and publishes AMIs nginx_repo_cert_path
Full path to certificate for accessing NGINX repo nginx_repo_key_path
Full path to key for accessing NGINX repo See variables.pkrvars.hcl.example for an example.
-
Build the images with the following commands
packer init acm/ && \ packer build -var-file=variables.pkrvars.hcl acm/ packer init apigw/ && \ packer build -var-file=variables.pkrvars.hcl apigw/ packer init devportal/ && \ packer build -var-file=variables.pkrvars.hcl devportal/
Each command will output the AMI ID for the corresponding ACM component, as below
==> Builds finished. The artifacts of successful builds are: --> nms-apigw-1.0.0.amazon-ebs.ubuntu: AMIs were created: ap-southeast-2: ami-04f4ea46fafd660d3
-
Deploy the NGINX ACM environment with Terraform using the instructions here.