add hotfix

Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
This commit is contained in:
haoshuwei
2020-02-14 18:30:53 +08:00
parent 31e45bf478
commit 94738ea7a5
8 changed files with 59 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.idea

View File

@@ -2,7 +2,7 @@
"variables": {
"region": "cn-hangzhou",
"image_name": "test_image{{timestamp}}",
"source_image": "centos_7_06_64_20G_alibase_20190711.vhd",
"source_image": "centos_7_06_64_20G_alibase_20190619.vhd",
"instance_type": "ecs.g6.large",
"access_key": "{{env `ALICLOUD_ACCESS_KEY`}}",
"secret_key": "{{env `ALICLOUD_SECRET_KEY`}}"
@@ -17,6 +17,7 @@
"source_image": "{{user `source_image`}}",
"ssh_username": "root",
"instance_type": "{{user `instance_type`}}",
"skip_image_validation": "true",
"io_optimized": "true"
}
],

View File

@@ -2,7 +2,7 @@
"variables": {
"region": "cn-hangzhou",
"image_name": "test_image{{timestamp}}",
"source_image": "centos_7_06_64_20G_alibase_20190711.vhd",
"source_image": "centos_7_06_64_20G_alibase_20190619.vhd",
"instance_type": "ecs.g6.large",
"vpc_id": "vpc-xxxxxx",
"vswitch_id": "vsw-xxxxxx",
@@ -21,6 +21,7 @@
"instance_type": "{{user `instance_type`}}",
"vpc_id": "{{user `vpc_id`}}",
"vswitch_id": "{{user `vswitch_id`}}",
"skip_image_validation": "true",
"io_optimized": "true"
}
],

View File

@@ -2,7 +2,7 @@
"variables": {
"region": "cn-hangzhou",
"image_name": "test_image{{timestamp}}",
"source_image": "centos_7_06_64_20G_alibase_20190711.vhd",
"source_image": "centos_7_06_64_20G_alibase_20190619.vhd",
"instance_type": "ecs.g6.large",
"access_key": "{{env `ALICLOUD_ACCESS_KEY`}}",
"secret_key": "{{env `ALICLOUD_SECRET_KEY`}}"
@@ -17,6 +17,7 @@
"source_image": "{{user `source_image`}}",
"ssh_username": "root",
"instance_type": "{{user `instance_type`}}",
"skip_image_validation": "true",
"io_optimized": "true"
}
],

View File

@@ -0,0 +1,8 @@
This is the template for ack base image to fix issue [#19](https://github.com/AliyunContainerService/ack-image-builder/issues/19)
Commands to build image:
```
export ALICLOUD_ACCESS_KEY=XXX
export ALICLOUD_SECRET_KEY=XXX
packer build ack-centos-issue-19.json
```

View File

@@ -0,0 +1,34 @@
{
"variables": {
"region": "cn-hangzhou",
"image_name": "test_image{{timestamp}}",
"source_image": "centos_7_06_64_20G_alibase_20190619.vhd",
"instance_type": "ecs.g6.large",
"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`}}",
"skip_image_validation": "true",
"io_optimized": "true"
}
],
"provisioners": [
{
"type": "shell",
"scripts": [
"scripts/updateSystemd.sh",
"scripts/updateContainerd.sh"
],
"expect_disconnect": true
}
]
}

View File

@@ -0,0 +1,7 @@
#!/bin/bash
curl -LO https://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/daemon-build/centos/containerd.io-1.2.10-3.2.el7.x86_64.rpm containerd.io-1.2.10-3.2.el7.x86_64.rpm
yum localinstall -y containerd.io-1.2.10-3.2.el7.x86_64.rpm
rm -rf containerd.io-1.2.10-3.2.el7.x86_64.rpm

View File

@@ -0,0 +1,3 @@
#!/bin/bash
yum install -y systemd-219-67.el7_7.3.x86_64