If you feel like this reading the title of this blog, you are not alone.
CI/CD isn't such as new concept and is really the central point of every devops implementation. However, having a full-stack CI pipeline is not so easy and speed bumps are generally around the database.
Typical challenges I hear from customers are,
In this multi-part series we will discuss building a full stack continuous integration pipeline in the Oracle public cloud.
Once setup, complex changes that involve application and database tiers can propagate to integration testing on commits. This allows a completely automated build process and improves release frequency.
Fig. 1 shows our proposed architecture.
The first and foremost problem we solve here is rapid provisioning of a test master. This can be a clone of a production database or a test database with seed data. Having their own dev environment is every developers desire. Often times if the application is deployed over multiple schemas, this become more of a necessity than a luxury. Let's see how we can clone a production/test database to create a test master and then provision thin clones on-demand which serve as dev/test copies
Log into your Oracle cloud service console through https://cloud.oracle.com. Here's what the dashboard looks like,
Once you pick the database service, the console shows all of your provisioned database instances along with summary information. In this case, lets say we wish to clone the 'prod' database to create a test master that will serve as a source for all of my thin clones.
We start with provisioning a new service through the 'Create Service' button. Let's fill-in the service details. I will call the service 'TestMaster', and pick options as shown below
Hit 'Next' to fill-in database details. All of this is pretty standard service creation stuff. The magic happens in the bottom right portion where you specify the source database backup to restore from.
The Initialize Data From Backup section is the place where you specify what source database you want restored and its backup location. Provide the database id of your source database, in this case 'prod'
To find the database Id of your source instance fire this sql shown below,
We also need to provide the storage container where the backup is located, and the credentials for your backup cloud service. Even if 'prod' exists on-premise, as long as you ship a backup to the oracle storage cloud, you can use this method to restore it as a new service. Backup containers are named in the format StorageAPIEndPoint/DomainName-ContainerName. To find out your Storage API endpoint or domain Name or backup container name, log into your storage cloud service account or talk to your storage cloud service or domain administrator.
And finally, you need to provide the decryption key. This is mandatory since you can only store encrypted backups in the Oracle backup cloud service. If you have an RMAN encrypted backup, you need to type in the key in the text box. If your source was encrypted using TDE keys, then zip up your wallet files and upload them by clicking the Edit button
If your source database exists in the database cloud service then most likely the wallet is located in /u01/app/oracle/product/12.1.0/dbhome_1/admin/<SID>/xdb_wallet
In this case I zipped up the xdb_wallet folder to wallet.zip, downloaded it to my local machine and then uploaded into the UI as shown above.
Confirm your submission and thats it! In about 20-30 mins your test master would be ready.
ok, so now that we have our point in time test master, we'll use it to create thin clones for developers. We will first create a point-in-time snapshot of the underlying storage volume to baseline our clones and then use the snapshot to provision clone instances.
Go back to the DB console and pick TestMaster
Click 'Admin' and select 'snapshots' tab
Any guesses how we can create a snapshot? Yes, the UI is pretty intuitive, you click the Create Snapshot button provide a name and you have a thinly provisioned snapshot of the underlying storage volume.
Once the snapshot is provisioned, click the hamburger menu to its right to reveal the Create Service option and use it to provision a new thin-cloned database service that uses the storage snapshot.
The steps are similar to provisioning a new service so I won't provide any screen shots here.
Thats it! You just provisioned your first dev copy. Multiple such dev copies of the test master can be provisioned using the snapshot.
In the next post we'll see how a developer orchestrates a java app server instance using the cloud stack manager, pulls code from the master git repository in the Oracle developer cloud service and starts coding his app and database changes.
Until then have fun playing around with database cloud service. If you don't have an oracle cloud account, you can always get a free trial at,