aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Buchholz <tomalok@gmail.com>2018-12-02 10:57:25 -0800
committerMike Crute <crutem@amazon.com>2018-12-02 11:16:39 -0800
commit5a06b6d8806ed9c1013894f99496bc72bc10f4f7 (patch)
treecbf6dcabc4ba0e4bfa6ac012cbaa0fbad20c73d9
parent86596057321716b77b1a38098e730284dd962822 (diff)
downloadalpine-ec2-ami-5a06b6d8806ed9c1013894f99496bc72bc10f4f7.tar.bz2
alpine-ec2-ami-5a06b6d8806ed9c1013894f99496bc72bc10f4f7.tar.xz
alpine-ec2-ami-5a06b6d8806ed9c1013894f99496bc72bc10f4f7.zip
* aws-ena-driver moved from testing to community
* improve minimum release version test * clarify public_ip variable; uses subnet's default when unset * add 'distclean' Makefile target * add 'variables.yaml_*' to .gitignore to exclude custom build profiles
-rw-r--r--.gitignore1
-rw-r--r--Makefile3
-rw-r--r--README.md2
-rwxr-xr-xmake_ami.sh14
-rw-r--r--variables.yaml-default8
5 files changed, 19 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index ca3d4df..0bf92c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
1/build/ 1/build/
2/.py3/ 2/.py3/
3/variables.yaml 3/variables.yaml
4/variables.yaml_*
4/scrub-old-amis.py 5/scrub-old-amis.py
5/gen-readme.py 6/gen-readme.py
diff --git a/Makefile b/Makefile
index 3f08dd0..f3e4c8a 100644
--- a/Makefile
+++ b/Makefile
@@ -37,3 +37,6 @@ build/convert:
37.PHONY: clean 37.PHONY: clean
38clean: 38clean:
39 rm -rf build .py3 scrub-old-amis.py gen-readme.py 39 rm -rf build .py3 scrub-old-amis.py gen-readme.py
40
41distclean: clean
42 rm -f variables.yaml
diff --git a/README.md b/README.md
index a27c2f3..2cb9b78 100644
--- a/README.md
+++ b/README.md
@@ -65,7 +65,7 @@ its development and thus there are some sharp edges.
65 we currently need to install some packages from edge. We expect that these 65 we currently need to install some packages from edge. We expect that these
66 will be included in Alpine 3.9, or perhaps as a 3.8.x update. 66 will be included in Alpine 3.9, or perhaps as a 3.8.x update.
67 - linux-virt @edge-main (includes necessary NVMe drivers) 67 - linux-virt @edge-main (includes necessary NVMe drivers)
68 - aws-ena-driver @edge-testing (installs 'virt' flavored subpackage) 68 - aws-ena-driver @edge-community (installs 'virt' flavored subpackage)
69 - tiny-ec2-bootstrap @edge-main (updated to v1.2.0) 69 - tiny-ec2-bootstrap @edge-main (updated to v1.2.0)
70 70
71- CloudFormation support is still forthcoming. This requires patches and 71- CloudFormation support is still forthcoming. This requires patches and
diff --git a/make_ami.sh b/make_ami.sh
index 9b24227..45d8ab3 100755
--- a/make_ami.sh
+++ b/make_ami.sh
@@ -132,7 +132,7 @@ install_core_packages() {
132 # 132 #
133 chroot "$target" apk --no-cache add \ 133 chroot "$target" apk --no-cache add \
134 linux-virt@edge-main \ 134 linux-virt@edge-main \
135 aws-ena-driver@edge-testing \ 135 aws-ena-driver@edge-community \
136 alpine-mirrors \ 136 alpine-mirrors \
137 chrony \ 137 chrony \
138 openssh \ 138 openssh \
@@ -282,10 +282,16 @@ cleanup() {
282 umount "$target" 282 umount "$target"
283} 283}
284 284
285version_sorted() {
286 # falsey if $1 version > $2 version
287 printf "%s\n%s" $1 $2 | sort -VC
288}
289
285main() { 290main() {
286 [ "$#" -ne 2 ] && { echo "usage: $0 '<repo>[,<repo>]' '<pkg>[,<pkg>]'"; exit 1; } 291 [ "$#" -ne 2 ] && die "Expecting two parameters\nUsage: $0 '<repo>[,<repo>]' '<pkg>[,<pkg>]'"
287 [ "$ALPINE_RELEASE" != 'edge' ] && [[ "$ALPINE_RELEASE" -lt "$MIN_RELEASE" ]] && \ 292 [ "$ALPINE_RELEASE" != 'edge' ] && {
288 { echo "ERR: minimum alpine_release value must be '$MIN_RELEASE'"; exit 1; } 293 version_sorted $MIN_RELEASE $ALPINE_RELEASE || die "Minimum alpine_release is '$MIN_RELEASE'"
294 }
289 295
290 local add_repos="$1" 296 local add_repos="$1"
291 local add_pkgs="$2" 297 local add_pkgs="$2"
diff --git a/variables.yaml-default b/variables.yaml-default
index 3ec54f4..3ae3cd6 100644
--- a/variables.yaml-default
+++ b/variables.yaml-default
@@ -7,10 +7,10 @@ subnet:
7# Optional security group to apply to the builder instance. 7# Optional security group to apply to the builder instance.
8security_group: 8security_group:
9 9
10# Assign a public IP to the builder instance. Set to "true" for if you need 10# By default, public IPs are assigned (or not) per the subnet's configuration.
11# to initiate the build from somewhere that wouldn't normally be able to access 11# Set to "true" or "false" to explicitly override the subnet's public IP auto-
12# the builder instance's private network and a private IP is not auto-assigned. 12# assign configuration.
13public_ip: "false" 13public_ip: ""
14 14
15 15
16### Build Options ### 16### Build Options ###