packer-cn/examples/ucloud/basic.json

34 lines
886 B
JSON
Raw Normal View History

2019-06-13 03:16:49 -04:00
{
"variables": {
"ucloud_public_key": "{{env `UCLOUD_PUBLIC_KEY`}}",
"ucloud_private_key": "{{env `UCLOUD_PRIVATE_KEY`}}",
"ucloud_project_id": "{{env `UCLOUD_PROJECT_ID`}}"
},
"builders": [{
"type": "ucloud-uhost",
"public_key":"{{user `ucloud_public_key`}}",
"private_key":"{{user `ucloud_private_key`}}",
"project_id": "{{user `ucloud_project_id`}}",
"region": "cn-bj2",
"availability_zone": "cn-bj2-02",
"instance_type": "n-basic-2",
"source_image_id":"uimage-f1chxn",
"ssh_username":"root",
2019-06-18 05:54:07 -04:00
"image_name": "packer-test-basic-bj",
2019-06-13 03:16:49 -04:00
"image_copy_to_mappings": [{
2019-06-18 05:54:07 -04:00
"project_id": "{{user `ucloud_project_id`}}",
2019-06-13 03:16:49 -04:00
"region": "cn-sh2",
2019-06-18 05:54:07 -04:00
"description": "test",
"name": "packer-test-basic-sh"
2019-06-13 03:16:49 -04:00
}]
}],
"provisioners": [{
"type": "shell",
"inline": [
2019-06-18 05:54:07 -04:00
"yum install -y mysql"
2019-06-13 03:16:49 -04:00
]
}]
}