9 December 2015
Since 9.1 upgrading Tableau Desktop has been super simple, and most importantly automated. But what about Tableau Server? Shouldn't we also be able to auto upgrade Tableau Server? With one script now you can, and here's how!
Spend 5 minutes talking to the Tableau developers and you'll quickly hear one common question of any new feature...'Can it be done in fewer clicks?' This has given us the best BI interface ever! But what about an interface/procedure that's rarely seen, that can easily be ignored. I'm talking about Tableau Server upgrades.For those who don't know here's a standard upgrade procedure:
- Download the latest Server installer
- Stop your Tableau Server with tabadmin stop
- Backup with tabadmin backup
- Uninstall Tableau Server
- Run the downloaded installer
- Click your mouse about 5 times
- Celebrate that your server is up to date!
Prerequisites
Before I get yelled at by hardened 'enterprise' BI admins this isn't intended for production environments. It's also not intended for distributed multi-node installations. They're probably complicated and as such human intervention is a good thing.But should you have a dev/test environment, or like us you like to live 'dangerously', and alway want your server to be up to date, then this is for you!Download
Everything you need to make it happen can be downloaded hereYou'll also find the code on our Github repositoryConfiguration
First off unpack the zip archive to an accessible location, personally I put it in our Tableau Server root installation folder.- Open the UpgradeTableau.ps1 file with your favourite text editor.
- Set the location of your Tableau Installation as $tabDir (this is the folder containing 9.0, 9.1, etc.)
- Just in case something goes wrong the script will backup your Tableau Server before anything is uninstalled. Set the folder location where this backup should be stored as $backupDir
- You're probably wanting to install 64 bit Tableau Server, if you want 32-bit simply change $bit to 32 ($bit = 32).
- Save and exit
One off Auto Upgrade
If you'd just like to upgrade your Server to the latest version as a one-off event simply run UpgradeTableau.bat or right click on UpgradeTableau.ps1 and click 'Run with Powershell'.All outputs from your upgrade will be saved to $tabDirUpgradeLog.txt[caption id='attachment_7111' align='aligncenter' width='560'] Auto Upgrade Tableau Server Output[/caption]Scheduled Auto Upgrade
Want to make your upgrade more automated?- Open 'Task Scheduler' and in the Task Scheduler Library click 'Create Task'.
- Under security options set to 'Run whether user is logged on or not' and tick 'Run with highest privileges'
- If needed change the run as user account with the 'Change User or Group' button.
- On the triggers tab create a 'New' trigger. This can be a one off event out of business hours or if you'd like your environment to always be up to date schedule the script to run every day (not recommended for production environments but great for dev/test)
- On the actions tab create a 'New' action.
- In the Program/script box enter: Powershell.exe
- In the Add arguments (optional) box enter: -ExecutionPolicy Bypass D:UpgradeTableau.ps1 (changing this last parameter to point to the location where you've extracted the UpgradeTableau.ps1 file
- Click OK, set any other task options as necessary and click OK to save the task. You should be asked to enter the run as user's password.