Deployment Guide

Deployment Guide

Overview

nFORM is an online electronic form submission and management tool that can be used to create and manage a wide variety of forms and workflows. This document covers the deployment of the nFORM application, and it may be used to setup a new installation or to upgrade an existing installation.

The nFORM application is a complicated piece of software and provides a variety of methods for customizing its functions, appearance, and behavior. This document assumes that you already have database, application, and configuration packages from Windsor Solutions in-hand, these are typically provided to the customer by Windsor Solutions prior to the initial deployment of nFORM.

 

Introduction

Installing or upgrading nFORM is straightforward. The primary steps include:

  • Shut Down nFORM Application

  • Setup nFORM Database

  • Move nFORM Application to Web Server

The main difference between a new installation and an upgrade is that you need to setup your web server and database. In an upgrade scenario these already established. For new installations the initial configuration will be provided to you by Windsor Solutions.

Shut Down nFORM Application

If you are performing an upgrade to your nFORM application or database, make sure that you have stopped the running nFORM application. If your web server only hosts the nFORM application, you can simply shut down Microsoft Internet Information Server. Typically, this is done by logging onto the server running IIS and then launching the “Internet Information Services (IIS) Manager” application. When this application opens, you can select your web server from the list in the right-hand pane and then click the “Stop” link that is listed under the “Manage Server” section in the right-hand panel.

Often your web server will be hosting more than one application. In this case you will want to stop only the “application pool” that supports the nFORM application. In the IIS Manager application, you will want to click on the disclosure triangle to the right of your server in the right-hand panel. This will display all the resources linked to your server, click on the “Application Pools” item and a list of the pools setup on your server will be displayed in the main, central panel. Next click on the application pool that supports your nFORM installation to highlight it in the list, a set of links will appear in the right-hand panel under the header “Application Pool Tasks”. You may click on the “Stop” link to stop the application pool, thus stopping the nFORM application.

Setup nFORM Database

New nFORM databases are created by restoring the minimal database provided by Windsor Solutions. This database provides not only the structure that the nFORM application requires as well as some seed data that the application is expecting to find. When nFORM is being upgraded, we will provide a database package that may be used to upgrade an existing nFORM database. You may then run this package against your existing database to upgrade it to the current version, if required.

Microsoft SQL Server Account and Database Privileges

We recommend that you create a new Microsoft SQL Server account specifically for nFORM. The account name and password for this account may then be added to the nFORM configuration and nFORM will use that account to access the database. The account should have the ability to read, write and alter the structure of the database. With those privileges in place, you may also use this account to perform upgrades on the database.

Creating new nFORM Database

We recommend that you copy the backup file for the new nFORM database to your database server. The default location for backup files for Microsoft SQL Server is deep inside the installation directory.

C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Backup

Your location may be different, depending on how your database server has been setup and configured. If you aren't sure, ask your database administrator for the correct location.

Once you have the backup file in place, you can connect to your database server with the “Microsoft SQL Server Management Studio” application. You will need to connect with an account that has the appropriate rights to create a new database and to restore from backups. When the application opens, click the icon to the right of your database server's name in the right-hand panel to see a list of the resources associated with your database server. Right-click on the “Databases” entry and select the “Restore Database…” item from the menu.

The “Restore Database” window will appear. We are restoring from a backup file, set the “Source” to “Device” and then click the button with the ellipses (“…”) to select the file. The “Select Backup devices” window will appear, click on the “Add” button to open the file browser. From there, browse to the backup file and select it by clicking on its name and then pressing the “OK” button. You can then press “OK” to close the “Select Backup Devices” window and the “Restore Database” window will update to indicate that it is ready to restore the database.

The last step is to set the “Destination”, in most cases the name of the database will be “nForm” but you are free to choose any name you feel is appropriate. With the destination set, press the “OK” button at the bottom of the window to restore the database.

The only other thing to note is that the SQL Server account that is used by nFORM should have its default schema set to the schema that contains the nFORM tables and objects. In typically deployments this schema is named “nForm”.

Notes on the “nForm” Schema

When nFORM seed database is reseeded in the environment, all the required database objects are created. This includes accounts and schemas. All nFORM databases include a schema named “nFORM” and the account that nFORM uses this schema set as its “default” schema.

Should you need to re-create the account used by nFORM, be sure that its “default” schema is also set to “nForm”. In this way the new account will look in the correct schema for database objects.

Upgrading the nFORM Database

The first step is to unpack the database package on a machine that has local network access to your database server. It is strongly encouraged to backup the existing nFORM database before running the package. While we do test the database package in a wide variety of scenarios, it always makes sense to be cautious. Also, you will want to stop the running nFORM application before running the database upgrade package.

To apply the script changes, we will be using the flyway command line tool.  To apply the package, use a command prompt or powershell session to navigate to an established flyway application that has been configured to work with your database.  You will place the sql package in the sql folder, and then run the command, flyway migrate.  The package will then run to update your database to the latest version. 

Move nFORM Application to Your Web Server

With our database in place the next step is to move the contents of the nFORM deployment package to our web server. We will also need to move in our configuration as well as create a new website for nFORM. When we upgrade an existing installation, we backup that installation and then move the contents of the nFORM deployment package into place, overwriting the previous installation.

Deploying nFORM for the First Time

Our first deployment of nFORM to a new web server can be broken down into three steps.

  • Install required software on the web server (Application Initialization and the .Net Framework package)

  • Creating a new Application Pool and Web Application

  • Moving the contents of the nFORM package into our new website

Each of these steps is simple and straightforward, the important thing is that we do them all and that we do them in order. At no time will we put the web server itself at risk, the worst outcome is that our new nFORM install doesn't function.

Installing Required Software on the Web Server

First, we want to make sure that the “Application Initialization” feature is installed on our web server. With this feature installed we can configure the web server to start the nFORM application as soon as the web server starts. This will ensure that nFORM is always running and available. Second, we will install the .Net Framework package so that the web server can host the nFORM application.

Log into your web server and launch the “Server Manager” application (on most servers, this application will launch automatically when you log in). When Server Manager finishes opening, click on the “Manage” link in the upper right-hand corner of the window and select the “Add Roles and Features” option.

The “Add Roles and Features” wizard will open and display some explanatory text about how the wizard works. Click the “Next” button to move to the next step.

You will be asked to select the installation type, click radio button for the “Role-based or feature-based” installation and then click “Next” to continue.

On this next screen you will be asked to select the server on which to perform the installation. Typically, the only server in the list will be yours, select it and then press “Next” to continue.

The “Server Roles” page will appear, and in most cases, the “Web Server (IIS)” role will already be installed. If it's not, go ahead and check the box next to the “Web Server (IIS)” role. The only other box we want to check is the one for “Application Initialization”, we can leave the rest of the items with their default value. Click the disclosure triangle to the right of the “Web Server (IIS)” entry to display its children. Do the same with the “Application Initialization” entry and then check the box for the “Application Initialization” option. With that done, press “Next” to move to the next step.

We don't need to make any changes to the “Features” panel, simply click “Next” to continue. Confirm that you would like to enact these changes and then complete the wizard. It will take a couple minutes to install these features and then you will be all set.

Install .Net Framework Package

Version 4.8 of the .Net Framework will need to be installed to run the application on the web server. Typically, nFORM targets the newest version of .Net Framework, at the time of this writing that version is 4.8. You can download the installer from Microsoft's .Net website.