add examples
This commit is contained in:
parent
022b559c2f
commit
04ad86a31a
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"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-irofn4",
|
||||
"ssh_username":"ubuntu",
|
||||
"image_name": "packer-test-ubuntu-bj"
|
||||
}],
|
||||
"provisioners": [{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"sudo visudo",
|
||||
"ubuntu ALL = NOPASSWD: /usr/local/sbin/apt-get",
|
||||
"sudo apt-get update",
|
||||
"sudo apt-get install -y mysql"
|
||||
]
|
||||
}]
|
||||
}
|
Loading…
Reference in New Issue