Workplace AI Installation (Windows)

This guide walks you through setting up a single node Workplace AI instance. It is for Windows 2016 or later.

For a production environment you must install agents and components on specific nodes. Reach out to your Aiimi contact for further guidance on this.

Prerequisites
  • You need your Workplace AI licence from Aiimi.

  • .NET SDK (v8.0) is downloaded and installed.

  • .NET Core and Hosting Bundle (v9.0) is downloaded and Installed.

    • This runs the Workplace AI agents and middleware and hosts web components.

If you installed Elasticsearch and Kibana you may already have the following downloads.

  • Notepad++ or similar text editing software installed.

  • NSSM is downloaded and installed to run the Tika Agent as a service.

  • Your Workplace AI distribution is downloaded. Your Aiimi contact can help you with this if you don't have it.

  • The Tika file in the Workplace AI distribution is downloaded.

Download Software

The following guide assumes everything is being stored in the C: drive. You can use any drive but we recommend installing to the root.

1

Check if your Workplace AI distribution is extracted into C:\InsightMaker.

2

If it's not, open PowerShell as an Admin.

3

Run the following script to extract the zip file to C:\InsightMaker.

Expand-Archive -Force C:\Downloads\insightmaker-win*.zip C:\InsightMaker
4

Run the following script to download the redistributables and dotnet bundle.

Start-BitsTransfer -Source "https://aka.ms/vs/17/release/vc_redist.x86.exe" -destination "C:\Downloads";
Start-BitsTransfer -Source "https://aka.ms/vs/17/release/vc_redist.x64.exe" -destination "C:\Downloads";
Start-BitsTransfer -Source "https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/8.0.16/dotnet-hosting-8.0.16-win.exe" -destination "C:\Downloads"

Prepare Files

1

Run the following script to stop Windows silently blocking files.

gci C:\InsightMaker\Plugins\*.dll | Unblock-File;
gci C:\InsightMaker\Scripts\*.ps1 | Unblock-File
2

Run the following script to update the Agent config file names.

$Filename = "C:\InsightMaker\ContentAgent";
Copy-Item -Path "$filename\appsettings.default.json" -Destination "$filename\appsettings.json" -Force;
Copy-Item -Path "$filename\log4net.default.config" -Destination "$filename\log4net.config" -Force;

$Filename = "C:\InsightMaker\EnrichmentAgent";
Copy-Item -Path "$filename\appsettings.default.json" -Destination "$filename\appsettings.json" -Force;
Copy-Item -Path "$filename\log4net.default.config" -Destination "$filename\log4net.config" -Force;

$Filename = "C:\InsightMaker\JobAgent";
Copy-Item -Path "$filename\appsettings.default.json" -Destination "$filename\appsettings.json" -Force;
Copy-Item -Path "$filename\log4net.default.config" -Destination "$filename\log4net.config" -Force;

$Filename = "C:\InsightMaker\MigrationAgent";
Copy-Item -Path "$filename\appsettings.default.json" -Destination "$filename\appsettings.json" -Force;
Copy-Item -Path "$filename\log4net.default.config" -Destination "$filename\log4net.config" -Force;

$Filename = "C:\InsightMaker\OCRAgent";
Copy-Item -Path "$filename\appsettings.default.json" -Destination "$filename\appsettings.json" -Force;
Copy-Item -Path "$filename\log4net.default.config" -Destination "$filename\log4net.config" -Force;

$Filename = "C:\InsightMaker\SecurityAgent";
Copy-Item -Path "$filename\appsettings.default.json" -Destination "$filename\appsettings.json" -Force;
Copy-Item -Path "$filename\log4net.default.config" -Destination "$filename\log4net.config" -Force;

$Filename = "C:\InsightMaker\SourceAgent";
Copy-Item -Path "$filename\appsettings.default.json" -Destination "$filename\appsettings.json" -Force;
Copy-Item -Path "$filename\log4net.default.config" -Destination "$filename\log4net.config" -Force;
3

Run the following script to update the Apps and Utils config file names.

$Filename = "C:\InsightMaker\Apps\Admin\Api";
Copy-Item -Path "$filename\appsettings.default.json" -Destination "$filename\appsettings.json" -Force;
Copy-Item -Path "$filename\log4net.default.config" -Destination "$filename\log4net.config" -Force;
Copy-Item -Path "$filename\web.default.config" -Destination "$filename\web.config" -Force

$Filename = "C:\InsightMaker\Apps\Admin\app";
Copy-Item -Path "$filename\web.default.config" -Destination "$filename\web.config" -Force;

$Filename = "C:\InsightMaker\Apps\search\api";
Copy-Item -Path "$filename\appsettings.default.json" -Destination "$filename\appsettings.json" -Force;
Copy-Item -Path "$filename\log4net.default.config" -Destination "$filename\log4net.config" -Force;
Copy-Item -Path "$filename\web.default.config" -Destination "$filename\web.config" -Force;

$Filename = "C:\InsightMaker\Utils\InsightMaker.IndexUtilities";
Copy-Item -Path "$filename\appsettings.default.json" -Destination "$filename\appsettings.json" -Force;
Copy-Item -Path "$filename\log4net.default.config" -Destination "$filename\log4net.config" -Force;

$Filename = "C:\InsightMaker\Utils\InsightMaker.Security.BuiltinSecurityUtilities";
Copy-Item -Path "$filename\appsettings.default.json" -Destination "$filename\appsettings.json" -Force;
Copy-Item -Path "$filename\log4net.default.config" -Destination "$filename\log4net.config" -Force;

Aiimi Insight Configurations

1

Run the following script to update your AppSettings.json files.

cd C:\InsightMaker\Utils\InsightMaker.SettingsUtilities;
.\InsightMaker.SettingsUtilities.exe patch -i C:\InsightMaker\ -a "elastic.certificate.path" -v "C:\Apps\certs\elastic-stack-ca.p12";
.\InsightMaker.SettingsUtilities.exe patch -i C:\InsightMaker\ -a "elastic.certificate.password" -v "Text input";
.\InsightMaker.SettingsUtilities.exe patch -i C:\InsightMaker\ -a "elastic.password" -v "Text input";
.\InsightMaker.SettingsUtilities.exe patch -i C:\InsightMaker\ -a "elastic.prefix" -v "Text input";
.\InsightMaker.SettingsUtilities.exe patch -i C:\InsightMaker\ -a "elastic.server" -l "https://localhost:9200";
.\InsightMaker.SettingsUtilities.exe patch -i C:\InsightMaker\ -a "plugins.locations" -l "C:\InsightMaker\Plugins"
.\InsightMaker.SettingsUtilities.exe patch -i C:\InsightMaker\ -a "remoteApi.certificate.path" -v "C:\Apps\certs\elastic-certificates.p12";
.\InsightMaker.SettingsUtilities.exe patch -i C:\InsightMaker\ -a "remoteApi.RemoteAddress" -v "https://localhost";
.\InsightMaker.SettingsUtilities.exe patch -i C:\InsightMaker\Apps\Admin\api -a "remoteApi.RemoteAddress" -v "https://localhost/admin/api";
.\InsightMaker.SettingsUtilities.exe patch -i C:\InsightMaker\Apps\Search\api -a "remoteApi.RemoteAddress" -v "https://localhost/api";
.\InsightMaker.SettingsUtilities.exe patch -i C:\InsightMaker\ -a "remoteApi.certificate.password" -v "Text input";
.\InsightMaker.SettingsUtilities.exe patch -c -i C:\InsightMaker\ -a "licenseKey" -v "Text input";
.\InsightMaker.SettingsUtilities.exe patch -c -i C:\InsightMaker\ -a "licenseSig" -v "Text input";

Json Web Token Config

1

Run the following script to update your JWT config key.


Configure Log File Storage

Each agent has a log4net.default.config file. This file defines the path for the log directory and is C:\tmp\logs by default.

1

Run the following script to update the logs into their own subfolders by

2

Run the following script to update the remaining logs into their own subfolders.


Initialise Control Hub Parameter

1

Run the following script to initialise the Control Hub.

  • They configure the default elastic mappings for Workplace AI indices. They also create some useful default entities for your system.


Agent Services

1

Run the following script to create all the agents.

Update Descriptions

1

Run the following script to update the descriptions of these agents.


Install Tika

1

Run the following script to move the Tika server file.

2

Run the following script to create a run-tika.bat.

3

Run the following script to create the Tika service.

  • This will open an NSSM service installer modal.

4

Path: Select the explore (...) button.

  • We recommend you don't copy and paste the file path.

5

Navigate to C:Utils\Tika\run-tika.bat.

6

Startup Directory: Select the explore (...) button

  • We recommend you don't copy and paste the file path.

7

Navigate to C:Utils\Tika.

If you want to run Tika without installing it from PowerShell navigate to the Tika folder. Run the .\run-tika.bat serve file. This can help you to identify any issues which are less obvious when going straight for the install.

8

Run the following script to start the Tika service.

Check Tika Services

1

Open your web browser and navigate to http://localhost:9998 to check the status of Tika.

  • It should say: "Welcome to the Apache Tika X.X.X-SNAPSHOT Server".


IIS Configuration

1

Run the following script to enable IIS.

2

Run the following command to create a self-signed certificate.

  • This is used later and can be updated for production builds.

3

Run the following script to create a new https (443) binding and remove the http (80) binding.

IIS Application Pools Setup

1

Run the following script to create a new application pool.

2

Run the following script to update the applications IIS settings.

IIS Assign Certificate to Binding

This sets up the default website on the server. It means it can be accessed using 'localhost' in any browser and the other apps using their alias. For example admin is accessed using localhost/admin.

1

The account IIS runs on needs read access to your Elasticsearch certificates.

2

Open IIS and navigate to the Default web site.

3

Select Bindings under Edit Site on the actions menu.

4

Select port 443 and select Edit.

5

SSL certificate: Select the new certificate you created.

6

Open your web browser and navigate to https://localhost/#/login to check this is set up correctly.

  • If you see a blank screen it's possible the IIS didn't set up correctly. You may need to restart IIS.


Password Encryption

We recommend you encrypt your build. For help encrypting your build see our Installation Security area. Once you have completed those steps return to this guide.


Restart Agent Services

1

Run the following script to restart all the agent services.


Accessing Control Hub

2

Login with your elastic username and password.

  • When you login for the first time you should see your agents on the configuration page. They will all be empty.

3

You can now close any PowerShell windows you have open.


Installing OData API (Optional)

1

Navigate to C:/Insightmaker/Apps/OData.

2

Open appsettings.default.json in a source code editor like NotePad++.

3

Check the following details:

  • The Plugins path points to the plugins folder. Likely C:\InsightMaker\Plugins.

  • The elastic certificate path points to the elastic-stack-ca.p12 file. This was created when you installed Elasticsearch.

  • The correct password is set.

  • The Elasticsearch credentials are set to the elastic login you created.

  • The prefix is set to the correct value and consistent across all components.

4

Add your two Aiimi Insight Engine licences to the root of the json:

  • "licenseKey": "your key"

  • "licenseSig": "your sig"

5

Check the remoteAddress is set to ‘http://localhost/analytics/‘.

6

Save this file, do not change the name or location.

7

Within C:/Insightmaker/Apps/OData open log4net.default.config.

8

Change the file paths to be where you’d like to save log files.

  • This can not be the in InsightMaker folder.

9

Save this file, do not change the name or location.

10

Remove the '.default' from each of the following file names:

  • 'appsettings.default.json'

  • 'log4net.default.config'

  • 'web.default.config'

11

Open the web.config file.

  • Check the module is modules="AspNetCoreModuleV2".

12

Open Internet Information Services (IIS).

13

Navigate to the Default website.

14

Click add new application.

15

Alias - Enter 'analytics' as the name of this application.

16

Physical Path - Set this to the API folder within InsightMaker/Apps/OData.

  • You should be able to view the OData metadata document using localhost/analytics/odata/$metadata.

Last updated