Commit Graph

190 Commits

Author SHA1 Message Date
Jake Buchholz def572e470 new AMIs (with metadata tags), handle ClientError in prune-amis.py 2019-07-05 12:51:09 -07:00
Jake Buchholz bc4e1ec30f README: missing ) 2019-07-05 12:51:09 -07:00
Jake Buchholz ed0559ef72 README: add example aws cli command for listing the latest current-x86_64 build 2019-07-05 12:51:09 -07:00
Jake Buchholz d206223bae minor output formatting tweak to resolve-profile.py 2019-07-05 12:51:09 -07:00
Jake Buchholz dbae752178 tag AMIs and snapshots with additional metadata 2019-07-05 12:51:09 -07:00
Jake Buchholz b517dda7b8 remove new release detection/auto-update of version -- future feature 2019-07-05 12:51:09 -07:00
Jake Buchholz 8f563aa4f1 more changes based on review...
* Makefile - improve/fix check for required make vars
* resolve-profile.py.in
+ build a list of all regions & probe to see which ones are enabled (unknown if special subscription regions like ap-northeast-3 would show up in this list)
+ expand 'ami_regions' 'ALL' meta key to all enabled regions, 'ALL' key's value is preserved (that is, a value of None or False will disable all regions)
+ warn/remove regions in profile config that are found to be disabled.
+ improve checks for [None, False] values
2019-07-05 12:51:09 -07:00
Jake Buchholz d28214fc50 simple updates...
* .gitignore - don't ignore whole dirs and then opt-in specific files
* Makefile
- fail if required vars aren't set
- SCRIPTS --> ALL_SCRIPTS
* profiles/README.md
- variables.yaml --> vars.json
- drop 'not possible to add/modify/remove arbitrary files' comment
* make-amis
- use -eq for integer comparison
- make shellcheck happier with printf's
- remove old bad-idea TODO
2019-07-05 12:51:09 -07:00
Jake Buchholz 396bb8ab86 Build Profiles and 3.9.4
* Build Profiles (completion of PR #49)
+ auto-updates version profile when new release detected
+ updates releases/<profile>.yaml after successful builds
* Prune AMIs (in AWS and in releases/<profile>.yaml
+ 'revision' - keep latest revision per release
+ 'release' - keep latest release per version
+ 'version' - remove end-of-life versions
* releases/README.md updater script
* README overhaul
+ Pre-built AMIs --> releases/README.md
+ profiles/README.md for profile configuration details
+ main README.md overhauled to go over how to build and manage custom AMIs
2019-07-05 12:51:09 -07:00
tomalok 24144391d6
* Alpine release 3.9.3 (#47)
* take care of YAML.load(input) deprecation, per https://github.com/yaml/pyyaml/wiki/PyYAML-yaml.load(input)-Deprecation
2019-04-09 07:31:03 -07:00
tomalok 15dc2ba223
Alpine release 3.9.2 (#46) 2019-03-04 18:14:36 -08:00
tomalok 052cab8914
Fix nvme-ebs-links (issue #44) (#45)
* EBS may prepend '/dev/' in front of the EBS alias, adjust the sanity sed to account for this.
* Attempt to get a sane EBS alias up to 50x, sleep 1/10s in between (max duration ~5 secs).
* Log when we add/fail-to-add/remove EBS alias symlinks.
2019-03-03 21:57:28 -08:00
tomalok 00aec03281
Alpine 3.9.1 (#43) 2019-03-02 17:32:15 -08:00
tomalok e65e381b20
release 3.9.0-1 (#42)
Release a revised set of Alpine Linux AMIs, including...

* improved nvme-ebs-links mdev script (issue #40)
* start haveged at boot runlevel (issue #39)
2019-02-25 18:09:09 -08:00
Jake Buchholz d92bbfc7c9 fix nvme-ebs-links
Ensure that the EBS volume alias matches what we expect it to be.
Should fix issue #40.
2019-02-23 20:24:32 -08:00
tomalok cfa0bdebad
Release Alpine Linux 3.9.0 AMIs (#38)
* Release Alpine Linux 3.9.0 AMIs

* Update README.md and release.yaml with a fresh batch of 3.9.0 AMIs
* Append GitHub project link to AMI description
* really minor caveat fix
2019-02-07 17:29:33 -08:00
Jake Buchholz 0b15db8bb5 * Re-baseline to the newly-released Alpine 3.9
* Match meanings of 'version' and 'release' to how Alpine uses them
* Use optional 'revision' to denote any same-release AMI rebuild
* Include CPU 'arch' in naming/description (may also offer 'aarch64' AMIs someday)
* Upgrade build instance to use Amazon Linux 2 AMIs
* Use env vars to pass details to 'make_ami.sh' instead of via CLI parameters
* make_ami.sh
+ minimum version/release shouldn't be overrideable
+ update APK tools & Alpine keys
+ check build's release vs. installed /etc/alpine-release
2019-02-04 13:08:11 -08:00
tomalok 4680ecd85e
Add add_svcs, fix nvme, add eu-north-1 (#34)
* Allow additional services on the AMI's runlevels

I'm using this with my AMIs to add haveged to the boot runlevel to boost the amount of initial entropy on smaller instance types, so sshd can start in under 6s instead of over 2m.

add_svcs:
  boot:
    - haveged

* fix race condition with nvme-ebs /dev linking
* copy nvme stuff to build target in one operation
* add eu-north-1 region
2019-01-26 13:32:54 -08:00
tomalok 80c014d702
fix 3.8 ena drivers (#33)
* go back to using linux-virt@edge-main, which has ena drivers
* other misc fixes
  * update README
  * use --no-cache when installing alpine-base
2019-01-19 11:58:34 -08:00
Jake Buchholz b669fc0a21 add mdev conf, links NVMEe devs to EBS xvd/sd devs 2019-01-11 16:46:32 +00:00
Jake Buchholz 80807fa647 * no longer need aws-ena-driver, it's in linux-virt
* no longer need to install edge linux-virt package
2019-01-11 08:45:19 -08:00
Jake Buchholz a8f8c499e7 packer region tweak, alpine 3.8.2 was released 2019-01-11 08:45:19 -08:00
Jake Buchholz 013c57122a fix issue #24
* Latest Amazon Linux enables 64bid when creating ext4 partitions, which is incompatible with syslinux/extlinux bootloader.  Explicitly disable 64bit support, as it's highly unlikely we'll need a boot volume >16 TiB.
* update-extlinux.conf - switch kernel default to 'virt', as 'hardened' no longer exists.
2018-12-02 19:58:49 -08:00
Jake Buchholz 5a06b6d880 * 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
2018-12-02 11:16:39 -08:00
Jake Buchholz 8659605732 make edge
* Add the ability to 'make edge' to create an AMI based on the latest Alpine edge repository
* Force 'ami_revision' to be 'rYYYYMMDDHHSS'
2018-09-11 09:57:37 -07:00
Jake Buchholz 4065c4ebb3 Incorporate recent Alpine edge changes
* standardize on 'linux-virt' kernel
  + no longer need 'kernel_flavor' variable
  + always install 'aws-ena-driver' package
  + always enable ena_support
* switch to 'variables.yaml' for config
  + update build/convert script to stringify certain keys that may contain arrays
  + copy from 'variables.yaml-default' if it doesn't exist
* drop 'vpc' variable, using 'subnet' derives the proper VPC to use
* fix chrony.conf (all pool.ntp.org references are changed to 169.254.169.123)
* update README.md caveats
2018-09-05 07:39:39 -07:00
Jake Buchholz 95b7837c9f PR updates
* README.md
  + update list of modern instance types
  + add caveat regarding linux-vanilla vs. linux-virt
* alpine-ami.yaml
  + build instance type is always t3.nano
  + block device where we build is always /dev/xvdf
  + add optional AMI encryption
  + always enable AMI SR-IOV flag (vanilla & virt both have the necessary driver)
  + no need to pass volume_name to make_ami.sh
* make_ami.sh
  + replace hard tabs with 4 spaces
  + always set up edge repositories
  + no need to add mkinitfs package, it's a dependency of linux-*
  + fix update of /etc/inittab
  + fix configuration of NTP
  + declare local vars in main()
  + device is always /dev/xvdf
* variables.json-default/example
  + improve comment for kernel_flavor
  + default add_repos is now empty
  + remove acct & e2fsprogs-extra from add_pkgs
  + add optional AMI encryption
  + remove sriov_enable, build_instance_type, and volume_name vars
2018-08-28 09:20:48 -07:00
Jake Buchholz 356105f23d incorporate additional fixes
https://github.com/mcrute/alpine-ec2-ami/pull/8 - temporary fix until ec2-tiny-bootstrap deps are updated
https://github.com/mcrute/alpine-ec2-ami/pull/9
https://github.com/mcrute/alpine-ec2-ami/pull/10
2018-08-28 09:20:48 -07:00
Jake Buchholz cb95f7fd1e Improve Configurability
* move config variables from alpine-ami.yaml to variables.json-*
  + variables.json-default - ready-for-action original default config
  + variables.json-example - original defaults with comments
* clean up tabs vs. spaces in make_ami.sh
* make_ami.sh handles custom kernel flavor, extra repos, and extra packages
* tweak README with regards to aws-ena-driver caveat
2018-08-28 09:20:48 -07:00
Jake Buchholz 836d9a3e7e * switch to alpine v3.8
* add public_ip variable, setting to 'true' allows packer to build from outside AWS
* use smallest instance_type (t2.nano) and volume_size (1 GiB)
* eu-west-3 region is live; ap-northeast-3 requires subscription
* no longer need setup_staging_repos function...
+ tiny-ec2-bootstrap is available in main since v3.8
+ aws-ena-driver-vanilla is only available in edge/testing
* switched to linux-vanilla since linux-hardened is no longer available and linux-virt does not have NVME available
+ TODO?  make kernel choice selectable (significant memory/disk savings linux-virt can be used)
2018-07-30 07:59:39 -07:00
Mike Crute 27bcd4a05e Release 3.7-r2 2017-12-26 16:58:28 +00:00
Mike Crute 4e881f09cb Make prompt more obvious 2017-12-26 04:07:50 +00:00
Mike Crute 6dbdc23272 Disable getty allocations 2017-12-26 04:07:38 +00:00
Mike Crute 31163ccb52 Start acpid to handle power events 2017-12-26 04:07:12 +00:00
Mike Crute 73f4135f98 Log boot output to console 2017-12-26 04:06:59 +00:00
Mike Crute 6fbb4d8ead Also delete snapshots 2017-12-25 05:25:14 +00:00
Mike Crute eb26234ebc Add all regions except eu-west-3 2017-12-25 05:03:53 +00:00
Mike Crute 0a69d4dfe9 Add gen-readme script 2017-12-25 05:03:24 +00:00
Mike Crute 24cac6b1a4 Add AMI scrub tool 2017-12-25 04:53:29 +00:00
Mike Crute 638be8d8b6 Initial import 2017-12-25 03:14:34 +00:00