Configure the CVR Update module services

When the two CVR Update services have been installed correctly, you must deploy and configure both services separately to access the KMD Logic platform. Both services will be started automatically during the configuration process. After you have configured the services, you can test the connection to make sure you have configured the services correctly.

Prerequisite: The CVR Update services must be able to reach the following KMD Logic endpoints:

  • https://identity-api.kmdlogic.io
  • https://gateway.kmdlogic.io

To configure the services, you will need the 4 identifiers you recorded during configuration of your KMD Logic subscription and product:

  • KMD Logic Client ID: GUID
  • KMD Logic Client Secret: GUID
  • KMD Logic Subscription ID: GUID 
  • KMD Logic Product ID: GUID 

From this step: Configure the KMD Logic platform

You will also need the CVR Update Client ID and CVR Update Client Secret from the OAuth2 setting that was created in WorkZone Configurator

  • CVR Update Client ID
  • CVR Update Client Secret

From this step: Configure the CVR Update OAuth2 credentials

Both CVR update services need to be configured identically and since each service is located on a separate machine (the WorkZone Agent server and the WorkZone web server), you will be switching machines during configuration.

The services are deployed and configured using Windows Powershell commands on the respective servers.

Deploy and configure the CVR Update service

To configure the CVR Update service, you must first import the CvrUpdate.psm1 powershell module into a Windows Powershell window and then enter the configuration commands.

Import the CvrUpdate.psm1 module (WorkZone Agent server)

The CvrUpdate.psm1 powershell module is located in the CVR Update folder in the installation folder of WorkZone Agent server.

The default location is C:\Program Files(x86)\KMD\WorkZone\Program but the folder may be different if you have selected another folder to install WorkZone to.

Prerequisite: You must log on to the WorkZone Agent server with administrator privileges.

Note: Each command is separated by a single space. Do not include the chevrons (angle bracket) < > in the script and use single quotation marks ('). Do not use double-qoutation marks (")

  1. On the WorkZone Agent server machine, open a Windows Powershell window with Administrator privileges and navigate to the folder that contains the CvrUpdate.psm1 module.
  2. In the powershell command line, enter Import-Module .\CvrUpdate.psm1 and press return to load the module.
  3. In the powershell command line, enter Add-CvrUpdateService -Dsn <Database> where <Database> is the name of your WorkZone database. Press enter to deploy CVR Update service to the WorkZone Agent server. The CvrUpdateservice is displayed in the Microsoft Services window but is not started as it hasn't been configured yet.
  4. In the powershell command line, enter Update-CvrUpdateServiceConfiguration -OAuth2ServerUrl 'http://<WZ Main page>/oauth2' -OAuth2ClientId '<CVR Update Client ID>' -OAuth2ClientSecret '<CVR Update Client Secret>' -ODataServerUrl 'http://<WZ Main page>/odata' -LogicClientId '<KMD Logic Client ID>' -LogicClientSecret '<KMD Logic Client Secret>' -LogicCvrSubscriptionId '<KMD Logic Subscription ID>' -LogicCvrConfigurationId '<KMD Logic Product ID>', where the placeholder values are as follows: 
    • <WZ Main Page>: The name of your WorkZone main page (landing page), for example http://MyOrg.WZLandingPage.Local/odata or http://MyOrg.WZLandingPage.Local/oauth2
    • <CVR Update Client ID> The CVR Update Client ID from the OAuth2 setting created in WorkZone Configurator
    • <CVR Update Client Secret> The CVR Update Secret ID from the OAuth2 setting created in WorkZone Configurator
    • <KMD Logic Client ID> The KMD Logic Client ID, created in the KMD Logic platform
    • <KMD Logic Client Secret> The KMD Logic Client Secret, created in the KMD Logic platform
    • <KMD Logic Subscription ID> The KMD Logic Subscription ID, created in the KMD Logic platform
    • <KMD Logic Product ID> The KMD Logic Product ID, created in the KMD Logic platform
  5. Press enter to execute the script. When the powershell script has been executed successfully, the CvrUpdateService service will be configured and started automatically on the WorkZone Agent server.

Deploy and configure the CVR Update Subscription service

To configure the CVR Update Subscription service, you must first import the CvrUpdate.psm1 powershell module into a Windows Powershell window and then enter the configuration commands.

Import the CvrUpdate.psm1 module (WorkZone web server)

The CvrUpdate.psm1 powershell module is located in the CVR Update folder in the installation folder of the WorkZone Web server.

The default location is C:\Program Files(x86)\KMD\WorkZone\Program but the folder may be different if you have selected another folder to install WorkZone to.

Prerequisite:

  • You must log on to the WorkZone Web server with administrator privileges.
  • The CVR Update Subscription web app service requires the ASP.NET Core 5.0 Hosting Bundle is installed on the web server. The bundle can be downloaded from Microsoft. See the See Also section below for the link.

Note: Each command is separated by a single space. Do not include the chevrons (angle bracket) < > in the script and use single quotation marks ('). Do not use double-qoutation marks (")

  1. On the WorkZone web server machine, open a Windows Powershell window with Administrator privileges and navigate to the folder that contains the CvrUpdate.psm1 module.
  2. In the powershell command line, enter Import-Module .\CvrUpdate.psm1 and press return to load the module.
  3. In the powershell command line, enter Install-CvrSubscriptionService. Press enter to install the CvrSubscriptionService to the WorkZone Web server. The CvrSubscriptionService is displayed in the Microsoft Application Pools window but is not started as it hasn't been configured yet.
  4. In the powershell command line, enter Update-CvrSubscriptionServiceConfiguration -OAuth2ServerUrl 'http://<WZ Main page>/oauth2' -OAuth2ClientId '<CVR Update Client ID>' -OAuth2ClientSecret '<CVR Update Client Secret>' -ODataServerUrl 'http://<WZ Main page>/odata' -LogicClientId '<KMD Logic Client ID>' -LogicClientSecret '<KMD Logic Client Secret>' -LogicCvrSubscriptionId '<KMD Logic Subscription ID>' -LogicCvrConfigurationId '<KMD Logic Product ID>', where the placeholder values are as follows: 
    • <WZ Main Page>: The name of your WorkZone main page (landing page), for example http://MyOrg.WZLandingPage.Local/odata or http://MyOrg.WZLandingPage.Local/oauth2
    • <CVR Update Client ID> The CVR Update Client ID from the OAuth2 setting created in WorkZone Configurator
    • <CVR Update Client Secret> The CVR Update Secret ID from the OAuth2 setting created in WorkZone Configurator
    • <KMD LogicClient ID> The KMD LogicClient ID, created in the KMD Logicplatform
    • <KMD LogicClient Secret> The KMD LogicClient Secret, created in the KMD Logic platform
    • <KMD LogicSubscription ID> The KMD LogicSubscription ID, created in the KMD Logicplatform
    • <KMD LogicProduct ID> The KMD Logic Product ID, created in the KMD Logic platform
  5. Press enter to execute the script. When the powershell script has been executed successfully, the CvrSubscriptionService web app will be configured and started automatically on the WorkZone Web server.

You can test the CVR Update connections to verify if the configuration of the services was successful.

See Also

Test the CVR Update connections

The JSON appsetting files

Download the ASP.NET Core 5.0 Hosting Bundle (External link)