Skip to content
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

deploy nebula ent with operator #1793

Merged
merged 1 commit into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,89 +6,207 @@

## 前提条件

[安装 Nebula Operator](../2.deploy-nebula-operator.md)
- [安装 Nebula Operator](../2.deploy-nebula-operator.md)
- 准备相应的 License 文件

!!! enterpriseonly

只有当创建的 Nebula Graph 集群是企业版本时,才需要提供 License 文件。

## 创建集群

本文以创建名为`nebula`的集群为例,说明如何部署 Nebula Graph 集群。

1. 创建名为`apps_v1alpha1_nebulacluster.yaml`的文件。

示例文件的内容如下:
=== "社区版集群示例"

```yaml
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
version: {{nebula.tag}}
service:
type: NodePort
externalTrafficPolicy: Local
logVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: gp2
metad:
resources:
requests:
cpu: "500m"
memory: "500Mi"
limits:
cpu: "1"
memory: "1Gi"
replicas: 1
image: vesoft/nebula-metad
version: {{nebula.tag}}
dataVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: gp2
logVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: gp2
storaged:
resources:
requests:
cpu: "500m"
memory: "500Mi"
limits:
cpu: "1"
memory: "1Gi"
replicas: 3
image: vesoft/nebula-storaged
version: {{nebula.tag}}
dataVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: gp2
logVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: gp2
reference:
name: statefulsets.apps
version: v1
schedulerName: default-scheduler
imagePullPolicy: Always
```

=== "企业版集群示例"

```yaml
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: {{nebula.tag}}
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: {{nebula.tag}}
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: {{nebula.tag}}
enableAutoBalance: true
```

```yaml
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
version: {{nebula.tag}}
service:
type: NodePort
externalTrafficPolicy: Local
logVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: gp2
metad:
resources:
requests:
cpu: "500m"
memory: "500Mi"
limits:
cpu: "1"
memory: "1Gi"
replicas: 1
image: vesoft/nebula-metad
version: {{nebula.tag}}
dataVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: gp2
logVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: gp2
storaged:
resources:
requests:
cpu: "500m"
memory: "500Mi"
limits:
cpu: "1"
memory: "1Gi"
replicas: 3
image: vesoft/nebula-storaged
version: {{nebula.tag}}
dataVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: gp2
logVolumeClaim:
resources:
requests:
storage: 2Gi
storageClassName: gp2
reference:
name: statefulsets.apps
version: v1
schedulerName: default-scheduler
imagePullPolicy: Always
```

参数描述如下:

Expand All @@ -113,8 +231,13 @@
| `spec.reference.name` | - | 依赖的控制器名称。 |
| `spec.schedulerName` | - | 调度器名称。 |
| `spec.imagePullPolicy` | Nebula Graph 镜像的拉取策略。关于拉取策略详情,请参考 [Image pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy)。 | 镜像拉取策略。 |
| `spec.metad.license` | - | 创建企业版 Nebula Graph 集群所需的 License 配置。 |

1. 创建 Nebula Graph 集群。
!!! enterpriseonly

拉取企业版 Nebula Graph 集群镜像前,请确保已联系销售人员([inqury@vesoft.com](mailto:inqury@vesoft.com))获取企业版 Nebula Graph 集群的镜像信息。

2. 创建 Nebula Graph 集群。

```bash
kubectl create -f apps_v1alpha1_nebulacluster.yaml
Expand All @@ -126,7 +249,25 @@
nebulacluster.apps.nebula-graph.io/nebula created
```

3. 查看 Nebula Graph 集群状态。
3. 配置集群 License。

!!! enterpriseonly

- 此步骤只适用于创建企业版 Nebula Graph集群。

- 创建社区版 Nebula Graph 集群时,忽略此步骤。

```bash
kubectl create secret generic nebula-license --from-file=nebula.license
```

查看集群 License 信息:

```bash
kubectl get secrets nebula-license -o yaml
```

4. 查看 Nebula Graph 集群状态。

```bash
kubectl get nebulaclusters.apps.nebula-graph.io nebula
Expand Down
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ theme:
features:
- navigation.top
- header.autohide
- content.tabs.link
language: 'zh'

extra_css:
Expand All @@ -57,6 +58,8 @@ markdown_extensions:
generic: true
- pymdownx.caret
- pymdownx.tilde
- pymdownx.superfences
- pymdownx.tabbed

# Plugins
plugins:
Expand Down