Install Bridge for Linux for Containers

Bridge for Linux provides the scalability and streamlined management capabilities of containerized workloads. The following instructions describe a lightweight way to run Bridge for Linux and assumes you have basic knowledge of Docker and the key terms used in the ecosystem.

Install and run Bridge from a Docker container

To use Bridge on Linux you must create a customized Docker image, install the RPM package, and then run Bridge from inside the container image.

Prerequisites

  • Installed Docker Engine. For the base image of the docker container, Bridge on Linux is supported on:
  • Tableau Bridge RPM package.
  • Experience with the Linux operating system.
  • Basic shell scripting and Docker experience.
  • Tableau Site admin Personal Access Token (PAT). Tableau recommends that you use one PAT token per client.

Step 1: Create a Bridge container image

The following steps are the basic instructions for building a Bridge on Linux base image. For more information, see Docker overview.

When Docker is installed, the only user with permission to run commands is root. You can run Docker commands with sudo or by a user who is a member of the docker group.

  1. Download the Bridge.rpm package from the Downloads(Link opens in a new window) page on the Tableau website.
  2. (Optional) You can edit the configuration settings to change how the client will run. See Change the Bridge Client Settings for more information.
  3. Create a working directory and move the .rpm package into the directory.

    cd ~

    $ mkdir Docker

    $ cd Docker

    $ mv <RPM_location>.rpm .

  4. Create a Docker file in the working directory. For example:

    $ touch Dockerfile

  5. Edit the Docker file and add the commands to run yum update.

    Red Hat Example

    For Red Hat 8:

    FROM registry.access.redhat.com/ubi8/ubi:latest

    RUN yum -y update

    For Red Hat 7:

    FROM registry.access.redhat.com/ubi7/ubi:latest

    RUN yum -y update

    Centos Example

    For Centos 7:

    FROM centos:7

    RUN yum -y update

  6. Edit the Docker file and add the commands to copy the bridge RPM package, install it, then remove it from the image

    COPY <your_bridge_rpm>.rpm /<path_of_container>

    RUN ACCEPT_EULA=y yum install -y $(find . -name *.rpm) && rm -rf *.rpm

  7. Build a new container image using the docker build command. The following com­mand builds an image in the current directory, tag­ging it with the word ​"bridge_base".

    docker buildx build --platform=linux/amd64 -t bridge_base .

  8. Check that the base image you created is displayed in the list of images.

    docker images | grep bridge

Step 2: Install the drivers

The Bridge client requires drivers to facilitate connectivity between private network data and Tableau Cloud. For drivers, go to Driver Download, select the data source, and then select Linux for the Operating system.

  1. Installation can be done interactively after the base image is launched, or separate Dockerfiles can be written as a layer on top of the base image.

    Example

    With the MySQL driver RPM copied into the directory, you can create a separate working directory for layering MySQL drivers using the following Dockerfile:

    # Using previously built bridge_base image

    FROM bridge_base COPY mysql-connector-odbc-8.0.26-1.el7.x86_64.rpm .

    RUN yum install -y mysql-connector-odbc-8.0.26-1.el7.x86_64.rpm

    Example

    Install a postgres JDBC driver. This can also be done in a separate Dockerfile.

    # Using previously built bridge_base image

    FROM bridge_base COPY postgresql-42.3.3.jar /opt/tableau/tableau_driver/jdbc/

    Example

    Install the Amazon Redshift driver.

    # Using previously built bridge_base image

    FROM bridge_base

    yum install -y unixODBC

    yum --nogpgcheck localinstall -y

    AmazonRedshiftODBC-64-bit-1.4.59.1000-1.x86_64.rpm

    odbcinst -i -d -f /opt/amazon/redshiftodbc/Setup/odbcinst.ini

  2. Create a new image:
  3. docker image build -t bridge_final .

    The bridge_final image uses the cached image from the previous step and automates the driver installation for all your Bridge instances. If you have an image repository, you can publish the image to the repository and distribute the image to all the machines you want to run Bridge on.

Step 3: Run the Bridge container

Now that you have a base image built, you can deploy it using a variety of methods. The basic steps are:

  1. Start the instance of the Bridge container.
  2. Log in and start the worker.
  3. Assign the agent to a pool.

Note: Bridge for Linux doesn't support Bridge (legacy schedules). See Migrate from Bridge (legacy) to Online schedules for more information.

  1. Before you start deploying the container, create a Personal Access Token (PAT). The PAT is required to log in to the agent. Tableau Cloud supports 104 PATs per user. Tableau recommends that you use one PAT token per client.

    Note: The following token names must match: The patTokenId (used when running the TabBridgeClientWorker command), the token name in the JSON file, and the token name when generating the PAT in Tableau Cloud.

  2. Set the locale in Docker using ENV LC_ALL en_US.UTF-8. You can also set the locale by adding the following to the /etc/profile file.
  3. export LANG="en_US.utf8"

    export LANGUAGE="en_US.utf8"

    export LC_ALL="en_US.utf8"

  4. Start an instance of the Bridge container. There are many ways you can set up and start the container image. The following interactive method illustrates the steps necessary to start the worker. When you exit, the container stops running.
    1. Use the following method to move to the shell prompt for the container as root. The rest of the commands are executed in the context of this interactive session of the container.

      docker container run -it bridge_final /bin/bash

    2. Add the PAT token to a flat file in JSON format. For example:

      /home/jSmith/Documents/MyTokenFile.txt

    3. Example token syntax:

      {"MyToken" : "uLICC7e8SUS8ZNGe8RIFn4u==:lRihmYHI0XBKle7e8S4uSORXGqAkAl4"}

    4. Change the file permissions to restrict access to the current user. For example:

      chmod 600 MyTokenFile.txt

    5. Start the Worker with the TabBridgeClientWorker command and provide the following command options:

      CommandDescription
      TabBridgeClientWorker -eCommand to start the Bridge client worker. The -e argument is required and runs command in the foreground. Currently, background mode isn’t supported.
      --patTokenIdThe ID of the PAT. See Personal Access Tokens for more information.
      --userEmailUser email associated with the PAT.
      --clientThe name that you want to give to the Worker.
      --siteSite name as it appears in the URI. Don’t include the URI path.
      --patTokenFileFile name and path to the PAT text file.
      --poolId(Optional) Pool Id that is assigned to the client. See Using a pool ID.

      Command example

      /opt/tableau/tableau_bridge/bin/TabBridgeClientWorker -e --patTokenId="Mytoken" --userEmail="admin@tableau.com" --client="myBridgeAgent" --site="mySite" --patTokenFile="/home/jSmith/Documents/MyTokenFile.txt" --poolId="1091bfe4-604d-402a-b41c-29ae4b85ec94"
  5. The following message indicates the agent is started. “Service started: ...”

    Use Control-C to stop the worker. Rather than restart the worker, you can start a new worker for the container image.

    If you didn’t assign a pool using the command option --poolId, the client is assigned to the default pool. If you want to use the client with specific domains or VConns, you can assign the client to a named pool using the UI. The menu for this on Tableau Cloud Home > Settings > Bridge. For more information, see Configure the Bridge Client Pool.

Using a pool ID

When starting the Bridge worker with the TabBridgeClientWorker command, the poolId is optional. However, the behavior of the client depends on whether the client is registered to a site, and whether the client is assigned to a pool. Tableau Bridge can only connect or register to one Tableau Cloud site at any given time. The client is registered to a site when you log off and log back in.

If a pool ID isn’t provided

  • If the Bridge client has been registered, the client status remains the same:
    • If the client is assigned to a pool, it remains assigned to the pool, regardless of whether it’s a named pool or default pool.
    • If the client isn’t assigned to a pool, it will remain unassigned.
  • If the Bridge client is new (you never signed in to Tableau Cloud), the client is assigned to the default pool.

If a pool ID is provided

  • If the pool ID is provided and is correct, the Bridge client is assigned to the named pool.
  • If the pool ID is provided and incorrect:
    • If the Bridge client isn’t t registered, then the client is assigned to the default pool.
    • If the Bridge client is registered, the client status remains the same, regardless of named pool, default pool, or unassigned.

Finding the Pool ID

To find the pool ID, go to the Settings > Bridge page and click on the name of the pool. For example:

Troubleshooting

Working with log files

Log files are stored in the user's My_Tableau_Bridge_Repository/Logs folder. To save logs in a tmp folder, run the following command:

docker container run --volume /tmp/bridge_logs:/root/Documents/My_Tableau_Bridge_Repository/Logs -it bridge_final /bin/bash

In this example, the location is specified by /tmp/bridge_logs. Using the docker command simplifies saving the log files and avoids having to manually copy the Bridge logs files from the container to your local file system.

MySQL driver fails

If LC_MESSAGES aren’t set with UTF-8 locales, you may experience read and display issues. You can edit the /etc/profile file, or relaunch the worker using the following

LC_ALL=en_US.UTF-8 /opt/tableau/tableau_bridge/bin/TabBridgeClientWorker -e

Thanks for your feedback!Your feedback has been successfully submitted. Thank you!