This section discusses gateway high availability use cases.
Gateway High Availability Use Cases
High availability of gateways is supported by configuring cloud agents with two or more gateway URLs. High availability ensures that the cloud agent can connect to the Oracle Management Cloud through the second gateway if the first gateway fails.
If you have deployed the cloud agent with a gateway, and the gateway goes down, no data will be transmitted to Oracle Management Cloud. To avoid this, you can deploy a second gateway and ensure that the cloud agent uses the second gateway to communicate with Oracle Management Cloud when the first gateway is down.
The following use cases are supported:
Adding Additional Gateways while Deploying the Cloud Agent
You can deploy two gateways (
gateway_1 and gateway_2) before you deploy the cloud agent. When you install the cloud agent, you must first specify the
gateway_1host and port number and then specify
gateway_2by passing the
ADDITIONAL_GATEWAYSparameter. Run the following command on the host on which cloud agent is being deployed:
./AgentInstall.sh GATEWAY_HOST=<gateway_host_1> GATEWAY_PORT<gateway_port_1> ADDITIONAL_GATEWAYS=<https://<gateway_host_2>:<gateway_port_2>where:
gateway_host_1is the host on which the first gateway is deployed.
gateway_port_1is the port number of the host on which the first gateway is deployed.
gateway_host_2is the host on which the second gateway is deployed.
gateway_port_2is the port number of the host on which the second gateway is deployed.
Note:You can get the gateway information by running the following command on the hosts on which the gateways are deployed:
<AGENT_BASE_DIRECTORY>/agent_inst/bin/omcli status agent
Adding Additional Gateways to an Existing Deployed Cloud Agent
To add additional gateways to a cloud agent that has already been deployed with a gateway, follow these steps:
Run the following command on the host on which you want to deploy the cloud agent with the first gateway:
./AgentInstall.sh AGENT_TYPE=cloud_agent AGENT_BASE_DIRECTORY=<the absolute path to the agent base directory> AGENT_REGISTRATION_KEY=<registration key value> GATEWAY_HOST=<gateway_host_1> GATEWAY_PORT=<gateway_port_1>
Run the following command on the host on which you want to deploy the second gateway:
./AgentInstall.sh AGENT_TYPE=gateway AGENT_BASE_DIRECTORY=<the absolute path to the agent base directory> AGENT_REGISTRATION_KEY=<registration key value>
Run the following command on the host on which the second gateway was deployed to get the gateway URL.
./<AGENT_BASE_DIRECTORY>/agent_inst/bin/omcli status agent
Example result of the preceding command::
Create a plain text file,
gateway.txt, as follows:
Insert the URL for the second gateway in the following format and save the file.
Navigate to the
/bindirectory of the cloud agent and run the following command to add the gateway:
./<AGENT_BASE_DIRECTORY>/agent_inst/bin/omcli add_gateway agent <full path to the gateway.txt file>
Stop the cloud agent.
./omcli stop agent
Navigate to the
<AGENT_BASE_DIRECTORY>/core/1.<n>.0/stage/agent_inst/sysman/config/server/directory on the gateway host that was added above and copy the
importCertfile to the cloud agent host as follows:
Back up the existing certificates directory.
mv <AGENT_BASE_DIRECTORY>/agent_inst/sysman/config/server <AGENT_BASE_DIRECTORY>/agent_inst/config/server_bak
Secure the cloud agent.
./omcli secure agent
Start the cloud agent.
./omcli start agent