Skip to content

Latest commit

 

History

History

packer

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Building AMIs

This directory contains Packer files to build Amazon Machine Images (AMI) for the following components in the NGINX ACM demo:

  1. ACM management
  2. Devportal
  3. API gateway

Prerequisites

Instructions

  1. Create variables.pkrvars.hcl in this directory with the following variables

    Variable 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.

  2. 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
  3. Deploy the NGINX ACM environment with Terraform using the instructions here.