{ "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", "source_image":"ubuntu_14_0405_64_20G_alibase_20170824.vhd", "ssh_username":"root", "instance_type":"ecs.n1.medium", "io_optimized":"true", "image_force_delete":"true", "internet_charge_type":"PayByTraffic", "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" ] }] }