Added upgrade article for kubevela version 1.2.5 (#678)
* Added upgrade article for bizworks Signed-off-by: jingliming <lmjingsd@163.com> * Correct spelling mistakes Signed-off-by: jingliming <lmjingsd@163.com> * Update blog/2022-05-27-kubevela-1.2.5-upgrade-practice.md Co-authored-by: Jianbo Sun <wonderflow@icloud.com> Signed-off-by: jingliming <lmjingsd@163.com> * mv 1.2.5 upgrade doc to system-operation Signed-off-by: jingliming <lmjingsd@163.com> * add sidecar && mv 1.2.5 upgrade doc to version doc folder Signed-off-by: jingliming <lmjingsd@163.com> * mv 1.2.5 upgrade docs to global sidecar Signed-off-by: jingliming <lmjingsd@163.com> Co-authored-by: Jianbo Sun <wonderflow@icloud.com>
This commit is contained in:
parent
305a6c271c
commit
7102592171
|
|
@ -0,0 +1,84 @@
|
|||
---
|
||||
title: Upgrade KubeVela from 1.1.5 to 1.2.5
|
||||
---
|
||||
|
||||
## Introduction
|
||||
This article is the operation manual for KubeVela to upgrade from 1.1.5 to 1.2.5 with deployed business applications. If you currently have no business applications deployed in KubeVela and no addons are enabled, you can directly refer to the official [upgrade document](https://kubevela. io/en/docs/v1.2/platform-engineers/advanced-install#%E5%8D%87%E7%BA%A7) to upgrade.
|
||||
|
||||
## Introduction to upgrade steps
|
||||
### Preparation before upgrading
|
||||
The following are the inspection items that need to be prepared before upgrading, you can compare them according to your actual situation
|
||||
- 1.2.5 CRD, which can be obtained in [Official website source file](https://github.com/kubevela/kubevela/tree/v1.2.5/charts/vela-core)
|
||||
- KubeVela[offline mirror](https://kubevela.io/zh/docs/v1.2/platform-engineers/system-operation/offline-installation) for offline deployment or using [velad](https:/ /github.com/oam-dev/velad)
|
||||
- Custom Definition
|
||||
### Check the KubeVela service
|
||||
This step is mainly to check whether KubeVela is running normally. If the pod is not in a ready state, in theory, the automatic execution of the upgrade script should be prohibited. Manual intervention is required to fix the KubeVela running state first.
|
||||
```
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
pod/kubevela-cluster-gateway-5bff6d564d-rhkp7 1/1 Running 0 16d
|
||||
pod/kubevela-vela-core-b67b87c7-9w7d4 1/1 Running 1 16d
|
||||
|
||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||
service/kubevela-cluster-gateway-service ClusterIP 172.16.236.150 <none> 9443/TCP 16d
|
||||
service/vela-core-webhook ClusterIP 172.16.54.195 <none> 443/TCP 284d
|
||||
|
||||
NAME READY UP-TO-DATE AVAILABLE AGE
|
||||
deployment.apps/kubevela-cluster-gateway 1/1 1 1 16d
|
||||
deployment.apps/kubevela-vela-core 1/1 1 1 284d
|
||||
|
||||
NAME DESIRED CURRENT READY AGE
|
||||
replicaset.apps/kubevela-cluster-gateway-5bff6d564d 1 1 1 16d
|
||||
replicaset.apps/kubevela-vela-core-569669cfb5 0 0 0 136d
|
||||
replicaset.apps/kubevela-vela-core-75bcc6b64 0 0 0 226d
|
||||
replicaset.apps/kubevela-vela-core-78cf7cb5c7 0 0 0 225d
|
||||
replicaset.apps/kubevela-vela-core-b67b87c7 1 1 1 16d
|
||||
replicaset.apps/kubevela-vela-core-cfc54f68f 0 0 0 223d
|
||||
replicaset.apps/kubevela-vela-core-ff5fcbc44 0 0 0 284d
|
||||
```
|
||||
In addition, it is also necessary to check whether the status of the application and workload enabled by the corresponding addon is normal.
|
||||
### update the CRD
|
||||
Update the CRD of version 1.2.5 to the cluster, the CRD list is as follows
|
||||
```shell
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_applicationrevisions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_applications.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_componentdefinitions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_definitionrevisions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_envbindings.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_healthscopes.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_manualscalertraits.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_policydefinitions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_resourcetrackers.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_scopedefinitions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_traitdefinitions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_workflowstepdefinitions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_workloaddefinitions.yaml
|
||||
kubectl apply -f /path/to/your/crds/standard.oam.dev_rollouts.yaml
|
||||
```
|
||||
### Execute the upgrade command
|
||||
This step is the key step to upgrade KubeVela. The execution command is as follows
|
||||
``` shell
|
||||
helm upgrade -n vela-system --install kubevela kubevela/vela-core --version 1.2.5 --wait
|
||||
```
|
||||
### Enable addon
|
||||
After the upgrade is successful, users can use the following methods to enable addonss if they need to be enabled
|
||||
```shell
|
||||
# View the list of addons
|
||||
vela addon list
|
||||
# Enable addon
|
||||
vela addon enable xxx
|
||||
```
|
||||
⚠️Note: This step is not required if the addon is already enabled and used in the pre-upgrade version
|
||||
### Update custom definition
|
||||
After the addon is enabled, update the custom definition to KubeVela. If there is no custom definition, you can skip it, and the normal upgrade process is completed!
|
||||
## Q&A
|
||||
The following are the problems and solutions you can encounter during the upgrade from 1.1.5 to 1.2.5.
|
||||
- Q: After upgrading from 1.1.5 to 1.2.5, the application status becomes workflowsuspending, and using workflow resume is invalid
|
||||
- A: The reason is that rt already exists. Check the status of the application to see the specific reason. The solution is to delete rt and use workflow resume xxx.
|
||||
- Q: How to solve the business application in workflow suspending state
|
||||
- A: After the update, the status of apply changes to running, so if the status of the application does not affect the business process, it can be resolved automatically after the user operation is upgraded.
|
||||
- Q: The application associated with the flux addon used, the status is always workflowsuspending
|
||||
- A: This can only be restored by manually deleting rt and then executing vela workflow resume. Generally, it does not affect normal use. It can be restored during subsequent upgrades.
|
||||
- Q: The rollout of the stock may fail to deploy the update components
|
||||
- A: Solve by replacing the ownreferences of the stock controllerrevision and point the controllerrevision to the application
|
||||
- Q: The updated definition file found that it did not take effect
|
||||
- A: You need to modify the flux application, remove componentDefinition and traitDefinition
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
---
|
||||
title: Kubevela 1.1.5升级到1.2.5参考文档
|
||||
---
|
||||
## 一、前言
|
||||
此文章为已部署业务应用的KubeVela由1.1.5升级到1.2.5的操作手册,如果您当前KubeVela未部署业务应用并且未启用插件,可以直接参照官方[升级文档](https://kubevela.io/zh/docs/v1.2/platform-engineers/advanced-install#%E5%8D%87%E7%BA%A7)进行升级。
|
||||
## 二、升级步骤
|
||||
### 2.1 升级前准备
|
||||
以下是升级前需要准备的检查项,可以按照自己实际情况对照
|
||||
- 1.2.5 CRD,可以在[官网源码文件](https://github.com/kubevela/kubevela/tree/v1.2.5/charts/vela-core)中获取
|
||||
- KubeVela[离线镜像](https://kubevela.io/zh/docs/v1.2/platform-engineers/system-operation/offline-installation),用于离线化部署或使用[velad](https://github.com/oam-dev/velad)
|
||||
- 自定义Definition
|
||||
### 2.2 第一步 检查KubeVela服务
|
||||
该步骤主要是检查KubeVela运行是否正常,如果pod不为就绪状态,则理论上应该禁止自动执行升级脚本。需要人工介入先修复KubeVela运行状态。
|
||||
```
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
pod/kubevela-cluster-gateway-5bff6d564d-rhkp7 1/1 Running 0 16d
|
||||
pod/kubevela-vela-core-b67b87c7-9w7d4 1/1 Running 1 16d
|
||||
|
||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||
service/kubevela-cluster-gateway-service ClusterIP 172.16.236.150 <none> 9443/TCP 16d
|
||||
service/vela-core-webhook ClusterIP 172.16.54.195 <none> 443/TCP 284d
|
||||
|
||||
NAME READY UP-TO-DATE AVAILABLE AGE
|
||||
deployment.apps/kubevela-cluster-gateway 1/1 1 1 16d
|
||||
deployment.apps/kubevela-vela-core 1/1 1 1 284d
|
||||
|
||||
NAME DESIRED CURRENT READY AGE
|
||||
replicaset.apps/kubevela-cluster-gateway-5bff6d564d 1 1 1 16d
|
||||
replicaset.apps/kubevela-vela-core-569669cfb5 0 0 0 136d
|
||||
replicaset.apps/kubevela-vela-core-75bcc6b64 0 0 0 226d
|
||||
replicaset.apps/kubevela-vela-core-78cf7cb5c7 0 0 0 225d
|
||||
replicaset.apps/kubevela-vela-core-b67b87c7 1 1 1 16d
|
||||
replicaset.apps/kubevela-vela-core-cfc54f68f 0 0 0 223d
|
||||
replicaset.apps/kubevela-vela-core-ff5fcbc44 0 0 0 284d
|
||||
```
|
||||
此外也需要检查开启的对应插件启用的application和workload状态是否正常。
|
||||
### 2.3 第二步 更新CRD
|
||||
将1.2.5版本的CRD更新到集群,CRD列表如下
|
||||
```shell
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_applicationrevisions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_applications.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_componentdefinitions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_definitionrevisions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_envbindings.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_healthscopes.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_manualscalertraits.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_policydefinitions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_resourcetrackers.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_scopedefinitions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_traitdefinitions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_workflowstepdefinitions.yaml
|
||||
kubectl apply -f /path/to/your/crds/core.oam.dev_workloaddefinitions.yaml
|
||||
kubectl apply -f /path/to/your/crds/standard.oam.dev_rollouts.yaml
|
||||
```
|
||||
### 2.4 第三步 执行升级命令
|
||||
该步骤为升级KubeVela关键步骤,执行命令如下
|
||||
``` shell
|
||||
helm upgrade -n vela-system --install kubevela kubevela/vela-core --version 1.2.5 --wait
|
||||
```
|
||||
### 2.5 第四步 开启插件
|
||||
升级成功后,如果有需要启用的插件可以自行使用如下方式开启
|
||||
```shell
|
||||
# 查看插件列表
|
||||
vela addon list
|
||||
# 启用插件
|
||||
vela addon enable xxx
|
||||
```
|
||||
⚠️注意: 如果已经在升级前版本已经启用插件并使用,不需要执行此步骤
|
||||
### 2.6 第五步 更新自定义definition
|
||||
开启插件后,将自定义的definition更新到KubeVela,如果没有自定义definition可以跳过,自此正常的升级流程完成!
|
||||
## 三、问题与解决
|
||||
以下是在升级1.1.5到1.2.5过程中您可以遇到的问题与解决办法
|
||||
- Q: 1.1.5升级到1.2.5后,application状态变为workflowsuspending,使用workflow resume无效
|
||||
- A: 原因为rt已存在,查看application的status可看到具体原因,解决办法为删除rt后使用workflow resume xxx。
|
||||
- Q: workflowsuspending状态的业务application如何解决
|
||||
- A: 通过更新后apply状态变为running,因此如果application的状态不影响业务流程的话,可以在后续更新部署后自动解决。
|
||||
- Q: 使用的flux addon关联的application,状态一直为workflowsuspending
|
||||
- A: 这个只能通过手动删除rt,然后执行vela workflow resume才可以恢复,一般不影响正常使用,后续升级的时候再行恢复。
|
||||
- Q: 存量的rollout会存在更新组件部署失败的情况
|
||||
- A: 通过更换存量controllerrevision的ownereferences解决,将controllerrevision指向application
|
||||
- Q: 更新definition文件发现没有生效
|
||||
- A: 需要修改flux的application,去除componentDefinition和traitDefinition
|
||||
|
|
@ -100,6 +100,7 @@ module.exports = {
|
|||
'platform-engineers/system-operation/bootstrap-parameters',
|
||||
'platform-engineers/advanced-install',
|
||||
'platform-engineers/system-operation/vela-cli-image',
|
||||
'platform-engineers/system-operation/1.2.5-upgrade-practice'
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue