MongoDB Installation Preparation (Prerequisites and Initialization)

Prerequisites - Primary replica set member

These pre-requisites are necessary for the successful deployment of the AspenTech Inmation solution.

# Procedure Expected Result

1

Confirm hostname for this deployment:

  • D-SITE-Core

  • D-SITE-RepA

  • D-SITE-RepB

  • D-SITE-RepC

2

Log into the server, where Primary MongoDB instance is to be installed with an administrative account using Remote Desktop console session.

In CMD Shell, type:

MSTSC /v:D-SITE-RepA

Execute this command by pressing ENTER/RETURN.

Successful login on machine with administrative account.

3

Open Start Menu and type Explorer

Open File Explorer by pressing ENTER/RETURN.

Check the file contents of the installation folder (D:\installation).

Installation Files

The following files exist in the installation folder (D:\installation):

  • AspenTechInmationNodeSetup.exe

  • AspenTechInmationSetup.exe

  • install.ps1

  • keyfile

  • mongodb-windows-x86_64-5.0.x-signed.msi

  • pre-install.ps1

  • pre_install_local.lua

  • Setup.xml

4

Ensure the security on the files is "Unblocked" by right-clicking on each file, selecting properties and checking the status of security as shown below. (Unblocking, where required, will ensure the setup can run without manual intervention)

Unblock File

Files are unblocked.

5

Ensure that the Setup.xml contains the right settings for the following parameters.

These parameters define the requirements for the instance type being installed (in this case a MongoDB) and will not change between installs on any deployment. Edit and save if necessary.

Edit and save if necessary.

Settings are as below:

OfflineInstallMongoDb

1

IntegrateMongoDB

1

LocationMongoDb

D:\installation

InstallConnector

1

InstallServer

0

InstallDataStudio

0

InstallWebApi

0

InstallOpcComponents

0

InstallCore

0

InstallRelay

0

ConfigureFirewall

1

ConnectorActiveComponent

1

IsPrimary

1

IsSecondary1

0

IsSecondary2

0

6

Depending on the server environment (D\Q\P) and its configuration specification the parameters below might be different from one server to another.

If required, consult your Design Specification/Configuration Specification and check that the following parameters in the xml file match the specification. Recall that the Site MongoDB replicaset will be associated with the Local core system machines.

InstanceName

InstallationFolder

CoreHost

CorePort

OverrideObjectName

ServiceName

MongoDbReplicasetPrimaryHost

MongoDbReplicasetPrimaryPort

MongoDbReplicasetSecondaryHost1

MongoDbReplicasetSecondaryPort1

MongoDbReplicasetSecondaryHost2

MongoDbReplicasetSecondaryPort2

MongoDbUserName

MongoDbReplicasetName

RetentionTimeNonGxpDays

RetentionTimeGxpDays

BackupPath

Prerequisites - Secondary replica set members

These pre-requisites are necessary for the successful deployment of the AspenTech Inmation solution on the secondary replica-set members.

# Procedure Expected Result

1

Confirm hostname for this deployment:

  • D-SITE-Core

  • D-SITE-RepB

  • D-SITE-RepC

2

Log into the server, where Secondary MongoDB instances are to be installed with an administrative account using Remote Desktop console session.

In CMD Shell, type:

MSTSC /v:D-SITE-RepB
MSTSC /v:D-SITE-RepC

Execute this command by pressing ENTER/RETURN.

Successful login on machines with administrative account.

3

Open Start Menu and type Explorer

Open File Explorer by pressing ENTER/RETURN.

Check the file contents of the installation folder (D:\installation).

Installation Files

The following files exist in the installation folder (D:\installation):

  • AspenTechInmationNodeSetup.exe

  • AspenTechInmationSetup.exe

  • install.ps1

  • keyfile

  • mongodb-windows-x86_64-5.0.x-signed.msi

  • Setup.xml

4

Ensure the security on the files is "Unblocked" by right-clicking on each file, selecting properties and checking the status of security as shown below. (Unblocking, where required, will ensure the setup can run without manual intervention)

Unblock File

Files are unblocked.

5

Ensure that the Setup.xml in the secondary replica set members contains the right settings for the following parameters. Edit and save if necessary.

These parameters define the requirements for the instance type being installed (in this case a MongoDB) and will not change between installs on any deployment. Edit and save if necessary.

Edit and save if necessary.

Param

Secondary 1 server D-SITE-RepB

Secondary 2 server D-SITE-RepC

OfflineInstallMongoDb

1

1

IntegrateMongoDB

1

1

LocationMongoDb

D:\installation

D:\installation

InstallConnector

1

1

InstallServer

0

0

InstallDataStudio

0

0

InstallWebApi

0

0

InstallOpcComponents

0

0

InstallCore

0

0

InstallRelay

0

0

ConfigureFirewall

1

1

ConnectorActiveComponent

1

1

IsPrimary

0

0

IsSecondary1

1

0

IsSecondary2

0

1

6

Depending on the server environment (D\Q\P) and its configuration specification the parameters below might be different from one server to another.

If required, consult your Design Specification/Configuration Specification and verify that the following parameters in the xml file match.

InstanceName

InstallationFolder

CoreHost

CorePort

OverrideObjectName

ServiceName

MongoDbReplicasetPrimaryHost

MongoDbReplicasetPrimaryPort

MongoDbReplicasetSecondaryHost1

MongoDbReplicasetSecondaryPort1

MongoDbReplicasetSecondaryHost2

MongoDbReplicasetSecondaryPort2

MongoDbUserName

MongoDbReplicasetName

RetentionTimeNonGxpDays

RetentionTimeGxpDays

BackupPath

Initialize Data Stores and Connectors

Some configurations are needed in the DataStudio through the scripts before the installation to create the MongoDB set and the Connector objects (it will not be functional at this step).

# Procedure Expected Result

1

Open RDP session to Master-Core

Successful login on machine

2

Open start menu and type DataStudio

Open “AspenTech Inmation DataStudio” by pressing ENTER/RETURN

DataStudio window opens with “Connect to dialog”

3

Use Windows Authentication

Click Ok

Connect to dialog closes. No error message is shown in connection dialog.

4

Optional: When using DataStudio the first time, the “Create new workspace…” dialog appears

Leave proposed name and click Ok

Create new workspace dialog closes

5

In the Menu Bar, click Open and then click on Console

New Console opens in AspenTech Inmation DataStudio

6

Copy the following mass command to the Console ensuring the settings reflect the requirements of the system (pre-install_local.lua):

(require "esi-deploy"):INIT_MONGODB_PSS({
    PrimaryHost = "D-SITE-RepA",
    SecondaryHost1 = "D-SITE-RepB",
    SecondaryHost2 = "D-SITE-RepC",
	ShortCode = "SITE",
	IsLocalCore = true,
    RetentionTimeNonGxpDays = 365,
    RetentionTimeGxpDays = 365
})

-

7

Press F5 to run the command

Local Custom Data Stores
  • Three Connector objects are created in the Navigation Tree beneath the Local-Core

  • Seven custom data stores are created in a Data Stores group identified by the site short code beneath the Master-Core

  • Six custom data stores are created in a Data Stores group identified by the site short code beneath the Local-Core

  • The status of the Connector, the System and the custom data stores objects is bad

Test initial configuration

# Procedure Expected Result

1

Check the MongoDB connection settings for each Data Store Object beneath the Local-Core. Select the Data Store and expand the Time Series Data Store in the Object Properties panel. The MongoDB connection settings should be as highlighted below:

MongoDB Custom Data Stores

For each Data Store (except logging and big table data store) the MongoDB Connection settings should match the entries in the pre-install script. Below are the object properties that need to be checked:

  • Connection String reflects the site PrimaryHost entry

  • Replication Set Name reflects the site replicaSet entry

  • Replica Set 1 reflects the site SecondaryHost1 entry

  • Replica Set 2 reflects the site SecondaryHost2 entry

  • Authentication Mode is set as SCRAM-SHA-256

  • User Name reflects the username setting

  • Password contains a random password generated during the installation phase which is the same for all Data Stores (except Logging and big table data stores).

This should be checked for these data stores:

  • Time Series Data Store

  • Event (A&E) Data Store

  • Production Tracking Data Store

  • Custom Data Store

  • File Store

  • Audit Trail Data Store

Below are the object properties that need to be checked for the Logging Data Store:

  • Connection String is set as localhost:27017

  • Authentication Mode is set as No Authentication This should be checked for all custom data stores.

2

In the I/O Model panel, expand the Local-Core object and show the installed three connectors.

Select the Object Properties for the Connectors and check the settings as highlighted below.

Data Studio Master Connector Object Properties

The connector Object Name and the Host Name or IP properties reflects the OverrideObjectName and MongoDbReplicasetPrimaryHost / MongoDbReplicasetSecondaryHost1/2 settings respectively in the Setup.xml file.

The next step is to install MongoDB on all replica set members through the scripts. The order of the installation should be to install the secondary members of the replica set first, followed by the primary member of the replica set.