Upgrade Data Hub or Context Graph

Follow this procedure to update Context Graph from an earlier version of Data Hub or Context Graph.

The Spectrum Technology Platform 2022.1.0 Context Graph models are stored separately on a separate Neo4j Graph Database Server. To upgrade from an earlier version of Spectrum, you need to perform the following steps:

  1. 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 Platform
    Back up these two property files:
    • SpectrumFolder\server\modules\hub\hub.propertiesSpectrumDirectory/server/modules/hub/hub.properties
    • SpectrumFolder\server\modules\hub\db\neo4j.propertiesSpectrumDirectory/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.
  2. Perform the Spectrum Technology Platform upgrade, apply any updates, and restart the server .
    For more information, see Spectrum Server Upgrade.
  3. Install Neo4j Graph Database Server in a stand-alone environment.
  4. Configure the Neo4j Graph Database Server instance to work with Context Graph.
    1. Copy the apoc jar file from Neo4jDirectory/labs/Neo4jDirectory\labs\ to Neo4jDirectory/plugins/Neo4jDirectory\plugins\.
    2. Open the Neo4jDirectory/conf/neo4j.confNeo4jDirectory\conf\neo4j.conf file in a code editor.
    3. Uncomment and configure the Bolt and HTTP connector port numbers as shown here:
      # Bolt connector
      dbms.connector.bolt.enabled=true
      #dbms.connector.bolt.tls_level=DISABLED
      dbms.connector.bolt.listen_address=:7700
      dbms.connector.bolt.advertised_address=:7700
                      
      # HTTP Connector. There can be zero or one HTTP connectors.
      dbms.connector.http.enabled=true
      dbms.connector.http.listen_address=:7474
      dbms.connector.http.advertised_address=:7474
      Important: Port 7474 is used by the Neo4j server instance embedded in Spectrum. If you install the stand-alone instance of Neo4j Graph Database Server on the same machine as Spectrum, you must therefore specify a different port number, such as 7475, for the two HTTP connector port settings.
    4. Uncomment and configure the following two property settings as follows:
      dbms.security.procedures.unrestricted=apoc.*
      dbms.security.procedures.allowlist=apoc.*
    5. Add the following setting (you can insert in the # Miscellaneous configuration section):
      cypher.forbid_shortestpath_common_nodes=false
    6. Optional: Add the following setting:
      dbms.db.timezone=SYSTEM
      By default, the Neo4j Graph Database Server logs and monitoring use UTC time. This setting specifies the local system time zone, which you may find easier to use.
    7. Optional: Uncomment and configure the following lines depending on available memory:
      dbms.memory.heap.initial_size=512m
      dbms.memory.heap.max_size=512m
      #dbms.memory.pagecache.size=10g
      Increasing the first two values (for example, to 2048M and 4096M respectively) can enhance performance. The third dbms.memory.pagecache.size setting assumes by default that the machine is dedicated to running Neo4j, so it is heuristically set to 50% of RAM minus the Java heap size. For more information, see Memory recommendations (Neo4j Operations Manual).
    You may choose to configure additional properties depending on your system architecture.
  5. Configure Context Graph to use the Neo4j Graph Database Server.
    1. Make sure that the Neo4j Graph Database Server is running.
    2. Sign into the Spectrum Management Console and click Resources > Context Graph Repository Configuration.
    3. If a user name and password is required to connect to the Neo4j Graph Database Server, choose Basic for Authentication type, then enter the User name and Password.
      Note: The Secured connection check box is selected to configure a secured connection (HTTPS) to a Neo4j Graph Database Server that has been configured for SSL. For more information, see Use SSL to communicate with Neo4j Graph Database Server.
    4. Click the Add address button + to specify the IP address or host name and Bolt connector port for the Neo4j Graph Database Server instance.
      If the Neo4j Graph Database Server instance runs on the same host machine as Spectrum then localhost:7700 will be used as the default connection.
      Note: If the Neo4j Graph Database Server instance is on a different server than Spectrum, you will then need to create a new connection based on the host name or IP address and the Bolt connector port for the remote instance.
    5. Click the Test button to test the connection settings.
  6. Navigate to SpectrumDirectory\server\modules\contextgraph\exportSpectrumDirectory/server/modules/contextgraph/export, and run the exporthub.batexporthub.sh batchscript 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 these 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.
    • A dbexport.error file that details any exceptions that occurred while exporting the model.
    • A Summary.txt file that contains an export summary for the model. The summary includes information and counts for Entities and Relationships for the model.
  7. Go to the output directoryfolder created by exporthub.bat file.
    If the Neo4j instance used by Context Graph is on a different server, first copy the output folder to that machine.
  8. Perform these steps for each model that you want to import to Neo4j Database Server:
    1. Make sure that Neo4j Database Server is running.
    2. Open the model folder and run the modelname-timestamp_import.batmodelname-timestamp_import.sh script file.
      When prompted, enter the path to the /bin folder for the Neo4j instance.
      This loads the model data into Neo4j Database Server.
      Note:

      If your data contains multiple line input fields, add the option --multiline-fields=true to the neo4j-admin import command in the modelname-timestamp_import.bat or modelname-timestamp_import.sh file.

      Example: call %neopath%/neo4j-admin import --database Artists --multiline-fields=true --verbose

    1. Run the appropriate dbinit script file to bring the model online and create indexes.
      SSL Certificate Run
      No None modelname-timestamp_dbinit.bat
      Yes Self-signed modelname-timestamp_dbinit_ssc.bat
      Yes Certificate authority modelname-timestamp_dbinit_s.bat
      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
    2. When prompted, enter the user name and password for Neo4j.
      Press Enter in each case if authentication is not set up for the Neo4j instance.
    3. For the port number, enter the Bolt connector address.
      The default port setting for the Bolt connector address is 7700. This is defined on the Neo4j server in the Neo4j configuration settings file (neo4j.conf).
    4. When prompted, enter the path to the /bin folder for the Neo4j instance.
After you complete this procedure, verify that you can open and query a model using Context Graph Visualization.