2017-03-03 03:56:17 -05:00
|
|
|
{
|
|
|
|
"variables": {
|
|
|
|
"access_key": "{{env `ALICLOUD_ACCESS_KEY`}}",
|
|
|
|
"secret_key": "{{env `ALICLOUD_SECRET_KEY`}}"
|
|
|
|
},
|
|
|
|
"builders": [{
|
|
|
|
"type":"alicloud-ecs",
|
|
|
|
"access_key":"{{user `access_key`}}",
|
|
|
|
"secret_key":"{{user `secret_key`}}",
|
|
|
|
"region":"cn-beijing",
|
|
|
|
"image_name":"packer_chef2",
|
2017-07-19 23:13:59 -04:00
|
|
|
"source_image":"ubuntu_14_0405_64_40G_alibase_20170625.vhd",
|
2017-03-03 03:56:17 -05:00
|
|
|
"ssh_username":"root",
|
|
|
|
"instance_type":"ecs.n1.medium",
|
|
|
|
"io_optimized":"true",
|
|
|
|
"image_force_delete":"true",
|
2017-08-03 21:56:04 -04:00
|
|
|
"internet_charge_type":"PayByTraffic",
|
2017-03-03 03:56:17 -05:00
|
|
|
"ssh_password":"Test1234",
|
|
|
|
"user_data_file":"examples/alicloud/chef/user_data.sh"
|
|
|
|
}],
|
|
|
|
"provisioners": [{
|
|
|
|
"type": "file",
|
|
|
|
"source": "examples/alicloud/chef/chef.sh",
|
|
|
|
"destination": "/root/"
|
|
|
|
},{
|
|
|
|
"type": "shell",
|
|
|
|
"inline": [
|
|
|
|
"cd /root/",
|
|
|
|
"chmod 755 chef.sh",
|
|
|
|
"./chef.sh",
|
|
|
|
"chef-server-ctl reconfigure"
|
|
|
|
]
|
|
|
|
}]
|
|
|
|
}
|