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
apiSiteName api Name of the api application pool
idsSiteName ids Name of the ids site
clientSiteName client Name of the client site
apiApplicationPoolName api Name of the api application pool
idsApplicationPoolName ids Name of the ids application pool
clientApplicationPoolName DefaultAppPool Name of the client application pool
apiSitePrefix api. Prefix of the api site address. E.g. api.someserver.net. If you use a *-certificate, the prefix shoud be api-. E.g. api-someserver.net
idsSitePrefix ids. Prefix of the ids site address. E.g. ids.someserver.net. If you use a *-certificate, the prefix shoud be ids-. E.g. ids-someserver.net
clientSitePrefix [empty] Prefix of the website address. E.g. someserver.net if not included or web.someserver.net if web is specified
apiSQLServiceAccountName IIS APPPOOL\\api Name of the service account accessing the SQL databases from the api server. See Service accounts for more information
idsSQLServiceAccountName IIS APPPOOL\\ids Name of the service account accessing the SQL databases from the identity server. See Service accounts for more information
forceDBReseed false Set to true if you wish to regenerate the databases on installation
noHostsEntries false Set to true if you do not wish the “hosts” file to be altered during installation.
forceParametersOnUpdate false Set to true if you wish the existing config files to be overwritten by the parameters during an update. Default behaviour is to leave the already working installation configuration intact.
     
commonOptions section

Options taken from Common settings, typical overrides are server:idsPublicEndpoint and server:idsLocalEndpoint 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 IDENTITY 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 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",
    "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
}
  remember that this appconfig.json file is replicated to each language subfolder, and you must update all of these if you make manual changes. The one used by default is within the en-GB language folder.

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

{
  "CORS": {
    "AllowedHosts": "https://dviserver.local;https://api.dviserver.local;https://ids.dviserver.local"
  },
  "server:apiPublicEndpoint": "https://api.dviserver.l1ocal",
  "server:apiLocalEndpoint": "https://api.dviserver.local",
  "server:idsPublicEndpoint": "https://ids.dviserver.local",
  "server:idsLocalEndpoint": "https://ids.dviserver.local",
  "sql:api2sql:dataSource": ".\\SQLEXPRESS",
  "sql:ids2sql:dataSource": ".\\SQLEXPRESS",
  "sql:job2sql:dataSource": ".\\SQLEXPRESS",
  "token:Audience": "vic_api_res",
  "token:NameClaimType": "email"
}

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

{
  "CORS": {
    "AllowedHosts": "https://dviserver.local;https://api.dviserver.local;https://ids.dviserver.local"
  },
  "server:idsPublicEndpoint": "https://ids.dviserver.local",
  "server:idsLocalEndpoint": "https://ids.dviserver.local",
  "server:webPublicEndpoint": "https://dviserver.l1ocal",
  "server:webLocalEndpoint": "https://dviserver.local",
  "sql:ids2sql:dataSource": ".\\SQLEXPRESS"
}

Updated: