Deploying Zeppelin and Connecting to AnzoGraph

This topic provides instructions for deploying the Cambridge Semantics Apache Zeppelin image with Docker CE, connecting to AnzoGraph, and downloading and running the tutorial notebook. The Zeppelin deployment includes an integrated SPARQL interpreter that enables users to make a secure, authenticated connection to AnzoGraph using gRPC protocol.

RHEL/CentOS Tarball Deployments: Zepellin uses gRPC protocol to connect to AnzoGraph, which requires a username and password for authentication. RHEL/CentOS deployments are not pre-configured with a gRPC user. Before deploying Zeppelin, create a username and password to use for the connection. How do I generate a gRPC username and password for RHEL/CentOS tarball deployments?

For information about installing Docker, see Installing and Configuring Docker.

Deploying Zeppelin

Note: If you use Linux for your Docker client, you might want to follow the steps in Post-installation steps for Linux to make sure that a non-root user can run Docker commands.

  1. In Docker, run the following command to create a logs directory in the current directory:
    [ -d $PWD/logs ] ||  mkdir -p  $PWD/logs
  2. Run the following command to create a notebook directory:
    [ -d $PWD/notebook ] || mkdir -p  $PWD/notebook
  3. Run the following command to download and run the Zeppelin image on port 8080:
    docker run -p 8080:8080 --name=zeppelin -v $PWD/logs:/logs -v $PWD/notebook:/notebook \
      -e ZEPPELIN_NOTEBOOK_DIR='/notebook' \
      -e ZEPPELIN_LOG_DIR='/logs' \
      -e ZEPPELIN_WEBSOCKET_MAX_TEXT_MESSAGE_SIZE=10240000 \
      -d  cambridgesemantics/contrib-zeppelin:latest \
      /zeppelin/bin/zeppelin.sh
  4. When the deployment is complete, open Zeppelin by going to the following URL in your browser:
    http://host_ip_address:8080

    The Welcome to Zeppelin page opens. For example:

Connecting to AnzoGraph

  1. At the top of the Zeppelin Welcome screen, click the anonymous drop-down list and select Interpreter. The Interpreters screen opens.
  2. In the Search interpreters field at the top of the screen, type "sparql" and find the SPARQL interpreter. For example:

  3. Click the edit button and modify the interpreter to enter your AnzoGraph deployment details and make a secure connection to the database. The list below describes each interpreter setting:
    • anzo.graph.host: The IP address of the AnzoGraph host. If AnzoGraph is running in a Docker container, you can run the following command to return the container IP address:
      docker container inspect container_name | grep IP

      For example:

      docker container inspect anzograph | grep IP
    • anzo.graph.password: The password for the user in the anzo.graph.user field.

      RHEL/CentOS Tarball Deployments: Zepellin uses gRPC protocol to connect to AnzoGraph, which requires a username and password for authentication. RHEL/CentOS deployments are not pre-configured with a gRPC user. Before deploying Zeppelin, create a username and password to use for the connection. How do I generate a gRPC username and password for RHEL/CentOS tarball deployments?

    • anzo.graph.port: The gRPC port for AnzoGraph. The default value is 5700. Do not change this value.
    • anzo.graph.trust.all: Instructs Zeppelin to trust the AnzoGraph SSL certificates. Accept the default value of true.
    • anzo.graph.user: The username to use to log in to AnzoGraph.
  4. When you finish adding the connection details, click Save at the bottom of the screen. Zeppelin displays a dialog box that asks if you want to restart the interpreter with the new settings. Click OK to configure the connection.
  5. When the interpreter restart is complete, click the Zeppelin logo at the top of the screen to return to the Welcome screen.

Downloading and Using the AnzoGraph Tutorial Notebook

Click the link below to download the AnzoGraph Tutorial Notebook to your computer. Then follow the instructions in this section to import the notebook and run the tutorial in Zeppelin.

Download the AnzoGraph Tutorial Zeppelin Notebook
  1. Extract the downloaded notebook ZIP file on your computer. The ZIP file contains AnzoGraph-Tutorial-Notebook.json.
  2. On the Zeppelin Welcome screen, click Import note. Zeppelin displays the Import New Note screen.

  3. On the import screen, click Select JSON File, and then select the AnzoGraph-Tutorial-Notebook.json file to import.

Zeppelin imports the note and opens the AnzoGraph tutorial. It might take some time to load all of the contents. To run a query in the file, click the run () button for the paragraph. For more information about using Zeppelin, see the Zeppelin Documentation.

Related Topics