{"id":361,"date":"2018-05-15T23:41:39","date_gmt":"2018-05-15T22:41:39","guid":{"rendered":"http:\/\/wp.philroche.net\/?p=361"},"modified":"2018-05-15T23:41:39","modified_gmt":"2018-05-15T22:41:39","slug":"ubuntu-cloud-images-and-how-to-find-the-most-recent-cloud-image-part-2-of-3","status":"publish","type":"post","link":"http:\/\/wp.philroche.net\/2018\/05\/15\/ubuntu-cloud-images-and-how-to-find-the-most-recent-cloud-image-part-2-of-3\/","title":{"rendered":"Ubuntu cloud images and how to find the most recent cloud image – part 2\/3"},"content":{"rendered":"

TLDR;<\/strong><\/p>\n

sudo snap install image-status<\/pre>\n

This will install a snap<\/a> of the very useful `image-status<\/a>` utility.<\/p>\n

image-status cloud-release bionic<\/pre>\n

This will show you the serial for the most recent Ubuntu 18.04 Bionic cloud image in QCOW format.<\/p>\n

image-status ec2-release bionic<\/pre>\n

This will show you the AWS EC2 AMIs for the most recent Ubuntu 18.04 Bionic AWS EC2 cloud images.<\/p>\n


\n

Part two of a three part series<\/a>.<\/p>\n

Following on from part 1<\/a> where I detailed simplestreams and sstream-query I present to you the `image-status<\/a>` utility which is a very neat and useful wrapper around sstream-query<\/a>.<\/p>\n

image-status is hosted on github as part of Scott Moser<\/a>‘s talk-simplestreams repo<\/a>.<\/p>\n

I recently submitted a pull request<\/a> which added the ability to package image-status as a snap<\/a>. This was merged and you can now install image-status on any linux distribution supporting snaps using the following command.<\/p>\n

sudo snap install image-status<\/pre>\n

Once installed you can start querying the simplestreams feeds for details on the most recent Ubuntu cloud images.<\/p>\n

Usage:<\/p>\n

image-status --help # to see all available options\r\n\r\nimage-status cloud-release bionic # to see most recent Ubuntu Bionic release images on\u00a0http:\/\/cloud-images.ubuntu.com\/<\/a>\r\nimage-status cloud-daily bionic # to see most recent Ubuntu Bionic daily images on\u00a0http:\/\/cloud-images.ubuntu.com\/<\/a>\r\n\r\nimage-status gce-release bionic # to see most recent Ubuntu Bionic release images on GCE\r\nimage-status gce-dailybionic # to see most recent UbuntuBionic daily images on GCE\r\n\r\nimage-status ec2-release bionic # to see most recent Ubuntu Bionic release AMIs on EC2\r\nimage-status ec2-daily bionic # to see most recent UbuntuBionic daily AMIs on EC2\r\n\r\nimage-status azure-release bionic # to see most recent Ubuntu Bionic release images on Azure\r\nimage-status azure-daily bionic # to see most recent UbuntuBionic daily images on Azure\r\n\r\nimage-status maas-release bionic # to see most recent Ubuntu Bionic release images for maas V2\r\nimage-status maas-daily bionic # to see most recent UbuntuBionic daily images for maas V2\r\n\r\nimage-status maas3-release bionic # to see most recent Ubuntu Bionic release images for maas V3\r\nimage-status maas3-daily bionic # to see most recent Ubuntu Bionic daily images for maas V3<\/pre>\n

I find this very useful when trying to quickly see what is the most recent Ubuntu release on any particular public cloud. eg:<\/p>\n

image-status ec2-release bionic | grep eu-west-1 | grep hvm | grep ssd | awk '{split($0,a,\" \"); print a[6]}'<\/pre>\n

This will return the ID for the most recent HVM EBS Ubuntu 18.04 (Bionic) in the eu-west-1 AWS EC2 region. This can be achieved using sstream-query too but I find filtering using grep to be easier to understand and iterate with.<\/p>\n

I hope the above is helpful with your automation.<\/p>\n","protected":false},"excerpt":{"rendered":"

TLDR; sudo snap install image-status This will install a snap of the very useful `image-status` utility. image-status cloud-release bionic This will show you the serial for the most recent Ubuntu 18.04 Bionic cloud image in QCOW format. image-status ec2-release bionic This will show you the AWS EC2 AMIs for the most recent Ubuntu 18.04 Bionic […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[13,19],"tags":[],"_links":{"self":[{"href":"http:\/\/wp.philroche.net\/wp-json\/wp\/v2\/posts\/361"}],"collection":[{"href":"http:\/\/wp.philroche.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wp.philroche.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wp.philroche.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/wp.philroche.net\/wp-json\/wp\/v2\/comments?post=361"}],"version-history":[{"count":1,"href":"http:\/\/wp.philroche.net\/wp-json\/wp\/v2\/posts\/361\/revisions"}],"predecessor-version":[{"id":362,"href":"http:\/\/wp.philroche.net\/wp-json\/wp\/v2\/posts\/361\/revisions\/362"}],"wp:attachment":[{"href":"http:\/\/wp.philroche.net\/wp-json\/wp\/v2\/media?parent=361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wp.philroche.net\/wp-json\/wp\/v2\/categories?post=361"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wp.philroche.net\/wp-json\/wp\/v2\/tags?post=361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}