Set up IMPACT Service on Azure

Last modified by Peter Karlsson on 2022/11/14 14:00

This is a brief instruction for setting up the IMPACT WebAPI and OpenID on Microsoft Azure Cloud Computing Services.

Please note that screenshots might differ slightly from the current Azure Portal. If in any doubt, please contact the IMPACT Support Team.

Set up a Resource Group

Azure Resources Groups are logical collections of virtual machines, storage accounts, virtual networks, web apps, databases, and/or database servers. Typically, users will group related resources for an application, divided into groups for production and non-production — but you can subdivide further as needed.

IMPACTSRequirements for the Resource Group are: 

  • The IMPACT WebAPI must be able to communicate with the IMPACT database and the IMPACT OpenID.
  • The IMPACT OpenID must be able to communicate with the IMPACT database.

For a list of Azure regions, please refer to https://azure.microsoft.com/en-us/global-infrastructure/locations/

Choose a location near to your operations.

1.png

Allow Access Through The Firewall

To be able to access your resource group, you need to open up the firewall on Azure for your specific IP address.

2.png

The IMPACT Web API is protected by a branch standard authentication mechanism leveraged by the OpenID and not possible to access without a valid user account. Every API call is required to carry an access token issued by the OpenID.

SQL Server

SQL in a Local Environment

If you currently don’t run IMPACT or if you want to test IMPACT on Azure with a clean database, you will first need an IMPACT database running in your local environment “on-premises”.

After having finished the installation procedure, you will have a clean database that can be migrated to Azure.

Set Up an SQL Server on Azure

The SQL Server on Azure should be tied to the resource group of your choice. Choose a location close to your operation.

5.png

Set Up an SQL Database on Azure

Create a blank database. Configure the pricing tier to match your performance needs. This database will be the target database during migration from the local server.

A Note about Collation Settings
A collation is a configuration setting that determines how the database engine should treat character data. Make sure that you select the correct collation because changing it afterward will include exporting the entire database and recreating it. Follow this link to read more about collation settings.

6.png

Migrate a Local SQL Database to Azure

Azure SQL Servers allows Azure SQL Databases. They differ from the ordinary SQL databases and therefore you cannot just simply connect to the server and restore a backup without having it migrated first.

Migrations can be performed by using Microsoft SQL Management Studio.

Right-click on the IMPACT database you want to migrate, choose Tasks and Deploy to Azure SQL Database and follow the guide.

7.png

Backup and Maintenance

Setting up backup and maintenance plans is based on individual usage of the service and it is not possible to give specific recommendations.

If the application is not used extensively, then a weekly or daily backup could suffice but if the application and the business rely heavily on the application, then a backup with transaction logs might be necessary for facilitate a restore to a specific point in time.

Web services

Requirements

The Azure Web App must be 64 bit and run on .NET 4.7 or higher. The minimum hardware requirement is 4 cores and 8 GB of RAM. The recommendation is 8 cores and 32 GB of RAM. Please see StruSoft Installer for further details.

Network and Security

IMPACT by norm uses webapi.company.com and openid.company.com but this could vary from case to case. Neither the WebAPI or OpenID has any specific requirements with regards to DNS.

We recommend using HTTPS to safeguard from man-in-the-middle attacks.

If the Database and the Web Apps are placed in different resource groups, then it is important that the Web Apps are allowed to communicate with the database server at SQL-port 1433. 

Set Up a New Web App

8.png

Note that you needs to set up two apps - one for the IMPACT WebAPI and one for the IMPACT OpenID.

Verify .NET Framework Version

9.png

Verify that the .NET Framework version is 4.7 or later and that the platform is 64-bit.

Get the deployment package

Download the deployment packages for the OpenID and WebAPI from the Strusoft Installer. They are available under “Service Configuration”.

image-20221114140033-1.png

Edit The Parameters File

Update all fields marked with XXXX to the correct settings. The application name is what your application is called. Eg XXXX.azurewebsites.net.

Example:

11.png

In this case, the value for IIS Web Application Name should be replaced only with webapi and not the entire URL webapi.azurewebsites.net.

1:

2:

3:

4:

5:

6:

7:

8:

9:

10:

11:

<?xml version="1.0" encoding="utf-8"?>

<parameters>

  <setParameter name="IIS Web Application Name" value="XXXX/" />

  <setParameter name="ImpactConnectionString" value="Server=XXXX.database.windows.net;Database=XXXX;User Id=XXXX;Password=XXXX;Trusted_Connection=False; MultipleActiveResultSets=True;" />

  <setParameter name="IMPACTDesktopSecret" value="XXXX" />

  <setParameter name="IMPACTMobileSecret" value="XXXX" />

  <setParameter name="IMPACTSyncSecret" value="XXXX" />

  <setParameter name="RequireSSL" value="true" />

  <setParameter name="ApiKeys" value="" />

  <setParameter name="AdditionalApiKeyScopes" value="" />

</parameters>

Download Publish Settings From Azure

12.png

Publish Using The Console

Download Microsoft WebDeploy, adapt and issue the following command from a command console.

msdeploy.exe -source:package="IMPACT OpenId Server 15.0.025.zip" 
-dest:auto,publishsettings=impact-it-openid.PublishSettings
-verb:sync
-disableLink:AppPoolExtension
-disableLink:ContentExtension
-disableLink:CertificateExtension
-setParamFile:"OpenIdParameters.xml"

13.png

Note that both the WebApi and the OpenID needs to be deployed in this manner.

Monitoring Application Performance

We don’t have any specific recommendations with regards to monitoring, but if a user wants to monitor the performance of an application, then that is generally a good practice. This will give a good foundation for adjusting performance and maintenance plans.

Release Management

It is recommended to test an application in a staging environment before it is released in production. To be able to test the WebAPI the customer would also need to use an application (such as Project Manager) with a version number that is in line with the version number of the WebAPI.

This would require the deployment environment to be able to execute a test version of the specific application, in this case, IMPACT Project Manager.

Both the WebAPI and OpenID are “stateless” only saving data in the database.