How to create a Secondary Core

This section explains how to create and configure a Secondary Core object. Secondary Cores can be set up to work as a secondary service for either a Master or Local Core. These instructions explain how to configure the Secondary Core on a different host to the Master Core or Local Core (most use cases for the Secondary Core will require it to be installed on a different host machine).

In this document we assume you already have a primary core service installed (either a Master or Local Core). The symbolic name 'PRIMARYCOREHOST' will be used to address this machine. 'SECONDARYCOREHOST' will be used for the machine where the local core service will be installed.

Core services can be installed using the Windows Installer or from the Command Line.

Creating a Secondary Core Service

  1. For an installation with the Windows Installer, go to the SECONDARYCOREHOST machine and run the Window Installer.

    1. On the first page of the installer dialog, make sure that the Server Components option is selected (other components can be selected if required) and then check that you agree to the license terms and conditions, and click Install.

    2. The options can be configured as described in the Windows Installer Setup until you reach the Core Options: Role page. Here, make sure you click on the Secondary Core or Secondary Local Core option and then in the Master/Local Core or Relay Host field, enter the PRIMARYCOREHOST hostname, and enter "6512" in the Port field (or a different port field depending on the configuration of the PRIMARYCOREHOST host).

  2. If using command line installation, go to the "bin" folder in the root directory and enter the following command for the default security mode.

    inmation.exe --install Core --corerole secondary --corehost PRIMARYCOREHOST --coreport 6512

When the Secondary Core service is running and properly configured, it will actively connect to the Master Core. It will then be visible in the I/O Model when connected to the PRIMARYCOREHOST with DataStudio.

Secondary Core in I/O Model when connected to Master Core in DataStudio
Figure 1. Secondary Core in I/O Model when connected to Master Core in DataStudio

Take note of the Component ID property in the Component Identification property compound of the Secondary Core. The Functional Component property of any Servers configured will need to use this value to ensure connection to the correct Core.

The Receive Realtime Data property is by default set to false when the Secondary Core is created. This can be switched on if Realtime Data is needed for the client applications, however activating this property can have an effect on performance. When this property is not activated, dynamic values will not be visible in the faceplate of objects if connecting to the Secondary Core with DataStudio. Any syslib.getvalue or read calls will return "nil" with Bad Quality.

In order for the Secondary Core to be able to connect to MongoDB, the Connection String property for any data store (System or Custom) configured in the system needs to use a hostname that is resolvable by the Secondary Core. For example, using "localhost" (the default on installation) for system data stores in the System object will not work and the Secondary Core will be unable to connect.

Connecting a Server to a Secondary Core

The Secondary Core can act as a "Read-Only" component for client applications to make, for example history calls. In this section we will show how to connect a Server component to a Secondary Core so that OPC clients can make calls to the Secondary Core. The Server service can be installed on the same host machine as the Secondary Core or on a different host.

  1. Install a Server Service using the instructions in the Node Installer section of the documentation. Give the Server instance a name and configure the hostname and port to match that of the Secondary Core configuration. The default Security Mode is "TLS-SRP" so configure a passphrase for secure communication between Secondary Core and Server components.

  2. Login to the Secondary Core or Primary Core with DataStudio using an administrator Profile and go to the Server Model.

    Although most create/delete/write permissions are not possible when connected to the Secondary Core, the Server Model is an exception and a Profile with sufficient permissions can create/modify objects in the Server Model.
  3. Right-click in the Server Model and select New  Services  Server.

  4. In the Create Server Wizard, give the Server Object a name. Then set the Functional Component property to match the Component ID of the Secondary Core object.

    Setting the Functional Component property correctly during object creation is important as otherwise it might be required to restart both Core and Server services (including resetting the Server image files).
  5. In the Communication page, enter the hostname of the Server service installed earlier. Also, set the Connection Mode to "Active" and enter the passphrase configured during the Server installation.

  6. Click Create to create the object in the Server Model. If configuration has been done correctly, the Server Object should show 2 green lights in the Server model.

Connecting a Web API Server to a Secondary Core

When installing a Secondary Core using the Windows Installer Setup, the Web API service can be installed at the same time. If the Web API service is not installed at this time or the Secondary Core is installed using the command line, then see the Web API installation section for instructions on how to configure the service.

When setting up the Web API service, either with the Windows Installer or the command line, a profile must be assigned. This profile must also exist in the Access Model in DataStudio. This profile can be created after the installation of the Web API service if necessary. It must be created in the Access Model on the PRIMARYCOREHOST.

In DataStudio, the Web API Server object is created automatically if both of the following hold:

  • The PRIMARYCOREHOST and SECONDARYCOREHOST must be able to communicate, i.e. the Secondary Core object should be enabled in the I/O model and should be in a good state.

  • The profile assigned to the Web API service on the SECONDARYCOREHOST must have administrative access and should be enabled in the Access Model.

This object will be disabled by default but can be enabled on either the PRIMARYCOREHOST or SECONDARYCOREHOST. To do this, navigate to the Server Model in DataStudio. Right-click on the Web API object for the Secondary Core and select Admin  Enable or click F9.