Generate Update
This document provides guidance and steps to upgrade Generate to a new release.
Audience
Technical staff that will be performing the Generate system upgrade.
It is strongly recommended that this document be read in full before attempting the upgrade.
System Requirements
Web Server:
Database Server:
Getting Started
If the current version of Generate is 3.1 or higher, updates should be performed using the Automatic Update functionality of Generate. This can be found in the Settings menu under the menu item named “Update”. This feature is available to users with the Admin role.
Update Steps (Manual Steps)
Database Server
There are two options for upgrading the database server:
Using a PowerShell script
Running SQL scripts manually
The PowerShell method is quicker but requires some basic knowledge of PowerShell. The SQL script method will take longer but only requires knowledge of running SQL scripts.
We strongly recommend using the PowerShell method as it is much quicker and less prone to manual error.
PowerShell Method
Create a backup of your database in case the update fails, and you need to revert the changes.
In the web application directory on the Web Server, copy the “
DatabaseScripts
” directory to the database server.Open the
RunDatabaseScripts.ps1
file in a text editor.If needed, modify the
$sqlCmdPath
value to suit your environment. This should be the path of yoursqlcmd.exe
executable.Save the file and open a PowerShell session.
Change the path to the directory where the
RunDatabaseScripts.ps1
file is located.Execute the PowerShell script with the following parameters relevant to your environment:
Version
Server
Database
User
Password
Confirm that the script executes successfully.
If the script fails, you may revert the update by restoring the backup created in the first step.
Example:
./RunDatabaseScripts.ps1 "11.0" "192.168.51.53" "generate " "generate" "password"
SQL Scripts Method
Create a backup of your database in case the update fails, and you need to revert the changes.
In the web application directory on the Web Server, copy the “
DatabaseScripts
” directory to the database server.Open the “VersionScripts.csv” file in the “
VersionUpdates\x.x
” directory for the relevant version.Execute each script listed in that file against the Generate database in the exact order they are listed in the file. The first column specifies the relative path of the file and the second column specifies the file name. You can ignore the third column.
It is important that every script is executed in order and runs successfully.
If any script fails, you may revert the update by restoring the backup created in the first step.
Web Application
Only perform these steps if the database update was successful.
Ensure the web server has the proper version of the .NET Core Runtime and Hosting Bundle referenced in the System Requirements. Keep in mind this may have changed since the last version of Generate.
In IIS, stop the generate.web website.
Make a backup of the generate.web website folder.
Delete all files within the generate.web website folder, except for the “appSettings.json” file located in the “Config” directory.
Extract contents of “generate.web_x.x.zip” into a temporary directory.
Copy all files from the just extracted “generate.web_x.x” folder, except for the “appSettings.json” file located in the “Config” directory, into the website folder
Start up the web application in IIS.
Open the website in a browser to confirm that it loads properly.
Only perform the following steps if the database and web updates were successful.
Background Application (update)
In IIS, stop the generate.background website.
Make a backup of the generate.background website folder.
Delete all files within the generate.background website folder, except for the “appSettings.json” file located in the “Config” directory.
Extract contents of “generate.background_x.x.zip” into a temporary directory.
Copy all files from the just extracted “generate.background _x.x” folder, except for the “appSettings.json” file located in the “Config” directory, into the website folder.
Start up the web application in IIS.
Permission Changes
For the Auto-Update functionality of Generate to work properly, you must ensure that the following permissions are set on the generate.web and generate.backgound directories:
The Application Pool Identity user account used by the generate.background site, must have Create and Modify permissions on the entire generate.web application directory.
The Application Pool Identity user account used by the generate.web site, must have Create and Modify permissions on the entire generate.background application directory.
Active Directory (AD)
Generate makes use of Active Directory (AD) for authentication and authorization. If an existing installation of AD is not available, Active Directory Lightweight Directory Services (AD LDS) may be installed. For those instructions, please see the AD LDS instructions in the Optional Installations section. The AD settings for Generate are configured in the “appsettings.json” file located in the “Config” folder of the web application directory. Please see the following for the configuration settings.
Generate makes use of two groups within Active Directory:
Administrators
Reviewers
Both AD roles must be configured in the AD instance and accessible by Generate. User access is provisioned via normal AD tools by adding or removing these roles to or from the desired users.
Final Steps
Start the web application in IIS.
Open the website in a web browser to confirm that it loads properly.
Last updated