FOR BI PROS Tableau
Tableau Server on Linux – part 1: Data Engine
July 21, 2015
0
, , , , , ,

This is an experiment from that time when Tableau Server had no Linux support and no Linux binaries except TDE API. Therefore, this is a dirty hack. And not for production. I mean really not. 

UNIX  is a miracle. Simple, clean and well organized – it summarizes what I like in IT. When I was twenty-something I joined to Compaq just to be part of their Tru64 OS dev team to learn what POSIX is all about. Even if I moved away from the OS coding to the Data world I am still in love with the consoles, compilers, vim and emacs, lisp and everything else which built on the BSD or SysV heritage.

That’s why I am always looking for Linux ports of server tools, I just feel more comfortable with them. And Tableau Server is not an exception. In the next couple of posts I will go thru on each and every Tableau Server service and show you how you can move them under linux. And a short disclaimer: this is  100% unsupported by Tableau and you need valid licenses for your Linux box otherwise you are going to violate their EULA.

I will use mostly three techniques:

  1. Move platform independent code to Linux (like solr, zookeeper, some parts of wg and tdfs)
  2. Use available Linux builds to replace windows services (like apache, data engine, postgres)
  3. Use Wine / Winelib to make windows api available under Linux (like vizql, data server). Wine is used for PC games mostly, it’s faster than virtualization and emulation (wine stands for Wine is not an emulator) and if it is fast enough for World of Warcraft it will be good for us as well. Tableau Desktop runs with Wine flawlessly, so everything from the server which relies on windows things can be moved under wine relatively easily.

But in every cases we definitely need to hack the config files, environments and sometimes the licensing related functionalities. That’s why it’s so fun.

In the later posts we can check how can these services moved to Linux, how can we port the tabadmin services to start and stop services and how can we dockerize the stuff into dynamically launchable containers. A short teaser what is coming:

  • Creating a Linux based extract producer docker image
    • Move TDE Server, TDFS, Zookeeper, Backgrounder and Data Server under Linux
    • Create a docker image with templated configurations
    • How to start 5-10 Tableau Server workers dynamically when the systems demands it (like for high volume of extract generations)
  • Move out the apache httpd and postgres
  • Dealing with vizql
  • Cluster control

Sounds fun, right?

Today’s practice: the TDE Server

Planning

The Tableau Data Extract Server or simply Data Engine is a native server application used by Desktop, Server and TDE API. Whenever a Tableau application requires retrieving or storing data from extracts it connects to a tdeserver process. In desktop the connection established thru named pipes while the server uses regular TCP sockets for connection. We can move the data engine executable while on the server we set up a port forward  for tdeserver’s TCP port to our new Linux box. All services will stay on windows except tdeserver.

TDE files are always stored on file system on the Server’s data directory. When we move the TDE Server from Windows to Linux we should make sure that the TDE files are moving along (so we should copy the tde files manually from Windows to Linux initially). Later when we utilize TDFS this will be not required, TDFS will make sure that we have all files on all nodes.

Configuration is fairly simple. The first thing what we should modify is the whitelist address option. All IPs needs to be added here from our original windows server. The file locations for database folder and log files need to be changed as well. We will see how.

And finally install the binaries. We will use TDE-API-Linux-64Bit.gz  which is the TDE API installation kit. As we learned, TDE API uses the same tdeserver as the Server but this one works on linux. Let’s download and install it on our Linux box (lib64 goes to /usr/local/lib64 while binaries goes /usr/local/bin ). After successful installation we should see something like:

Looks fine.

Moving the service

Step 1: As we planned first move the Server’s TDE file store under our Linux box. This is a simple copy from %ProgamData%\Tableau\Tableau Server\data\tabsvc\dataengine\  to our server, let’s say under ~/dataengine . We should see something like:

Folder structure on Linux for TDE Server

Step 2: Move the config file tdeserver_standalone.yml  from %ProgamData%\Tableau\Tableau Server\data\tabsvc\config\dataengine\  to Linux as ~/tdeserver_linux.yml

Step 3: Edit the tdeserver_linux.yml files and change the highlighted lines (row 7, 9, 10):

As you see we must change the whitelist (add IP and ::ffff:IP as well), the location of the logfile (prefix only) and the folder name where the extracts are stored (dataengine in our case).

Step 4: Start the tdeserver with this config file as:

$ tdeserver64 --config tdeserver_linux.yml 

To see what is going on you can start tailing the logs with:

Checking the logs of the newly started TDE Server

Checking the logs of the newly started TDE Server

Okay, we have an up and running tde server but how will our server know where to connect?

Step 5: Redirecting dataengine traffic from windows to Linux. This is just part 1, let’s use an easy way (not to mess with tabadmin settings and templates), use netsh to redirect tcp port 27042 from windows to linux. This is how:

C:\> netsh interface portproxy add v4tov4 listenport=27042 connectaddress=54.203.245.18 

Configuring port forward on the Tableau Server

Configuring port forward on the Tableau Server

Done done.

Test and enjoy.

Open any workbook which is using extracts and enjoy the power of the linux system. Now you have just moved Tableau’s own database engine to different OS!

Tableau Server consumes the data from our external Linux Server

Tableau Server consumes the data from our external Linux Server

Next steps

In the next we will eliminate the need of copying files from Windows to Linux by moving Zookeeper and TDFS appservice to Linux.

Read Tableau Server on Linux – Part 2: Zookeeper and File Store/TDFS on DataBoss

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

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

This is an experiment from that time when Tableau ...

Read more
Tableau Docker

HOWTO: Tableau Server Linux in Docker Container

This is an experiment from that time when Tableau ...

Read more
Tableau Consistency Checker

Tableau Filestore Consistency Checker – How Repository Maps to Filestore

This is an experiment from that time when Tableau ...

Read more