diff --git a/.gitignore b/.gitignore index ca3d4df..0bf92c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /build/ /.py3/ /variables.yaml +/variables.yaml_* /scrub-old-amis.py /gen-readme.py diff --git a/Makefile b/Makefile index 3f08dd0..f3e4c8a 100644 --- a/Makefile +++ b/Makefile @@ -37,3 +37,6 @@ build/convert: .PHONY: clean clean: rm -rf build .py3 scrub-old-amis.py gen-readme.py + +distclean: clean + 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. we currently need to install some packages from edge. We expect that these will be included in Alpine 3.9, or perhaps as a 3.8.x update. - linux-virt @edge-main (includes necessary NVMe drivers) - - aws-ena-driver @edge-testing (installs 'virt' flavored subpackage) + - aws-ena-driver @edge-community (installs 'virt' flavored subpackage) - tiny-ec2-bootstrap @edge-main (updated to v1.2.0) - 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() { # chroot "$target" apk --no-cache add \ linux-virt@edge-main \ - aws-ena-driver@edge-testing \ + aws-ena-driver@edge-community \ alpine-mirrors \ chrony \ openssh \ @@ -282,10 +282,16 @@ cleanup() { umount "$target" } +version_sorted() { + # falsey if $1 version > $2 version + printf "%s\n%s" $1 $2 | sort -VC +} + main() { - [ "$#" -ne 2 ] && { echo "usage: $0 '[,]' '[,]'"; exit 1; } - [ "$ALPINE_RELEASE" != 'edge' ] && [[ "$ALPINE_RELEASE" -lt "$MIN_RELEASE" ]] && \ - { echo "ERR: minimum alpine_release value must be '$MIN_RELEASE'"; exit 1; } + [ "$#" -ne 2 ] && die "Expecting two parameters\nUsage: $0 '[,]' '[,]'" + [ "$ALPINE_RELEASE" != 'edge' ] && { + version_sorted $MIN_RELEASE $ALPINE_RELEASE || die "Minimum alpine_release is '$MIN_RELEASE'" + } local add_repos="$1" 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: # Optional security group to apply to the builder instance. security_group: -# Assign a public IP to the builder instance. Set to "true" for if you need -# to initiate the build from somewhere that wouldn't normally be able to access -# the builder instance's private network and a private IP is not auto-assigned. -public_ip: "false" +# By default, public IPs are assigned (or not) per the subnet's configuration. +# Set to "true" or "false" to explicitly override the subnet's public IP auto- +# assign configuration. +public_ip: "" ### Build Options ###