iPhone app 'OCI Manager' for Oracle Cloud

iPhone app 'OCI Manager' for Oracle Cloud

Published on: Category: Oracle

During a recent presentation of Richard Garsthagen (Director Cloud Business Development at Oracle EMEA) the existence of a mobile app was mentioned: the OCI Manager. Moreover, Richard appeared to be the creator of this app. With the app, you should be able to manage some basic functionalities in your Oracle Cloud environment. I downloaded the app and I must admit, the login screen was not very inviting or appealing. But… You only fill that in once, so let’s see what else the app has to offer.

The app is only available for iPhone, and is maintained by Richard Garsthagen. That’s a bit peculiar. You would expect Oracle to invest more in mobile apps and user-friendly interfaces.  

Richard created a YouTube video and a blog post to get you going, but during my first attempt I got stuck on a value I needed to fill in. I decided to write a blog post about my experiences with this app. 

To get the app, search for OCI manager in the Apple store. After downloading, you can start right away.

First, you’ll have to create an account profile.

What do I need:

  1.       Tenant OCID
  2.       User OCID
  3.       Fingerprint
  4.       Region
  5.       Private PEM Key (SHA256)

All the information has to be filled in on my iPhone, and I can’t copy/paste it from my desktop into the app. What I can do, is mail the information to an email I can read on my iPhone and copy/paste this to the app. So you need two mails for convenience’s sake: one for the first 4 fields, and one for the private PEM key. Let’s start.

1. Tenant OCID

To get your tenant OCID, first click on your region at the top right of your screen and choose ‘Manage Regions’.

Go to the ‘details’ page.

On the details page is the OCID of the tenant. Click copy, then paste this in the first email you are about to send.

2. User OCID

For the User OCID, you have to choose your profile in the top-right corner of your screen.

Then you can copy your OCID, and paste this in your first e-mail, together with the tenant OCI.

3. Fingerprint

Fingerprint is the one which comes with the public key, when generated. When choosing ‘Add Public Key’, you will have to fill in a generated public – PEM key.

Plan A.

I followed the tutorial for generating keys for Oracle Cloud services, with Putty-Gen.

I converted this key in a PEM key.

  1. ssh-keygen -f rsa-key-20191216.pub -m PEM -e > rsa-key-20191216.pem

Unfortunately, I didn’t succeed in getting the job done with these tools. I tried out a few different things, but I still got the following message: InvalidKey – Invalid RSA public key. I’m sure it’s a valid PEM key, though…

Over to plan B. An attempt with OpenSSL, documented here:

Installed Git Bash and followed the document:

  1. mkdir ~/.oci
  2. $ openssl genrsa -out ~/.oci/oci_api_key.pem 2048
  3. Generating RSA private key, 2048 bit long modulus (2 primes)
  4. .................................+++++....+++++
  5. e is 65537 (0x010001)
  6. $ chmod go-rwx ~/.oci/oci_api_key.pem
  7. $ openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem
  8. writing RSA key
  9. $ cat ~/.oci/oci_api_key_public.pem
  10. -----BEGIN PUBLIC KEY-----
  11. MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAth5E6pmBPSM+vaGsCRvx
  12. r1UoXFRoEf97pAbfd57gwzk3hJBW8wCe/wJXAi81bkk8TYCAa2YX/VUdOpR1YNd
  13. U499aVT//78AF2hIb8NVWrmd+6yYwYC9vXXXXXXXXzOIr0wUrv3vwt7MbwfowZCO
  14. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX7rKgmy9rhclUTg9ikh8smT2wmzXdSkJ
  15. sip+OHBxSiZaElVHKI5jD33DgogcFH8MgdxU64Zs+fgjjmwUDpRuqUrHWSApUUEe
  16. AevmPM3Mck0RiiCVSHOJLS43F/n+3OBTE92TgOePPp/f15MV+BhEy7wghZzYQfHf
  17. ZwIDAQAB
  18. -----END PUBLIC KEY-----

And this worked!! I filled in the private key and got the Fingerprint.

You can also get the Fingerprint by using this command:

  1. openssl rsa -pubout -outform DER -in ~/.oci/oci_api_key.pem | openssl md5 -c

4. Region

Filled in ‘eu-frankfurt-1’.

I mailed the first 4 values to myself to read on my iPhone. Now, I need just one.

5. Private PEM-key

Put the private key, generated before, in a mail:

  1. $ cat ~/.oci/oci_api_key.pem
  2. -----BEGIN RSA PRIVATE KEY-----
  3. MIIEoQIBAAKCAQEAth5E6pmBPSM+vaGsCRvxr1UoXFRoEf97npAbfd57gwzk3hJB
  4. W8wCe/wJXAi81bkk8TYCAa2YX/VUdOpR1YNdU499aVT//78u0XS7bgNAF2hIb8NV
  5. Wrmd+6yYwYC9vzOIr0wUrv3vwt7MbwfowZCO1Xju8T1XPMLUfC67V0R2ZDr8Htwg
  6. Czk1+7rKgmy9rhclUTg9ikh8smT2wmzXdSkJsip+OHBxSiZaElVHKI5jD33Dgogc
  7. ……
  8. -----END RSA PRIVATE KEY-----
  9.  

I sent this last email to myself and filled in all the fields of the account profile.

And… I got in!

First thing I noticed is a list of the compartments I got.

The autonomous databases I got in this compartment (free tier):

What’s in eminfra? Ah, another Autonomous Database. This used to be an Enterprise Manager Repository.

What can I do with the database in this app: Start, Stop, Reset, Scale.

Very limited, but could be sufficient for a start.

What scaling looks like:

Wrap up

In my opinion, a mobile app for Oracle Cloud Infrastructure doesn’t have to be equipped with extensive functionality. I was called numerous times for starting up a VM for developers or testers, so I can imagine that starting and stopping is the very basic functionality, and a must-have in the Cloud, where you’re saving money when VM’s are down.

Speaking of which, insight in your account balance is also a desired functionality in an app. As I understood, that will be in a next release. 

However, it remains a bit odd that this app (or similar app) is not fully supported and equipped with resources by Oracle. Microsoft Azure has a quite professional, user-friendly app too!

Sources

YouTube: https://www.youtube.com/watch?v=YJAfz7p18Kc&t=262s

Blog: https://www.oc-blog.com/iphone/

Tutorial generating keys for Oracle Cloud: https://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/javaservice/JCS/JCS_SSH/create_sshkey.html

Job Oprel
About the author Job Oprel

Job Oprel is a Solution Architect working for Qualogy with special interest in HA, hybrid cloud environments and Oracle software costs. In 2020, Job was appointed Oracle ACE Associate for his contributions to the Oracle community.

More posts by Job Oprel
Comments
Reply