Parameters-file

Instead of tweaking the different server- and client configuration files after they are generated with defaults and essential setting using the installation script, you may supply detailed settings in a parameters-file and let the installation script read and deploy all settings from this file.

If you store the parameters-file with your internal installation documentation, it will also be easy to repeat an installation or upgrade with the exact same parameters instead of risking just typing these again with the install command.

The minimal parameters-file contains information equivalent to the required command-line parameters on the setup script:

{
  "installOptions": {
    "siteHost": "dviserver.local",
    "destinationFolder": "C:\\InetPub\\wwwroot\\dvi6",
  }
}

“siteHost” is the server name part of the target Internet Information Server server binding. “destinationFolder” is the storage root-path where all the installation executable- and data-files are copied and configured.

Parameters file structure

The parameters file (i.e. parameters.json) is a JSON-formatted file and it can have any name as long as you specify the name during setup.

The file consist of a required “installOptions” node and optional nodes for each of the other configuration targets:

installOptions section
Option Default Usage
siteHost [must be specified] The server name part of the target Internet Information Server server binding
destinationFolder [must be specified] The storage root-path where all the installation executable- and data-files are copied and configured
installDefaultCertificates true Whether the default self-signed certificates should be installed to the https site
protocol https Protocol to bind the web-sites to. Alternatively, you may specify ‘http’ at your own risk. , see important note
    This setting will target all server and CORS URL options as well as “deployment:allowHttp”
licensePath   Path to existing license file. If filled, the file will be copied to the installation
apiSitePrefix api Name of the api site and prefix of the api server endpoint. E.g. “api.dviserver.local”
idsSitePrefix ids Name of the ids site and prefix of the identity server endpoint. E.g. “ids.dviserver.local”
apiApplicationPoolName api Name of the api application pool
idsApplicationPoolName ids Name of the ids application pool
apiSQLServiceAccountName IIS APPPOOL\\api Name of the service account accessing the SQL databases from the api server
idsSQLServiceAccountName IIS APPPOOL\\ids Name of the service account accessing the SQL databases from the identity server
commonOptions section

Options taken from Common settings, typical overrides are server:idsBaseUrl if not on siteHost and sql:api2sql:dataSource, sql:ids2sql:dataSource and job:ids2sql:dataSource to specify SQL Server(s)

apiOptions section

Options taken from API Service specific settings, typical overrides are server:apiBaseUrl if not on siteHost

idsOptions section

Options taken from API Service specific settings, typical overrides are server:webBaseUrl if not on siteHost and then some Authentication Policies according to local rules.

Sample parameters.json file

If we assume a setup with:

  • An SSL multi-endpoint certificate(/dvi-doc/gd-admin/inst/ssl-certificate) for https://my-dvi-server.int, https://client.my-dvi-server.int, https://api.my-dvi-server.int and https://ids.my-dvi-server.int
  • Database service is Microsoft SQL Server on \dvisql.policedomain.org instance
  • The DVI database is renamed to PLASS_ID_COMMON_TEST
  • All other services deployed to the local installation server
  • Main hostname: https://my-dvi-server.int
  • Host is Windows Server 2016 with default settings, using drive C: for everything
  • Password must be at least 8 characters

you would create this parameters file:

{
  "installOptions": {
    "siteHost": "my-dvi-server.int",
    "destinationFolder": "C:\\InetPub\\wwwroot\\dvi6"
  }
  "commonOptions": {
    "sql:api2sql:dataSource": "dvisql.policedomain.org",
    "sql:ids2sql:dataSource": "dvisql.policedomain.org",
    "sql:job2sql:dataSource": "dvisql.policedomain.org"
  }
  "apiOptions": {
    "sql:api2sql:catalog": "PLASS_ID_COMMON_TEST"
  }
  "idsOptions": {
    "password:RequiredLength": "8"
  }
}

Resulting configuration files

An installation with the minimal/default parameters file will generate the following minimal configuration files:

Angular client
C:\inetpub\dvi6root\clients\apps\kmd-dvi\assets\config\appconfig.json:

{
 "apiServer": {
    "baseUrl": "https://api.dviserver.local",
    "jwtWhitelistedDomains": "https://api.dviserver.local"
  },
  "idsServer": {
    "baseUrl": "https://ids.dviserver.local"
  },
  "isConfig": "true"
}

Api data server
C:\inetpub\dvi6root\api\appsettings.json:

{
  "CORS": {
    "AllowedHosts": "https://dviserver.local;https://api.dviserver.local;https://ids.dviserver.local"
  },
  "server:apiBaseUrl": "https://api.dviserver.local",
  "server:idsBaseUrl": "https://ids.dviserver.local",
  "sql:api2sql:dataSource": ".\\SQLEXPRESS",
  "sql:ids2sql:dataSource": ".\\SQLEXPRESS",
  "sql:job2sql:dataSource": ".\\SQLEXPRESS",
  "token:Audience": "vic_api_res",
  "token:LifetimeMinutes": "5",
  "token:NameClaimType": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
}

Identity server
C:\inetpub\dvi6root\ids\appsettings.json:

{
  "CORS": {
    "AllowedHosts": "https://dviserver.local;https://api.dviserver.local;https://ids.dviserver.local"
  },
  "server:idsBaseUrl": "https://ids.dviserver.local",
  "server:webBaseUrl": "https://dviserver.local",
  "sql:ids2sql:dataSource": ".\\SQLEXPRESS"
}