Skip to main content
Loading
Version: Graph 2.0.0

Aerospike Graph Installation

Prerequisites

  • Docker, a containerization service.

  • A running Aerospike Database instance, version 6.2.0.7 or higher.

  • An Aerospike feature key file which has the graph-service key enabled. Click here to sign up for an Aerospike Graph trial, or contact your Aerospike account manager.

    note

    Verify the IP address of your Aerospike server. If you are running 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.

Run Aerospike Graph with Docker

  1. An Aerospike Database instance must be running before you start Aerospike Graph Service (AGS). You can use an existing database instance, or you can start one in a Docker container. See Install with Docker for help setting up an Aerospike Database instance with Docker. Take note of the accessible network address of your database instance before going on to the next step.

  2. Download the AGS Docker image.

    Pull from Docker:

    docker pull aerospike/aerospike-graph-service

    OR

    Pull from the Google Container Registry:

    docker pull gcr.io/aerospike-prod/aerospike-graph-service
  3. Run the AGS Docker container.

    docker run -p8182:8182 -e [OPTIONS] aerospike/aerospike-graph-service

    The options you pass to your Docker command let the Graph service know how to connect to your Aerospike database and what kind of indexes to create. For a complete list of available options, see Configuration Options.

    You can either specify configuration options with a configuration file (recommended) or with environment variables via Docker command-line arguments.

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

    aerospike.client.namespace: test
    aerospike.client.host: aerospike-devel-cluster-host1:3000, aerospike-devel-cluster-host2:3000
    aerospike.graph.index.vertex.properties: property1, property2
    aerospike.graph.index.vertex.label.enabled: true
    docker run -p8182:8182 -e aerospike.client.namespace="test" \
    -e aerospike.client.host="aerospike-devel-cluster-host1:3000, aerospike-devel-cluster-host2:3000" \
    -e aerospike.graph.index.vertex.properties=property1,property2 \
    -e aerospike.graph.index.vertex.label.enabled=true \
    aerospike/aerospike-graph-service

    Java options

    Aerospike Graph is constrained by the amount of memory available to the Java Virtual Machine (JVM) in its Docker container, which is 80% of memory available to the Docker container by default. You can set the amount of memory available to the JVM by setting the aerospike.graph-service.heap.max and aerospike.graph-service.heap.min configuration options.

    In the example below, the Docker container's JVM can use up to 32GB of memory:

    docker run -p 8182:8182 \
    -e aerospike.graph-service.heap.max="32768m" \
    -e aerospike.client.host="172.17.0.1" \
    aerospike/aerospike-graph-service

    To use other Java options, set the JAVA_OPTIONS Docker environment variable with the -e command line argument. For example, to set the javax.net.ssl.trustStore option:

    -e JAVA_OPTIONS=" -Djavax.net.ssl.trustStore=/data/certs/Platinum/myTrustStore"
    note

    The leading space before the Java option is required.

    Configuration file options

    It is also possible to run the AGS Docker image with a configuration file. To use a configuration file, create a file named aerospike-graph.properties, store it locally, and reference it when you start the AGS Docker image.

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

    aerospike.client.host=aerospike-devel-cluster-host1:3000, aerospike-devel-cluster-host2:3000
    aerospike.client.namespace=test
    aerospike.graph.index.vertex.label.enabled=true
    aerospike.graph.index.vertex.properties=property1,property2

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

    docker run -p 8182:8182 \
    -v /home/graph-user/graph/conf/aerospike-graph.properties:/opt/aerospike-graph/aerospike-graph.properties \
    aerospike/aerospike-graph-service

    Docker output

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

    Server config:

    aerospike.client.host=172.17.0.1
    aerospike.client.port=3000
    aerospike.client.namespace=test
    aerospike.graph.data.model=packed

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

[INFO] o.a.t.g.s.GremlinServer - Configuring Gremlin Server from /opt/aerospike-graph/conf/docker-default/aerospike-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 these steps, you're ready to start using Aerospike Graph.
See [Using Aerospike Graph](/docs/graph/getting-started/basic-usage) for help with getting
started on interacting with your graph data.