neo4j

by joaquinito2051

Helm chartv1.0.0App 3.4.5

Neo4j is the world's leading graph database

About this chart

Neo4j

Neo4j is a highly scalable native graph database that leverages data relationships as first-class entities, helping enterprises build intelligent applications to meet today’s evolving data challenges.

TL;DR;

$ helm install <helm-repo>/neo4j

$ helm install stable/neo4j

Introduction

This chart bootstraps a Neo4j deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.6+ with Beta APIs enabled
  • PV provisioner support in the underlying infrastructure
  • Requires the following variables You must add acceptLicenseAgreement in the values.yaml file and set it to yes or include --set acceptLicenseAgreement=yes in the command line of helm install to accept the license.

Installing the Chart

You must add acceptLicenseAgreement in the values.yaml file and set it to yes or include --set acceptLicenseAgreement=yes in the command line of helm install to accept the license.

To install the chart with the release name neo4j-helm:

$ helm install --name neo4j-helm <helm-repo>/neo4j --set acceptLicenseAgreement=yes --set neo4jPassword=mySecretPassword

$ helm install --name neo4j-helm stable/neo4j --set acceptLicenseAgreement=yes --set neo4jPassword=mySecretPassword You must explicitly accept the neo4j license agreement for the installation to be successful.

The command deploys Neo4j on the Kubernetes cluster in the default configuration but with the password set to mySecretPassword. The configuration section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the neo4j-helm deployment:

$ helm delete neo4j-helm --purge

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the Neo4j chart and their default values.

ParameterDescriptionDefault
imageNeo4j imageneo4j
imageTagNeo4j version{VERSION}
imagePullPolicyImage pull policyIfNotPresent
podDisruptionBudgetPod disruption budget{}
authEnabledIs login/password required?true
core.numberOfServersNumber of machines in CORE mode3
core.sideCarContainersSidecar containers to add to the core pod. Example use case is a sidecar which identifies and labels the leader when using the http API{}
core.initContainersInit containers to add to the core pod. Example use case is a script that installs the APOC library{}
core.persistentVolume.enabledWhether or not persistence is enabledtrue
core.persistentVolume.storageClassStorage class of backing PVCstandard (uses beta storage class annotation)
core.persistentVolume.sizeSize of data volume10Gi
core.persistentVolume.mountPathPersistent Volume mount root path/data
core.persistentVolume.subPathSubdirectory of the volume to mountnil
core.persistentVolume.annotationsPersistent Volume Claim annotations{}
readReplica.numberOfServersNumber of machines in READ_REPLICA mode0
readReplica.initContainersInit containers to add to the replica pod. Example use case is a script that installs the APOC library{}
resourcesResources required (e.g. CPU, memory){}
clusterDomainCluster domaincluster.local

The above parameters map to the env variables defined in the Neo4j docker image.

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

$ helm install --name neo4j-helm --set core.numberOfServers=5,readReplica.numberOfServers=3 <helm-repo>/neo4j

$ helm install --name neo4j-helm --set core.numberOfServers=5,readReplica.numberOfServers=3 stable/neo4j The above command creates a cluster containing 5 core servers and 3 read replicas.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

$ helm install --name neo4j-helm -f values.yaml <helm-repo>/neo4j

$ helm install --name neo4j-helm -f values.yaml stable/neo4j

Tip: You can use the default values.yaml

Once you have all 3 pods in running, you can run the "test.sh" script in this directory, which will verify the role attached to each pod and also test recovery of a failed/deleted pod. This script requires that the $RELEASE_NAME environment variable be set, in order to access the pods, if you have specified a custom namespace or replicas value when installing you can set those via RELEASE_NAMESPACE and CORE_REPLICAS environment variables for this script.

Deploy neo4j with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has neo4j on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartneo4j is pinned at v1.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply