Table of Contents | ||||
---|---|---|---|---|
|
Single Node Setup Instructions
...
Pre-requisites
1. Ensure you have the syndeia-cloud-3.
56-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.
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.5.30.zip
)
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/
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.56-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 | ||||
---|---|---|---|---|
| ||||
When completed, confirm all of the following are true before proceeding: (The tools used and the network locations used are site-dependent.)
|
...
JanusGraph Keyspace Setup, Service Setup & Start:
6. In a new terminal session, cd into the bin dir and run the Syndeia Cloud JanusGraph setup script, ie: cd ~/syndeia-cloud-3.56_janusgraph_setup/bin; ./syndeia-cloud-3.56_janusgraph_setup.bash
.
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Note, If you are deploying JG on a multi-node configuration where JG is not on the same machine as Cassandra, please:
|
...
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
This will: - Create/update
- If you installed Elasticsearch on the same machine, add Note: you may be prompted for Avoid all of the following special characters:
|
Tip | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||
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.)
|
...
Managing JanusGraph:
7. To check the status of JanusGraph services, use systemctl status janusgraph
. You can verify that it started by verifying "Active: active (running)" shows up in the output:
Code Block | ||||
---|---|---|---|---|
| ||||
$ 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:
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
...
Before making the image you may wish to first stop and optionally disable the service temporarily to prevent auto-start on boot, ie: sudo systemctl disable janusgraph
.
...
Multi-Node (Cluster) Setup Instructions
Enabling your single-node deployment for cluster operation
11. If Cassandra will be on a separate server from JG, ensure you first enable Cassandra for cluster operation.
...
13B. Ensure port 8182 is accessible on the JG server.
...
Adding new nodes to an existing single-node
14. Deploy another instance of your Janusgraph base image (which depending on your topology could be the same as your Cassandra base image).
...
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).
- Change the Snitch: see "Switching Snitches": https://docs.datastax.com/en/archived/cassandra/3.x/cassandra/operations/opsChangeKSStrategy.html
Alter the RF: verify the Cassandra “datacenter” name (default =
dc1
) from the CLI by runningnodetool status
and then from Cassandra CQLSH increment the RF for your JanusGraph keyspace(s):Code Block language sql 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)
Run
nodetool repair
: Runnodetool 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.
Note, this is a simplified view of adding nodes to a single-datacenter (DC) scenario. As your data usage increase and your cluster grows, you may wish to consider more sophisticated multi-DC topologies. For further information on this please consult the Cassandra documentation.
...
Validating JanusGraph Operation for 1-node (or multiple nodes)
21. To validate JanusGraph operation, we start a Gremlin client and issue commands to check the edges and vertices in our graph To do this, perform the following steps:
...
Code Block | ||||
---|---|---|---|---|
| ||||
$ ./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 | ||||
---|---|---|---|---|
| ||||
: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(); |
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 |
---|
...