Skip to content
Open

Nebula #1265

Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
73 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
ea733b3
NebulaGraph k8s deploy
jeanyu-habana Feb 6, 2025
62a70d8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 6, 2025
cf0e0c1
k8s deployment for neo4j
jeanyu-habana Feb 4, 2025
55942e5
updated README and added 2 scripts
jeanyu-habana Feb 4, 2025
320d11e
fixed hardcoded NS
jeanyu-habana Feb 5, 2025
0a45ece
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 4, 2025
b097d2b
removed cluster specific configs
jeanyu-habana Feb 5, 2025
c56a3c5
rename
jeanyu-habana Feb 5, 2025
f35edea
use kubernetes instead of k8s in the path
jeanyu-habana Feb 6, 2025
2f01606
NebulaGraph k8s deploy
jeanyu-habana Feb 6, 2025
079e1ec
Merge branch 'main' into nebula
jeanyu-habana Feb 7, 2025
af60a1c
Merge remote-tracking branch 'origin/main' into nebula
jeanyu-habana Feb 7, 2025
109451c
rebase
jeanyu-habana Feb 7, 2025
c4ff066
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 7, 2025
3113700
rm neo4j k8s files
jeanyu-habana Feb 7, 2025
413fbc6
resolve conflict
jeanyu-habana Feb 7, 2025
16b9569
fixed yaml error
jeanyu-habana Feb 8, 2025
e0e408d
fixed README
jeanyu-habana Feb 8, 2025
cf278b0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 8, 2025
1cae41e
added instructions/examples for database conenction
jeanyu-habana Feb 8, 2025
e7673c9
Merge branch 'main' into nebula
jeanyu-habana Feb 8, 2025
d84ed29
added info for database connection
jeanyu-habana Feb 8, 2025
c56f9b7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 8, 2025
9be528a
fixed README
jeanyu-habana Feb 9, 2025
af58635
Merge remote-tracking branch 'origin/nebula' into nebula
jeanyu-habana Feb 9, 2025
0876d6e
Merge branch 'main' into nebula
jeanyu-habana Feb 11, 2025
f957a4d
fixed README
jeanyu-habana Feb 11, 2025
332ac41
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 11, 2025
916fbf2
Merge branch 'main' into nebula
lvliang-intel Feb 13, 2025
a22e11f
added test script for nebulagraph component
jeanyu-habana Feb 14, 2025
bc47599
Merge branch 'main' into nebula
jeanyu-habana Feb 14, 2025
aa9f52b
Merge remote-tracking branch 'origin/nebula' into nebula
jeanyu-habana Feb 14, 2025
7df8202
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 14, 2025
23c3996
fixed path in the test script
jeanyu-habana Feb 14, 2025
4c5a0a8
Merge remote-tracking branch 'origin/nebula' into nebula
jeanyu-habana Feb 14, 2025
36ce2ad
fixed error in test script
jeanyu-habana Feb 14, 2025
3fb2f89
set storageClass
jeanyu-habana Feb 14, 2025
1edb31f
added wait in the script
jeanyu-habana Feb 14, 2025
6286026
fixed namespace
jeanyu-habana Feb 14, 2025
03530ff
recycle nebula-console pod
jeanyu-habana Feb 14, 2025
0ff8e39
fixed cluster-ip
jeanyu-habana Feb 14, 2025
7a640b1
fixed ns
jeanyu-habana Feb 14, 2025
82df762
fixed test script
jeanyu-habana Feb 18, 2025
fe04811
fixed script
jeanyu-habana Feb 18, 2025
b167636
Merge branch 'main' into nebula
jeanyu-habana Feb 18, 2025
c0215e3
Merge branch 'main' into nebula
jeanyu-habana Feb 18, 2025
4702499
test script update
jeanyu-habana Feb 18, 2025
7fbc25a
Merge remote-tracking branch 'origin/nebula' into nebula
jeanyu-habana Feb 18, 2025
e79a742
more work for test script
jeanyu-habana Feb 18, 2025
442e659
Merge branch 'main' into nebula
jeanyu-habana Feb 19, 2025
afbb45f
Merge branch 'main' into nebula
xiguiw Feb 25, 2025
cb1535e
updates to address review comments
jeanyu-habana Feb 26, 2025
ec70edb
Merge remote-tracking branch 'origin/nebula' into nebula
jeanyu-habana Feb 26, 2025
6b7e24f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 26, 2025
3dcba86
updated README with storageClass info
jeanyu-habana Feb 27, 2025
aa4c672
Merge remote-tracking branch 'origin/nebula' into nebula
jeanyu-habana Feb 27, 2025
20480e4
Merge branch 'main' into nebula
jeanyu-habana Mar 2, 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
64 changes: 64 additions & 0 deletions comps/third_parties/nebula/deployment/kubernetes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Deploy NebulaGraph cluster (with Kubectl)

## 1. Install cert-manager

```bash
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have cert-manager of versions othern than 1.9.1? I'm asking this because the user might have other versions of cert-manager in their cluster already.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. I replaced specific version with <release_version> in the README to indicate that the user can use other versions. Thanks.

```

## 2. Install Nebula Operator

```bash
helm repo add nebula-operator https://vesoft-inc.github.io/nebula-operator/charts
helm repo update
helm install nebula-operator nebula-operator/nebula-operator --namespace=<namespace_name> --version=${chart_version}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should either give specific chart version or let user to use the latest.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, updated with a specific version.

```

## 3. Install and start NebulaGraph cluster

Choose between the Enterprise and Community configuration files base on your license. Edit the config with the proper storageClassName and run the command below:

```bash
kubectl create -f enterprise_edition.yaml
or
kubectl create -f community_edition.yaml
```

## 4. Connect to NebulaGraph databases

Once you've set up a NebulaGraph cluster using Nebula Operator on Kubernetes, you can connect to NebulaGraph databases both from inside the cluster and from external sources.

### 4.1. Connect to NebulaGraph databases from within a NebulaGraph cluster

Run the following command to check the IP of the Service:

```bash
$ kubectl get service -l app.kubernetes.io/cluster=<nebula> #<nebula> is a variable value. Replace it with the desired name.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what should be? Replace it by what value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be any desired name.

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nebula-graphd-svc ClusterIP 10.98.213.34 <none> 9669/TCP,19669/TCP,19670/TCP 23h
nebula-metad-headless ClusterIP None <none> 9559/TCP,19559/TCP,19560/TCP 23h
nebula-storaged-headless ClusterIP None <none> 9779/TCP,19779/TCP,19780/TCP,9778/TCP
```

Run the following command to connect to the NebulaGraph database using the IP of the <cluster-name>-graphd-svc Service above:

```bash
kubectl run -ti --image vesoft/nebula-console --restart=Never -- <nebula_console_name> -addr <cluster_ip> -port <service_port> -u <username> -p <password>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be better to give users direct bash commands to get <cluster_ip>, <service_port> .

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the bash commands to find <cluster_ip>, <service_port> in README.

```

For example:

```bash
kubectl run -ti --image vesoft/nebula-console --restart=Never -- nebula-console -addr 10.98.213.34 -port 9669 -u root -p vesoft

```

A successful connection to the database is indicated if the following is returned:

If you don't see a command prompt, try pressing enter.

(root@nebula) [(none)]>

### 4.2. Connect to NebulaGraph databases from outside a NebulaGraph cluster

Refer to the [NebulaGraph Database Manual](https://docs.nebula-graph.io/3.1.3/nebula-operator/4.connect-to-nebula-graph-service/) for more information.
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

apiVersion: apps.nebula-graph.io/v1alpha1
kind: NebulaCluster
metadata:
name: nebula
spec:
graphd:
resources:
requests:
cpu: "500m"
memory: "500Mi"
limits:
cpu: "1"
memory: "1Gi"
replicas: 1
image: vesoft/nebula-graphd
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we pin the image tag instead of using latest image? Just in case future versions of nebula might not be compatible with this resource operator definition.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, updated the yaml file with specific version for all related images.

#version: v3.1.3
service:
type: NodePort
externalTrafficPolicy: Local
logVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: "csi-wekafs-fs"
metad:
resources:
requests:
cpu: "500m"
memory: "500Mi"
limits:
cpu: "1"
memory: "1Gi"
replicas: 1
image: vesoft/nebula-metad
#version: v3.1.3
dataVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: "csi-wekafs-fs"
logVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: "csi-wekafs-fs"
storaged:
resources:
requests:
cpu: "500m"
memory: "500Mi"
limits:
cpu: "1"
memory: "1Gi"
replicas: 3
image: vesoft/nebula-storaged
#version: v3.1.3
dataVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: "csi-wekafs-fs"
logVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: "csi-wekafs-fs"
reference:
name: statefulsets.apps
version: v1
schedulerName: default-scheduler
imagePullPolicy: Always
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

apiVersion: apps.nebula-graph.io/v1alpha1
kind: NebulaCluster
metadata:
annotations:
nebula-graph.io/owner: test
name: nebula
spec:
enablePVReclaim: true
graphd:
readinessProbe:
failureThreshold: 3
httpGet:
path: /status
port: 19669
scheme: HTTP
initialDelaySeconds: 40
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
image: reg.vesoft-inc.com/vesoft-ent/nebula-graphd
logVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: fast-disks
replicas: 1
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: 500m
memory: 500Mi
version: v3.1.3
imagePullPolicy: Always
imagePullSecrets:
- name: vesoft
metad:
license:
secretName: nebula-license
licenseKey: nebula.license
readinessProbe:
failureThreshold: 3
httpGet:
path: /status
port: 19559
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 5
successThreshold: 1
timeoutSeconds: 5
image: reg.vesoft-inc.com/vesoft-ent/nebula-metad
logVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: fast-disks
dataVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: fast-disks
replicas: 1
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: 500m
memory: 500Mi
version: v3.1.3
reference:
name: statefulsets.apps
version: v1
schedulerName: default-scheduler
storaged:
readinessProbe:
failureThreshold: 3
httpGet:
path: /status
port: 19779
scheme: HTTP
initialDelaySeconds: 40
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
image: reg.vesoft-inc.com/vesoft-ent/nebula-storaged
logVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: fast-disks
dataVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: fast-disks
replicas: 3
resources:
limits:
cpu: "1"
memory: 1Gi
requests:
cpu: 500m
memory: 500Mi
version: v3.1.3
enableAutoBalance: true
2 changes: 2 additions & 0 deletions comps/third_parties/nebula/src/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0