Oracle Enterprise Manager 12cR5 – Let’s connect to the Oracle Cloud

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
  • Enjoy

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:

cloud_1

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.

http://docs.oracle.com/cd/E24628_01/doc.121/e24473/hybrid-cloud.htm#EMADM15149

oracle@training-monitoring:~/ [oms11107_a] emcli login -username=sysman
Enter password
Login successful
oracle@training-monitoring:~/ [oms11107_a] emcli sync
Synchronized successfully
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.

cloud_2

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.

cloud_3

Select Named Credential and activate Checkbox to enable the Hybrid Cloud Gateway Agent. This port will be set automatically.

cloud_4

Deploy the agent and run root.sh on cloud host.

cloud_5

In the agent details via Setup – Manage Cloud Control – Agents you can verify if it’s a cloud agent or not.

cloud_6

Discover and add new Targets

After the successful agent installation, the cloud database can be added. Target – Databases – Add Enter Hostname – Next.

cloud_7

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.

cloud_8

Enjoy

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!

Links:

  • https://cloud.oracle.com/database
  • http://docs.oracle.com/cloud/latest/dbcs_dbaas/index.html
  • http://docs.oracle.com/cd/E24628_01/doc.121/e24473/hybrid-cloud.htm#EMADM15141