33 lines
835 B
JSON
33 lines
835 B
JSON
|
{
|
||
|
"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",
|
||
|
"image_name": "packer-test-regionCopy-bj",
|
||
|
"image_copy_to_mappings": [{
|
||
|
"project_id": "org-fthbzm",
|
||
|
"region": "cn-sh2",
|
||
|
"description": "test"
|
||
|
}]
|
||
|
}],
|
||
|
"provisioners": [{
|
||
|
"type": "shell",
|
||
|
"inline": [
|
||
|
"yum install mysql -y"
|
||
|
]
|
||
|
}]
|
||
|
}
|
||
|
|