mirror of
https://github.com/outbackdingo/ack-image-builder.git
synced 2026-01-27 10:18:13 +00:00
48 lines
1.4 KiB
JSON
48 lines
1.4 KiB
JSON
{
|
|
"variables": {
|
|
"image_name": "ack-optimized_image-1.28-{{timestamp}}",
|
|
"source_image": "aliyun_3_9_x64_20G_alibase_20231219.vhd",
|
|
"instance_type": "ecs.gn6i-c4g1.xlarge",
|
|
"region": "{{env `ALICLOUD_REGION`}}",
|
|
"access_key": "{{env `ALICLOUD_ACCESS_KEY`}}",
|
|
"secret_key": "{{env `ALICLOUD_SECRET_KEY`}}",
|
|
"runtime": "{{env `RUNTIME`}}",
|
|
"skip_secrutiy_fix": "{{env `SKIP_SECURITY_FIX`}}"
|
|
},
|
|
"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`}}",
|
|
"skip_image_validation": "true",
|
|
"io_optimized": "true"
|
|
}
|
|
],
|
|
"provisioners": [
|
|
{
|
|
"type": "file",
|
|
"source": "scripts/ack-optimized-os-all.sh",
|
|
"destination": "/root/"
|
|
},
|
|
{
|
|
"type": "shell",
|
|
"inline": [
|
|
"export RUNTIME={{user `runtime`}}",
|
|
"export SKIP_SECURITY_FIX={{user `skip_secrutiy_fix`}}",
|
|
"export OS_ARCH=amd64",
|
|
"export PRESET_GPU=true",
|
|
"export NVIDIA_DRIVER_VERSION=460.106.00",
|
|
"export KEEP_IMAGE_DATA=true",
|
|
"export KUBE_VERSION=1.28.9-aliyun.1",
|
|
"bash /root/ack-optimized-os-all.sh",
|
|
"ctr -n k8s.io i pull docker.io/library/nginx:1.7.9"
|
|
]
|
|
}
|
|
]
|
|
}
|