development.adoc 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. = Local Development
  2. [abstract]
  3. This chapter provides instructions for local development of the helm chart and how to make changes to it.
  4. == Template Expansion
  5. ```shell
  6. helm template --name tester --set acceptLicenseAgreement=yes --set neo4jPassword=mySecretPassword . > expanded.yaml
  7. ```
  8. == Full-Cycle Test
  9. The following mini-script will provision a test cluster, monitor it for rollout, test it, report results, and teardown/destroy PVCs.
  10. === Provision K8S Cluster
  11. Please use `tools/test/provision-k8s.sh` and customize to your Google Cloud project ID
  12. === Standalone
  13. Standalone forms faster so we can manually lower the liveness/readiness timeouts.
  14. ```shell
  15. export NAME=a
  16. export NAMESPACE=default
  17. helm install $NAME . --set acceptLicenseAgreement=yes --set neo4jPassword=mySecretPassword --set core.standalone=true --set readinessProbe.initialDelaySeconds=20 --set livenessProbe.initialDelaySeconds=20 && \
  18. kubectl rollout status --namespace $NAMESPACE StatefulSet/$NAME-neo4j-core --watch && \
  19. helm test $NAME --logs | tee testlog.txt
  20. helm uninstall $NAME
  21. sleep 20
  22. for idx in 0 1 2 ; do
  23. kubectl delete pvc datadir-$NAME-neo4j-core-$idx ;
  24. done
  25. ```
  26. === Causal Cluster
  27. ```shell
  28. export NAME=a
  29. export NAMESPACE=default
  30. helm install $NAME . --set acceptLicenseAgreement=yes --set neo4jPassword=mySecretPassword --set readReplica.numberOfServers=1 && \
  31. kubectl rollout status --namespace $NAMESPACE StatefulSet/$NAME-neo4j-core --watch && \
  32. helm test $NAME --logs | tee testlog.txt
  33. helm uninstall $NAME
  34. sleep 20
  35. for idx in 0 1 2 ; do
  36. kubectl delete pvc datadir-$NAME-neo4j-core-$idx ;
  37. done
  38. ```
  39. == Internal Tooling
  40. This repo contains internal tooling containers for backup, restore, and test of the helm chart, found
  41. under the `tools` directory.
  42. == Building the Containers
  43. If you want to push your own docker containers, make sure the registry in the Makefile is set to some
  44. where you have permissions on.
  45. ```shell
  46. cd tools
  47. make docker_build
  48. make docker_push
  49. ```