Commit Graph

15 Commits

Author SHA1 Message Date
Mike Crute
7e60c7fb6a Combine all commands into a meta-command
There is an increasing need to share components among the various
commands, especially with the introduction of the identity broker API.
Rather than trying to assemble an importable python library of code for
the build process I think we can just combine everything into one file
and use argparse sub-commands to integrate them into a set of
individually callable scripts. This change does that integration.
2020-05-28 17:55:36 -07:00
Mike Crute
1241cb5aaf Better model make dependencies on build files 2020-05-28 17:55:26 -07:00
Mike Crute
d63409acce Convert make-amis to python
This is paving the way for identity broker improvements for opt-in
regions. Eventually we'll need to hook some region logic into these
scripts so having them written in python will be helpful.
2020-05-22 18:23:32 -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
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
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
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