Upgrading a Cluster with Context Graph
In versions of Spectrum Technology Platform earlier than 2022.1.0, each node hosts the Spectrum Technology Platform server as well as Data Hub or Context Graph models.
To upgrade a Spectrum Technology Platform cluster that runs Context Graph, complete the following tasks.
-
Before you upgrade to Spectrum Technology Platform
2022.1.0, back up existing models and property files.
Use the Relationship Analysis Client or the Administration Utility hub backup all CLI command to back up all Data Hub or Context Graph models from the Spectrum Technology PlatformBack up these two property files:
- SpectrumDirectory/server/modules/hub/hub.properties
- SpectrumDirectory/server/modules/hub/db/neo4j.properties
Important: We recommend that you create a backup before upgrading so that you can recover your flows, security settings, and other settings if an error occurs during the upgrade process. -
Make sure each node in the Spectrum Technology Platform cluster has been shut down.
For more information, see Stopping a Cluster.
-
Perform the Spectrum Technology Platform upgrade on each node in the cluster.
Important: The installer will prompt whether to start the Spectrum Technology Platform. Make sure this option is not selected so that the server does not start automatically when the installation completes.For more information, see Upgrading a Cluster.
-
Apply any updates after you complete the upgrade.
To download and install updates for Spectrum Technology Platform 2022.1.0, see the Spectrum Update Summary pages.
-
Start all nodes consecutively after upgrading.
Make sure that you start node 2 within only a few seconds after starting node 1, and repeat this interval for any additional nodes.
-
Install Neo4j Graph Database Server and configure the neo4j.conf file cluster settings for each node
in a cluster configuration.
We recommend that you install at least a 3-node Neo4j core cluster.For more information, see Neo4j Clustering (Neo4j Operations Manual)
-
On each node in the Neo4j Graph Database Server cluster, complete the following steps to configure each instance to work with Context
Graph.
You may choose to configure additional properties depending on your system architecture.
- Start the Neo4j Graph Database Server cluster.
-
Confirm that Neo4j Graph Database Server instances are running in the clustered configuration.
To check the cluster status, connect to any instance in the Neo4j Browser, and enter:CALL dbms.cluster.overview()This shows information about the cluster. For more information, see Deploy a Cluster (Neo4j Operations Manual).
-
Configure Context Graph Repository Configuration settings to
enable Context Graph to communicate with the Neo4j Graph Database Server.
-
From one of the Spectrum cluster nodes, navigate to the
SpectrumDirectory\server\modules\contextgraph\export
folder, and run the exporthub.sh shell executable file.
The export command creates an Output folder that contains a folder for each model. You can define the location of the output folder or use the default location. Each model folder contains the following files:
- .csv files and import and cypher script files used to
import the model into the Neo4j Graph Database Server.
The .csv files define entities and relationships for the exported model.
- An export.errorfile that details any exceptions that occurred while exporting the model.
- A Summary.txt file that contains an export summary for the model.
The export summary includes information and counts for Entities and Relationships for the model.
- .csv files and import and cypher script files used to
import the model into the Neo4j Graph Database Server.
- Install a stand-alone Neo4j Graph Database Server instance on the cluster node where you ran the exporthub.sh shell executable file, or install the instance on a different server.
- Start the stand-alone Neo4j Graph Database Server instance.
-
Navigate to the path of the output folder that resulted from running exporthub.sh.
If the Neo4j Graph Database Server was installed on a different server, copy the output folder to that server.
-
On the server that runs the stand-alone Neo4j instance, open the model folder and run
themodelname-timestamp_import.sh script
file.
-
On the server that runs the stand-alone Neo4j instance, open the model folder and run
the appropriate dbinit script file.
SSL Certificate Run No None modelname-timestamp_dbinit.sh Yes Self-signed modelname-timestamp_dbinit_ssc.sh Yes Certificate authority modelname-timestamp_dbinit_s.sh -
On the server that runs the stand-alone Neo4j Graph Database Server instance, configure the following settings:
dbms.backup.enabled=true dbms.backup.listen_address=0.0.0.0:6365
-
Run the
neo4j-admin backup
command to create an online backup of the imported model on the stand-alone instance of Neo4j.For example, the following command backs up the artists model database on a stand-alone instance of Neo4j:
neo4j-admin backup --from=ipAddress/hostname:6365 --backup-dir=path-to-backup-folder --database=artistsFor more information, see Back up an online database (Neo4j Operations Manual). - Confirm Neo4j Graph Database Server cluster is started.
-
Use the model backup from the stand-alone Neo4j instance, and run the
neo4j-admin restore command to restore the model database on one of
the core cluster nodes.
The following command line restores the artists model to the cluster node.
neo4j-admin restore --from=path-to-backup-folder --database=artistsFor more information, see Restore a database backup (Neo4j Operations Manual). -
Use the Neo4j Browser (http://localhost:7475/browser/) to connect to the cluster core
node on which you ran the Restore command.
For more information, see Neo4j Browser User Interface Guide.
- Select the system database and run CALL dbms.cluster.overview().
- From the list of nodes, find the IP address or hostname of the core node on which you ran the Restore command, and copy the node ID.
-
From the system database run the CREATE DATABASE command to create
the artists model database.
The following example illustrates the Cypher CREATE DATABASE command to create a database model.
CREATE DATABASE artists options {existingData: 'use', existingDataSeedInstance: 'core-node-ID'};The model database will replicate to the other core nodes in the cluster.Note: If the database is of considerable size, the execution of the command can take some time. You can reference the Neo4j logs to check the status. -
Verify the model database is online on all members of the cluster.
To do this, log into the Neo4j Browser and from the system database run the Cypher SHOW DATABASES command.