- 微服务开发框架升级
- 添加Choerodon Chart仓库
- 升级register server
- 升级config server
- 升级manager service
- 升级iam service
- 升级api gateway
- 升级gateway helper
- 升级oauth server
- 升级event store service
- 升级file service
- 升级choerodon iam front
- DevOps服务升级
- 升级devops service
- 升级gitlab service
- 敏捷管理升级
- 升级整合前端
- 升级choerodon front
- 升级choerodon front
微服务开发框架升级
请按以下顺序依次进行升级部署,请不要随意调整升级顺序。升级后可能数据库结构会发生改变,故不能进行版本回退。文档升级命令中的RELEASE NAME是在基于分步安装文档之上编写的,若你在安装时指定了其他RELEASE NAME,请以你安装时指定的RELEASE NAME为准。一键部署安装的请执行helm list命令查看RELEASE NAME。
添加Choerodon Chart仓库
helm repo add c7n https://openchart.choerodon.com.cn/choerodon/c7n/
helm repo update
升级register server
- 升级服务
helm upgrade register-server c7n/go-register-server \
-f <(helm get values register-server) \
--version=0.7.1
验证升级
- 验证命令
curl $(kubectl get svc register-server -o jsonpath="{.spec.clusterIP}" -n choerodon-devops-prod):8000/eureka/apps
- 出现以下类似信息即为成功升级
{
"name": "go-register-server",
"instance": [
{
"instanceId": "192.168.3.19:go-register-server:8000",
"hostName": "192.168.3.19",
"app": "go-register-server",
"ipAddr": "192.168.3.19",
"status": "UP",
"overriddenstatus": "UNKNOWN",
"port": {
"@enabled": true,
"$": 8000
},
"securePort": {
"@enabled": false,
"$": 443
},
"countryId": 8,
"dataCenterInfo": {
"name": "MyOwn",
"@class": "com.netflix.appinfo.InstanceInfo$DefaultDataCenterInfo"
},
"leaseInfo": {
"renewalIntervalInSecs": 10,
"durationInSecs": 90,
"registrationTimestamp": 1528201698,
"lastRenewalTimestamp": 1528201698,
"evictionTimestamp": 0,
"serviceUpTimestamp": 1528201698
},
"metadata": {
"VERSION": "0.7.0"
},
"homePageUrl": "http://192.168.3.19:8000/",
"statusPageUrl": "http://192.168.3.19:8000/info",
"healthCheckUrl": "http://192.168.3.19:8000/health",
"vipAddress": "go-register-server",
"secureVipAddress": "go-register-server",
"isCoordinatingDiscoveryServer": true,
"lastUpdatedTimestamp": 1528201698,
"lastDirtyTimestamp": 1528201698,
"actionType": "ADDED"
}
]
}
升级config server
- 升级服务
helm upgrade config-server c7n/config-server \
-f <(helm get values config-server) \
--version=0.7.0
验证升级
- 验证命令
curl -s $(kubectl get po -n choerodon-devops-prod -l choerodon.io/release=config-server -o jsonpath="{.items[0].status.podIP}"):8011/health | jq -r .status
- 出现以下类似信息即为成功升级
UP
升级manager service
- 升级服务
helm upgrade manager-service c7n/manager-service \
-f <(helm get values manager-service) \
--version=0.7.0
验证升级
- 验证命令
curl -s $(kubectl get po -n choerodon-devops-prod -l choerodon.io/release=manager-service -o jsonpath="{.items[0].status.podIP}"):8964/health | jq -r .status
- 出现以下类似信息即为成功升级
UP
升级iam service
- 升级服务
helm upgrade iam-service c7n/iam-service \
-f <(helm get values iam-service) \
--version=0.7.0
验证升级
- 验证命令
curl -s $(kubectl get po -n choerodon-devops-prod -l choerodon.io/release=iam-service -o jsonpath="{.items[0].status.podIP}"):8031/health | jq -r .status
- 出现以下类似信息即为成功升级
UP
升级api gateway
- 升级服务
helm upgrade api-gateway c7n/api-gateway \
-f <(helm get values api-gateway) \
--version=0.7.0
验证升级
- 验证命令
curl -s $(kubectl get po -n choerodon-devops-prod -l choerodon.io/release=api-gateway -o jsonpath="{.items[0].status.podIP}"):8081/health | jq -r .status
- 出现以下类似信息即为成功升级
UP
升级gateway helper
- 升级服务
helm upgrade gateway-helper c7n/gateway-helper \
-f <(helm get values gateway-helper) \
--version=0.7.0
验证升级
- 验证命令
curl -s $(kubectl get po -n choerodon-devops-prod -l choerodon.io/release=gateway-helper -o jsonpath="{.items[0].status.podIP}"):9181/health | jq -r .status
- 出现以下类似信息即为成功升级
UP
升级oauth server
- 升级服务
helm upgrade oauth-server c7n/oauth-server \
-f <(helm get values oauth-server) \
--version=0.7.1
验证升级
- 验证命令
curl -s $(kubectl get po -n choerodon-devops-prod -l choerodon.io/release=oauth-server -o jsonpath="{.items[0].status.podIP}"):8021/health | jq -r .status
- 出现以下类似信息即为成功升级
UP
升级event store service
- 升级服务
helm upgrade event-store-service c7n/event-store-service \
-f <(helm get values event-store-service) \
--version=0.7.0
验证升级
- 验证命令
curl -s $(kubectl get po -n choerodon-devops-prod -l choerodon.io/release=event-store-service -o jsonpath="{.items[0].status.podIP}"):9011/health | jq -r .status
- 出现以下类似信息即为成功升级
UP
升级file service
- 升级服务
helm upgrade file-service c7n/file-service \
-f <(helm get values file-service) \
--version=0.7.0
验证升级
- 验证命令
curl -s $(kubectl get po -n choerodon-devops-prod -l choerodon.io/release=file-service -o jsonpath="{.items[0].status.podIP}"):9091/health | jq -r .status
- 出现以下类似信息即为成功升级
UP
升级choerodon iam front
- 升级服务
helm upgrade choerodon-front-iam c7n/choerodon-front-iam \
-f <(helm get values choerodon-front-iam) \
--version=0.7.0
验证升级
- 验证命令
curl $(kubectl get svc choerodon-front-iam -o jsonpath="{.spec.clusterIP}" -n choerodon-devops-prod)
- 出现以下类似信息即为成功升级
<!DOCTYPE html><html><head><meta http-equiv="Content-type"content="text/html; charset=utf-8"><title>Choerodon</title><link rel="shortcut icon"href="favicon.ico"></head><body><div id="app"></div><script type="text/javascript"src="app/vendor_19e4b950.js"></script><script type="text/javascript"src="app/main_19e4b950.js"></script></body></html>
DevOps服务升级
升级devops service
- 升级服务
helm upgrade devops-service c7n/devops-service \
-f <(helm get values devops-service) \
--set env.open.TEMPLATE_VERSION_MICROSERVICE="0.7.0" \
--set env.open.TEMPLATE_VERSION_MICROSERVICEFRONT="0.7.0" \
--set env.open.TEMPLATE_VERSION_JAVALIB="0.7.0" \
--version=0.7.0
验证升级
- 验证命令
curl -s $(kubectl get po -n choerodon-devops-prod -l choerodon.io/release=devops-service -o jsonpath="{.items[0].status.podIP}"):8061/health | jq -r .status
- 出现以下类似信息即为成功升级
UP
升级gitlab service
- 升级服务
helm upgrade gitlab-service c7n/gitlab-service \
-f <(helm get values gitlab-service) \
--version=0.7.0
验证升级
- 验证命令
curl -s $(kubectl get po -n choerodon-devops-prod -l choerodon.io/release=gitlab-service -o jsonpath="{.items[0].status.podIP}"):8071/health | jq -r .status
- 出现以下类似信息即为成功升级
UP
敏捷管理升级
- 升级服务
helm upgrade agile-service c7n/agile-service \
-f <(helm get values agile-service) \
--version=0.6.0
验证升级
- 验证命令
curl -s $(kubectl get po -n choerodon-devops-prod -l choerodon.io/release=agile-service -o jsonpath="{.items[0].status.podIP}"):8379/health | jq -r .status
- 出现以下类似信息即为成功升级
UP
升级整合前端
升级choerodon front
- 升级服务
前端添加了PRO_FILE_SERVER
用于指定文件存储服务Minio的地址,注意替换为真实的地址
helm upgrade choerodon-front c7n/choerodon-front \
-f <(helm get values choerodon-front) \
--set env.open.PRO_FILE_SERVER="http://minio.example.choerodon.io" \
--version=0.7.1
验证升级
- 验证命令
curl $(kubectl get svc choerodon-front -o jsonpath="{.spec.clusterIP}" -n choerodon-devops-prod)
- 出现以下类似信息即为成功升级
<!DOCTYPE html><html><head><meta http-equiv="Content-type"content="text/html; charset=utf-8"><title>Choerodon</title><link rel="shortcut icon"href="favicon.ico"></head><body><div id="app"></div><script type="text/javascript"src="app/vendor_19e4b950.js"></script><script type="text/javascript"src="app/main_19e4b950.js"></script></body></html>
在访问搭建好的Choerodon的api,
api.example.choerodon.io/manager/swagger-ui.html
,选择iam_service
->client-controller
->创建client
- 认证请使用用户名:admin,密码:admin
- 提交以下数据,注意正式搭建时请替换以下值为真实值
{
"accessTokenValidity": 60,
"additionalInformation": "",
"authorizedGrantTypes": "implicit,client_credentials,authorization_code,refresh_token",
"autoApprove": "default",
"name": "choerodon",
"objectVersionNumber": 0,
"organizationId": 1,
"refreshTokenValidity": 60,
"resourceIds": "default",
"scope": "default",
"secret": "secret",
"webServerRedirectUri": "http://choerodon.example.choerodon.io"
}