Minimizing Upgrade Downtime

This topic only applies to Secret Server On-Premises

Introduction

Large enterprise Secret Server customers with clustered environments often have a strong interest in minimizing downtime during their upgrade process. This document details our recommendations for accomplishing that.

This strategy may require close coordination between networking, server administration, and SQL DBA teams. We recommend they are available at the same time during the upgrade to minimize downtime. This procedure works best for those upgrading from the prior most recent version of Secret Server.

We recommend that you have a QA or test environment mirroring your production environment and that you first run this procedure through that environment to ensure the desired results occur, prior to attempting this in a production environment. As with any third-party application upgrade, we strongly recommend taking snapshots or virtual machine backups of your web, Secret Server distributed engine, and database servers so you can easily revert to a pre-upgrade state if issue arise during the upgrade.

Distributed engines auto-upgrade as part of the upgrade process to the latest release. It is possible that you will have up to 10 minutes of downtime while the engines upgrade, regardless of this procedure.
Customers using IWA and upgrading from 10.6 or lower to 10.6 or greater need to follow the steps in Configuring Integrated Windows Authentication to configure their distributed engines.

Procedures

Load Balanced Configuration Upgrade

Prerequisites

The upgrade procedure requires that you do these steps outside of the Secret Server install.

  • Download the upgrade package (step 1)
  • Backup your database (step 2)
  • Obtain the database upgrade script from support (step 4)
  • Backup any customized web.config or web-appsettings.config files (step 12)

Procedure

If you upgraded Secret Server from 12.0.x or earlier to 12.1.x or 12.2.x and copied the application files to a web server before you ran the database script, your database might be in a state that disables background processing and blocks the next upgrade. Before you upgrade again, follow Case 2 in Database or Binary Version Mismatch or contact Delinea Support.

  1. Download the latest version of Secret Server from the Support Website.

  2. Perform a full backup of your Secret Server database using the preferred backup method used by your company. For a quicker recovery procedure in case of disaster, we recommend creating a local SQL backup, engaging your SQL DBA team as needed. If you use an AlwaysOn configuration, perform the backup from your primary node. If desired, you can choose the option to do a "copy only" backup to avoid interrupting any log truncation performed by your enterprise backup tool.

  3. Restore the database onto a separate SQL server or separate instance within your environment. This restored backup is used to test the upgrade process. For this instruction, we call this server the "Test SQL Server."

Depending on your circumstances, you might want to provision a standalone SQL server to accommodate this need in the future.
  1. Request a database upgrade script from the Delinea Support team. You must provide them the current exact version of software you are on. The script can only be provided by Delinea. You can be request it prior to your upgrade.

  2. Run the upgrade script on the Test SQL Server to verify the upgrade script runs without errors. If the upgrade script completes without errors, you can proceed.

  3. Remove the database from the Test SQL Server. This may require your restarting SQL Server Engine services prior to removal.

  4. Choose one of the web servers in a load balancer pool. For this instruction, we call this the "Target Web Server A." The pool has three servers total (Target Web Server A, B, and C).

  5. Stop IIS on Target Web Server A. That server will appear offline in the pool list on your load balancer configuration application. For now, leave the other target web servers as is.

  6. Temporarily remove Target Web Server A from the load balancer pool using your load balancer configuration application. Leave the server itself running. For example, on a F5 Big-IP load balancer:

    1. Click Local Traffic.
    2. Click Pools.
    3. Click to select the desired pool.
    4. Click Advanced in the Configuration section.
    5. Ensure Reject is selected for Action on Service Down.
  7. Enable maintenance mode and Ignore Version Mismatch. Both settings apply to every web server. Target Web Servers B and C continue serving traffic on the previous application files while the database is upgraded, and these settings prevent password changes during the database upgrade and stop users being redirected to the version mismatch page. The Secret Server read-only vaulting function is still possible from these nodes.

    To turn on Ignore Version Mismatch, go to https://<SecretServerURL>/ConfigurationAdvanced.aspx and enable the Manual Upgrade: Allow version mismatch while in Maintenance Mode setting.

See Maintenance Mode FAQ for more on maintenance mode.
  1. Run the upgrade script on the Production SQL Server, confirming there are no errors. If there are errors, restore the database from backup before continuing.

    If you run the script with sqlcmd, include the -b and -x options. Without -x, sqlcmd treats text such as $(mktemp) in the script as sqlcmd variables, and either stops partway through or silently changes that text. Without -b, sqlcmd keeps going after an error, and a database change that fails partway isn't rolled back. In SQL Server Management Studio, the variable problem only occurs in SQLCMD mode.

    After the script completes, don't run it against the database again. Depending on the version of Secret Server that generated the script, running it again against an upgraded database can leave the database in a state that disables background processing and blocks the next upgrade. If you aren't sure whether the script completed, contact Delinea Support before you run it again.

  2. Copy the Secret Server application files you downloaded to Target Web Server A. Copy all files in the SS_update.zip file into Secret Server directory on Target Web Server A. This typically takes less than five minutes, depending on VM resources.

If you have any customized settings that are per-node-specific in the existing web.config or web-appsettings.config files on the target servers, consider whether you want to protect those changes from being overwritten during the upgrade. Because the default contents of those files might change with the upgrade, we strongly recommend copying any customizations line-by-line to the new files, rather than simply replacing the new files with your customized ones. We suggest running a diff or comparison operation on the file pairs to see what, if anything, was customized in the existing files or changed in the new files.
  1. When you are prompted, instruct the system copy dialog to overwrite all files.

  2. Start IIS on Target Web Server A. Wait until the site fully loads. This may take some time.

  3. Disable Target Web Servers B and C on your load balancer pool.

  4. Enable Target Web Server A on your load balancer pool.

  5. Access the web server through the load balancer URL. The Secret Server Login page should appear, and you should be able to log on immediately.

  6. Make Target Web Server A the primary load balancer node in the load balancer pool until the other target web servers are upgraded and online.

  7. Disable IIS on Target Web Servers B and C.

  8. Manually upgrade the Secret Server application files as previously discussed.

  9. Enable IIS on Target Web Servers B and C.

  10. Enable Target Web Servers B and C in the load balancer pool.

  11. Disable maintenance mode and Ignore Version Mismatch.

  12. Recycle the Secret Server application pool on each web server, one server at a time, so that every server uses the upgraded database version and starts its background roles.

Manual Rolling Upgrade

The manual rolling upgrade uses the Secret Server upgrade wizard to generate the database script and a zip file of the changed application files, then upgrades your web nodes in two groups so that users keep access to secrets during the upgrade. It applies only to clustered (multiple web node) environments. For the procedure, see Manual Rolling Upgrade.