A tutorial for running JanusGraph on Cassandra and Elasticsearch, and then integrating within AWS Graph Notebook.
For more information, see the blog post.
Start everything using docker-compose
docker-compose up -d
You can now find it open in http://localhost:8888
Login using password: tensorflow
Out of the box, the Graph Notebook lib provides dozens of notebooks to try out. Unfortunately those with seed data for loading into your graph mostly don't work since they use custom string ids, and JanusGraph doesn't support that.
However, you can load in the air routes data manually using the commands below, which will allow you to use the Air-Routes-Gremlin
notebook
./scripts/load-in-airroutes.sh
docker cp ./tmp jg-notebook-janusgraph:/opt/tmp/
docker exec -it jg-notebook-janusgraph ./bin/gremlin.sh
:remote connect tinkerpop.server conf/remote.yaml
g = traversal().withRemote('conf/remote-graph.properties')
path = "/opt/tmp/air-routes.xml";
g.io(path).read().iterate();
Run this at the top of any notebook that you try. Do it here as well.
%%graph_notebook_config
{
"host": "janusgraph",
"port": 8182,
"ssl": false,
"gremlin": {
"traversal_source": "g"
}
}
Example of how this works is given here: http://localhost:8888/notebooks/notebooks/sample-config.ipynb
You can find it here: http://localhost:8888/notebooks/notebooks/sample-config.ipynb
Want to just use your standard Gremlin console for whatever reason?
docker exec -it jg-notebook-janusgraph ./bin/gremlin.sh
:remote connect tinkerpop.server conf/remote.yaml
g = traversal().withRemote('conf/remote-graph.properties')
# g.V() or whatever you want to run
- Add script or docs to index into Elasticsearch (we have ES setup - but out of the box it isn't being used!)
Based heavily on: