The cloud is more than a portal: oracle-dbcs-cli

A common misconception is that “The Cloud” is only accessible through the portal which is provided to you. In this post I will show that Oracle has some utilities ready for you to manage the cloud using the command line (cli). One way to do it, and which is very useful when you only use one-time commands, is Curl. The REST API is well documented with curl examples as well.
This time we will focus on oracle-dbcs-cli utility and the oracle traditional cloud.

To run the utility, a template/dat/configfile is required. There is a sample file bundled with the download which you can adapt to your needs and also that is documented here: https://docs.oracle.com/en/cloud/paas/database-dbaas-cloud/csdbi/oracle-dbcs-cli-create-data-file.html

So, no need to blog you would think? Well, there are a few things to mention.

sm_url

I am located in EMEA and we have a subscription to an EMEA based datacenter. When you copy paste the sm_url from the oracle documentation it will not work. I summarise it like this:

vm size

I left most of the config default and started with a config as basic as possible. I will highlight the problematic rules only here.

In the template there is for storage requirements this line:

1

# db_vols=(bits:30gb data:25gb fra:10gb redo:10gb)

It’s best to crosscheck to the documentation again because apparently it has changed over time. A small adaption gives the following line which is actually usable:

1

db_vols=(bits:60gbdata:15gbfra:26gbredo:25gb)

What is very interesting in the document: “25 GB volume completely allocated to /u04 on the virtual machine. (If the data volume is 25 GB, then the redo volume is allocated 26 DB instead.)”. Definitely something to take into account.

The bad thing about this is, that the message in the activity log from the portal is not showing exactly what’s wrong:

When you look this error up you hit this bug: Bug 26254417 – CREATE DBAAS INSTANCE FAILS WITH EXPECTED ONE ORCHESTRATION FROM DBORCH BUT GOT 0.

The thing is … that bug refers to the password but the password used was a strong one, so this one could not be applicable. When digging further, it turned out that also not specifying the correct size of the volumes gave this error.

Another thing worth mentioning is the size of the vm boot volume as documented in the documentation.

When using it this way, you will end up with an error telling you that the boot volume is too small.

Oracle versions

In my opinion, Oracle 12.2 is the way to go. So whilst preparing the configfile, you must specify the version. Unfortunately the oracle-dbcs-cli does not offer you that choice. You have to stick with 12.1.0.2 (default in the template) or 11.2.0.4.

This means you really have to stick with these versions. In my next blog-post about the psm utility you will see that you can specify a json-file as the payload in the rest call and that one does support 12.2.

Glassfish

For the project I am preparing I wanted to see if we can use the VM which comes with DBaas also as a web server. Then I saw in the configfile that you could also specify glassfish. Well … guess twice …