neo4j-community
by Helm
Neo4j is the world's leading graph database
About this chart
Neo4j
This chart is based on the official neo4j enterprise helm chart, modified to deploy a single-instance neo4j-community deployment.
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 repo add equinor-charts https://equinor.github.io/helm-charts/charts/
helm repo update
helm upgrade --install neo4j-community equinor-charts/neo4j-community
Introduction
This chart bootstraps a Neo4j deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Helm 3
- Kubernetes 1.6+ with Beta APIs enabled
- PV provisioner support in the underlying infrastructure
Installing the Chart
To install the chart with the release name neo4j-community:
helm upgrade --install neo4j-community equinor-charts/neo4j-community --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-community deployment:
helm delete neo4j-community
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.
| Parameter | Description | Default |
|---|---|---|
image | Neo4j image | neo4j |
imageTag | Neo4j version | {VERSION} |
imagePullPolicy | Image pull policy | IfNotPresent |
nodeSelector | Pod node selector | {} |
tolerations | Pod tolerations | [] |
affinity | Pod affinity | {} |
authEnabled | Is login/password required? | true |
neo4jPassword | Password to log in the Neo4J database if password is required | (random string of 10 characters) |
existingPasswordSecret | Secret name containing the password for neo4j user | `` |
existingPasswordSecretKey | key in existingPasswordSecret, in which the password is contained | `` |
persistentVolume.enabled | Whether or not persistence is enabled | true |
persistentVolume.mountPath | Persistent Volume mount root path | /data |
persistentVolume.size | Size of data volume | 10Gi |
persistentVolume.storageClass | Storage class of backing PVC | standard (uses beta storage class annotation) |
persistentVolume.subPath | Subdirectory of the volume to mount | nil |
extraVars | Extra environment variables to set | nil |
sideCarContainers | Sidecar containers to add to the core pod. Example use case is a sidecar which identifies and labels the leader when using the http API | [] |
initContainers | Init containers to add to the core pod. Example use case is a script that installs the APOC library | [] |
resources | Resources required (e.g. CPU, memory) | {} |
service.type | Type of the service | ClusterIP |
service.annotations | Annotations to be added to service | {} |
service.labels | Labels to be added to service | {} |
service.loadBalancerSourceRanges | Traffic through the load-balancer will be restricted to the specified client IPs (for service.type: LoadBalancer) | [] |
rbac.create | Whether to create RBAC for Neo4j | false |
serviceAccount.create | Whether to create service account of Neo4j | true |
serviceAccount.annotations | Annotations to be added to service account | {} |
serviceAccount.name | Service account name | `` |
podLabels | Labels to be added to pods | {} |
podAnnotations | Annotations to be added to pods | {} |
additionalVolumes | Additional volumes to mount in the Neo4j container | [] |
additionalVolumeMounts | Where the additional volumes are mounted in the Neo4j container | [] |
terminationGracePeriodSeconds | Duration in seconds the pod needs to terminate gracefully | 300 |
readinessProbe.initialDelaySeconds | Number of seconds after the container has started before probes are initiated | 60 |
readinessProbe.failureThreshold | Minimum consecutive failures for the probe to be considered failed after having succeeded | 3 |
readinessProbe.timeoutSeconds | Number of seconds after which the probe times out | 2 |
readinessProbe.periodSeconds | How often (in seconds) to perform the probe | 10 |
readinessProbe.tcpSocket.port | TCP check against the pod's IP address on a specified port | 7687 |
livenessProbe.initialDelaySeconds | Number of seconds after the container has started before probes are initiated | 120 |
livenessProbe.failureThreshold | Minimum consecutive failures for the probe to be considered failed after having succeeded | 3 |
livenessProbe.timeoutSeconds | Number of seconds after which the probe times out | 2 |
livenessProbe.periodSeconds | How often (in seconds) to perform the probe | 10 |
livenessProbe.tcpSocket.port | TCP check against the pod's IP address on a specified port | 7687 |
securityContext | Security context to be added to pods | {} |
env.JMXPORT | Port for jmxremote rmi port | 1099 |
exporters.jmx | Configuration for jmx exporter for Prometheus (disabled by default) | see values.yaml |
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 upgrade --install neo4j-community equinor-charts/neo4j-community
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
helm upgrade --install neo4j-community -f values.yaml equinor-charts/neo4j-community
Tip: You can use the default values.yaml
Updating password
We can indeed reset that password without having to delete the PVC by:
- Deleting the file
/var/lib/neo4j/data/dbms/auth - Running
neo4j-admin set-initial-password <new password> - Changing the password in the configured
secret. - Deleting the pod to restart and pick up the latest configuration
Special considerations when using AzureFile storage
If you want to use AzureFile you need to create a StorageClass with the neo4j user uid&gid in mount options:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: azurefile-neo4j
provisioner: kubernetes.io/azure-file
reclaimPolicy:
Deploy neo4j-community with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has neo4j-community 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartneo4j-community is pinned at v1.2.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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