Deploy AnzoGraph DB with Helm

Follow the instructions below to deploy AnzoGraph DB using Helm.

  1. Run the following command to add the Cambridge Semantics repository to Helm:
    helm repo add csi-helm https://storage.googleapis.com/csi-helm/
  2. Run the following command to update the metadata for the Helm repository.
    helm repo update
  3. Run the following command to find the available AnzoGraph DB Helm charts.
    helm search repo anzograph

    The command returns details about the two charts that are available, one for AnzoGraph DB and one for the Cambridge Semantics Apache Zeppelin image (see Use Third-Party Visualization Tools for information about the Zeppelin image).

    NAME                 CHART VERSION   APP VERSION  DESCRIPTION
    csi-helm/anzograph   2.0.20230427    3.0.0        CSI Anzograph deployment on K8S
    csi-helm/zeppelin    0.2.20191219    0.8.2        CSI Zeppelin deployment on K8s that enables...
  4. Run the following command to fetch and view the readme for the AnzoGraph DB Helm chart:
    helm inspect readme csi-helm/anzograph | tee Readme.md
  5. Run the following command to fetch and view the AnzoGraph DB Helm chart values (values.yaml):
    helm inspect values csi-helm/anzograph | tee values.yaml
  6. By default the Helm chart is configured to deploy a single AnzoGraph DB node with 2 CPU and 8 GiB of RAM. If you want to customize the depolyment, such as to specify a larger instance or create a cluster, customize values.yaml before you deploy AnzoGraph DB. In addition, if you obtained a license key from Cambridge Semantics, add that key to values.yaml. The steps below provide guidance for customizing node or cluster sizes and adding a license key to the deployment. For more detailed information about all of the AnzoGraph DB Helm chart options, view the readme, Readme.md.
    1. Open values.yaml in a text editor. The file is in the $HELM_HOME directory that was defined when you initialized Helm, usually your home directory. You can run helm home to view the HELM_HOME location.
    2. The option that controls the number of instances for the cluster is in the Values for statefulset section of the file:
      # Values for statefulset
      replicas: 1

      To create a cluster, change the replicas value from 1 to the number of nodes that you want to deploy. To achieve the best performance, specify a multiple of 4, i.e., 4, 8, 12, etc. For guidance on sizing AnzoGraph DB servers and clusters, see Sizing Guidelines for In-Memory Storage.

    3. To increase the number of CPU or amount of memory on the instances that will be deployed, change the values for the cpu and memory settings under database.resources.requests. Depending on the values that you specify for requests, you might need to increase the values under limits.

      For example, the following values create a cluster with instances that have 16 CPU and 120 GiB of RAM each. The upper limit are instances with 32 CPU and 160 GiB.

      database:
        image:
          repository: "docker.io"
          name: "cambridgesemantics/anzograph-db"
          tag: "3.0.0"
          pullPolicy: "IfNotPresent"
        resources:
          requests:
            cpu: "16000m"
            memory: "120000Mi"
          limits:
            cpu: "32000m"
            memory: "160000Mi"
        tolerations: []
    4. When you have finished customizing the file, save and close values.yaml
  7. Run the following command to deploy AnzoGraph DB:
    helm install -f ~/values.yaml <deployment_name> csi-helm/anzograph

    Where <deployment_name> is the unique name that you want to assign to this AnzoGraph DB deployment. For example:

    helm install -f ~/values.yaml anzograph-1 csi-helm/anzograph

    Helm deploys AnzoGraph DB and displays the initial status. For example:

    NAME:   anzograph-1
    LAST DEPLOYED: Fri May 12 22:32:12 2023
    NAMESPACE: default
    STATUS: DEPLOYED
    
    RESOURCES:
    ==> v1/Pod(related)
    NAME                     READY  STATUS             RESTARTS  AGE
    anzograph-anzograph-1-0  0/1    Pending            0         0s
    
    ==> v1/Secret
    
    NAME                    AGE
    anzograph-1-ui-secrets  1s
    anzograph-1-license     1s
    
    ==> v1/ConfigMap
    anzograph-1-configmap  1s
    
    ==> v1/Service
    anzograph-1-ui           1s
    anzograph-1-statefulset  1s
    
    ==> v1beta1/StatefulSet
    anzograph-anzograph-1  1s
  8. Run the following command to refresh the status and monitor the deployment:
    helm status <deployment_name>

    For example:

    helm status anzograph-1

    When the status says "Running," the deployment is complete. In the status output under v1/Service, note the first service name (with -ui appended to the release name). In the example above, the service name is anzograph-1-ui.

  9. Using the service name for your deployment, run the following command to view the cluster and endpoint information for AnzoGraph DB:
    kubectl get service <service_name>

    For example:

    kubectl get service anzograph-1-ui
    NAME             TYPE           CLUSTER-IP      EXTERNAL-IP     PORT(S)                      AGE
    anzograph-1-ui   LoadBalancer   10.47.254.111   35.225.23.113   443:30281/TCP,80:30704/TCP   1h

For next steps, see Get Started for brief tutorials that are designed to introduce you to the AnzoGraph DB user interface and CLI and get you started with loading data and running SPARQL queries.