Skip to content

Instantly share code, notes, and snippets.

@maraca
Created March 6, 2014 19:59
Show Gist options
  • Save maraca/9398172 to your computer and use it in GitHub Desktop.
Save maraca/9398172 to your computer and use it in GitHub Desktop.
Builds a packer AMI.
#!/bin/bash
rm -r vendor
bundle exec berks install --path vendor/cookbooks
packer build \
-var "account_id=$AWS_ACCOUNT_ID" \
-var "aws_access_key_id=$AWS_ACCESS_KEY_ID" \
-var "aws_secret_key=$AWS_SECRET_ACCESS_KEY" \
-var "x509_cert_path=$AWS_X509_CERT_PATH" \
-var "x509_key_path=$AWS_X509_KEY_PATH" \
-var "s3_bucket=packer-ami-bucket" \
-only=amazon-instance packer.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment