Using TIBCO Cloud™ Integration - Hybrid Agent to Connect TIBCO Flogo® Apps to On-premises Databases
You can set up hybrid connectivity between TIBCO Flogo® apps and on-premises or private cloud databases using the Flogo Database connector design-time service (or DB Service). DB Service is a singleton user app you run per subscription of your organization. It enables the activities of a Flogo Database connector to be connected to your on-premises or private cloud database through the TIBCO Cloud Integration - Hybrid Agent. The database service is accessible only by the users that belong to the organization.
The DB Service requires that you enable the service using the TIBCO Cloud™ - Command Line Interface, TIBCO Cloud™ Integration API, or Web UI, run the TIBCO Cloud Integration - Hybrid Agent on-premises, and enable the on-premises DB Service in your Flogo connectors, as follows:
- Log in to TIBCO Cloud™ Integration.
- Download the TIBCO Cloud™ - Command Line Interface, as described in Downloading TIBCO Cloud™ Integration Tools.
- Install the CLI as described in Installing the TIBCO Cloud™ - Command Line Interface.
- Download and configure the TIBCO Cloud Integration - Hybrid Agent for Hybrid Connectivity as described in Downloading, Configuring, and Running the Hybrid Agent. Do not start the agent yet.
- Make sure your access to the on-premises or private cloud database is ready.
-
At the command line, run the following commands, replacing
<keyname>
with the access key name,<keyvalue>
with the key secret, and<newprofile>
with a new profile name:tibcli login tibcli org dbservice enable --accessKey <keyname>
Tip: You can also enable or disable the DB Service from the Web UI. Instead of running the second line above, go to Environment & Tools > Hybrid Connection in the Web UI, click the Flogo DB Services Enable toggle, and select an access key. -
Run the command to start the TIBCO Cloud Integration - Hybrid Agent for Hybrid Connectivity as described in Using the Agent for Hybrid Connectivity with a spec for the database connection. For example:
tibagent start agent --spec 3306:10.97.170.85:3306 <agentname>
-
Once the Agent starts, create or edit a Flogo app in the TIBCO Cloud Integration Web UI and create a MySQL connection. In the connection, set On Premise DB Service to true.
This enables the activities of a TIBCO Flogo® Database connector to be routed to your on-premises database through the TIBCO Cloud Integration - Hybrid Agent instance now running.
For step-by-step instructions, see Creating an Oracle MySQL Connection.
Note: This procedure showcases the DB Service configuration for an Oracle MySQL Server connection to an on-premises database, but these steps also apply to Microsoft SQL Server, and PostgreSQL Server connections.
- Click Push in the Web UI to push the app after it has been designed. The app is not running. Do not scale up the app yet.
- In the TIBCO Cloud Integration Web UI, click the app to go the associated App Details page, then click Environmental controls > Hybrid Connectivity.
- Choose the access key that you created earlier.
- Click Push updates in the Web UI again to repush the app.
- Scale up the app to start it running.
The app works in design time as well as runtime.
Related Topics
Installing the TIBCO Cloud™ - Command Line Interface
Downloading, Configuring, and Running the Hybrid Agent