Monday, 19 February 2018 11:01

Automating Multi-node Tableau Server Environment

Written by
Rate this item
(1 Vote)

image

After a few weeks off, I am delighted to announce that I have returned full time, once again delivering somewhat IT related blog posts, while neatly segueing in thirty-six thousand links to older articles at the same time, in the hope of gaining a few more hits for the internet's least widely-read IT blog.

A couple of weeks ago I was working with a large automotive on implementing a silent installation for a distributed, multi-node Tableau Server environment using LoginVSI Automation Machine in order to increase the scalability of the resulting configuration. By taking advantage of automation, the goal was to establish a powerful and highly-extensible infrastructure for quickly creating and re-deploying Tableau Server environment. With a little effort, it is little surprising how automated your final solution can be.

In a nutshell, the approach to automate the installation of Tableau Server is fairly straight forward and Tableau is kind enough to provide extensive documentation on available command-line arguments as well as Python-based reference scripts for automated deployments. 

Packaging Tableau Server should be *SUPER* easy with Login VSI Automation Machine: in theory, all you need to do is simply importing the Worker Software Setup as well as Tableau Server install source files into the media repository, creating the corresponding packages and adding Run executable action item with appropriate command-line arguments. That's the theory. In reality, the installation experience was somewhat uneven, with the primary node install setup routine sometimes reporting successful installation before all essential background configuration tasks were finished leading to an incorrectly configured and non-functioning installation.

After extensive discussions with Tableau support and some digging on my own, I identified following key factors indicating successful Tableau Server installation and implemented a number of mitigations and remediations:

  • tabsvc service needs to be present
  • "Init: Starting Tableau Server" string is present in C:\ProgramData\Tableau\Tableau Server\logs\tabadmin.log

Armed with this knowledge, I put together following PowerShell script:

# Main code
While (!(Get-Service -Name "tabsvc" -ErrorAction SilentlyContinue)) {
    Write-Host "$(Get-Date -Format HH:mm:ss) - tabsvc not found. Retrying in 30 seconds..."
    Start-Sleep 30
} 

Write-Host "$(Get-Date -Format HH:mm:ss) - tabsvc service detected. Checking tabadmin.log next."

$ready = $false
While ($ready -ne $true) {
    If (Get-Content "C:\ProgramData\Tableau\Tableau Server\logs\tabadmin.log" | Select-String "Init: Starting Tableau Server") {
        Write-Host "$(Get-Date -Format HH:mm:ss) - 'Init: Starting Tableau Server' string detected. Assuming installation is finished."
        $ready = $true
    }
    Else {
        Write-Host "$(Get-Date -Format HH:mm:ss) - Configuration tasks are still running. Waiting for 30 seconds."
        Start-Sleep 30
    }
}

Below is a screenshot of a Tableau Server LoginVSI Automation Machine package which automates installation with a non-default configuration using a YML file, including certificate pre-staging, "run as" user, nodes configuration, and so on.

image

Thanks to Login Automation Machine, I could quickly iterate through numerous versions of the package while striving for the highest quality possible. 

image

Finally, the customer asked to implement a functionality to start Tableau Server after successful installation. Launching the server is easy: all you need to do is run following command:

tabadmin start

As before, theory and reality rarely coincide. Once start procedure initiates, Tableau Server contacts worker nodes and performs initial data store synchronization, so I had to make sure all nodes are up and running before moving on to processing other packages. Without boring you with technical details (for technical mumbo-jumbo, see the PowerShell script attached below), this involved looping through "tabadmin status -v" output until all nodes ended up in status RUNNING.

In conclusion, then, this is the automated installation that gave me the most headaches, literally. And given that I had the whole back catalog of software packages I automated over the years to compare it with, then it must be really, really saying something.

Read 7337 times Last modified on Monday, 19 February 2018 11:34

Recent Posts

  • Windows 10 21H2 Built-In Apps: What to Keep
    The development of the Windows 10, version 21H2 is finished and the update will soon be available for download from…
    Written on Wednesday, 20 October 2021 11:41
  • Group Policy Changes in Windows 10 21H2
    As Windows 10, version 21H2 update development winds down, Microsoft is now preparing for the final release of the Windows…
    Written on Wednesday, 20 October 2021 07:20
  • Group Policy Changes in Windows 10 20H1 Preview
    As Windows 10 Vibranium Update (20H1) development winds down, Microsoft is now beginning the phase of checking in the final…
    Written on Tuesday, 14 January 2020 04:51
  • An alternative ESU MAK Activation Solution
    This blog post was shared with me by a colleague of mine, Daniel Dorner, a Microsoft Premier Field Engineer. It’s…
    Written on Wednesday, 04 December 2019 21:04
  • The Case of Missing UE-V Templates
    My customers often deal with unexpected Windows behavior and this case is no different. This particular one is especially interesting…
    Written on Tuesday, 03 September 2019 12:20
  • The Case of Changing Default Printer
    While I sometimes long for the day when I no longer have to deal with unexpected Windows 10 behavior, there’s…
    Written on Wednesday, 14 August 2019 20:36