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:
- Move platform independent code to Linux (like solr, zookeeper, some parts of wg and tdfs)
- Use available Linux builds to replace windows services (like apache, data engine, postgres)
- 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
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:
[ec2-user@ip-10-217-241-55 ~]$ tdeserver64
2015-07-15 21:34:01.959 (140051553511296): Machine Configuration
2015-07-15 21:34:01.959 (140051553511296): Max Descriptors: 4096
2015-07-15 21:34:01.967 (140051553511296): tdeserver: server listening for incoming connections at: tab.tcp://[::1]:27042
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:
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):
# This is YAML, but it's very strict.
# Comments can appear in column 0
# All characters before the colon are part of the key
# All characters after the colon are part of the value
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:
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=22.214.171.124
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!
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
Latest posts by Tamás Földi (see all)
- Tableau Extensions Addons Introduction: Synchronized Scrollbars - December 2, 2019
- Tableau External Services API: Adding Haskell Expressions as Calculations - November 20, 2019
- Scaling out Tableau Extracts – Building a distributed, multi-node MPP Hyper Cluster - August 11, 2019