docker-minecraft-server/titan-gremlin
2015-02-16 14:52:19 +00:00
..
Dockerfile [titan-gremlin] Adding apt-clean and skipping extra bash in CMD spec 2015-02-15 06:12:51 +00:00
README.md [titan-gremlin] Updated README for itzg/cassandra usage 2015-02-16 14:52:19 +00:00
start-gremlin.sh [titan-gremlin] Automatically use 'itzg/cassandra' image's publish-as address 2015-02-16 14:50:03 +00:00

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 available during the next use of gremlin.

Connecting to Cassandra and Elasticsearch Containers

First start containers for Cassandra and Elasticsearch, where the --name you choose can be arbitrary or left off to use a generated name. Note: Cassandra's Thrift port is exposed to allow for external usage, such as Titan Browser.

docker run -d --name cass -e PUBLISH_AS=192.168.59.103 -p 9160:9160 cass 
docker run -d --name es -p 9300:9300 -e PUBLISH_AS=192.168.59.103:9300 itzg/elasticsearch

Replacing 192.168.59.103 with your Docker host's LAN IP address.

Now start Gremlin linking the containers to the respective aliases

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

such as

docker run -it --rm --link cass:cass --link 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