forked from aws-samples/amazon-eks-custom-amis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
183 lines (132 loc) · 7.19 KB
/
Makefile
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
182
183
PACKER_VARIABLES := binary_bucket_name binary_bucket_region eks_version eks_build_date cni_plugin_version root_volume_size data_volume_size hardening_flag http_proxy https_proxy no_proxy
VPC_ID := vpc-0e8cf1ce122b1b059
SUBNET_ID := subnet-0eddf1d7d0f9f9772
AWS_REGION := us-east-2
PACKER_FILE :=
EKS_BUILD_DATE := 2020-11-02
EKS_115_VERSION := 1.15.12
EKS_116_VERSION := 1.16.15
EKS_117_VERSION := 1.17.12
EKS_118_VERSION := 1.18.9
EKS_119_VERSION := 1.19.6
build:
packer build \
--var 'aws_region=$(AWS_REGION)' \
--var 'vpc_id=$(VPC_ID)' \
--var 'subnet_id=$(SUBNET_ID)' \
$(foreach packerVar,$(PACKER_VARIABLES), $(if $($(packerVar)),--var $(packerVar)='$($(packerVar))',)) \
$(PACKER_FILE)
# Amazon Linux 2
#-----------------------------------------------------
build-al2-1.15:
$(MAKE) build PACKER_FILE=amazon-eks-node-al2.json eks_version=1.15
build-al2-1.16:
$(MAKE) build PACKER_FILE=amazon-eks-node-al2.json eks_version=1.16
build-al2-1.17:
$(MAKE) build PACKER_FILE=amazon-eks-node-al2.json eks_version=1.17
build-al2-1.18:
$(MAKE) build PACKER_FILE=amazon-eks-node-al2.json eks_version=1.18
build-al2-1.19:
$(MAKE) build PACKER_FILE=amazon-eks-node-al2.json eks_version=1.19
# Ubuntu 18.04
#-----------------------------------------------------
build-ubuntu1804-1.15:
$(MAKE) build PACKER_FILE=amazon-eks-node-ubuntu1804.json eks_version=$(EKS_115_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-ubuntu1804-1.16:
$(MAKE) build PACKER_FILE=amazon-eks-node-ubuntu1804.json eks_version=$(EKS_116_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-ubuntu1804-1.17:
$(MAKE) build PACKER_FILE=amazon-eks-node-ubuntu1804.json eks_version=$(EKS_117_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-ubuntu1804-1.18:
$(MAKE) build PACKER_FILE=amazon-eks-node-ubuntu1804.json eks_version=$(EKS_118_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-ubuntu1804-1.19:
$(MAKE) build PACKER_FILE=amazon-eks-node-ubuntu1804.json eks_version=$(EKS_119_VERSION) eks_build_date=2021-01-05
# Ubuntu 20.04
#-----------------------------------------------------
build-ubuntu2004-1.15:
$(MAKE) build PACKER_FILE=amazon-eks-node-ubuntu2004.json eks_version=$(EKS_115_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-ubuntu2004-1.16:
$(MAKE) build PACKER_FILE=amazon-eks-node-ubuntu2004.json eks_version=$(EKS_116_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-ubuntu2004-1.17:
$(MAKE) build PACKER_FILE=amazon-eks-node-ubuntu2004.json eks_version=$(EKS_117_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-ubuntu2004-1.18:
$(MAKE) build PACKER_FILE=amazon-eks-node-ubuntu2004.json eks_version=$(EKS_118_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-ubuntu2004-1.19:
$(MAKE) build PACKER_FILE=amazon-eks-node-ubuntu2004.json eks_version=$(EKS_119_VERSION) eks_build_date=2021-01-05
# RHEL 7
#-----------------------------------------------------
build-rhel7-1.15:
$(MAKE) build PACKER_FILE=amazon-eks-node-rhel7.json eks_version=$(EKS_115_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-rhel7-1.16:
$(MAKE) build PACKER_FILE=amazon-eks-node-rhel7.json eks_version=$(EKS_116_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-rhel7-1.17:
$(MAKE) build PACKER_FILE=amazon-eks-node-rhel7.json eks_version=$(EKS_117_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-rhel7-1.18:
$(MAKE) build PACKER_FILE=amazon-eks-node-rhel7.json eks_version=$(EKS_118_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-rhel7-1.19:
$(MAKE) build PACKER_FILE=amazon-eks-node-rhel7.json eks_version=$(EKS_119_VERSION) eks_build_date=2021-01-05
# RHEL 8
#-----------------------------------------------------
build-rhel8-1.15:
$(MAKE) build PACKER_FILE=amazon-eks-node-rhel8.json eks_version=$(EKS_115_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-rhel8-1.16:
$(MAKE) build PACKER_FILE=amazon-eks-node-rhel8.json eks_version=$(EKS_116_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-rhel8-1.17:
$(MAKE) build PACKER_FILE=amazon-eks-node-rhel8.json eks_version=$(EKS_117_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-rhel8-1.18:
$(MAKE) build PACKER_FILE=amazon-eks-node-rhel8.json eks_version=$(EKS_118_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-rhel8-1.19:
$(MAKE) build PACKER_FILE=amazon-eks-node-rhel8.json eks_version=$(EKS_119_VERSION) eks_build_date=2021-01-05
# CentOS 7
#-----------------------------------------------------
build-centos7-1.15:
$(MAKE) build PACKER_FILE=amazon-eks-node-centos7.json eks_version=$(EKS_115_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-centos7-1.16:
$(MAKE) build PACKER_FILE=amazon-eks-node-centos7.json eks_version=$(EKS_116_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-centos7-1.17:
$(MAKE) build PACKER_FILE=amazon-eks-node-centos7.json eks_version=$(EKS_117_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-centos7-1.18:
$(MAKE) build PACKER_FILE=amazon-eks-node-centos7.json eks_version=$(EKS_118_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-centos7-1.19:
$(MAKE) build PACKER_FILE=amazon-eks-node-centos7.json eks_version=$(EKS_119_VERSION) eks_build_date=2021-01-05
# CentOS 8
#-----------------------------------------------------
build-centos8-1.15:
$(MAKE) build PACKER_FILE=amazon-eks-node-centos8.json eks_version=$(EKS_115_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-centos8-1.16:
$(MAKE) build PACKER_FILE=amazon-eks-node-centos8.json eks_version=$(EKS_116_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-centos8-1.17:
$(MAKE) build PACKER_FILE=amazon-eks-node-centos8.json eks_version=$(EKS_117_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-centos8-1.18:
$(MAKE) build PACKER_FILE=amazon-eks-node-centos8.json eks_version=$(EKS_118_VERSION) eks_build_date=$(EKS_BUILD_DATE)
build-centos8-1.19:
$(MAKE) build PACKER_FILE=amazon-eks-node-centos8.json eks_version=$(EKS_119_VERSION) eks_build_date=2021-01-05
# Windows 1809 Full
#-----------------------------------------------------
build-windows1809full-1.16:
$(MAKE) build PACKER_FILE=amazon-eks-node-windows1809full.json eks_version=1.16
build-windows1809full-1.17:
$(MAKE) build PACKER_FILE=amazon-eks-node-windows1809full.json eks_version=1.17
build-windows1809full-1.18:
$(MAKE) build PACKER_FILE=amazon-eks-node-windows1809full.json eks_version=1.18
build-windows1809full-1.19:
$(MAKE) build PACKER_FILE=amazon-eks-node-windows1809full.json eks_version=1.19
# Windows 1809 Core
#-----------------------------------------------------
build-windows1809core-1.16:
$(MAKE) build PACKER_FILE=amazon-eks-node-windows1809core.json eks_version=1.16
build-windows1809core-1.17:
$(MAKE) build PACKER_FILE=amazon-eks-node-windows1809core.json eks_version=1.17
build-windows1809core-1.18:
$(MAKE) build PACKER_FILE=amazon-eks-node-windows1809core.json eks_version=1.18
build-windows1809core-1.19:
$(MAKE) build PACKER_FILE=amazon-eks-node-windows1809core.json eks_version=1.19
# Windows 2004 Core
#-----------------------------------------------------
build-windows2004core-1.16:
$(MAKE) build PACKER_FILE=amazon-eks-node-windows2004core.json eks_version=1.16
build-windows2004core-1.17:
$(MAKE) build PACKER_FILE=amazon-eks-node-windows2004core.json eks_version=1.17
build-windows2004core-1.18:
$(MAKE) build PACKER_FILE=amazon-eks-node-windows2004core.json eks_version=1.18
build-windows2004core-1.19:
$(MAKE) build PACKER_FILE=amazon-eks-node-windows2004core.json eks_version=1.19