X

Break New Ground

Hey Siri! Create my Oracle Autonomous Database!

Manish Kapur
Director, Oracle Cloud Platform

As developers, we usually don't enjoy setting up the infrastructure and environments needed to develop and deploy applications. We prefer getting straight to developing applications as quickly as possible. Recently, I was working on developing a sample application using Node.js and connecting to Oracle Autonomous Database. Typically, to do this and for any other similar development projects, I would have to spin up a VM, install all the developer tools, install the runtime needed for my project (Node.js, PHP, Java), create a Database instance etc.


In Oracle Cloud Infrastructure (OCI), our focus is to automate as much as possible. In my case, I decided to try and automate the creation of Oracle Autonomous Database using Siri on iPhone as a fun experiment. The steps below are a POC (or rather an experiment) that demonstrate how easy it is to achieve this. 

  1. Spin up a VM using Oracle Cloud Developer Image VM from the Oracle Cloud Marketplace. The Cloud Developer Image is full of all the goodies and everything a developer needs to be up and running in a few minutes. 
  2. Configure the OCI CLI in the Cloud Developer Image VM. The OCI CLI is a command line interface tool that you can use to complete Oracle Cloud Infrastructure tasks and it comes pre-installed in the Cloud Developer Image.
  3. Write a script to create an Autonomous Database instance on the Cloud Developer Image VM. A simple create_atp.sh script to create an Autonomous Transaction Processing (ATP) serverless instance would look like:

oci db autonomous-database create \                                                      
--compartment-id [COMPARTMENT OCID] \
--db-name ATP1 \
--cpu-core-count 1 \
--data-storage-size-in-tbs 1 \
--admin-password [password] \
--db-workload OLTP \
--display-name "ATP1" \
--license-model LICENSE_INCLUDED \
--is-auto-scaling-enabled true \
--is-dedicated false

  1. On your iPhone, use the Shortcuts app to create a short cut and call it "Create Autonomous Database". Inside the shortcut, add a shortcut step that will include a "Run script over SSH" and in that script you specify the IP Address of the Cloud Developer Image VM as the host where the script will be executed. Use SSH key based authentication to connect via SSH to the Cloud Developer image VM. And finally, invoke the create_atp.sh script. The screenshot of this shortcut is shown below.

  1. You are all set! Say - "Hey Siri! Create Autonomous Database" and voila your Oracle Autonomous Database starts provisioning in your Cloud tenancy. Within a couple of minutes, your Database instance will be up and running.

As you can see it is extremely easy to setup and invoke commands on OCI using Siri on your iPhone. This was an example of creating an Autonomous Database instance, but you can use a similar approach and do lots of creative things using the OCI CLI and other Developer SDKs on Oracle Cloud like creating an Oracle Kubernetes Engine cluster or deploying Serverless Functions.

Join the discussion

Comments ( 5 )
  • Sergio Castro Saturday, November 16, 2019
    Amazing!
  • Sergio Castro Saturday, November 16, 2019
    Amazing
  • Matthew Artibee Friday, November 22, 2019
    I am so glad there are smart people out there looking for ways to make things simple. As Sergio stated, this is amazing. For developers that are constantly doing small projects for sales, marketing, manufacturing, etc. this is just soooooo cool. What a productivity tool this would be in practice. Glad you're on our side!
  • Pavel Tuhari Sunday, November 24, 2019
    +1 :)
  • swati Wednesday, December 11, 2019
    This is Super cool !!
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.

Recent Content