In this article series, we are looking at the steps for setting up the Oracle Hybrid Cloud via the latest version – Enterprise Manager Cloud Control 13c. The aim is to install a hybrid cloud agent via the hybrid gateway.
A hybrid cloud, of course, is when you have multiple databases running on premises as well as on the public cloud. Many companies have this scenario.
In the previous part of the article series here, we went through the pre-setup steps for the hybrid cloud, including setting up one of your OMS agents as the hybrid gateway agent, creating SSH keys for the OMS server, and creating a named credential with SSH key credentials for the hybrid cloud. You would use an account (either trial or production) for the Oracle Public Cloud (OPC) at cloud.oracle.com, for the Database Cloud Service. You will have created an Oracle Database Service (a server with an Oracle database) on the Oracle public cloud in advance, and it would be up and running.
As an initial step, you also copied the OMS server public key to the authorized_keys file on the Oracle Public Cloud database server. We now continue with testing the Hybrid Cloud capability, in this third part of the article series.
Installing the Cloud Agent
Log in to the Enterprise Manager console as SYSMAN or a super administrator. Select Setup | Add Target | Add Targets Manually. Figure 3 appears.
Figure 3: Add Targets Manually
In the section “Add Host Targets”, click on “Install Agent on Hosts”. The Add Host Targets screen appears (Figure 4).
Figure 4: Add Host Targets
In the “Add Host Targets” screen, you need to type in the IP address of the Oracle Public Cloud database server. Select the platform as Linux x86-64 (the only one that can be chosen for the hybrid cloud at the time of writing). Click on the Next button.
A warning appears that you have used an IP address or short name, and the host name is not fully qualified. The full text of the warning is as follows:
“The host names specified include IP addresses or short names. It is advised to provide Fully Qualified Host Names, such as foo.mydomain.com, that are persistent over the life of the targets. It is recommended for ease of maintenance and overall security. However, you can choose to ignore this warning and proceed by clicking Next.”
Note that if you want to use a full host name for this IP address, you will need to add the host name and address to /etc/hosts on the OMS server as well on the Oracle Public Cloud database server before the agent install; otherwise the “emctl secure agent” command which is run by Enterprise Manager at the end of the agent install procedure will not work.
Ignore the warning and click on Next. The Installation Details screen appears, as seen in Figure 5. The Agent Software version that will be installed is 18.104.22.168.0.
Figure 5: Add Host Targets: Installation Details
On this screen, enter the Installation Base Directory for the agent. Adhering to cloud database standards, which are derived from the earlier well-known Oracle Flexible Architecture (OFA) standards, this directory is put under /u01/app/oracle/product where other Oracle database software has been installed when the OPC database server was created.
You can use any name for the base directory. We have used “agentHome”, so the full directory path is /u01/app/oracle/product/agentHome.
On entering the base directory, the Instance Directory in the next line is automatically generated as “agent_inst” under /u01/app/oracle/product/agentHome.
As the named credential, select “NC_OPC_DBCS”. This named credential uses SSH key credentials, and was pre-created with the SSH private and public keys of the OMS server.
A very important thing to do at this stage is to expand the “Optional Details” section by clicking on it. The expanded details are seen in Figure 6.
Figure 6: Optional Details
Make sure you tick “Configure Hybrid Cloud Agent”. Note that if this is not ticked and the Hybrid Cloud Agent is not selected, the cloud agent install on the Oracle Public Cloud database server will proceed but will ultimately fail.
As the Hybrid Cloud Gateway Agent, we have selected the previously registered gateway agent. Since we have only one agent in our Enterprise Manager installation, which is the agent on our OMS server; we registered this as the Gateway agent in one of the pre-setup steps. This is okay for testing purposes, but in an actual production scenario you should not register the OMS agent. Instead, register an agent on a less-utilized target server as the gateway agent.
Keep the Hybrid Cloud Gateway Proxy port at the default value of 1748. Click on the Next button. The Review page appears (Figure 7).
Figure 7: Add Host Targets: Review
Review the information, and click on “Deploy Agent”. The procedure starts. The first step is the Agent’s “Initialization”, as seen in Figure 8, followed by remote prerequisite checks and then the actual deployment.
Figure 8: Agent Deployment: Initialization in Progress
The initialization of the agent includes remote validations (a check to see if enough space is available, etc.) and transferring the agent software to the destination host.
While the transfer and deployment are in progress, you can monitor them if you SSH to the OPC database server. Change your directory to the Agent home. You will see that the size of the cloud agent that is installed is considerably smaller than a normal Enterprise Manager agent. (This is the size after the agent has completed the install.)
[oracle@AHUTESTSERVER]$ cd /u01/app/oracle/product/agentHome
[oracle@AHUTESTSERVER agentHome]$ du -hs .
After the Initialization step, the “Remote Prerequisite Check” step also completes (Figure 9). A warning is displayed about the root privileges required to run the root.sh script at the end of the agent install. Note that we have ticked on “Show only warnings and failures”.
Figure 9: Remote Prerequisite Check Warning
Ignore this warning, and continue with deployment from the menu via Continue | Continue, All Hosts. The Agent deployment proceeds, and is successful (Figure 10).
Figure 10: Successful Agent Deployment
We will continue in the next part of this article series.