Alteryx Server Knowledge Base

Definitive answers from Server experts.

Alteryx Server Silent Patch Upgrade

FlorianC
Alteryx
Alteryx
Created
image.pngimage.png

In this article, we are going to review how to perform a silent patch upgrade of Alteryx Server using the command-line.

Table of contents

 

Introduction

A silent installation is a method of installation of software while suppressing any message or window, thus rendering the process silent. This enables users to script the process and ensure it runs using specified parameters without the need for someone to sit and wait it through.

This is often the preferred, and sometimes required, way of deploying software in organisations. We can indeed build the process and validate it in a lower test environment before deploying it in the production environment. This helps mitigate the risk of error and provides an auditable trail when logged appropriately.

 

Process

The patch upgrade process of Alteryx Server is very similar to the standard upgrade but is simplified. It is comprised of four steps:
  1. Pre-upgrade checks
  2. Back-up of Alteryx Server
  3. Installation of Alteryx Server patch
  4. Optional: Upgrade of Intelligence Suite
  5. Post-upgrade checks
Remarks:
  1. The patch installation file must be downloaded manually from the [Alteryx Downloads Portal](https://downloads.alteryx.com).
  2. It is always recommended to perform a back-up before making any changes to Alteryx Server. This creates a restore point and will enable you to perform a roll-back in-case the process does not go as expected.
  3. After the installation of the patch, validation and regression tests should be ran in order to check that the installation was successful and that existing processes are not affected in any way.
  4. If Intelligence Suite is installed, you must install the new version corresponding to the patch applied. If this step is skipped, it could result in conflicts causing errors in workflows containing the Intelligence Suite-specific tools.
Note: In this example, we are going to install Alteryx Server version 2021.4.2.35356 (patch 3). In case you are trying to install a different version, please do update the version references to match your environment.


Pre-upgrade checks

Before attempting an upgrade of the Alteryx platform, it is recommended to perform some pre-upgrade checks to ensure nothing could impede the process.

Please refer to the following article detailing the steps: Alteryx Server Upgrade Guidelines - Checklist to upgrade Alteryx Server.
 

Backup Alteryx Server

As with all processes, there are risks associated with the upgrade. In order to minimise those, a backup should always be performed before attempting to do it in order to create a restore point to rollback to if something goes wrong.

The backup is performed in three steps:
  1. Database backup
  2. Optional: Configuration files backup
  3. Optional: Tokens backup
It is recommended to compress the backup files and archive them securely. If at any point during the upgrade an error occurred, we will be using this backup to restore the server to its original state.

Note: You should have a regular backup process in place.

Stop Alteryx Service

In order to create a restore point, the Alteryx Service must be stopped. This will prevent incomplete processes to be registered in the database which might corrupt it and prevent the platform from functioning as expected when restored.
In order to stop the Alteryx Service, the Alteryx Service process (AlteryxService.exe) can be used by specifying the parameter stop.
AlteryxService.exe stop
image.pngimage.png

Remark: You can also use Windows Services application to stop the Alteryx Service.

Backup database

Workflows and the configuration of the Gallery (users, collections, etc.) are stored in the underlying MongoDB database.

Remark: The Alteryx Service must be stopped to perform a backup of the database.

In order to backup the database, the Alteryx Service process (AlteryxService.exe) can be used. It requires two parameters:
  1. emongodump: The action to perform.
  2. The path to the backup location.
This step will generate a directory to the location specified.
AlteryxService.exe emongodump="D:\Backup\MongoDB"
A new command prompt window will appear displaying the progress of the MongoDB backup.

image.pngimage.png

Upon success, the following output message will appear:
EMongoDump running..finished.
image.pngimage.png

Four files and four folders will be generated at the target backup location.
image.pngimage.png


Backup configuration files

The configuration of the Alteryx Server is stored in XML configuration files at the following locations:
  1. System settings: %PROGRAMDATA%\Alteryx\RuntimeSettings.xml
  2. System aliases: %PROGRAMDATA%\Alteryx\Engine\SystemAlias.xml
  3. System connections: %PROGRAMDATA%\Alteryx\Engine\SystemConnections.xml
xcopy "%PROGRAMDATA%\Alteryx\RuntimeSettings.xml" "D:\Backup\Configuration\" /F
xcopy "%PROGRAMDATA%\Alteryx\Engine\SystemAlias.xml" "D:\Backup\Configuration\" /F
xcopy "%PROGRAMDATA%\Alteryx\Engine\SystemConnections.xml" "D:\Backup\Configuration\" /F
 image.pngimage.png

Remark: The system alias and connections files might not be present as pictured in this example. Those are optional and depend on the configuration of your environment.
 

Backup controller token


The controller service uses a unique token to communicate with all other components of Alteryx Server. This value is stored as an encrypted value in the RuntimeSettings.xml file and should thus be decrypted and stored separately.

This step is mandatory is you want to be able to restore the backup on a different machine.

In order to decrypt this token, the AlteryxService.exe utility can be used. It requires one single parameter: getserversecret
AlteryxService.exe getserversecret > "D:\Backup\ControllerToken.txt"
image.pngimage.png
This will return the decrypted value of the controller token and save it in a text file with the rest of the backup files from the previous step.
 

Archive backup files

Now that all required elements have been successfully backed up, it is recommended to compress and archive the files to reduce their size and make it easier to store.
powershell Compress-Archive -LiteralPath "D:\Backup" -DestinationPath "D:\Backup.zip"
image.pngimage.png You can now safely delete the original backup directory.
rmdir "D:\Backup" /S /Q
Remark: It is recommended to define a naming convention to uniquely identify backup files and to store them in a secured location.  

 

Install Patch

The installation of an Alteryx Server patch is quite straightforward. The aim is to call the patch installation executable file with the /s parameter to specify that it should run in silent mode. image.pngimage.png
Open a command prompt as administrator, navigate to the directory containing your source files, and run the command below (change the filename with the corresponding product version if required).
AlteryxServerPatchInstall_2021.4.2.3.35356.exe /s
image.pngimage.png

The installation will take a couple of minutes depending on your environment. Wait for the process to complete.

Note: The installation process will start in the background. It is visible from the task manager or the resource manager. image.pngimage.png

 

Upgrade Intelligence Suite

The upgrade process for Intelligence Suite is similar and takes a single /s parameter to run it in silent mode. image.pngimage.png
Open a command prompt as administrator, navigate to the directory containing your source files, and run the command below (change the filename with the corresponding product version if required).
AlteryxAISInstall_2021.4.2.35356.exe /s

The upgrade will take a couple of minutes depending on your environment. Wait for the process to complete.

Note: The upgrade process will start in the background. It is visible from the task manager or the resource manager. image.pngimage.png

 

Post-upgrade checks

Now that the patch upgrade process completed successfully, it is time to do a last round of checks before the platform can be opened to users again.

The first step is to go through the System Settings to ensure all configuration remain relevant and that any new feature is set as expected. At the end of this review, the Alteryx Service will restart.

Once Alteryx Server is back online, perform the following tests:
  1. Log in Gallery
  2. Navigate to your workspace
  3. Open a workflow
  4. Run workflow
  5. Visualise results
  6. Download results (if applicable)
  7. Navigate to collections and check that they are available (if applicable)
  8. Navigate to district and check that they are available (if applicable)
  9. Open to admin console
  10. Check users & groups
  11. Check Data Connections (if applicable)
  12. Check Credentials (if applicable)
As always, do monitor the log files for any unexpected warnings or errors.  
 

Rollback

In the unfortunate event that the upgrade of the platform was unsuccessful, please follow the steps described in the articles below to rollback and restore Alteryx to its previous state.  

Conclusion

In this article, we went through all the steps required to install a patch for Alteryx Server in a silent manner. To make this process more robust, I encourage you to wrap this in a script that will monitor the different processes and log each individual step so that it can be audited.

For an example of such an automation script, check out the open-source alteryx-deploy PowerShell utility.

Additional Resources

Comments
Paul_Holden
9 - Comet

@FlorianC 

Thanks for the great post.

 

Any idea why the patch upgrade page talks about stopping specific executables...

 

Before You Install a Patch Update

  • If you’re installing the patch for an installation of Alteryx Designer, you need to close Designer if it’s running and install the patch via its EXE file.
  • If you’re installing the patch for an installation of Alteryx Server, open Windows Task Manager and stop Alteryx-related executables (specifically, AlteryxEngineCmd.exe and AlteryxConfiguration.exe). They will restart automatically at the end of the patch installation.

 

... as opposed to simply stopping the AlteryxService service?