Installation and Upgrade > Importing the ThingWorx Apps Extension for a High Availability Active-Active Environment
Importing the ThingWorx Apps Extension for a High Availability Active-Active Environment
* 
The instructions in this topic are for an initial import of ThingWorx Apps on a ThingWorx system that is configured for a high availability (HA) active-active environment. If you are importing ThingWorx Apps on a single-server ThingWorx system, follow the instructions in Importing the ThingWorx Apps Extension.
ThingWorx Apps can be run in a ThingWorx system that is configured as a high availability (HA) active-active environment, with the following configuration:
Two-server high availability active-active installation.
Running with Apache Ignite embedded in the ThingWorx Platform, rather than running Ignite standalone. Using an external, standalone Ignite degrades ThingWorx Apps performance due to query performance across the cluster.
The following graphic shows the cluster configuration for this scenario:
Diagram showing high availability clustering components for this scenario.
The following components can be part of an HA deployment:
Users and Devices—No role in HA functionality. From their perspective nothing changes. They always use the same URLs and IP address even if there is a change in the primary ThingWorx server.
Firewalls—No HA function and can be considered optional. Firewalls are often placed to implement security requirements.
Load Balancers- Load balancers manage a virtual IP address for the application they are supporting. All traffic routed to that virtual IP address is directed to the active application that can receive it. In this scenario, HAProxy is used.
ThingWorx Connection Servers—Receives web socket traffic from assets and route it to the ThingWorx Platform. The connection servers can operate in a cluster configuration. Once an asset is directed to a specific Connection Server, it should always use the same connection server. If that server goes offline, then the asset should be redirected to another available Connection Server.
ThingWorx Foundation—Receives all user and asset traffic.
ThingWorx Repositories—These are required storage locations such as ThingworxPlatform, ThingworxStorage, and ThingworxBackupStorage, and any additional storage locations added to support your implementation. For a cluster environment, the storage folders must exist in a common storage location where all ThingWorx servers can equally access them.
Apache ZooKeeper—ZooKeeper is a centralized coordination service used by ThingWorx Connection Server and Ignite for service discovery, singleton election, and distributed coordination.
Apache Ignite—Ignite provides a distributed memory cache for sharing state across servers in the cluster. In this configuration, Ignite is embedded in the ThingWorx Platform, rather than installed separately.
PostgreSQL—For an HA configuration, PostgreSQL will operate through two or more server nodes in a hot standby configuration. One node receives all write traffic, and one of the other nodes can receive all read traffic. Streaming replication is activated between all nodes to keep each node up to date.
Pgpool-II—This is only used in PostgreSQL HA configurations. Pgpool-II nodes receive the ThingWorx requests (reads and writes) and directs them to the appropriate PostgreSQL node. It also monitors the health of each PostgreSQL node and can initiate failover and retargeting tasks when one of the nodes goes offline.
Microsoft SQL Server—Microsoft Failover is used to ensure at least one MS SQL server is online and available.
InfluxDB—An InfluxDB implementation is not required for a ThingWorx clustering configuration. If it is needed to meet the ingestion requirements of the implementation, then ensure it is configured for HA.
For more information, see ThingWorx High Availability in the ThingWorx Help Center.
Installation Process
Complete the steps in the following sections:
Prerequisites
Before you begin, complete the following prerequisites:
Review the ThingWorx requirements for the ThingWorx release that is compatible with the ThingWorx Apps you are installing:
If you are installing ThingWorx Apps 9.1.0, review the ThingWorx 9.1 System Requirements.
If you are installing ThingWorx Apps 9.1.1, review the ThingWorx 9.2 System Requirements.
Review the Clustering Requirements in the ThingWorx Help Center.
Install and Configure ThingWorx for a High Availability Active-Active Environment
Complete the following steps:
1. Install and configure Apache ZooKeeper as described in Installing and Configuring ZooKeeper for ThingWorx HA in the ThingWorx Help Center.
2. Install and configure your database as described in PostgreSQL High Availability or Microsoft SQL Server High Availability in the ThingWorx Help Center.
3. Do not install Apache Ignite.
4. Install and configure ThingWorx on two servers as described in Configuring ThingWorx Foundation for Clustering in the ThingWorx Help Center.
5. When configuring the platform-settings.json file on each ThingWorx server, ensure that the following values are set:
In the cache section:
Set client-mode to false.
Set read-from-backup to true.
Set cache-mode to REPLICATED.
Set backups to 0.
In the BasicSettings section, update the ScriptTimeout setting to 500.
For additional settings information, see Platform Settings for ThingWorx HA in the ThingWorx Help Center.
6. Ensure that the /ThingWorxStorage and /ThingWorxBackupStorage folders are in a common location that can be accessed by both ThingWorx servers. For more information, see ThingWorx Foundation File Storage.
7. Install and configure ThingWorx Connection Server as described in ThingWorx Connection Servers for ThingWorx HA in the ThingWorx Help Center.
8. Install and configure HAProxy as a load balancer, as described in Load Balancers for ThingWorx High Availability and HAProxy Example in the ThingWorx Help Center.
9. Update the following HAProxy timeout settings to a value of 500s:
timeout connect
timeout client
timeout server
10. Configure ThingWorx to enable extension import. For more information, see Importing Extensions in the ThingWorx Help Center.
11. The ThingWorx Remote Access Extension must be imported as part of your ThingWorx Platform installation before the ThingWorx Apps extension is imported. For more information, see Remote Access in the ThingWorx Help Center.
Import the Extension Files
Import ThingWorx Apps as a ThingWorx extension into an existing ThingWorx Platform installation.
* 
In a high availability clustering environment, ThingWorx extensions only need to be imported on one of the ThingWorx servers. For more information, see Managing ThingWorx Extensions in ThingWorx HA in the ThingWorx Help Center.
1. Ensure that the ThingWorx Remote Access Extension (RAE) is imported. You can find the compatible version of the ThingWorx Remote Access Extension in the "ThingWorx Extensions" section of the release matrix in Release Advisor for your installed version of ThingWorx.
2. Download and unzip the contents of the following file: ThingWorx-Apps-<version>-extension-bundle
To locate the download, go to the PTC Software Download page and expand the following folders: ThingWorx Foundation > Release 9.1 > ThingWorx Manufacturing & Service Apps Extension.
3. Import the ThingWorx Apps extension files. The extension files must be imported in the following order:
a. ThingWorx-Apps-<version>-extension-dependencies
b. ThingWorx-Apps-<version>-extension
To import the extension files:
a. In ThingWorx Composer, navigate to Import/Export > Import.
b. On the Import window, select Extension from the Import Option list.
c. Under File Name, click Browse. Navigate to and select the extension file.
d. Click Import. When the import finishes, click Close.
e. Repeat as needed.
4. View the extensions after the import by navigating to Manage > Extensions.
5. Restart the ThingWorx server.
Import Optional Extensions
The following optional extensions are available to import along with ThingWorx Apps, and are downloaded from the same location on the PTC Software Download page:
ThingWorx-Asset-Remoting-<version>-extension—Enables you to use the Remote Access and Control features in Asset Advisor. For more information, see Remote Access and Control.
ThingWorx-Apps-<version>-extension-factory-demo—Provides an example implementation for manufacturing planning activities. For more information, see Manufacturing Planning Example Implementation.
The following optional extension is available to import along with ThingWorx Apps, and is available for download from ThingWorx Foundation > Release 9.1 > ThingWorx Utilities > Most Recent Datecode.
ThingWorx-Software-Content-Management-<version>—For more information, see Software Content Management.
* 
The ThingWorx Utilities Core extension bundle is a prerequisite for the ThingWorx Software Content Management extension, and must be imported first. If you have not already imported the ThingWorx Utilities Core extension bundle, do so before importing the ThingWorx Software Content Management extension. For more information, see ThingWorx Utilities Installation in the ThingWorx Utilities Help Center.
The following optional extension is available to import along with ThingWorx Apps, and is available for download from ThingWorx Foundation > Release 8.5 > ThingWorx Rockwell FactoryTalk MES Extension. This 8.5.0 extension is supported with ThingWorx Apps 9.1.
ThingWorx-Rockwell-FT-MES-8-5-0-Extension-Bundle—For more information, see ThingWorx Rockwell FactoryTalk MES Integration.
Import the optional extensions in the same manner as you imported the ThingWorx Apps extensions.
Post Import Database Configurations
After importing the ThingWorx Apps extensions, complete the following database configurations.
1. Navigate to the database Thing corresponding to your database: PTC.SCA.SCO.PostgresDatabase or PTC.SCA.SCO.MSSQLDatabase.
2. Under Configuration, set the JDBC Settings appropriately for your database, including the JDBC Connection String, Database User Name, and Database Password fields. If you are using the same database that is used for the ThingWorx Platform, use the same values for those three fields as the values that are specified in the platform-settings.json file.
* 
Before configuring your database Thing, ensure that the necessary JDBC drivers are present in ThingWorx. ThingWorx can use JDBC drivers to connect to any JDBC compatible database (such as SQL Server, MySQL, and so on). You can also connect using the ThingWorx Edge MicroServer and the ThingWorx Host/Resource using OLEDB and ODBC if the database is behind a firewall. If a JDBC extension for your database is not in ThingWorx, you can manually add the JDBC driver by downloading the driver and adding the files to the following location: /<Tomcat folder>/webapps/Thingworx/WEB-INF/lib. After copying the driver, you must restart your ThingWorx server.
3. Click Save to save the database Thing.
4. Navigate to the PTC.Factory.C_LaunchPointConfigurationThing_[ReleaseVersion] Thing.
5. Under Configuration, in the DatabaseConfigurationSettings section, edit the DBConnection field to point to the database Thing you configured in step 2.
6. Click Save to save the launch point configuration Thing.
7. Navigate to the PTC.SCA.SCO.DatabaseManager Thing.
8. Under Services, execute the CreateTables service.
Access ThingWorx Apps
To access ThingWorx Apps, go to the following URL on your ThingWorx server. Replace the <port> with your port number.
https://localhost:<port>/Thingworx/FormLogin/Welcome
The default user name is Administrator. The password is the one that you specified during the installation and configuration of ThingWorx.
Was this helpful?