From 5ab42d0bb67c9aef3c94d80bf898473b70f9e8a6 Mon Sep 17 00:00:00 2001 From: "abby.huang" <78209557+abby-cyber@users.noreply.github.com> Date: Wed, 11 May 2022 18:19:50 +0800 Subject: [PATCH] Update 3.1create-cluster-with-kubectl.md (#1359) * Update 3.1create-cluster-with-kubectl.md * Update 3.1create-cluster-with-kubectl.md Co-authored-by: cooper-lzy <78672629+cooper-lzy@users.noreply.github.com> --- .../3.1create-cluster-with-kubectl.md | 295 +++++++++++++----- 1 file changed, 220 insertions(+), 75 deletions(-) diff --git a/docs-2.0/nebula-operator/3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md b/docs-2.0/nebula-operator/3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md index 3f7c9e355f2..1bb4610b3c4 100644 --- a/docs-2.0/nebula-operator/3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md +++ b/docs-2.0/nebula-operator/3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md @@ -6,7 +6,12 @@ ## Prerequisites -[Install Nebula Operator](../2.deploy-nebula-operator.md) +- [Install Nebula Operator](../2.deploy-nebula-operator.md) +- You have prepared the license file for Nebula Graph Enterprise Edition clusters. + + !!! enterpriseonly + + The license file is required only when creating a Nebula Graph Enterprise Edition cluster. ## Create clusters @@ -16,79 +21,195 @@ The following example shows how to create a Nebula Graph cluster by creating a c The file contents are as follows: - ```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 - ``` + === "Community Edition" + + ```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 + ``` + + === "Enterprise Edition" + + ```yaml + # Contact our sales team to get a complete Nebula Graph Enterprise Edition cluster YAML example. + + 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 + ``` The parameters in the file are described as follows: @@ -113,6 +234,11 @@ The following example shows how to create a Nebula Graph cluster by creating a c | `spec.reference.name` | - | The name of the dependent controller. | | `spec.schedulerName` | - | The scheduler name. | | `spec.imagePullPolicy` | The image policy to pull the Nebula Graph image. For details, see [Image pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy). | The image pull policy in Kubernetes. | + | `spec.metad.license` | - | The configuration of the license for creating a Nebula Graph Enterprise Edition cluster. | + + !!! enterpriseonly + + Make sure that you have access to Nebula Graph Enterprise Edition images before pulling the image. For details, contact our sales team ([inqury@vesoft.com](mailto:inqury@vesoft.com)) 2. Create a Nebula Graph cluster. @@ -126,7 +252,26 @@ The following example shows how to create a Nebula Graph cluster by creating a c nebulacluster.apps.nebula-graph.io/nebula created ``` -3. Check the status of the Nebula Graph cluster. +3. Configure the license for the Enterprise Edition cluster. + + !!! enterpriseonly + + - This step is required only for creating a Nebula Grpah Enterprise Edition cluster. + + - Ignore this step if you are creating a Nebula Graph Community Edition cluster. + + + ```bash + kubectl create secret generic nebula-license --from-file=nebula.license + ``` + + To check the details of the license, run the following command: + + ```bash + kubectl get secrets nebula-license -o yaml + ``` + +4. Check the status of the Nebula Graph cluster. ```bash kubectl get nebulaclusters.apps.nebula-graph.io nebula