Deploy the AnzoGraph DB Container Image

This topic provides instructions for downloading and deploying an AnzoGraph DB container image using the command line. The steps include Docker commands that may need to be customized depending on your application.

Deploy AnzoGraph DB in a Mac Desktop Application

Follow the instructions below to deploy AnzoGraph DB on a Mac desktop container application.

  1. If necessary, start the desktop application, and then open the Mac Terminal app.
  2. Applications typically cache images on the host. If you have deployed an AnzoGraph DB container previously, that image will be used to redeploy AnzoGraph DB. If you want to deploy the latest release, first pull the latest image. To do so, run the following command:
    docker pull cambridgesemantics/anzograph:latest

    You can deploy alternate AnzoGraph DB versions by replacing the "latest" tag with any of the tags that are available on the AnzoGraph Docker Hub site.

  3. If you are deploying the AnzoGraph DB container for the first time, Cambridge Semantics recommends that you create a directory on the local file system where load files, query files, and other files can be staged and shared with the container file system. When you deploy AnzoGraph DB, you map the directory on the local file system to a directory in the container. This way the files are shared, and if you remove the AnzoGraph DB container, the local file system retains a copy of the shared files. If you redeploy a new AnzoGraph DB image, the new container can be mapped to the same local directory and access the existing files. To create the directory, navigate to a location on the host and run the following command to create a directory in the current directory:
    mkdir <directory_name>

    For example:

    mkdir shared-files

    On Mac and Linux, Docker is configured by default to allow local directories to be shared with containers. On Mac, the /Users, /Volumes, /private, and /tmp directories are shared. If necessary, you can configure additional locations in Docker Preferences > Resources > File Sharing.

  4. In Terminal, run the following command to deploy the AnzoGraph DB image. The command runs the AnzoGraph DB image and configures HTTP and HTTPS access by mapping the container ports to the HTTP and HTTPS ports on the host:
    docker run -d -p <host_http_port>:8080 -p <host_https_port>:8443 \
    -v /<path>/<shared_directory>:/opt/<shared_directory> \
    --name=<container_name> cambridgesemantics/anzograph:<tag>

    The list below describes each of the parameters:

    • host_http_port is the port on the local host to use for HTTP access to the AnzoGraph DB user interface. In the container, the user interface binds to port 8080 for HTTP access. Cambridge Semantics recommends that you specify 80 to map the container's HTTP port to port 80 on the local host. If port 80 is in use, specify an alternate port for host_http_port.
    • host_https_port is the port on the local host to use for HTTPS access to the AnzoGraph DB user interface. In the container, the user interface binds to port 8443 for HTTPS access. Cambridge Semantics recommends that you specify 443 to map the container's HTTPS port to port 443 on the local host. If port 443 is in use, specify an alternate port for host_https_port.
    • /path/shared_directory: The path and directory name for the shared directory on the local file system.
    • shared_directory: The directory on the container file system to map to the shared directory on the local file system. The directory is created when the container is deployed.

      The command above lists /opt/ as a convenient path on the container file system because the AnzoGraph DB path is /opt/anzograph. You can specify a different path.

    • container_name is the short name to use to identify the AnzoGraph DB container. For example, anzograph.
    • tag is the tag from the AnzoGraph Docker Hub site that identifies the version of AnzoGraph DB to deploy. If you pulled an image in the first step, this tag should match the tag from the pull command. Usually the latest tag is specified so the most recent release is deployed.

    For example:

    docker run -d -p 80:8080 -p 443:8443 -v /Volumes/shared-files:/opt/shared-files --name=anzograph cambridgesemantics/anzograph:latest

    When the prompt returns the container ID, the container is running. For example:

    c16b912a4a8944592297cf052f90447a5657c3362540334aba2195ae8941f1af

AnzoGraph DB is now installed and ready to use. You can access the user interface by opening a browser and going to http://127.0.0.1. If you specified a port other than 80 for the host HTTP port, specify that port in the URL. For example, http://127.0.0.1:8888.

Use the following credentials to log in to the user interface:

  • Username: admin
  • Password: Passw0rd1

For next steps, see Get Started, a brief tutorial designed to introduce you to the AnzoGraph DB user interface and command line interface and get you started with loading data and running SPARQL queries.

Deploy AnzoGraph DB in a Linux Container Engine

Follow the instructions below to deploy AnzoGraph DB on Linux.

  1. If necessary, start the container application.
  2. Applications typically cache images on the host. If you have deployed an AnzoGraph DB container previously, that image will be used to redeploy AnzoGraph DB. If you want to deploy the latest release, first pull the latest image. To do so, run the following command:
    docker pull cambridgesemantics/anzograph:latest

    You can deploy alternate AnzoGraph DB versions by replacing the "latest" tag with any of the tags that are available on the AnzoGraph Docker Hub site.

  3. If you are deploying the AnzoGraph DB container for the first time, Cambridge Semantics recommends that you create a directory on the local file system where load files, query files, and other files can be staged and shared with the container file system. When you deploy AnzoGraph DB, you map the directory on the local file system to a directory in the container. This way the files are shared, and if you remove the AnzoGraph DB container, the local file system retains a copy of the shared files. If you redeploy a new AnzoGraph DB image, the new container can be mapped to the same local directory and access the existing files. To create the directory, navigate to a location on the host and run the following command to create a directory in the current directory:
    mkdir <directory_name>

    For example:

    mkdir shared-files

    On Mac and Linux, Docker is configured by default to allow local directories to be shared with containers. On Mac, the /Users, /Volumes, /private, and /tmp directories are shared. If necessary, you can configure additional locations in Docker Preferences > Resources > File Sharing.

  4. Run the following command to deploy the AnzoGraph DB image. The command instructs Docker to start AnzoGraph DB and configure HTTP and HTTPS access to the application by mapping the container ports to the HTTP and HTTPS ports on the local host:
    docker run -d -p <host_http_port>:8080 -p <host_https_port>:8443 \
    -v /<path>/<shared_directory>:/opt/<shared_directory> \
    --name=<container_name> cambridgesemantics/anzograph:<tag>

    The list below describes each of the parameters:

    • host_http_port is the port on the local host to use for HTTP access to the AnzoGraph DB user interface. In the container, the user interface binds to port 8080 for HTTP access. Cambridge Semantics recommends that you specify 80 to map the container's HTTP port to port 80 on the local host. If port 80 is in use, specify an alternate port for host_http_port.
    • host_https_port is the port on the local host to use for HTTPS access to the AnzoGraph DB user interface. In the container, the user interface binds to port 8443 for HTTPS access. Cambridge Semantics recommends that you specify 443 to map the container's HTTPS port to port 443 on the local host. If port 443 is in use, specify an alternate port for host_https_port.
    • /path/shared_directory: The path and directory name for the shared directory on the local file system.
    • shared_directory: The directory on the container file system to map to the shared directory on the local file system. The directory is created when the container is deployed.

      The command above lists /opt/ as a convenient path on the container file system because the AnzoGraph DB path is /opt/anzograph. You can specify a different path.

    • container_name is the short name to use to identify the AnzoGraph DB container. For example, anzograph.
    • tag is the tag from the AnzoGraph Docker Hub site that identifies the version of AnzoGraph DB to deploy. If you pulled an image in the first step, this tag should match the tag from the pull command. Usually the latest tag is specified so the most recent release is deployed.

    For example:

    docker run -d -p 80:8080 -p 443:8443 -v /opt/shared-files:/opt/shared-files --name=anzograph cambridgesemantics/anzograph:latest

    When the prompt returns the container ID, the container is running. For example:

    c16b912a4a8944592297cf052f90447a5657c3362540334aba2195ae8941f1af

    If you want to attach to the container and explore the AnzoGraph DB file system, you can run the following command.

    docker exec -it anzograph /bin/bash

AnzoGraph DB is now installed and ready to use. To open the user interface, open a browser and go to the following URL:

https://<host_IP_address>

Where <host_IP_address> is the IP address of the host server where the container image is installed. If you mapped the container's HTTPS port to port 443 on the host, you do not need to specify a port. If you specified a port other than 443, include the port in the URL. For example, https://10.100.0.1:8888.

If you are using Docker for Linux locally and need to know the IP address of the AnzoGraph DB container, you can run the following command:

docker inspect <container_name> | grep '"IPAddress"' | head -n 1

For example:

docker inspect anzograph | grep '"IPAddress"' | head -n 1
"IPAddress": "172.17.0.2"

Use the following credentials to log in to the user interface:

  • Username: admin
  • Password: Passw0rd1

For next steps, see Get Started, a brief tutorial designed to introduce you to the AnzoGraph DB user interface and command line interface and get you started with loading data and running SPARQL queries.

Deploy AnzoGraph DB in a Windows Desktop Application

Follow the instructions below to deploy AnzoGraph DB on a Windows desktop container application.

  1. If necessary, start the desktop application, and then open the Windows PowerShell application.
  2. Applications typically cache images on the host. If you have deployed an AnzoGraph DB container previously, that image will be used to redeploy AnzoGraph DB. If you want to deploy the latest release, first pull the latest image. To do so, run the following command:
    docker pull cambridgesemantics/anzograph:latest

    You can deploy alternate AnzoGraph DB versions by replacing the "latest" tag with any of the tags that are available on the AnzoGraph Docker Hub site.

  3. If you are deploying the AnzoGraph DB container for the first time, Cambridge Semantics recommends that you create a directory on the local file system where load files, query files, and other files can be staged and shared with the container file system. When you deploy AnzoGraph DB, you map the directory on the local file system to a directory in the container. This way the files are shared, and if you remove the AnzoGraph DB container, the local file system retains a copy of the shared files. If you redeploy a new AnzoGraph DB image, the new container can be mapped to the same local directory and access the existing files. To create the directory, navigate to a location on the host and run the following command to create a directory in the current directory:
    mkdir <directory_name>

    For example:

    mkdir shared-files
  4. In PowerShell, run the following command to deploy the AnzoGraph DB image. The command runs AnzoGraph DB and configures HTTP and HTTPS access by mapping the container ports to the HTTP and HTTPS ports on the local host:
    docker run -d -p <host_http_port>:8080 -p <host_https_port>:8443 \
    -v \<path>\<shared_directory>:/opt/<shared_directory> \
    --name=<container_name> cambridgesemantics/anzograph:<tag>

    The list below describes each of the parameters:

    • host_http_port is the port on the local host to use for HTTP access to the AnzoGraph DB user interface. In the container, the user interface binds to port 8080 for HTTP access. Cambridge Semantics recommends that you specify 80 to map the container's HTTP port to port 80 on the local host. If port 80 is in use, specify an alternate port for host_http_port.
    • host_https_port is the port on the local host to use for HTTPS access to the AnzoGraph DB user interface. In the container, the user interface binds to port 8443 for HTTPS access. Cambridge Semantics recommends that you specify 443 to map the container's HTTPS port to port 443 on the local host. If port 443 is in use, specify an alternate port for host_https_port.
    • \path\shared_directory: The path and directory name for the shared directory on the local file system.
    • shared_directory: The directory on the container file system to map to the shared directory on the local file system. The directory is created when the container is deployed.

      The command above lists /opt/ as a convenient path on the container file system because the AnzoGraph DB path is /opt/anzograph. You can specify a different path.

    • container_name is the short name to use to identify the AnzoGraph DB container. For example, anzograph.
    • tag is the tag from the AnzoGraph Docker Hub site that identifies the version of AnzoGraph DB to deploy. If you pulled an image in the first step, this tag should match the tag from the pull command. Usually the latest tag is specified so the most recent release is deployed.

    For example:

    docker run -d -p 80:8080 -p 443:8443 -v C:\shared-files:/opt/shared-files --name=anzograph cambridgesemantics/anzograph:latest

    When the prompt returns the container ID, the container is running. For example:

    c16b912a4a8944592297cf052f90447a5657c3362540334aba2195ae8941f1af

AnzoGraph DB is now installed and ready to use. You can access the user interface by opening a browser and going to http://127.0.0.1. If you specified a port other than 80 for the host HTTP port, specify that port in the URL. For example, http://127.0.0.1:8888.

Use the following credentials to log in to the user interface:

  • Username: admin
  • Password: Passw0rd1

For next steps, see Get Started, a brief tutorial designed to introduce you to the AnzoGraph DB user interface and command line interface and get you started with loading data and running SPARQL queries.