Packer Operations

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Build an Amazon EC2 AMI

Credentials

Amazon credentials can be provided in the template (not recommended) or as environment variables in the context packer is executed:

export AWS_ACCESS_KEY_ID="anaccesskey"
$ export AWS_SECRET_ACCESS_KEY="asecretkey"
$ export AWS_DEFAULT_REGION="us-west-2"

or in ~/.aws/credentials file. To specify a specific profile in the file, set "AWS_PROFILE" environment variable or use insert this in the template, in the corresponding builder block:

{
  "profile": "customprofile",
  ...
}

then

packer build ...

Build

packer build <template-name>.json

Debug

-debug