Graylog2 / graylog2-images

Ready to run machine images
Apache License 2.0
236 stars 92 forks source link

Provide machine-readable list of AMIs #206

Open joschi opened 6 years ago

joschi commented 6 years ago

In order to simplify configuration management and infrastructure-as-code for users of the official AMI, there should be a machine-readable list of available AMIs per version and per region:

https://github.com/Graylog2/graylog2-images/blob/2.4/aws/README.md

I propose the following format:

{
   "serial" : 1,
   "last_update" : "2018-01-19T23:42:00.000Z",
   "amis" : {
      "<version>" : {
         "<region-1>" : {
            "id" : "<ami-id>"
         },
         "<region-2>" : {
            "id" : "<ami-id>"
         }
      },
      "2.3.2-2" : {
         "eu-central-1" : {
            "id" : "ami-4b54ed24"
         }
      },
      "2.4.0-1" : {
         "us-east-1" : {
            "id" : "ami-9f2663e5"
         }
      }
   }
}
mariussturm commented 6 years ago

Do you have a tool in mind with which we can generate this file? Updating it by hand would be a pain I guess.

joschi commented 6 years ago

@mariussturm No idea. Currently we're manually maintaining the list in the README.md file manually anyway.

malcyon commented 3 years ago

The updating of the aws/README.md has been automated in our CI system. It uses:

https://github.com/Graylog2/graylog2-images/blob/4.0/scripts/update-aws-ami.rb

It doesn't create a json file, though. It could certainly be added, but I'm unsure of the demand for this feature. There is not a lot of activity on this issue.