-
Notifications
You must be signed in to change notification settings - Fork 25
Packer: Building AMIs Runbook
Packer is a command line tool created by Hashicorp to build images. Download it, add it to your shell, and run it like any other *nix command. eAPD uses it to take the Gold image provided by CMS and enrich it with the dependencies needed to make the Golden Image an eAPD image. We use Packer to create a Preview AMI, a Staging/Production (Backend) AMI, and Mongo AMIs. Running packer requires 3 files; a Packer definition file (.pkr.hcl), a script (.sh), and a var file (.hcl).
Packer is a command line tool, download it, add it to your shell, and then can run commands like you would *nix commands.
https://learn.hashicorp.com/tutorials/packer/get-started-install-cli
Using a CLI/terminal program navigate to the the "packer" directory in the eAPD GitHub Repo run these commands to build AMIs
Preview AMI
packer build -var-file="/path/to/app-preview.hcl" preview-ami.pkr.hcl
Backend AMI (Staging/Production)
packer build backend-ami.pkr.hcl -var-file="/path/to/backend.hcl" backend-ami.pkr.hcl
Mongo Staging AMI
packer build -var-file="/path/to/mongo-staging.hcl" mongo-ami.pkr.hcl
Mongo Production AMI
packer build -var-file="/path/to/mongo-prod.hcl" mongo-ami.pkr.hcl
Variable values can be found in Keybase in the "infrastructureascode/packer" directory
- Team Working Agreement
- Team composition
- Workflows and processes
- Testing and bug filing
- Accessing eAPD
- Active Documentation:
- Sandbox Environment
- Glossary of acronyms
- APDs 101
- Design iterations archive
- MMIS Budget calculations
- HITECH Budget calculations
- Beyond the APD: From Paper to Pixels
- UX principles
- User research process
- Visual styling
- Content guide
- User research findings
- eAPD pilot findings
- User needs
- Developer info
- Development environment
- Coding Standards
- Development deployment
- Infrastructure Architecture
- Code Architecture
- Tech 101
- Authentication
- APD Auto Saving Process
- Resetting an Environment
- Hardware Software List
- Deploying Staging Production Instances Using Scripts
- Terraform 101 for eAPD
- Provisioning Infrastructure with Terraform
- WebSocket basics
- Operations-and-Support-Index
- Single Branch Deployment Strategy
- Ops and Support Overview
- Service Level AOI
- Incident Response Plan
- On-Call Policy
- Infrastructure Contingency Plan
- Updating CloudFront Security Headers
- Requesting and Installing TLS Certificates