packer.io 配置文件api-server.json:
{
"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-bf5021d6",
"instance_type": "t1.micro",
"ssh_username": "root",
"ami_name": "api-server-centos-{ {timestamp}}"
}],
"provisioners": [
{
"type": "shell",
"inline": [
"sleep 10",
"rpm -Uvh http://down