From dafba2385041cba6566fd6c0a9283fc6782ba46a Mon Sep 17 00:00:00 2001 From: Abby <78209557+abby-cyber@users.noreply.github.com> Date: Wed, 10 Nov 2021 11:27:42 +0800 Subject: [PATCH 1/4] Create 9.upgrade-nebula-cluster.md --- .../9.upgrade-nebula-cluster.md | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md diff --git a/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md b/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md new file mode 100644 index 00000000000..8cd41d07c2a --- /dev/null +++ b/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md @@ -0,0 +1,117 @@ +# 升级Nebula Graph集群 + +本文介绍如何升级Nebula Graph集群。 + +## 前提条件 + +已创建Nebula Graph集群。具体步骤,参见[使用Kubectl创建Nebula Graph集群](3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md)。 + +## 使用限制 + +只支持升级Nebula Graph 2.5.x至2.6.x版本。 + +## 操作步骤 + +本文示例中的被升级集群的YAML名为`apps_v1alpha1_nebulacluster.yaml`,版本为2.5.1。 + +1. 查看集群中服务的镜像版本。 + + ```bash + kubectl get pods -l app.kubernetes.io/cluster=nebula -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq -c + ``` + + 返回: + + ```bash + 1 vesoft/nebula-graphd:v2.5.1 + 1 vesoft/nebula-metad:v2.5.1 + 3 vesoft/nebula-storaged:v2.5.1 + ``` + +2. 编辑`apps_v1alpha1_nebulacluster.yaml`并将所有`version`的值从v2.5.1修改至{{nebula.branch}}。 + + 修改后的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: 2 + image: vesoft/nebula-graphd + version: {{nebula.branch}} //将值从v2.5.1修改至{{nebula.branch}}。 + service: + type: NodePort + externalTrafficPolicy: Local + storageClaim: + resources: + requests: + storage: 2Gi + storageClassName: local-path + metad: + resources: + requests: + cpu: "500m" + memory: "500Mi" + limits: + cpu: "1" + memory: "1Gi" + replicas: 1 + image: vesoft/nebula-metad + version: {{nebula.branch}} //将值从v2.5.1修改至{{nebula.branch}}。 + storageClaim: + resources: + requests: + storage: 2Gi + storageClassName: local-path + storaged: + resources: + requests: + cpu: "500m" + memory: "500Mi" + limits: + cpu: "1" + memory: "1Gi" + replicas: 3 + image: vesoft/nebula-storaged + version: {{nebula.branch}} //将值从v2.5.1修改至{{nebula.branch}}。 + storageClaim: + resources: + requests: + storage: 2Gi + storageClassName: local-path + reference: + name: statefulsets.apps + version: v1 + schedulerName: default-scheduler + imagePullPolicy: IfNotPresent + ``` + +3. 执行以下命令将版本升级的更新应用于集群CR中。 + + ```bash + kubectl apply -f apps_v1alpha1_nebulacluster.yaml + ``` + +4. 等待约2分钟后,执行以下命令可查看到服务的镜像版本变更为{{nebula.branch}}。 + + ```bash + kubectl get pods -l app.kubernetes.io/cluster=nebula -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq -c + ``` + + 返回: + + ```bash + 1 vesoft/nebula-graphd:v2.6.1 + 1 vesoft/nebula-metad:v2.6.1 + 3 vesoft/nebula-storaged:v2.6.1 + ``` \ No newline at end of file From e7f152c060d31b8e73b71c9746488a0bb70b3b57 Mon Sep 17 00:00:00 2001 From: Abby <78209557+abby-cyber@users.noreply.github.com> Date: Wed, 10 Nov 2021 15:28:25 +0800 Subject: [PATCH 2/4] Update 9.upgrade-nebula-cluster.md --- docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md b/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md index 8cd41d07c2a..ed1c3ad128b 100644 --- a/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md +++ b/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md @@ -1,6 +1,6 @@ # 升级Nebula Graph集群 -本文介绍如何升级Nebula Graph集群。 +Nebula Operator支持升级Nebula Graph集群。本文介绍如何升级Nebula Graph集群。 ## 前提条件 From ff9eebe03693edcf04bbeb4817dc1e121f8648b9 Mon Sep 17 00:00:00 2001 From: Abby <78209557+abby-cyber@users.noreply.github.com> Date: Thu, 11 Nov 2021 10:03:11 +0800 Subject: [PATCH 3/4] Update 9.upgrade-nebula-cluster.md --- docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md b/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md index ed1c3ad128b..a6258f098f3 100644 --- a/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md +++ b/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md @@ -1,18 +1,20 @@ # 升级Nebula Graph集群 -Nebula Operator支持升级Nebula Graph集群。本文介绍如何升级Nebula Graph集群。 +本文介绍如何升级通过Nebula Operator创建的Nebula Graph集群。 ## 前提条件 已创建Nebula Graph集群。具体步骤,参见[使用Kubectl创建Nebula Graph集群](3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md)。 +本文示例中待升级的Nebula Graph版本为2.5.1,其YAML文件名为`apps_v1alpha1_nebulacluster.yaml`。 + ## 使用限制 -只支持升级Nebula Graph 2.5.x至2.6.x版本。 +- 只支持使用Nebula Operator创建的Nebula Graph集群。 -## 操作步骤 +- 只支持升级Nebula Graph 2.5.x至2.6.x版本。 -本文示例中的被升级集群的YAML名为`apps_v1alpha1_nebulacluster.yaml`,版本为2.5.1。 +## 操作步骤 1. 查看集群中服务的镜像版本。 From c507832403758471a5c783ab38b71ba3d9febf2c Mon Sep 17 00:00:00 2001 From: Abby <78209557+abby-cyber@users.noreply.github.com> Date: Thu, 11 Nov 2021 11:09:49 +0800 Subject: [PATCH 4/4] Update 9.upgrade-nebula-cluster.md --- docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md b/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md index a6258f098f3..22ad1eb2f3b 100644 --- a/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md +++ b/docs-2.0/nebula-operator/9.upgrade-nebula-cluster.md @@ -113,7 +113,7 @@ 返回: ```bash - 1 vesoft/nebula-graphd:v2.6.1 - 1 vesoft/nebula-metad:v2.6.1 - 3 vesoft/nebula-storaged:v2.6.1 + 1 vesoft/nebula-graphd:{{nebula.branch}} + 1 vesoft/nebula-metad:{{nebula.branch}} + 3 vesoft/nebula-storaged:{{nebula.branch}} ``` \ No newline at end of file