forked from awslabs/amazon-eks-ami
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eks-worker-al2.json
181 lines (181 loc) · 6.12 KB
/
eks-worker-al2.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
{
"variables": {
"aws_region": "us-west-2",
"ami_name": null,
"creator": "{{env `USER`}}",
"encrypted": "false",
"kms_key_id": "",
"aws_access_key_id": "{{env `AWS_ACCESS_KEY_ID`}}",
"aws_secret_access_key": "{{env `AWS_SECRET_ACCESS_KEY`}}",
"aws_session_token": "{{env `AWS_SESSION_TOKEN`}}",
"binary_bucket_name": "amazon-eks",
"binary_bucket_region": "us-west-2",
"kubernetes_version": null,
"kubernetes_build_date": null,
"kernel_version": "",
"docker_version": "19.03.13ce-1.amzn2",
"containerd_version": "1.4.6-2.amzn2",
"runc_version": "1.0.0-1.amzn2",
"cni_plugin_version": "v0.8.6",
"pull_cni_from_github": "true",
"source_ami_id": "",
"source_ami_owners": "137112412989",
"source_ami_filter_name": "amzn2-ami-minimal-hvm-*",
"arch": null,
"instance_type": null,
"ami_description": "EKS Kubernetes Worker AMI with AmazonLinux2 image",
"cleanup_image": "true",
"ssh_interface": "",
"ssh_username": "ec2-user",
"temporary_security_group_source_cidrs": "",
"security_group_id": "",
"associate_public_ip_address": "",
"subnet_id": "",
"remote_folder": "",
"launch_block_device_mappings_volume_size": "4",
"ami_users": "",
"additional_yum_repos": "",
"sonobuoy_e2e_registry": ""
},
"builders": [
{
"type": "amazon-ebs",
"region": "{{user `aws_region`}}",
"source_ami": "{{user `source_ami_id`}}",
"ami_users": "{{user `ami_users`}}",
"snapshot_users": "{{user `ami_users`}}",
"source_ami_filter": {
"filters": {
"name": "{{user `source_ami_filter_name`}}",
"architecture": "{{user `arch`}}",
"root-device-type": "ebs",
"state": "available",
"virtualization-type": "hvm"
},
"owners": [
"{{user `source_ami_owners`}}"
],
"most_recent": true
},
"instance_type": "{{user `instance_type`}}",
"launch_block_device_mappings": [
{
"device_name": "/dev/xvda",
"volume_type": "gp2",
"volume_size": "{{user `launch_block_device_mappings_volume_size`}}",
"delete_on_termination": true
}
],
"ami_block_device_mappings": [
{
"device_name": "/dev/xvda",
"volume_type": "gp2",
"volume_size": 20,
"delete_on_termination": true
}
],
"ssh_username": "{{user `ssh_username`}}",
"ssh_interface": "{{user `ssh_interface`}}",
"temporary_security_group_source_cidrs": "{{user `temporary_security_group_source_cidrs`}}",
"security_group_id": "{{user `security_group_id`}}",
"associate_public_ip_address": "{{user `associate_public_ip_address`}}",
"ssh_pty": true,
"encrypt_boot": "{{user `encrypted`}}",
"kms_key_id": "{{user `kms_key_id`}}",
"run_tags": {
"creator": "{{user `creator`}}"
},
"subnet_id": "{{user `subnet_id`}}",
"tags": {
"Name": "{{user `ami_name`}}",
"created": "{{timestamp}}",
"docker_version": "{{ user `docker_version`}}",
"containerd_version": "{{ user `containerd_version`}}",
"source_ami_id": "{{ user `source_ami_id`}}",
"kubernetes": "{{ user `kubernetes_version`}}/{{ user `kubernetes_build_date` }}/bin/linux/{{ user `arch` }}",
"cni_plugin_version": "{{ user `cni_plugin_version`}}"
},
"ami_name": "{{user `ami_name`}}",
"ami_description": "{{ user `ami_description` }}, (k8s: {{ user `kubernetes_version` }}, docker: {{ user `docker_version` }}, containerd: {{ user `containerd_version` }})"
}
],
"provisioners": [
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"script": "{{template_dir}}/scripts/install_additional_repos.sh",
"environment_vars": [
"ADDITIONAL_YUM_REPOS={{user `additional_yum_repos`}}"
]
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"expect_disconnect": true,
"script": "{{template_dir}}/scripts/upgrade_kernel.sh",
"environment_vars": [
"KUBERNETES_VERSION={{user `kubernetes_version`}}",
"KERNEL_VERSION={{user `kernel_version`}}"
]
},
{
"type": "shell",
"pause_before": "90s",
"remote_folder": "{{ user `remote_folder`}}",
"inline": [
"mkdir -p /tmp/worker/"
]
},
{
"type": "file",
"source": "{{template_dir}}/files/",
"destination": "/tmp/worker/"
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"script": "{{template_dir}}/scripts/install-worker.sh",
"environment_vars": [
"KUBERNETES_VERSION={{user `kubernetes_version`}}",
"KUBERNETES_BUILD_DATE={{user `kubernetes_build_date`}}",
"BINARY_BUCKET_NAME={{user `binary_bucket_name`}}",
"BINARY_BUCKET_REGION={{user `binary_bucket_region`}}",
"DOCKER_VERSION={{user `docker_version`}}",
"CONTAINERD_VERSION={{user `containerd_version`}}",
"RUNC_VERSION={{user `runc_version`}}",
"CNI_PLUGIN_VERSION={{user `cni_plugin_version`}}",
"PULL_CNI_FROM_GITHUB={{user `pull_cni_from_github`}}",
"AWS_ACCESS_KEY_ID={{user `aws_access_key_id`}}",
"AWS_SECRET_ACCESS_KEY={{user `aws_secret_access_key`}}",
"AWS_SESSION_TOKEN={{user `aws_session_token`}}",
"CLEANUP_IMAGE={{user `cleanup_image`}}",
"SONOBUOY_E2E_REGISTRY={{user `sonobuoy_e2e_registry`}}"
]
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"script": "{{template_dir}}/scripts/cleanup_additional_repos.sh",
"environment_vars": [
"ADDITIONAL_YUM_REPOS={{user `additional_yum_repos`}}"
]
},
{
"type": "shell",
"remote_folder": "{{ user `remote_folder`}}",
"script": "{{template_dir}}/scripts/validate.sh"
}
],
"post-processors": [
{
"type": "manifest",
"output": "manifest.json",
"strip_path": true
},
{
"type": "manifest",
"output": "{{user `ami_name`}}-manifest.json",
"strip_path": true
}
]
}