dockertinkerpopbulbsrexster

How to create a graph database in TinkerPop/Rextser using the Rexster Docker image and Bulbs?


How do I create a new database? I am using the Rexster Docker image from "https://github.com/konrade/docker-rexster" to get a functional Rexster server up and running. It is run using the following command:

sudo docker.io run -i -t -P 6cced29c46a3 /bin/bash

And verify which port is assigned to Rexster's necessary 8182 like so:

sudo docker.io port <container id> 8182

I am confident the server is running as I get webpage with the TinkerPop characters when I go to url

'http://localhost:49153'.

But I cannot get the simple example on the bulbs Quickstart section to execute succesfully. Here is the simple code I am trying to execute:

from bulbs.rexster import Graph, Config
config = Config('http://localhost:49153/graphs/dantest')
g = Graph(config)

Would creating a neo4j database solve my problems? if so, what would be the code used to create it?


Solution

  • Bulbs doesn't create the graph for you -- to do that, you must configure your rexster.xml to create a specific graph.

    The default graph name is emptygraph so this should work out of the box...

    >>> from bulbs.rexster import Graph, Config
    >>> config = Config('http://localhost:49153/graphs/emptygraph')
    >>> g = Graph(config)