forked from awslabs/amazon-eks-ami
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (30 loc) · 1021 Bytes
/
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
KUBERNETES_VERSION ?= 1.10.3
DATE ?= $(shell date +%Y-%m-%d)
# Defaults to Amazon Linux 2 LTS AMI
# * use the us-west-2 minimal hvm image
# https://aws.amazon.com/amazon-linux-2/release-notes/
SOURCE_AMI_ID ?= $(shell aws --region eu-central-1 ec2 describe-images \
--output text \
--filters \
Name=owner-id,Values=137112412989 \
Name=virtualization-type,Values=hvm \
Name=root-device-type,Values=ebs \
Name=name,Values=amzn2-ami-minimal-hvm-* \
Name=architecture,Values=x86_64 \
Name=state,Values=available \
--query 'max_by(Images[], &CreationDate).ImageId')
AWS_DEFAULT_REGION = eu-central-1
.PHONY: all validate ami 1.11 1.10
all: 1.11
validate:
packer validate eks-worker-al2.json
1.10: validate
packer build \
-var binary_bucket_path=1.10.11/2018-12-06/bin/linux/amd64 \
-var source_ami_id=$(SOURCE_AMI_ID) \
eks-worker-al2.json
1.11: validate
packer build \
-var binary_bucket_path=1.11.5/2018-12-06/bin/linux/amd64 \
-var source_ami_id=$(SOURCE_AMI_ID) \
eks-worker-al2.json