I’ve used CoreOS a good deal for the last few months, automating it on Amazon Web Services to run Docker instances like a boss, but when a new version comes out, figuring out the new AMI ID to target is cumbersome. What happens is that a new CoreOS version will be built with AWS, resulting in a new AMI ID, but going to the CoreOS cloud provider’s page to manually grok the ID is no fun. I knew there had to be a automated way to do this, but earlier attempts failed. That changed today as I got a clue from the #coreos channel on irc.freenode.net. Here’s the gist:
If you pull that, and run it, calling out the region you want the AMI in, you’ll get the details. For example:
# coreid.sh us-east-1 us-east-1,alpha,hvm,ami-ff35fc94,https://console.aws.amazon.com/ec2/home?region=us-east-1#launchAmi=ami-ff35fc94
Now we have all the details, and for me, most importanly the AMI ID and the URL to launch the AMI. Cool, so that’s it, I’m calling this day a success. Is there an easier way of doing this? Am I missing something obvious? Let me know, always happy to learn more.