Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update JG .ZIPs names + JG v0.5.3 -> 1.0.0

Table of Contents
outlinetrue
stylenone

...

Pre-requisites

1.  Ensure you have the syndeia-cloud-3.6-SP1_janusgraph_setup.zip (or latest service pack) downloaded to your home directory (or home directory's Downloads folder) from the download/license instructions sent out by our team.  

(info)  Note: the .ZIP will pre-create a separate folder for its contents when extracted so there is no need to pre-create a separate folder for it.  

2.  Ensure you satisfy Janusgraph's pre-requisites, ie: have (Open|Oracle)JDK/JRE + Apache Cassandra (& optionally Elasticsearch) installed.  Re. CPU, memory, HD space, etc. this will depend on how much data you expect to store, query, and graph.  

3.  If using a firewall, and JG will be on a separate server from SC, ensure the following port is accessible (consult your local network admin if required): TCP port 8182 (this is the port to listen to for client connections).  


...

Downloading & Extracting JanusGraph

1. Ensure you have Janusgraph 1.0.5.3 0 (https://github.com/JanusGraph/janusgraph/releases/tag/v0v1.50.30) downloaded to your home directory (ie: wget https://github.com/JanusGraph/janusgraph/releases/download/v0v1.50.30/janusgraph-full-1.0.50.3.zip)

(info) Note: JG releases are now split into ones with and without ElasticSearch + Gremlin Server bundled.  The full releases contains ElasticSearch + the Gremlin Server.  

2. Unzip the JanusGraph package to /opt, ie:  sudo unzip janusgraph-1.0.5.30-full.zip -d /opt/

(info) Note: if you don't have unzip installed, you may need to first install it via yum install unzip

3. Unzip Syndeia Cloud's JanusGraph setup package in your home directory ~/, ie:  unzip syndeia-cloud-3.6-SP1_janusgraph_setup.zip -d ~/

...

5. Take ownership of the extracted folder, ie:  sudo chown -R janusgraph:janusgraph /opt/janusgraph-1.0.5.30-full

Tip
titlePre-Janusgraph Setup Health Check
typesquare

When completed, confirm all of the following are true before proceeding:

(The tools used and the network locations used are site-dependent.)

  • Cassandra service is running:  systemctl status cassandra 
  • Cassandra port is accessible/open:  netstat -tulpn | grep 9042 
  • Cassandra service is accessible via CQLSH:  Linux: clqsh check  
  • JanusGraph files exist at:  /opt/janusgraph-${JG_build-ver} 

...

Panel
borderColor#eae6ff
bgColor#eae6ff
titleColorblack
borderWidth1
borderStylesolid

  This will:  

- Create/update janusgraph-current symlink to specified version, default = 1.0.5.30
- Create a new syndeia_admin superuser in Cassandra with a password you specify
- Create a new syndeia_cloud_graph and syndeia_cloud_graph_config keyspaces
GRANT ALL PERMISSIONS ON KEYSPACE syndeia_cloud_graph TO syndeia_admin
GRANT ALL PERMISSIONS ON KEYSPACE syndeia_cloud_graph_config TO syndeia_admin
- Run a Groovy JanusGraph setup script to set storage params for your graph and build indexes
- Create a renamed copy of the file /opt/janusgraph-<release_ver>/conf/janusgraph-cql-configurationgraph.properties as janusgraph-cql-configurationgraph-syndeia.properties with: 

graph.graphname=syndeia_cloud_graph_config
Add storage.username=syndeia_admin
Add storage.password=<password_specified>
storage.hostname=<your_Cassandra_host>

- If you installed Elasticsearch on the same machine, add index.search.backend=elasticsearch and index.search.hostname=localhost to use Elasticsearch for search indexing
- Create a renamed copy of the file /opt/janusgraph-<release_ver>/conf/gremlin-server/gremlin-server-configuration.yaml as gremlin-server-configuration-syndeia.yaml and set ConfigurationManagementGraph to point to janusgraph-cql-configurationgraph-syndeia.properties.  
- Install systemd .service file for JanusGraph service
- Start JanusGraph service

(info)  Note: you may be prompted for sudo authentication.  You will also be prompted for your cassandra account password (default = cassandra), to set your syndeia_admin password and the FQDN of your Cassandra host.  

(warning)  Avoid all of the following special characters: \?*[]+#&.{}$ when setting your syndeia_admin password.

 


Tip
titleConfiguration Health Check
typesquare

When completed, confirm all of the following are true before proceeding or when trying to determine if the JanusGraph service is properly configured and operating.

(The tools used and the network locations used are site-dependent.)

  • SC's .groovy script for JG ran successfully, ie:  you should have only received a WARN  org.apache.hadoop.util.NativeCodeLoader  - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable WARN-ing 
  • JanusGraph service is now running:  systemctl status janusgraph 
  • JanusGraph port is accessible:  netstat -tulpn | grep 8182
  • Cassandra syndeia_cloud_graph and syndeia_cloud_graph_config keyspaces exist, ie:  if you type SELECT * FROM syndeia_cloud_ in CQLSH and hit tab, you should see syndeia_cloud_graph. syndeia_cloud_graph_config. 
  • Following files exist as described below:  
    • /opt/janusgraph-current symlink exists, and points to the latest Intercax-approved version of JanusGraph
    • /opt/janusgraph-current/conf/gremlin-server/gremlin-server-configuration-syndeia.yaml exists.

      • When completed with the defaults, the beginning of the file should resemble this content:

        Code Block
        languagebash
        themeRDark
        titlesample: gremlin-server-configuration-syndeia.yaml
        linenumberstrue
        collapsetrue
        host: localhost
        port: 8182
        scriptEvaluationTimeout: 60000
        channelizer: org.janusgraph.channelizers.JanusGraphWebSocketChannelizer
        graphManager: org.janusgraph.graphdb.management.JanusGraphManager
        graphs: {
          ConfigurationManagementGraph: conf/janusgraph-cql-configurationgraph-syndeia.properties
        }
        ...


    • janusgraph-cql-configurationgraph-syndeia.properties' 

      • storage.hostname entry should be set to the hostname/IP address for the Cassandra host

    • /opt/janusgraph-current/conf/gremlin-server/gremlin-server-configuration-syndeia.yaml exists

    • /opt/janusgraph-current/log/gremlin-server.log exists

  • A message similar to INFO org.apache.tinkerpop.gremlin.server.GremlinServer - Channel started at port 8182. appears near the recent end of the gremlin-server.log file

...

Code Block
languagebash
themeRDark
$ systemctl status janusgraph
● janusgraph.service
   Loaded: loaded (/etc/systemd/system/janusgraph.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-04-17 10:21:59 EDT; 7s ago
  Process: 22486 ExecStop=/bin/bash -c /opt/janusgraph-1.0.5.30-full/bin/janusgraph.sh stop (code=exited, status=0/SUCCESS)
 Main PID: 23677 (java)
   CGroup: /system.slice/janusgraph.service
           └─23677 java -server -Djanusgraph.logdir=/opt/janusgraph-1.0.5.30-full/bin/../log -Dlog4j.configuration=conf/gremlin-server/log4j-server.properties -Xms32m -Xmx512m -javaagent:

...

9. To view the logs for JanusGraph, use sudo journalctl -eu janusgraph & less /opt/janusgraph-1.0.5.30-full/log/gremlin-server.log.  To follow the log files, you can use sudo journalctl -feu janusgraph & tail -f /opt/janusgraph-1.0.5.30-full/log/gremlin-server.log.  You should see output similar to the following (abridged) text:

(info) Note, for your convenience you may wish to create a symlink to /opt/janusgraph-1.0.5.30-full/log/ from /var/log, ie: sudo ln -nfs /opt/janusgraph-1.0.5.30-full/log/ /var/log/janusgraph

...

18. Three things need to occur:  you will need to change the Snitch (if not already done for Cassandra), alter the keyspace Replication Factor (RF), and run nodetool repair on each node (see https://docs.datastax.com/en/archived/cassandra/3.x/cassandra/operations/opsChangeKSStrategy.html for a summary of the process).

  1. Change the Snitch:  see "Switching Snitches":  https://docs.datastax.com/en/archived/cassandra/3.x/cassandra/operations/opsChangeKSStrategy.html
  2. Alter the RF:  verify the Cassandra “datacenter” name (default = dc1) from the CLI by running nodetool status and then from Cassandra CQLSH increment the RF for your JanusGraph keyspace(s):

    Code Block
    languagesql
    ALTER KEYSPACE syndeia_cloud_auth WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<datacenter_name>' : <total_number_of_nodes> };
    -- where <datacenter_name> = the name of the datacenter as shown via nodetool status, and <total_number_of_nodes> = total # of nodes (in the cluster)
    ALTER KEYSPACE syndeia_cloud_store WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<datacenter_name>' : <total_number_of_nodes> };
    -- where <datacenter_name> = the name of the datacenter as shown via nodetool status, and <total_number_of_nodes> = total # of nodes (in the cluster)
    ALTER KEYSPACE syndeia_cloud_confluence WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<datacenter_name>' : <total_number_of_nodes> };
    -- where <datacenter_name> = the name of the datacenter as shown via nodetool status, and <total_number_of_nodes> = total # of nodes (in the cluster)
    ALTER KEYSPACE syndeia_cloud_graph WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<datacenter_name>' : <total_number_of_nodes> };
    -- where <datacenter_name> = the name of the datacenter as shown via nodetool status, and <total_number_of_nodes> = total # of nodes (in the cluster)
    ALTER KEYSPACE syndeia_cloud_graph_config WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '<datacenter_name>' : <total_number_of_nodes> };
    -- where <datacenter_name> = the name of the datacenter as shown via nodetool status, and <total_number_of_nodes> = total # of nodes (in the cluster)
    


  3. Run nodetool repair:  Run nodetool repair --full <keyspace_name> on each node (for more details see https://docs.datastax.com/en/dse/5.1/cql/cql/cql_using/cqlUpdateKeyspaceRF.html)

19. Follow  "Things to Consider in a Multi-Node JanusGraph Cluster" https://docs.janusgraph.org/1.0.3.10/things-to-consider-in-a-multi-node-janusgraph-cluster.html

20. Repeat steps 14 ~ 19 for each additional cluster node.

...

Code Block
languagebash
themeRDark
$ ./gremlin.sh 

         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/janusgraph-1.0.5.30-full/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/janusgraph-1.0.5.30-full/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
plugin activated: janusgraph.imports
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
20:19:16 WARN  org.apache.hadoop.util.NativeCodeLoader  - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
plugin activated: tinkerpop.hadoop
plugin activated: tinkerpop.spark
plugin activated: tinkerpop.tinkergraph
gremlin> 

...

Code Block
languagebash
themeRDark
:remote connect tinkerpop.server conf/remote.yaml session
:remote console
graph = ConfiguredGraphFactory.open('syndeia_cloud_graph');
// should return: ==>standardjanusgraph[cql:[cassandra.mydomain.com]]
g = graph.traversal();
g.V();
g.E();

(info) The last 2 commands above should not return any results since the graph (syndeia_cloud_graph) is empty - no vertices or edges.

21.4.  Type :quit   


Page break macro

...