Setting up a Tableau Server

Setting up a Tableau Server

Have been wondering what is involved in setting up a Tableau Server recently. Theoretically, for providing online reporting solutions for small businesses.

My model is that I would host a separate "site" for each company and then utilize a series of viewer licenses, that each only had access to their particualr company's site.

So what is there to it?

To get a Tableau Server license, to practice on, I signed up to the Beta program.

This is the very latest version of Server and, in theory, it can be buggy -so it's not supposed to be used for production. Keys are supplied but I don't know whether these are unique to specific members, so I have hidden mine from view.

For hosting, I chose Digital Ocean because I have been hanging out with it heaps the past couple months (this website is hosted on it). In particular, it bills by the hour... So assuming we are quick and nimble in our setup and testing process, we can keep our total bill to under a couple dollars.

I also use SSH to connect via Putty.

Once in, I have laid out the key steps to getting Tableau Server and Tableau Service Manager (TSM) up and running.


Steps

Download the required install file (and install)

sudo apt-get update
apt install gdebi-core

wget https://beta.tableau.com/2020.3/tableau-server-2020-3-beta_amd64.deb
gdebi -n tableau-server-2020-3-beta_amd64.deb

Create a user for yourself

adduser julian
gpasswd -a julian sudo
su - julian

Initialise the tsm

sudo /opt/tableau/tableau_server/packages/scripts.20203.20.0611.0742/initialize-tsm --accepteula

At this point, I can access the TSM at https://my_ip_address:8850/

I can login as my own user (julian) and then follow the steps of the process. but I could also do this from the console side, as well. This requires the creation of a few files with some key information.

The registration details... could probably just give them dummy data, for now.

{
    "zip":"[value]",
    "country":"[value]",
    "city":"[value]",
    "last_name":"[value]",
    "industry":"[value]",
    "eula":"[value]",
    "title":"[value]",
    "phone":"[value]",
    "company":"[value]",
    "state":"[value]",
    "department":"[value]",
    "first_name":"[value]",
    "email":"[value]"
}

The type of authentication setup.

{
  "configEntities": {
    "identityStore": {
      "_type": "identityStoreType",
      "type": "local"
    }
  }
}

A passwords file

# You can use this as a template for the secrets file used with the
# automated-installer script.
#
# Note: If you do not enter the tsm_admin_pass or the
# tableau_server_admin_pass in this file, you will be prompted to enter this
# information during installation. However, you must enter the account names
# for tsm_admin_user and tableau_server_admin_user.

# Credentials for the account that is running the automated-installer script.
# This account will be added to the 'tsmadmin' group. The 'tsmadmin' group is
# created during the Tableau installation process. Members of the 'tsmadmin'
# group can run TSM commands.
#
tsm_admin_user=""
tsm_admin_pass=""

# Enter a username and password to create the initial Tableau administrator
# account. This account will be created in Tableau Server by the installation
# process and will have Tableau Server administrator rights. The user account
# will be local to Tableau Server and will not be a Linux OS account. If you
# are using LDAP or AD for authentication, then the account you specify for
# the Tableau administrator must be a valid account from the directory service.
#
tableau_server_admin_user=""
tableau_server_admin_pass=""

We could run a trial

tsm licenses activate --trial

Or we can use our licence from the beta program.

tsm licenses activate --license-key XXXX-XXXX-XXXX-XXXX-XXXX

then

tsm register --file reg_templ.json
Mind you, I didn't actually do it this way -I just used the GUI at the ip_address:8850. Just noting it down so I can practice it later.
tabcmd initialuser --server localhost:80 --user admin --password

This gets the tableau server initializing -it takes around 30 minutes.

We can now access Tableau Server from http://my_ip_address/#/home


Custom Domain + SSL

Now we need to change over our server from our ip address to a nice custom url with a nice little https padlock on it. This is where things started getting tricky.

There was a dearth of information on this (with the really unhelpful, "consult with your IT team" being offered, at one point).

Generating an SSL certificate, seems to be something that involves purchasing it from a domain provider, like Godaddy, for ~AU$80... which wouldn't really suit my immediate purposes.

I had also had experience with a service called Let's Encrypt that would provide https certificates for free... via a Linux program/script called CertBot. And with the domain name specified pointing to the server location, thanks to a program called Nginx.

The process (for other use cases) normally goes like this:

sudo apt-get update
sudo apt-get -y install nginx

sudo add-apt-repository ppa:certbot/certbot
sudo apt install python-certbot-nginx

Create a conf file.

sudo nano /etc/nginx/sites-available/tableau_server.conf 

Add this as the contents of the conf file (adjust for your own domain)

server {
        server_name tableau.tadge-analytics.com.au;
        location / {
                proxy_pass http://localhost/#/home;
        }
}
sudo ln -s /etc/nginx/sites-available/tableau_server.conf /etc/nginx/sites-enabled/tableau_server.conf

Then run the CertBot to get a certificate from Let's Encrypt

sudo systemctl reload nginx
sudo certbot --nginx

But this process was not working for my install of Tableau.


The official Tableau documentation seems to point to using something in the Apache folder to generate on open SSL certificate, which we would then send to the domain provider, pay them some money, and they would return a proper certificate to us.

I wasn't quite able to work out the process for doing this, even if I was open to paying for the certificate (and then getting a refund for it, within the 30 days limit).


Turns out there was another solution -to use a "load-balancer". Basically, this is a separate droplet / instance that simply redirects traffic from my domain url through to the tableau server instance. It costs and additional $10 per month.

I am unsure the real, net difference (for a proper implementation) between using this method and just forking out the $80 for the SSL setup on the original machine. I'll need the advice of someone a bit wiser, to answer this one.


Anyhoo, getting that nice green padlock in my browser isn't the only thing worth investigating with Tableau server. There was heaps of aspects of managing a Tableau server that I am still able to explore with this practice setup:

  • Backup processes
  • Upgrade process
  • Prep conductor
  • Adding new users
  • Adding new sites
  • Automatic pdf generation
  • Automation of report emails (scheduled or triggered by alerts)

Another thing we had to set up with the SMTP, which gives Tableau server the ability to send us email that allow us to reset our passwords and such. I'd had experience with something similar using MailGun. But will have to investigate this further.


Another aspect of Tableau Server is the back-end Postgres "repository server", which keeps track of the overall usage of the service. This would be good to activate and enable.

wget https://downloads.tableau.com/drivers/linux/deb/tableau-driver/tableau-postgresql-odbc_09.06.0501_amd64.deb
sudo gdebi tableau-postgresql-odbc_09.06.0501_amd64.deb

tsm data-access repository-access enable

However, much of the data it contains are already accessible via some default dashboard / reports on Tableau Server, already. So delving into this deeper might be a case of over-kill.


Best of luck practicing with your own Tableau Servers.