Public | Automated Build

Last pushed: a year ago
Short Description
Titan GraphDB's Gremlin console with easy container linking
Full Description

Runs the Gremlin console from the Titan Graph Database's "all" distribution.

Basic Usage

To start the Gremlin console with the default configuration files available:

docker run -it itzg/titan-gremlin

In order to adjust or further define property files to use within Gremlin,
attach a host directory to the container's /conf such as

docker run -it -v $(pwd)/conf:/conf itzg/titan-gremlin

After running once your host directory will be populated with the distribution-default
configuration files. Modify those or add to them and they will be available during
the next time you (re)start your container.

Connecting to Cassandra and Elasticsearch Containers

First start containers for Cassandra and Elasticsearch (pre-2.x),
where the --name you choose can be arbitrary or left off to use a generated name.

docker run -d --name gremlin-cass itzg/cassandra
docker run -d --name gremlin-es itzg/elasticsearch:1.x

Now start Gremlin with networking links to those containers with the aliases

  • --link <container>:cass
  • --link <container>:es

such as

docker run -it --rm --link gremlin-cass:cass --link gremlin-es:es itzg/titan-gremlin

and with that you can follow the
Graph of the Gods example, such as

gremlin> GraphOfTheGodsFactory.load(g)
gremlin> saturn = g.V.has('name','saturn').next()
==>v[256]
gremlin> saturn.map()
==>name=saturn
==>age=10000
gremlin> saturn.in('father').in('father').name
==>hercules

Running and Connecting with Docker Compose

Create the following Compose content as the file docker-compose.yml and in
that directory invoke docker-compose run titan to run the Gremlin shell
with the supporting Elasticsearch and Cassandra containers.

titan:
    image: itzg/titan-gremlin
    links:
        - cass
        - es
cass:
    image: itzg/cassandra
es:
    image: itzg/elasticsearch:1.x
Docker Pull Command
Owner
itzg
Source Repository

Comments (3)
itzg
2 years ago

Sorry @sdhebert, I just now discovered Docker Hub's notification feature, so only now came across your comment.

I did discover an issue where the Elasticsearch node couldn't be contacted, but couldn't recreate the Cassandra aspect you described. Try one more time with the latest pull of this container, itzg/cassandra, and itzg/elasticsearch. Hopefully with all the latest and greatest, the issue worked itself out.

sdhebert
3 years ago

I referenced your itzg/cassandra container, but Titan refuses to acknowledge the ring with the following warnings. The ring describe warning pops three times before a full exception is thrown on ring connect. Thoughts?

13:58:34 WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
13:59:16 WARN com.netflix.astyanax.impl.RingDescribeHostSupplier - Failed to get hosts from titan via ring describe. Will use previously known ring instead

sdhebert
3 years ago

Your run command doesn't include the fully qualified path to the cassandra container. Which one would you recommend using?