Thursday, 3 January 2019

Another first ( for me ) - using IBM Cloud Automation Manager (CAM) to spin up stuff on IBM Cloud

I started playing with Terraform a few weeks back, and was able to spin up a VM on the IBM Cloud ( fka SoftLayer ) once I worked out certain parameters such as: -

  • IBM API Username
  • Account API Key ( Authentication Key )
  • IBM Cloud API Key

via the IBM Cloud consoles: -

https://console.bluemix.net/iam/#/apikeys

https://control.softlayer.com/

https://control.softlayer.com/account/user/profile

etc.

I've now gone one step further, and am starting to spin up workloads, using IBM Cloud Automation Manager (CAM), on the self-same IBM Cloud platform.

In part, CAM requires one to have two key things: -

  • A connection to the IBM Cloud - that bit was easy, as I already had the username and keys
  • An Advanced Content Runtimes
That latter bit was more difficult - for me, at least :-)

From the documentation: -



...
The Content Runtime is a virtual machine. A Chef server is installed on the virtual machine as part of the configuration of the Content Runtime. Two docker containers are installed on the machine to help communicate with the Chef server and to manage the software repository.
...



It took me a while to work out the parameters for this, and I may not have got it totally right ...

However, one thing that I did need to create was a TCP Subnet and a Virtual LAN (VLAN) on the IBM Cloud.

I ordered a new block of IP addresses from here: -


specifically this: -

4 Portable Private IP Addresses

which gave me a corresponding VLAN.

Having grabbed the subnet ( in the CIDR format of X.X.X.X/YY ) I also needed to give the newly created VLAN a "friendly" name. I also needed to grab the location - the IBM Cloud Data Centre - in my case, it's in Dallas, TX.

Like "proper" Terraform, CAM follows the same Plan and Apply phases, and provide useful feedback as one goes along.

I did see a few failures, including: -


data.ibm_network_vlan.private: data.ibm_network_vlan.private: No VLAN was found with the name '925'

ibm_compute_vm_instance.single-node: Error ordering virtual guest: SoftLayer_Exception_Public: The VLAN specified #XXXXX does not match the specified primary subnet's VLAN #XXXXX. Since the subnet supercedes the VLAN, the VLAN does not need to be provided. (HTTP 500)

ibm_compute_vm_instance.single-node: Error ordering virtual guest: SoftLayer_Exception_Public: The VLAN #XXXXX (925) is not a backend VLAN. (HTTP 500)



ibm_compute_vm_instance.single-node: Error ordering virtual guest: SoftLayer_Exception_Public: The subnet specified #XXXXX ( XXXXX ) does not currently have available slots. Free up space or remove the subnet specification. (HTTP 500)


Eventually, I realised that I needed to (a) ensure that my VLAN name was specified as the friendly name and (b) that the VLAN actually had some available IP addresses :-)

Once I did this, it all started working - the actual Apply took ~15-20 minutes, and I received lots of helpful emails from IBM Cloud before the infrastructure was properly provisioned.

So now I have the Content Runtime, time to play with some real workloads .....

This was also rather useful in providing context: -


No comments:

Reminder - installing podman and skopeo on Ubuntu 22.04

This follows on from: - Lest I forget - how to install pip on Ubuntu I had reason to install podman  and skopeo  on an Ubuntu box: - lsb_rel...