Using the Agent for Hybrid Connectivity

Before starting, you must download and configure the TIBCO Cloud™ Integration - Hybrid Agent and get an access key, as described in Downloading, Configuring, and Running the Hybrid Agent.

The configuration topic above mentions that there are additional steps for the configure and run commands when configuring Hybrid Connectivity to establish a tunnel to on-premises resources. This topic describes these options.

You can configure an agent to manage and monitor remote apps or for Hybrid Connectivity to establish a tunnel connection between remote apps and on-premises resources. You cannot use a single agent to do both. Configure a dedicated agent for each one. These agents can run on the same machine.

Step 1: Download the TIBCO Cloud Integration - Hybrid Agent

  1. Follow the steps in Step 1 of Downloading, Configuring, and Running the Hybrid Agent to download the agent and get a key.
  2. Add the access key for TIBCO Cloud Integration - Hybrid Agent to one or more apps, as described in Setting the App Access Key for Hybrid Connectivity.

Step 2: Configure the TIBCO Cloud Integration - Hybrid Agent

  1. Follow the steps in Step 2 of Downloading, Configuring, and Running the Hybrid Agent to configure the agent. You must run three commands: tibagent login, tibagent configure agent, and tibagent configure connect. This is a one-time process.
Note: tibagent configure connect can only configure one key per configuration. If you run it a second time, it overwrites the first configuration.

Step 3: Start the TIBCO Cloud Integration - Hybrid Agent

Follow the steps in Step 3 of Downloading, Configuring, and Running the Hybrid Agent to start the agent with the tibagent start agent command. You also need to pass one or more connection specs.

A spec is a mapping of your on-premises host and port, and the port to which it is mapped on the container running your app within TIBCO Cloud Integration. You can map a port to a different port if you have a port already in use. If an app uses multiple servers, you can pass more than one spec by specifying multiple -s spec arguments.

The syntax for a spec is containerPort:onPremiseHost:onPremisePort

The syntax for starting the agent with specs is:

tibagent start agent --spec <spec> <agentName>

For example, to start a single TIBCO Cloud Integration - Hybrid Agent instance named MyAgent used by multiple apps, with specs to Jaeger open tracing on port 14268, Prometheus app metrics monitoring on port 9090, and a MySQL server for design time and runtime use on port 3306:

tibagent start agent --spec 14268:localhost:14268 \
                     --spec 9090:localhost:9090 \
                     --spec 3306:localhost:3306 \
                     MyAgent

Connections are established with every app that uses the access key specified during configuration. This dynamically checks for newly created apps using the access key. If a new app uses the configured access key, a new tunnel is launched for it as well. If you configured the agent with --app arguments to specify app names, connections are made for those apps only.

Port Mapping

Most of the time, the on-premises port and the container port are the same. However, if the app port is not available in the container (for example, when the app is using that port), the port can be remapped to a different port.

This means the on-premises resource at onPremiseHost:onPremisePort are reachable from the app container as onPremiseHost:containerPort.

Using the Resource URL in a Client App

Note that when you use the URL for an on-premises resource in a client app, you must use the same format as used in the spec.

For example, if you specified -s 1122:example.com:9991, where 1122 is the port opened in the app container and 9991 is the on-premises port, the URL used in the client app must use example.com:1122. Do not substitute hostname or an IP number, even if they do resolve to example.com.

You can use an IP number in your client app if you also used it in your spec when starting the tunnel.

Role Requirements