Skip to main content
Loading

Install Aerospike Graph with Docker

Prerequisites

  • Docker, a containerization service.

  • GitHub credentials for Aerospike Graph, which are in your welcome email.

  • An Aerospike database instance which is running and network-accessible. See Install with Docker for installation instructions if you need to set up an Aerospike database instance.

    note

    Verify the IP address of your Aerospike server. If you started Aerospike in a Docker container, get the IP address with the following command:

    docker inspect -f  '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' AEROSPIKE-CONTAINER-ID

    Replace AEROSPIKE-CONTAINER-ID with the Docker container ID of your Aerospike container.

Install Aerospike Graph

  1. Authenticate with the Aerospike Graph server.

    docker login ghcr.io -u USERNAME
  2. Retrieve the Graph Docker image.

    docker pull ghcr.io/citrusleaf/firefly
  3. Run the Graph Docker container.

    When running the Graph Docker container, the following configuration options are available:

    OptionDefaultDescription
    aerospike_hostlocalhost:3000Accessible address of one or more an Aerospike seed nodes. To specify multiple, use a comma-separated list.
    aerospike_namespacetestNamespace to use for storage of graph data. Note: This namespace must already exist on the Aerospike cluster.
    vertex_property_indexesnoneSpecify vertex properties to be indexed.
    graph_idGRAPH_IDSpecify a unique identifier for this graph database.
    v_label_index_enabledfalseEnable indexing of vertex labels.
    tlsfalseEnable TLS.

    In the following example, the Graph Docker image runs with these configuration options:

    aerospike_namespace: test
    aerospike_host: aerospike-devel-cluster-host1:3000, aerospike-devel-cluster-host2:3000
    vertex_property_indexes: property1, property2
    v_label_index_enabled: true
    docker run -p8182:8182 -e aerospike_namespace="test" -e \
    AEROSPIKE_HOST="aerospike-devel-cluster-host1:3000, aerospike-devel-cluster-host2:3000" \
    -e vertex_property_indexes=property1,property2 \
    -e v_label_index_enabled=true ghcr.io/citrusleaf/firefly

    Configuration file options

    It is also possible to run the Graph Docker image with a configuration file. To use a configuration file, create a file named firefly-graph.properties and store it locally.

    The following properties file uses options equivalent to those in the above Docker command:

    gremlin.graph=com.aerospike.firefly.structure.FireflyGraph
    aerospike_host=aerospike-devel-cluster-host1:3000, aerospike-devel-cluster-host2:3000
    aerospike_namespace=test
    v_label_index_enabled=true
    vertex_property_indexes=property1,property2

    To use a configuration file when running the Graph Docker image, use the -v flag. In the following example, the full path to the configuration file is /home/graph-user/graph/conf/firefly-graph.properties. The filepath after the :, /opt/aerospike-firefly/conf/firefly-graph.properties, is the correponding configuration file in the Graph Docker container.

    docker run -p 8182:8182 -v /home/graph-user/graph/conf/firefly-graph.properties:/opt/aerospike-firefly/conf/firefly-graph.properties ghcr.io/citrusleaf/firefly

    Docker output

    The Graph Docker container runs a Gremlin server instance, so you will see some Gremlin server initialization messages after the container starts. The messages will look similar to the following:

    Server config:

    gremlin.graph=com.aerospike.firefly.structure.FireflyGraph
    aerospike_host=172.17.0.1
    aerospike_port=3000
    aerospike_namespace=test
    firefly_data_model=packed


    [INFO] o.a.t.g.s.GremlinServer - 3.6.0
    \,,,/
    (o o)
    -----oOOo-(3)-oOOo-----

    [INFO] o.a.t.g.s.GremlinServer - Configuring Gremlin Server from /opt/aerospike-firefly/conf/docker-default/firefly-gremlin-server.yaml
    [INFO] o.a.t.g.s.u.MetricManager - Configured Metrics ConsoleReporter configured with report interval=180000ms
    ...
    ...
    ...
    [INFO] o.a.t.g.s.GremlinServer$1 - Channel started at port 8182.

If you've successfully completed the these steps, you're ready to start using Graph.