2. Installation and Setup
This chapter describes the requirements and installation procedures for the Database Integration Adapter.
2.1. Before You Begin
Database Integration Adapter uses ODBC to interface with databases. It requires the same core components as RTI Connext Gateway, as well as additional dependencies for database connectivity.
The following components are needed to create a successful connection:
An ODBC driver manager (unixODBC for Linux systems)
Database-specific ODBC drivers
MariaDB: MariaDB Connector/ODBC 3.1 or later
PostgreSQL: PostgreSQL ODBC Driver (psqlODBC)
Note
The Docker-based installation comes pre-configured with all required dependencies.
2.2. Docker-Based Compilation
The easiest way to build Database Integration Adapter is using the provided Docker environment. The container includes a fully pre-configured environment with all dependencies.
Important
Database Integration Adapter is disabled by default. You must explicitly enable it by
setting the CMake variable RTIGATEWAY_ENABLE_DIA=ON. See
Compiling with CMake for more information.
2.2.1. Docker environment components
The provided Dockerfile (located in resource/docker/Dockerfile) includes:
RTI Connext DDS 7.3.0
Build tools (make, cmake, git, gcc)
ODBC driver manager (unixODBC)
MariaDB 10.5+ server
MariaDB Connector/ODBC 3.1
PostgreSQL 13+ server
PostgreSQL ODBC driver
Fully pre-configured environment variables
2.2.2. Building and running the environment
The resource/docker/docker-compose.yml file defines a complete environment
that includes:
The Database Integration Adapter container
MariaDB and PostgreSQL database servers
Build and start the environment using
docker compose.Note
Important License Notice: Use of RTI software is subject to the terms of the applicable RTI Software License Agreement, which can be reviewed here: RTI License Terms (Free Use Software License Agreement (#4046)). By setting the RTI_LICENSE_AGREEMENT_ACCEPTED environment variable to accepted and providing your rti_license.dat file, you acknowledge that you have read, understood, and agree to be bound by these terms. Replace <license_path> with the path to your RTI license file directory.
bash plugins/adapters/dia/resources/scripts/dia_docker_compose.sh build-run --license-file <license_path>This command:
builds the Database Integration Adapter container image with all dependencies
starts a MariaDB database server on 172.20.0.3:3306
starts a PostgreSQL database server on 172.20.0.4:5432
Build the RTI Connext Gateway inside the container. See Building from Source in the RTI Connext Gateway documentation for complete build instructions. (See also
doc/building.rst.)Run Routing Service directly from the container. For example:
source /opt/rti.com/rti_connext_dds-<connext_version>/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.sh rtiroutingservice -cfgFile \ plugins/adapters/dia/resources/xml/dia_routing_configuration.xml \ -cfgName bridge_DDS_DIA
The ODBC configuration provided in the Database Integration Adapter container connects to the MariaDB and PostgreSQL containers at 172.20.0.3 and 172.20.0.4, respectively.
Note
For a complete working example that demonstrates Database Integration Adapter with both MariaDB and PostgreSQL, see the Tutorial chapter.
2.2.3. Stopping the environment
To stop and remove all containers:
bash plugins/adapters/dia/resources/scripts/dia_docker_compose.sh remove
2.3. Local Installation
The Dockerfile (resource/docker/Dockerfile) is maintained as the single
source of truth for all dependency requirements and installation commands. It
contains the exact package names, versions, and configuration steps needed for
a complete working environment.
To install Database Integration Adapter natively (without Docker), use the Dockerfile as the definitive reference for required packages and installation steps.
Follow these general steps to install Database Integration Adapter locally (adjusting commands for your specific Linux distribution):
Install all dependencies listed in the Dockerfile.
Refer to
resource/docker/Dockerfilefor the complete list of required packages. The Dockerfile includes the following components:Build tools (make, cmake, git)
ODBC driver manager (unixODBC)
Database servers and client libraries (MariaDB, PostgreSQL)
Database-specific ODBC drivers
Use your distribution’s package manager (
apt,yum, etc.) to install these packages.Build the gateway.
See Building from Source in the RTI Connext Gateway User’s Manual for complete build instructions. (See also
doc/building.rst)
Important
Database Integration Adapter is disabled by default. You must explicitly enable it by
setting the CMake variable RTIGATEWAY_ENABLE_DIA=ON. See
Compiling with CMake for more information.
Configure ODBC data sources
Create
~/.odbc.ini(or/etc/odbc.inifor system-wide configurations) with your database connection details. See example configurations inplugins/adapters/dia/resources/odbc.ini.Set ODBC environment variables:
export ODBCSYSINI=/etc export ODBCINI=$HOME/.odbc.ini
Test ODBC connectivity to verify the installation:
odbcinst -q -d # List installed ODBC drivers isql -v your_dsn_name # Test database connection
Run Routing Service with your Database Integration Adapter configuration:
source /opt/rti.com/rti_connext_dds-<connext_version>/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.sh rtiroutingservice \ -cfgFile plugins/adapters/dia/resources/xml/dia_routing_configuration.xml \ -cfgName bridge_DDS_DIA
Note
For a complete working example that demonstrates Database Integration Adapter with both MariaDB and PostgreSQL, see Tutorial.
For in-depth solutions to common issues, see Troubleshooting.