Since EM12c Release 5 Oracle has integrated the connection to the Oracle cloud, databases can be monitored and handled very easy, on-premise databases and cloud databases are now managed in one tool. Adding a cloud database to an on-premise EM12c from cloud.oracle.com is very easy and done in a few steps:
- Create a SSH key
- Create a DBaaS instance on cloud.oracle.com
- Configure a local Linux agent as Hybrid Cloud Gateway Agent
- Create an EM12c credential for SSH login
- Install EM12c Agent via push method on the DBaaS machine
- Discover and add the new targets
A few documents are available how this setup has to be done. But the best way to get some experience is just to do it. We do not start from scratch with the EM12c integration, I have already created a new DbaaS instance which is up and running:
Configure a local Linux Agent as Hybrid Cloud Gateway Agent
A local agent has to be configured to communicate to the Oracle cloud as gateway. This has to be an existing Agent. I have decided to use the local OMS agent as Hybrid Cloud Gateway agent. The concept behind the Hybrid Cloud Gateway and the configuration is well described here, also how to configure it high available, the used ports etc.
oracle@training-monitoring:~/ [oms11107_a] emcli login -username=sysman
oracle@training-monitoring:~/ [oms11107_a] emcli sync
oracle@training-monitoring:~/ [oms11107_a] emcli register_hybridgateway_agent -hybridgateway_agent_list='training-monitoring.trivadistraining.com:3872'
Successfully registered list of agents as hybridgateways.
Create an EM12c Credential for SSH Login
The credential contains an username and the private ssh key for the passwordless connection to the new host of the DBaaS. The scope is global, so all new cloud connections can use it. You can create the credential in menu Setup – Security – Named Credential. A test run is not possible because there were no other cloud targets configured at the moment.
Install EM12c Agent via Push Method on the DBaaS Machine
The installation of the agent is simple, it’s almost like local installations. The only two changes are a) to use the SSH credential and b) to choose the Hybrid Cloud Gateway Agent.
Setup – Add Target – Add Targets Manually – Add Host Targets – Add Host …
Information: During tests I ran into errors when I wanted to resolve the cloud hostname via /etc/hosts file. I was able to install the agent, but not to configure the databases. So I used the IP address here instead of the hostname, this works fine.
Select Named Credential and activate Checkbox to enable the Hybrid Cloud Gateway Agent. This port will be set automatically.
Deploy the agent and run root.sh on cloud host.
In the agent details via Setup – Manage Cloud Control – Agents you can verify if it’s a cloud agent or not.
Discover and add new Targets
After the successful agent installation, the cloud database can be added. Target – Databases – Add Enter Hostname – Next.
The fresh added database is available after a few minutes. The look and feel is as usual, only the small cloud icon on top shows you that the database is hosted at Oracle.
The integration of a cloud database into a on-premise EM12c is well done by Oracle. This is only the beginning, in the next days I will test more features like cloning a on-premise pluggable database to the cloud, set up a cloud database in the EM12c Self Service Portal and many more. It’s important to verify what it’s possible – and what’s not. Have fun with in the cloud!