Commit Graph

167 Commits

Author SHA1 Message Date
Mike Crute
b1da6a47d6 Embed nvme config 2020-05-30 13:17:56 -07:00
Mike Crute
a0cc4d8a12 Don't require copying scripts to build 2020-05-30 13:17:56 -07:00
Mike Crute
5ca05bfb46 Remove explicit build subnet 2020-05-30 13:17:56 -07:00
Mike Crute
812eba9597 Remove release vars from packer 2020-05-30 13:17:56 -07:00
Mike Crute
b804d174b3 Allow building without broker 2020-05-30 12:14:48 -07:00
Mike Crute
df53323de9 Add some more python docs 2020-05-29 21:11:25 -07:00
Mike Crute
b53492723d Migrate full ami build to builder script 2020-05-29 20:58:53 -07:00
Mike Crute
5b2f32c9c8 Allow builder to be run by itself 2020-05-29 20:58:11 -07:00
Mike Crute
41f127d77b Authenticate per-region for make-amis 2020-05-28 17:57:13 -07:00
Mike Crute
bfc4bf99bf Convert packer.json builder to python 2020-05-28 17:55:46 -07:00
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
a36d0616bf Convert python scripts to argparse
This removes the manual command line handling and reformats the scripts
into main methods. This is paving the way for a more unified build tool.
2020-05-26 18:10:03 -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
Mike Crute
1fd42af98d Refactor resolve-profile script
This is paving the way for identity broker improvements for opt-in
regions. The output is functionally identical between the two scripts
modulo the svcs change. Hopefully this makes the transformation process
a little more clear.
2020-05-21 16:45:17 -07:00
tomalok
fe362af91f
3.11.6, 3.10.5, and 3.9.6 (#65) 2020-04-25 17:03:26 -07:00
tomalok
7ce209cfb6
Alpine 3.11.5 (#63) 2020-04-02 21:08:12 -07:00
tomalok
c8c6a995cf
The Latest Releases (#62)
* 3.9.5
* 3.10.4
* 3.11.3
2020-02-05 20:29:16 -08:00
Jake Buchholz
e15b8a4401 Alpine 3.11.2 2020-01-04 12:23:32 -08:00
Jake Buchholz
7fd3719cf2 Alpine 3.11.0
Also attach  per build target (3.11.0 is r0, but 3.10.3 remains r1)
2019-12-19 20:27:31 -08:00
Jake Buchholz
8245073a8a Alpine-3.10.3 (and latest edge)
Also includes fix for Packer regression affecting encrypted AMIs
2019-10-26 15:59:32 -07:00
tomalok
6b5596e0e3
alpine 3.10.2 (and latest edge) AMIs (#56) 2019-08-25 20:51:23 -07:00
tomalok
8a46e41b77
fix regression on nvme mdev script (#55)
* sh doesn't allow nesting of prefix strip
* also update some minor test profile bits
* new AMI revisions (fixed nvme)
* edge AMI release should remain a timestamp
2019-07-27 03:02:20 +02:00
Jake Buchholz
0f1cc5c4b2 Latest AMIs per Version in releases/README.md
Only keep the latest AMIs per version in releases/README.md instead of per release.
2019-07-14 09:07:01 -07:00
tomalok
b4baa30e52
alpine 3.10.1 release (#52) 2019-07-12 09:00:48 -07:00
Jake Buchholz
2ef5df0927 * 3.10.0 has landed!
* switch build name from 'current-x86_64' to 'v#_#-x86_64' to avoid  any confusion when new versions roll out
* resolvie-alpine.py.in - only warn about disabled regions once, instead of for each profile build
* make-amis - tweak script output
* new set of AMIs for edge, 3.10.0, and 3.9.4
2019-07-05 12:51:09 -07:00
Jake Buchholz
12b73e4e0a update releases/README.md with latest AMIs with metadata tags 2019-07-05 12:51:09 -07:00
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