openzfs / zfs-buildbot

The OpenZFS Buildbot Configuration
http://build.zfsonlinux.org
BSD 2-Clause "Simplified" License
25 stars 29 forks source link

FreeBSD: Use public SSM parameters for latest AMIs #247

Closed ghost closed 2 years ago

ghost commented 2 years ago

FreeBSD now registers the latest AMI IDs as public parameters in the AWS SSM parameter store. EC2 APIs accept SSM parameters in place of an AMI and will resolve the AMI from the parameter value. Use this to replace the current hacked in method of determining the latest FreeBSD AMIs at run time.

More info on the SSM parameters: https://www.daemonology.net/blog/2021-08-31-FreeBSD-AMI-SSM-Public-Parameters.html

ghost commented 2 years ago

NB: I don't have an environment set up for testing this.

behlendorf commented 2 years ago

When I get a moment I'll see about manually testing this and will include it if it seems to work as expected.

ghost commented 2 years ago

As I recall, this does not actually work because unlike the aws cli tools, the python library does not resolve SSM parameters. I had thought this happened on the AWS end, but apparently not.

This will have to be revisited to resolve the SSM parameter at runtime similar to how the current patch resolves the AMIs from JSON blobs in an S3 bucket.