Skip to content

rg2609/neo4j-helm

 
 

Repository files navigation

CircleCI

Neo4j-Helm

This repository contains a Helm chart that starts Neo4j >= 4.0 Enterprise Edition clusters in Kubernetes.

Quick Start

Check the releases page and copy the URL of the tgz package. Make sure to note the correct version of Neo4j.

Standalone (single server)

$ helm install mygraph RELEASE_URL --set core.standalone=true --set acceptLicenseAgreement=yes --set neo4jPassword=mySecretPassword

Causal Clustere (3 core, 0 read replicas)

$ helm install mygraph RELEASE_URL --set acceptLicenseAgreement=yes --set neo4jPassword=mySecretPassword

When you're done: helm uninstall mygraph.

Documentation

The User Guide contains all the documentation for this helm chart.

The Neo4j Community Site is a great place to go for discussion and questions about Neo4j & Kubernetes.

Additional instructions, general documentation, and operational facets are covered in the following articles:

Neo4j Overview

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.

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

This package is fairly similar to the Neo4j-maintained GKE Marketplace entry, which is also built on helm. This package tries to avoid Kubernetes distribution-specific features to be general, while the other is tailored specifically to GKE.

Versioning

The versioning of this helm chart will follow Neo4j versions for simplicity.

  • Version 4.0.X-Y of the helm chart is compatible with Neo4j EE v4.0.*
  • Version 4.1.X-Y of the helm chart is compatible with Neo4j EE v4.1.*
  • (and so on)

The charts in this repository are for Neo4j 4.0 going forward. There are previous available charts for the Neo4j 3.5 series, but there are substantial differences between the two versions. Careful upgrade planning is advised before attempting to upgrade an existing chart.

Consult the upgrade guide and expect that additional configuration of this chart will be necessary.

Helm Testing

This chart contains a standard set of helm chart tests, which can be run after a deploy is ready, like this:

helm test mygraph

Local Testing & Development

Template Expansion

To see what helm will actually deploy based on the templates:

helm template --name tester --set acceptLicenseAgreement=yes --set neo4jPassword=mySecretPassword . > expanded.yaml

Full-Cycle Test

The following mini-script will provision a test cluster, monitor it for rollout, test it, report test results, and teardown / destroy PVCs.

Standalone

Standalone forms faster so we can manually lower the liveness/readiness timeouts.

export NAME=a
export NAMESPACE=default
helm install $NAME . --set acceptLicenseAgreement=yes --set neo4jPassword=mySecretPassword --set core.standalone=true --set readinessProbe.initialDelaySeconds=20 --set livenessProbe.initialDelaySeconds=20 && \
kubectl rollout status --namespace $NAMESPACE StatefulSet/$NAME-neo4j-core --watch && \
helm test $NAME --logs | tee testlog.txt
helm uninstall $NAME
sleep 20
for idx in 0 1 2 ; do
  kubectl delete pvc datadir-$NAME-neo4j-core-$idx ;
done

Causal Cluster

export NAME=a
export NAMESPACE=default
helm install $NAME . --set acceptLicenseAgreement=yes --set neo4jPassword=mySecretPassword --set readReplica.numberOfServers=1 && \
kubectl rollout status --namespace $NAMESPACE StatefulSet/$NAME-neo4j-core --watch && \
helm test $NAME --logs | tee testlog.txt
helm uninstall $NAME
sleep 20
for idx in 0 1 2 ; do
  kubectl delete pvc datadir-$NAME-neo4j-core-$idx ;
done

Internal Tooling

This repo contains internal tooling containers for backup, restore, and test of the helm chart.

Building the Containers

If you want to push your own docker containers, make sure that the registry in the Makefile is set to somewhere you have permissions on.

cd tools
make docker_build
make docker_push

Packages

No packages published

Languages

  • Shell 74.5%
  • Dockerfile 11.5%
  • Smarty 10.9%
  • Makefile 3.1%