mirror of
https://github.com/outbackdingo/ack-image-builder.git
synced 2026-01-27 18:18:10 +00:00
42 lines
1.1 KiB
JSON
42 lines
1.1 KiB
JSON
{
|
|
"variables": {
|
|
"region": "cn-hangzhou",
|
|
"image_name": "test_image{{timestamp}}",
|
|
"source_image": "centos_7_06_64_20G_alibase_20190619.vhd",
|
|
"instance_type": "ecs.g6.large",
|
|
"vpc_id": "vpc-xxxxxx",
|
|
"vswitch_id": "vsw-xxxxxx",
|
|
"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": "{{user `region`}}",
|
|
"image_name": "{{user `image_name`}}",
|
|
"source_image": "{{user `source_image`}}",
|
|
"ssh_username": "root",
|
|
"instance_type": "{{user `instance_type`}}",
|
|
"vpc_id": "{{user `vpc_id`}}",
|
|
"vswitch_id": "{{user `vswitch_id`}}",
|
|
"skip_image_validation": "true",
|
|
"io_optimized": "true"
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"type": "shell",
|
|
"scripts": [
|
|
"scripts/updateKernel.sh",
|
|
"scripts/reboot.sh",
|
|
"scripts/cleanUpKerneles.sh",
|
|
"config/default.sh",
|
|
"scripts/verify.sh"
|
|
],
|
|
"expect_disconnect": true
|
|
}
|
|
]
|
|
}
|