Skip to content

k8s deployment for neo4j #1254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3270982
k8s deployment for neo4j
jeanyu-habana Feb 4, 2025
0011a66
updated README and added 2 scripts
jeanyu-habana Feb 4, 2025
fee5ffe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 4, 2025
e7868fd
fixed hardcoded NS
jeanyu-habana Feb 5, 2025
296f3ed
Merge branch 'main' into neo4jk8s
jeanyu-habana Feb 5, 2025
5ceb03b
Merge remote-tracking branch 'origin/main' into neo4jk8s
jeanyu-habana Feb 5, 2025
8701aab
Merge remote-tracking branch 'origin/neo4jk8s' into neo4jk8s
jeanyu-habana Feb 5, 2025
fb7658f
removed cluster specific configs
jeanyu-habana Feb 5, 2025
9c2ba3b
Merge branch 'main' into neo4jk8s
jeanyu-habana Feb 5, 2025
aaa6d95
Merge remote-tracking branch 'origin/main' into neo4jk8s
jeanyu-habana Feb 5, 2025
4076e21
rename
jeanyu-habana Feb 5, 2025
d3b7003
Merge remote-tracking branch 'origin/neo4jk8s' into neo4jk8s
jeanyu-habana Feb 5, 2025
a20e914
Merge branch 'main' into neo4jk8s
jeanyu-habana Feb 6, 2025
67b2da9
Merge remote-tracking branch 'origin/main' into neo4jk8s
jeanyu-habana Feb 6, 2025
a00e886
Merge remote-tracking branch 'origin/neo4jk8s' into neo4jk8s
jeanyu-habana Feb 6, 2025
23f1ab4
use kubernetes instead of k8s in the path
jeanyu-habana Feb 6, 2025
61c6dfc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2025
8dea16c
Merge branch 'main' into neo4jk8s
jeanyu-habana Feb 10, 2025
82ecbf9
Merge remote-tracking branch 'origin/main' into neo4jk8s
jeanyu-habana Feb 10, 2025
9d5a9a5
updated README
jeanyu-habana Feb 10, 2025
239fb96
Merge remote-tracking branch 'origin/neo4jk8s' into neo4jk8s
jeanyu-habana Feb 10, 2025
5ffda03
rename config file
jeanyu-habana Feb 10, 2025
9c14104
updated README
jeanyu-habana Feb 10, 2025
1c01c24
add test script
jeanyu-habana Feb 18, 2025
33e0337
rm nodeSelector
jeanyu-habana Feb 18, 2025
75b7031
updated namespace
jeanyu-habana Feb 19, 2025
b79274b
fixed namespace
jeanyu-habana Feb 19, 2025
93dd0fc
fixed syntax error
jeanyu-habana Feb 19, 2025
bff8b2a
updated test script
jeanyu-habana Feb 19, 2025
37daf80
Merge branch 'main' into neo4jk8s
jeanyu-habana Feb 19, 2025
5ab61af
Merge remote-tracking branch 'origin/neo4jk8s' into neo4jk8s
jeanyu-habana Feb 19, 2025
ead6ab7
change mode
jeanyu-habana Feb 19, 2025
18a32f1
updated wait time
jeanyu-habana Feb 19, 2025
9fcd825
cleanup
jeanyu-habana Feb 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions comps/third_parties/neo4j/deployment/kubernetes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Deploy Neo4j on kubernetes cluster

## Deploy on Xeon

Step 1: Edit cpu.yaml and replace the values of the following items with the actual configurations of your system:

- passwordFromSecret
- storageClassName

Step 2: Run the following command

```
./install.sh ${release_name} $version $NS
```
32 changes: 32 additions & 0 deletions comps/third_parties/neo4j/deployment/kubernetes/cpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

neo4j:
name: "neo4j"
passwordFromSecret: neo-creds
env:
- name: NEO4J_apoc_import_file_use__neo4j__config
value: "true"
nodeSelector:
nfs: enabled
env:
NEO4J_PLUGINS: '["apoc"]'
apoc_config:
apoc.import.file.enabled: "true"
apoc.export.file.enabled: "true"
config:
server.directories.import: "import"
dbms.security.allow_csv_import_from_file_urls: "true"
dbms.security.procedures.unrestricted: "apoc.*"
dbms.security.procedures.allowlist: "apoc.*"
server.config.strict_validation.enabled: "false"
apoc.trigger.enabled: "true"
volumes:
data:
mode: dynamic
dynamic:
storageClassName: "csi-wekafs-fs"
accessModes:
- ReadWriteOnce
requests:
storage: 10Gi
9 changes: 9 additions & 0 deletions comps/third_parties/neo4j/deployment/kubernetes/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

helm repo add neo4j https://helm.neo4j.com/neo4j && helm repo update # call once
release_name=${1:-graph-neo}
version=${2:-5.23.0}
NS=${3:-ogpt}
./uninstall.sh ${release_name} $NS
helm install -n $NS --version $version ${release_name} neo4j/neo4j -f cpu.yaml
13 changes: 13 additions & 0 deletions comps/third_parties/neo4j/deployment/kubernetes/uninstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

release_name=${1:-graph-neo}
NS=${2:-ogpt}

tsleep=0
helm uninstall -n $NS ${release_name} && tsleep=5
neo_pvc=( $(kubectl get pvc -l helm.neo4j.com/instance=${release_name} --no-headers -o custom-columns=CONTAINER:.metadata.name))
for pvc in "${neo_pvc[@]}"; do
kubectl delete pvc $pvc
done
sleep $tsleep