DB Sync with Gen 2 ExaC@C: Synchronizing operating system command line database management actions with Exadata Cloud@Customer automation
Have you ever wondered about breaking the Gen 2 ExaC@C automation because you you wanted to directly call the underlying tools in the customer VM, like dbaascli, because you needed the deployment flexibility afforded by those tools to create database or modify database characteristics but were not sure if you can execute these actions outside of Gen 2 Cloud@Customer UI? Well, I have a good news for you.
Introducing DB Sync:
Oracle recently introduced a feature called DB Sync with Gen 2 ExaC@C that syncrhonizes certain command-line actions performed with dbaascli and/or dbaasapi commands with the Cloud UI* so you can use the method that works best for your database provisioning needs. This feature work with both database homes and databases such that both actions - creation and modification from dbaascli / dbaasapi - are synchronized with the UI. Another good news is that there is nothing you have to do for the synchronization to work - it is fully automatic - managed by a daemon that wakes up every 10 min and synchronizes the metadata between dbaasapi/dbaascli and Cloud UI.
Benefits Of DB Sync:
Database & System Administrators use command-line simply because they like having that control of saved scripts that can be reused easily after making some simple changes. Another reason could be that they want to perform operations from command-line that are not yet available from the Cloud UI. For example, as of the time of writing of this blog, Oracle has not introduced DB/GI Patching of databases from UI for Gen 2 ExaCC but it is available from command-line tools. The DB Sync feature enables synchronization of the effects of certain command line based database operations with the Cloud Control Plane metadata such that the same changes can now be reflected in the UI. For example, I may apply an Oct 2019 (19.5) update to my DB Home using the command line, and the DB Sync capability will ensure that the UI eventually reflects this update.
DB Sync basics:
For Cloud UI to accurately reflect the changes made via command-line, the metadata updated by dbaascli/dbaasapi needs to be reflected in the Cloud UI metadata. To do this, the OCI control plane issues a request to dbcs-agent (database cloud service agent) running on customer VM every 10 mins and asks the agent to run dbaasapi commands to get any changes done via command-line operations. Upon receiving any such changes back from the dbcs agent, metadata maintained by the OCI control plane is updated and is reflected on the Cloud console. In the example above, if a DB Home was updated with Apr 2020 Release Update (RU), that information will be captured by dbcs-agent and sent to control plane. The OCI Control plane in return will update the RU displayed on the Cloud console from Oct 2019 to Apr 2020.
To see the list of all attributes synced between host tooling (command-line metadata) and control plane (cloud-console metadata) by DB Sync, refer to documentation.
Figure 1: Command output showing the running dbcs-agent process
Figure 2: DB Sync Process Flow
What actions does DB Sync Synchronize:
The following actions are synchronized with the UI
After the properties are synced, UI based life cycle operation can be performed on synced object.
In the part-2 of this blog post, I will talk about each of the above use-case with an example. For each of the above use-cases, I will validate that DB Sync works by first performing the command-line action and then checking if the changes are reflected in the UI. Finally, I will validate that UI based life cycle operation can be performed on synced object.
Conclusion: DB Sync is a foundational feature to Gen 2 ExaC@C cloud functionality that allows you to use dbaasapi to create/modify databases/database homes and automatically sync the changes to the OCI Control Plane.
"*" Cloud UI - Terms Cloud UI, Cloud Console and The OCI Control plane have been used interchangeably in this blog and it represents all of the following interfaces Console/APIs/OCI CLI/SDK and Terraform
Are you looking for more Gen 2 ExaC@C Blog Posts