#525 Make a script to get and use AMI IDs automatically
Closed: Fixed None Opened 9 years ago by robyduck.

AMI IDs are getting more and more and we'll probably have soon other public cloud services and not only Amazon. To make this part easier to maintain we should think about a script. I have an idea, it could work like this:

  • use fedimg to get the IDs of the AMIs for all regions
  • put the IDs into a specific file (a dedicated ami_id.py variable file?)
  • all html files can get the IDs from that file simply by calling the variables
  • we should add the execution of the script to our makefile. This way we can update all IDs on every page manually just by doing ''make amis''. At the next build the IDs would be in the html pages

The source from where the script gets the IDs can be datanommer but also other sources. Not sure which one is easier and faster.

Ideas? Comments? Other proposals?


There's currently some code in https://apps.fedoraproject.org/releng-dash that gets some AMI ids from datagrepper, but it's currently implemented in JSON.

rtnpro and I are working on a daemon and web service to cache and serve the latest relevant information about different systems: https://github.com/fedora-infra/statscache I expect that it could cache and serve the latest relevant AMI ids some day. It'll take quite a while before we can finish, vet, and deploy it though.

If we decide to go with something quicker/near-term, consider making it available as JSON instead of in a .py file so that it is easily consumable by anything that can make HTTP requests.

If we can make the JSON aligned with https://launchpad.net/simplestreams, that would be kinda nice from a cross-distro coherence point of view.

Ok so we have a branch for it already and will merge it soon into f23 final branch. Ralph is working on it and it should not only get AMI IDs for final but also for prerelease versions.

We want to release this feature for F23 GA. After that we'll add also the bi-weekly Atomic image, which will be probably included in the same task.

We should make sure the AMI ID script gets executed '''only''' when building getfedora.org. The IDs are not needed when building spins, labs or whatever. Also, if we have a connection error (which I faced already several times) it would break all websites builds.

Let's get the execution of this script into the getfedora.org dir instead of adding it to the global makefile. Any complains about that?

The script it much nicer now, and shorter. Build time is never more than 15 sec, but it still greps the AMI IDs when building spins, labs, arm...

robyduck said in channel that the extraneous grepping is no longer an issue (there was a dangling .pyc file to blame). I think this one is good-to-go.

I changed the variables and dropped the comments in the script to pull the right AMI IDs. Seems they pull the right IDs now, final F23 IDs.

Login to comment on this ticket.

Metadata