#DaysOfArm (6 of X)

This is my sixth #DaysOfArm article that tracks some of the experiences that I’ve had so far. And just to recap from the first post (here) on June 12 2021.

It’s been just over 2 weeks since the launch of Ampere Arm deployed in Oracle Cloud Infrastructure (OCI). Check this article out to learn more (here). And it’s been about one week since I started looking into the new architecture and deployment, since I started provisioning the VM.Standard.A1.Flex Compute Shape on OCI and since I started migrating a specific application that has many different variations to it to test it all out.

This is my next learning.

I’ve been on the automation side of Oracle Cloud Infrastructure and working with Ansible and Terraform. To provision compute images, you need to know the specific image you want to use. A documented catalog of the images can be found (here).

In the README sections of each of these images you can find further details including the important OCID which is used to identify the image in the Ansible and Terraform. Note that the OCID are different for each region.

This is great for a once off. And in Oracle Resource Manager, this isn’t an issue because you can use the tooling to create a better user experience by selecting the image itself.

BUT … if you are doing this externally on a build server and you want to be more dynamic, then using the OCI SDK is the way you can get this information. Here are a couple of examples that I used:

To get the full of images (in JSON format) for the Melbourne region.

oci --region MEL compute image list --compartment-id ocid1.tenancy.oc1..TENANCY_ID --all

The result looked like this:

To get this same list but in a concise CSV format using jq.

oci --region MEL compute image list --compartment-id ocid1.tenancy.oc1..TENANCY_ID --all | jq -r ".data[] | [.\"display-name\", .id] | @csv"

This result looked like this:

If I want a subset, then I can filter this list. I wanted to just have a look at the Arm images.

oci --region MEL compute image list --compartment-id ocid1.tenancy.oc1..TENANCY_ID --all | jq -r ".data[] | select(.\"display-name\" | contains(\"arch\")) | [.\"display-name\", .id] | @csv"

And the result was this.

These calls are region-specific so you will need to repeat this command for the different regions you have access. If you try to run this command in a region that you are not subscribed to, it will return saying that you are not authorised.

There are different ways that you can get access to the right compute images that I need to use to provision your Compute VM on OCI.

If you want to try this out yourself or work on your own application, sign-up (here) for the free Oracle Cloud Trial. I’d be interested to hear your experiences and learn from others as well. Leave a comment or contact me at jason.lowe@oracle.com if you want to collaborate.

There’s plenty of work to make this more achievable for everyone. And hence sharing this knowledge is the reason why I’m writing this series – #XDaysOfArm. I’ll keep documenting as long as I keep learning.

Advertisement

Author: Jason Lowe

I am passionate about how organisations adopt IT quickly and sustainably to achieve a specific and measurable outcome. This thinking is supported through lean IT practices in operational support and project delivery, and adopting these practices with Oracle technologies by creating sustainable platforms. I'm also interested different perspectives and drivers - from enterprise to start-ups, academia to commercial to public sector, cost-sensitive (risk) to value-driven (reward) - all of which influences decisions that organisations make. I have a passion for community and have been called "a connector" - meeting new people that are trying to solve valuable and hard problems and connecting them with others that can validate and help realise their full potential. I've supported different organisations like TADHack and Hacking Health as a global organiser. I'm is a persistent blogger on medium.com and redthunder.blog and on LinkedIn - https://www.linkedin.com/in/lowe-jason #CommunityMatters #ItTakesAVillage

One thought on “#DaysOfArm (6 of X)”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: