Created
June 15, 2014 19:26
-
-
Save rdhyee/bcf051fb626b377d294d to your computer and use it in GitHub Desktop.
A configuration files for creating a lightly modified AMI for ubuntu 12.04LTS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to get my credentials in place --> to create env vars with my key/secret | |
source ~/ry_aws.sh | |
packer build \ | |
-var aws_access_key=$AWS_ACCESS_KEY \ | |
-var aws_secret_key=$AWS_SECRET_KEY \ | |
packer_example_aws.json | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"aws_access_key": "", | |
"aws_secret_key": "" | |
}, | |
"builders": [{ | |
"type": "amazon-ebs", | |
"access_key": "{{user `aws_access_key`}}", | |
"secret_key": "{{user `aws_secret_key`}}", | |
"region": "us-east-1", | |
"source_ami": "ami-de0d9eb7", | |
"instance_type": "t1.micro", | |
"ssh_username": "ubuntu", | |
"ami_name": "packer-example {{timestamp}}" | |
}], | |
"provisioners": [{ | |
"type": "shell", | |
"inline": [ | |
"sleep 30", | |
"sudo apt-get update", | |
"sudo apt-get install -y redis-server" | |
] | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment