FOR BI PROS LEARN Tableau
HOWTO: Tableau Server Linux in Docker Container
November 2, 2017
10
, , , ,

We are all excited about the great news that Tableau will release its Server version on Linux. Even if I’ve been testing the linux build for a while now, since this feature is currently in Beta I can start sharing tips and tricks that will make others’ (yours perhaps) lives easier. The first is an easy howto, namely how to run a Tableau Server Linux in Docker container. Running the production Server in docker definitely makes no sense, however, for quick and dirty checks or automated testing pipelines (CD/CI) it has it’s own place. So let’s see.

TL;DR

Dockerfile, instruction and code is here: https://github.com/tfoldi/tableau-server-docker

If you prefer to watch a geeky console video, here is the flow how you can build the image with few simple commands:

After the build you can simply execute make run  to execute the built image.

Prerequisites

To start you  need a systemd based Linux host (can be physical box or VM) with Docker installed. If you don’t have this I suggest to create an amazon ec2 instance with CentOS 7. Simply provision a new image with a CentOS7 marketplace image:

You need to install docker and set the required permissions to run it with a non-root user. To do that simply create a group called docker and set your desired user’s membership to include this group. If all good, you should be able to list running docker images with docker ps :

Now we are good to go and focus on Tableau specific tasks.

Building the Dockerfile

First of all, “Dockerizing” Linux is not that easy, even folks at Tableau had problems doing that:

The good old systemd. It’s a love hate relationship: we all know that the init.d/rc.d approach is not scalable but we all do hate systemd. Let’s address this first with our Dockerfile:

As you see we start from a special systemd centos image. If your parent docker image does not support systemd, you will have  bad times.

Few important things here:

  • Line 6: We should add the cgroup  specific volumes here as external ones. Also, to speed things up /var/opt/tableau  should go to a volume.
  • Line 9: to reduce docker fs layers we install dependencies (plus vim), create the OS users and install the Tableau Server bits in the same RUN  run.
  • Line 22: my magic config file templates and init scripts go under /opt/tableau/docker_build/
  • Line 24: this is the magic part: installing tableau_server_install.service  systemd file and enable it. This systemd service will run only at the first execution and will invoke the initalization part.
  • Line 31: the start command is systemd’s init

Now we have our docker image, let’s run it.

The first run: initalizing the container

Tableau Server must be initalized before you start using it. You have to accept the EULA, register, license and initalize the server. All these actions are performed during your first load from the above mentioned tableau server install systemd service. The code to initalize the server can be found here:

And now, for you, a boring but complete screencast from this phase:

After the initalization you can see that the container reached the multi user state:

And now nothing is left but log on to the server with admin / admin user / pass:

Tableau Linux build in Docker.

And wow, Linux, fully automated installation directly in docker.

*Pro tip*

After you initalized the image and your tableau server is up and running, it’s activated and licensed it’s time to save back to your docker repository. Thus, next time when you run the image you don’t have to wait 10 mins for the initalization. However, for that you have to keep track of your volumes and make sure that you set volume storage to a persistent location.

 

Where is the code?

Again, it’s here: https://github.com/tfoldi/tableau-server-docker

Questions? Comments?

Just drop a comment.

 

 

Tamás Földi

Tamás Földi

Director of IT Development at Starschema
Decades of experience with data processing and state of the art programming. From nuclear bomb explosion simulation to distributed file systems. ethical hacking, real time stream processing practically I always had a great fun with those geeky ones and zeros.
Tamás Földi
  • Patrick Whitefield

    I followed your guide and it was a great tutorial. However, I ran into a problem. My desktop did not meet the minimum requirements. Do you know how to get around this issue:

    –Your system does NOT meet the minimum system requirements for Tableau Server–
    Tableau Server requires these minimum hardware requirements: http://www.tableau.com/products/server/specs
    Either try the install on a different computer, or explore our other options for running a trial of Tableau Server: http://www.tableau.com/products/server/download
    Tableau Server requires at least 8 GB memory to run, but found only 2 GB of memory.
    Tableau Server runs best with at least 8 cores, but found only 4 core(s).

    • Maybe add more resources? Actually it’s tableau’s requirement, not mine. You can bypass the checks by modifying the install scripts but that requires to change the RPMs

  • 王新俊

    the latest version https://www.tableau.com/zh-cn/support/releases/server/10.5.2 ,docker support ?

  • percy78

    Hi,
    Great guide, unfortunately I’ve seen to have stumbled on the last hurdle.
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    c06546f4443d tfoldi/tableau-server:release “/bin/sh -c /sbin/…” 22 minutes ago Up 22 minutes 8850/tcp, 0.0.0.0:32768->80/tcp gracious_pare

    As you can see my Docker container is running, however I cannot login to tableau from the web-browser. I’m trying all sorts.
    I’ve tested 32768 and as your demonstration 32774 with no success.

    Telnet works on 32768.
    Trying 127.0.0.1…
    Connected to localhost.
    Escape character is ‘^]’.
    Connection closed by foreign host.

    Any ideas?

    Thanks

    • can you connect to the docker image with “make exec” from a different terminal but same subdirectory. then you can try tsm status to see what is going on

  • 王新俊

    Hi,
    Use your new Dockerfile,it stop here:

    [ OK ] Created slice User Slice of tsm.
    [FAILED] Failed to start Tableau Silent Install in Docker.
    See ‘systemctl status tableau_server_install.service’ for details.
    [ OK ] Reached target Multi-User System.

    Inner docker,The details :

    sh: /opt/tableau/tableau_server/packages/scripts.*/initialize-tsm: No such file
    or directory

    How to do next?

    Thanks

    • Can you ping me the full logs from docker build? not just from the make run

      • Joshua Tonga

        having the same issue

      • Joshua Tonga

        [ OK ] Created slice User Slice of tsm.
        [ OK ] Removed slice User Slice of tsm.
        [ OK ] Created slice User Slice of tsm.
        [FAILED] Failed to start Tableau Silent Install in Docker.
        See ‘systemctl status tableau_server_install.service’ for details.
        [ OK ] Reached target Multi-User System.

        make exec
        systemctl status tableau_server_install.service’ -l

        tableau_server_install.service – Tableau Silent Install in Docker
        Loaded: loaded (/etc/systemd/system/tableau_server_install.service; enabled; vendor preset: disabled)
        Active: failed (Result: exit-code) since Wed 2018-04-11 04:09:55 UTC; 5min ago
        Main PID: 19 (code=exited, status=1/FAILURE)

        Apr 11 04:09:31 e753b7fd3dcb tableau-init-configure.sh[19]: [2018-04-11 04:09:31+00:00]: login tsm done
        Apr 11 04:09:31 e753b7fd3dcb tableau-init-configure.sh[19]: [2018-04-11 04:09:31+00:00]: licenses activate
        Apr 11 04:09:31 e753b7fd3dcb su[919]: (to tsm) root on none
        Apr 11 04:09:43 e753b7fd3dcb tableau-init-configure.sh[19]: [2018-04-11 04:09:43+00:00]: licenses activate done
        Apr 11 04:09:43 e753b7fd3dcb tableau-init-configure.sh[19]: [2018-04-11 04:09:43+00:00]: register
        Apr 11 04:09:43 e753b7fd3dcb su[1040]: (to tsm) root on none
        Apr 11 04:09:55 e753b7fd3dcb systemd[1]: tableau_server_install.service: main process exited, code=exited, status=1/FAILURE
        Apr 11 04:09:55 e753b7fd3dcb systemd[1]: Failed to start Tableau Silent Install in Docker.
        Apr 11 04:09:55 e753b7fd3dcb systemd[1]: Unit tableau_server_install.service entered failed state.
        Apr 11 04:09:55 e753b7fd3dcb systemd[1]: tableau_server_install.service failed.

Related items

/ You may check this items as well

Pasted image at 2018_01_09 04_59 PM

Python Experiments in Tableau 1. – Add live currency conversion to Tableau Dashboards using TabPy

We are all excited about the great news that Table...

Read more
Tableau Consistency Checker

Tableau Filestore Consistency Checker – How Repository Maps to Filestore

We are all excited about the great news that Table...

Read more
TCOT

Pushing the Limits of Tableau Server – Practical Lessons from a Zen Master

We are all excited about the great news that Table...

Read more