Installing QPR ProcessAnalyzer Server

From QPR ProcessAnalyzer Wiki
Jump to: navigation, search

This page describes how to install QPR ProcessAnalyzer Server. Installation steps are:

  1. Acquire a Windows server machine and SQL Server (see the System Requirements).
  2. Configure SQL Server for QPR ProcessAnalyzer database.
  3. Install and configure Roles and Features for IIS.
  4. Install QPR ProcessAnalyzer using Web Deploy or manually.
  5. Configure IIS for QPR ProcessAnalyzer.
  6. Go through and set settings in QPR ProcessAnalyzer Server web.config file.
  7. Go through and set settings in PA_Configuration table in QPR ProcessAnalyzer database.
  8. Setup Scripting Sandbox.
  9. Setup https and signed certificate.
  10. Install QPR UI.

Notes:


SQL Server setup

Note: In order to perform the installation successfully, you need to know the basics about server environments. If you're not familiar with Windows Server and SQL Server, please refer, for example, to http://technet.microsoft.com/en-us/library/bb545450.aspx for additional information.

Setup Account for SQL Server Connection

It's possible to connect to SQL Server either using a Windows account (Windows authentication) or SQL Server's own logins (SQL Server authentication). Decide with option to use and setup the needed account.

Create New Database

  1. Open SQL Server Management Studio and create new database. You can use name QPR_ProcessAnalyzer. You can use the <default> collation.
  2. Add the (optionally) created Windows user as a new Login in Security -> Logins.
  3. Assign the created Windows user as the db_owner role for the previously created database.
  4. Run database initialization scripts initializedb.sql and optimizedb.sql. These scripts are available in the PA_Deploy.zip file.
  5. If needed, change Initial size and Autogrowth size of the datafiles of the QPR ProcessAnalyzer database for better performance.
  6. Implement a scheduled maintenance task that defragments fragmented indexes.

Adjust SQL Server Settings

For better performance, it's advised you adjust the following SQL Server settings. Set default fill factor to 95% for new tables. Note that you need to restart SQL Server for this to take effect (for more information, see https://msdn.microsoft.com/en-us/library/ms190470.aspx):

sp_configure 'show advanced options', 1;  
GO
RECONFIGURE;  
GO
sp_configure 'fill factor', 95;  
GO
RECONFIGURE;  
GO

Install Server Roles and Features for IIS

The following Server Roles and Features should be enabled for Microsoft Internet Information Services (IIS):

  • On the taskbar, click Server Manager, and then click the Manage menu, and then click Add Roles and Features.
  • In the Add Roles and Features wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.
  • In the Server Roles section, select the following components:
  • Common HTTP Features: Default Document, Directory Browsing, HTTP Errors, Static Content
  • Health and Diagnostics: HTTP Logging
  • Performance: Static Content Compression
  • Security: Request Filtering, Windows Authentication
  • Application Development: .Net Extensibility 4.5/4.6, Application Initialization, ASP.NET 4.5/4.6, ISAPI Extensions, ISAPI Filters
  • Management Tools: IIS 6 Management Console

AddRolesAndFeaturesWizard1.JPG

  • In the Features section, select the following components:
    • .Net Framework 4.5/4.6 Features:
      • .Net Framework 4.5/4.6
      • ASP.Net 4.5/4.6
      • WCF Services: HTTP Activation, TCP Port Sharing

SelectFeaturesWizard1.JPG

  • User Interfaces and Infrastructure: Graphical Management Tools and Infrastructure, Server Graphical Shell (Only for Windows Server 2012 or earlier version)
  • Windows Powershell: Windows Powershell 2.0, 3.0 or newer if available, Windows Powershell ISE
  • Windows Process Activation Service: Process Model, Configuration APIs
  • WoW64 Support

SelectFeaturesWizard2.JPG

  • On the Confirm installation selections page, click Install.
  • On the Results page, click Close.

Install QPR ProcessAnalyzer Server using Web Deploy

Follow these instructions to install QPR ProcessAnalyzer server using the Web Deploy. There is also a manual installation method available. The QPR ProcessAnalyzer Service can be installed either via a Microsoft Web Deploy package or manually. Note: PA service only supports default port 80 (http) and 443 (https).

  1. Install Microsoft Web Deploy 3.6 or later (Installation package: https://www.microsoft.com/en-us/download/details.aspx?id=43717).
  2. Copy files PA_Deploy.zip, Configuration.ps1 and DeployPAService.ps1 to a same folder from the Service folder (QPR ProcessAnalyzer Server file package from https://devnet.onqpr.com/pawiki/index.php/QPR_Product_Downloads ).
  3. Open Configuration.ps1 using a text editor and modify settings for your needs. The table below lists available settings in the file.
  4. Launch Microsoft PowerShell as an administrator and navigate to the folder containing the deployment files.
  5. Run .\DeployPAService.ps1 and input the application pool user password when requested (asked only if you chose to use custom credentials).
  6. Make sure that there is an https binding set to the IIS web site for QPR ProcessAnalyzer (found in Edit Bindings...). If you don't have a valid SSL certificate, a self-signed certificate can be used.
  7. If you want to disable http binding in IIS, rename C:\inetpub\wwwroot\QPRPA\Web.config to Web.Http.config, and rename C:\inetpub\wwwroot\QPRPA\Web.HttpsOnly.config to Web.config. (The default Web.config file requires that there are both http and https bindings in IIS.)
  8. Create a QPR_Admin user with a strong password to the QPR ProcessAnalyzer instance. Store the QPR_Admin user password in a secure location. Use this administrator user to grant user rights to users of the service.
Parameter name Description Example value
$webSiteName Name of the IIS Website, where QPR ProcessAnalyzer Server is installed. The Website must be created when installing QPR ProcessAnalyzer Server. "Default Web Site"
$appPath Path where the application will be created. "$webSiteName\$virtualDir$appName"
$DBConnectionString Connection string used by QPR ProcessAnalyzer Server to access the database. "Server=localhost\databaseinstancename;Database=QPR_PA;Persist Security Info=False;User ID=<SQLServerLogin>;Password=<password>"
$customAppPool Defines if custom application pool is used. $false
$appPoolName Name of the application pool used by QPR ProcessAnalyzer Server. The application pool is created by the QPR ProcessAnalyzer Server installation. "QPRPA"
$customAppPoolCredentials Defines whether the application pool will be run as a user defined in $appPoolUser setting (password for the account will be requested during the installation.) If you set $customAppPoolCredentials = $false in the configuration script, you need to create a new user to DB and name the user NT AUTHORITY\NETWORK SERVICE and grant DBO role to it. $true
$appPoolUser Defines the identity under which the application pool is run. Password for the user is requested during the installation and not stored here. "PA_user"
$logFileName Name of the QPR ProcessAnalyzer Server log file. Only the file name, not the folder path. "PAService_$svcVerMajor.$svcVerMinor.$svcVerRelease.svclog"
$paLogFileName Name of the QPR ProcessAnalyzer log file. Only the file name, not the folder path. "w3wp.txt"
$bindingsConfigSource Defines the config source file for bindings. For http connection, use Bindings_http.config; for https connection use Bindings_https.config. "Bindings_https.config"
$logFilePath Path to the service log file and QPR ProcessAnalyzer log file. "C:\ProgramData\QPR Software\QPR ProcessAnalyzer\201X.X\Logs"
$supportLoadBalancer Defines if QPR ProcessAnalyzer service is running behind a system that hides the original client IP, such as a load balancer. If you are running the service in Amazon Web Services and wish to use the AWS load balancing, set to "True". "True"
$ActivationEMSAddress See the description of the corresponding setting in the web.config section. "https://activation.qpr.com"
$ActivUserFirstName See the description of the corresponding setting in the web.config section. "UserFirstName"
$ActivUserLastName See the description of the corresponding setting in the web.config section. "UserLastName"
$ActivUserEmail See the description of the corresponding setting in the web.config section. "system.owner@company.com"
$LicenseFilePath QPR ProcessAnalyzer Server license file path. The license file is generated automatically, when QPR ProcessAnalyzer Server is activated. The user account defined in the $appPoolUser setting must have write access to the specified folder. If this folder doesn't already exist, you have to create it. It's recommended to use folder C:\ProgramData\QPR Software\QPR ProcessAnalyzer\License\. The lisence file name is not part of this setting. "C:\ProgramData\QPR Software\QPR ProcessAnalyzer\License\"
$licenseFileName Name of the QPR ProcessAnalyzer Server license file. The license file is generated automatically, when QPR ProcessAnalyzer Server is activated. Please, do not change this setting. "pa_service.lf"
$ProductActivationCode See the description of the corresponding setting in the web.config section.
$serverGroupPA This setting is related to Common QPR Authentication.
$serverGroupMD This setting is related to Common QPR Authentication.
$serverGroupMEA This setting is related to Common QPR Authentication.
$responsePollingInterval See the description of the corresponding setting in the web.config section. 300000

IIS Configuration

All the IIS configurations instructed in this chapter needs to be in place for QPR ProcessAnalyzer Server to work correctly.

Set Application Pool Always Running

  1. Open Internet Information Services (IIS) Manager and click Application Pools in the left side hierarchy.
  2. Select QPR ProcessAnalyzer application pool and click Advanced Settings....
  3. Set (General) > Start Mode to AlwaysRunning. Click OK.

Enable Application Preloading

  1. Open Internet Information Services (IIS) Manager and in the left side hierarchy under Sites select the QPR ProcessAnalyzer application.
  2. Click Advanced Settings... on the right pane.
  3. Set Preload Enabled to True. Click OK.

Disable Application Pool Idle Timeout

When the IIS application pool that runs QPR ProcessAnalyzer Server shuts down, all loaded models are dropped and script running is stopped. By default, idle application pools (i.e. QPR ProcessAnalyzer hasn't been used for some time) are shut down automatically after a certain time. To disable application pool idle timeout:

  1. Open Internet Information Services (IIS) Manager and click Application Pools in the left side hierarchy.
  2. Locate QPR ProcessAnalyzer application pool, select it and click Advanced Settings....
  3. Set Process Model -> Idle Time-out (minutes) to 0. Click OK.

Disable Application Pool Regular Recycling

When the IIS application pool that runs QPR ProcessAnalyzer Server shuts down, all loaded models are dropped and script running is stopped. By default, application pools are restarted (recycled) regularly. To disable application pool regular recycling:

  1. Open Internet Information Services (IIS) Manager and click Application Pools in the left side hierarchy.
  2. Locate QPR ProcessAnalyzer application pool, select it and click Advanced Settings....
  3. Set Recycling -> Regular Time Intervals (minutes) to 0. Click OK.

Disable Application Pool Overlapping Recycle

If using regular application pool recycling, e.g. at specific times, it's recommended to disable the overlapping recycles. When using overlapping recycles, a new instance is started before shutting down the previous, which will take much more memory. Disable the overlapping recycling as follows:

  1. Open Internet Information Services (IIS) Manager and click Application Pools in the left side hierarchy.
  2. Locate QPR ProcessAnalyzer application pool, select it and click Advanced Settings....
  3. Set Recycling -> Disable Overlapping Recycle to True. Click OK.

IIS Application Pool User Profile Loading

To enable user profile loading:

  1. Open Internet Information Services (IIS) Manager and click Application Pools in the left side hierarchy.
  2. Click QPR ProcessAnalyzer application pool and click Advanced Settings....
  3. Set Process Model > Load User Profile to True. Click OK.

The user profile loading allow access to their cryptographic store and environment variables (such as %TEMP%). Additional information can be found from Compatibility Issues with Application Pool Identities.

Disable Application Pool Pinging

Application pool pinging is a mechanism in IIS to monitor that applications are responding normally. In QPR ProcessAnalyzer, application pool pinging may cause issues when there are long running analysis calculations, because during them the application pool might not respond to a ping. As a result, IIS shuts down QPR ProcessAnalyzer application pool (that IIS considers unhealthy), and models are dropped from the memory which degrades performance.

To disable application pool pinging:

  1. Open Internet Information Services (IIS) Manager and click Application Pools in the left side hierarchy.
  2. Locate QPR ProcessAnalyzer application pool, select it and click Advanced Settings....
  3. Set Ping Enabled to False. Click OK.

More information about IIS Application Pool Pinging: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc725836(v=ws.10)

Add MIME Type for PO files

IIS needs to have a MIME type for .po files (language dictionaries) specified. Otherwise .po files cannot be downloaded from IIS. Follow these steps:

  1. Open Internet Information Services (IIS) Manager, expand the left side hierarchy and click QPRPA application.
  2. Select MIME Types;
  3. Click Add... and add a entry with .po extension and application/octet-stream MIME type;