Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

【User 文档】弹性运维调度系统 module-controller 搭建部署文档 #3

Closed
lylingzhen opened this issue Jul 27, 2023 · 1 comment
Assignees

Comments

@lylingzhen
Copy link
Contributor

lylingzhen commented Jul 27, 2023

demo 应用准备

基座准备

dynamic-stock-mng
https://github.com/sofastack-guides/sofa-ark-dynamic-guides

注:本地构建建议使用最新版本 arklet。

构建基座镜像

在本地使用 docker 构建镜像:
docker buildx build --platform linux/amd64 -t dynamic-stock-mng .
docker tag [ImageId] serverless-registry.cn-shanghai.cr.aliyuncs.com/opensource/test/dynamic-stock-mng:[镜像版本号]
docker push serverless-registry.cn-shanghai.cr.aliyuncs.com/opensource/test/dynamic-stock-mng:[镜像版本号]

注意: 使用 docker buildx build --platform linux/amd64 , build for multiple architectures

模块准备
dynamic-provider
上传OSS: http://serverless-opensource.oss-cn-shanghai.aliyuncs.com/module-packages/stable/dynamic-provider-1.0.0-ark-biz.jar?Expires=1690827422&OSSAccessKeyId=TMP.3KkBner42hKhywrbHcxUSvaypwEqSV6P2nFhdxU6CFA3Z3FW9FNwWBLvBiNXMfwhLXEhSSiMLx6f25ynecTYD4fjVQXWys&Signature=FPMoPLiDZdYS6nE%2Fb8GG1Vw3Ik0%3D

Operator 准备

构建 Operator 镜像

在本地使用 docker 构建镜像:
docker buildx build --platform linux/amd64 -t module-deployment .
docker tag [ImageId] serverless-registry.cn-shanghai.cr.aliyuncs.com/opensource/test/module-deployment:[镜像版本号]

部署

本地使用 minikue kubectl 部署 CRD、RBAC、测试基座、Operator 等

部署CRD

kubectl apply -f /module-deployment/config/crd/bases/module-deployment.serverless.alipay.com_moduledeployments.yaml kubectl apply -f /module-deployment/config/crd/bases/module-deployment.serverless.alipay.com_modulereplicasets.yaml
kubectl apply -f /module-deployment/config/crd/bases/module-deployment.serverless.alipay.com_modules.yaml kubectl apply -f /module-deployment/config/crd/bases/module-deployment.serverless.alipay.com_moduletemplates.yaml

部署RBAC

kubectl apply -f /module-deployment/config/rbac/role.yaml kubectl apply -f /module-deployment/config/rbac/role_binding.yaml
kubectl apply -f <?>/module-deployment/config/rbac/service_account.yaml

部署 demo 应用

kubectl apply -f <?>/module-deployment/config/samples/dynamic-stock-deployment.yaml
为demo应用配置了slb,可访问: 139.224.111.169:8080

部署 operator

kubectl apply -f <?>/module-deployment/config/samples/dynamic-stock-deployment.yaml


演示

副本数为1 的ModuleDeployment
kubectl apply -f <?>/module-deployment/config/samples/module-deployment_v1alpha1_moduledeployment.yaml
确认产生 ModuleDeployment ModuleReplicaSet 资源,确认长出一个 module。


kubectl get moduledeployment
kubectl get modulereplicaset
kubectl get module -oyaml
确认对应的pod上热部署了模块


资源 module 的ownereference 和其中的 label 都包含对应的pod信息。
登陆pod,确认 module 已安装。


扩容到 5
确认 module
kubectl get module
http://139.224.111.169:8080/ 已经可访问


缩容到 3
确认 module instance 只有 3 个,2 个模块已从机器上卸载

@lylingzhen lylingzhen self-assigned this Jul 27, 2023
@lylingzhen lylingzhen changed the title 搭建从运维调度组件到客户端全链路开发测试环境和文档 搭建从运维调度组件到客户端全链路本地开发测试文档 Aug 7, 2023
@lylingzhen lylingzhen changed the title 搭建从运维调度组件到客户端全链路本地开发测试文档 弹性运维调度系统本地开发测试文档 Aug 15, 2023
@lylingzhen
Copy link
Contributor Author

#26 中跟进。

@lylingzhen lylingzhen changed the title 弹性运维调度系统本地开发测试文档 【使用者文档】弹性运维调度系统本地开发测试文档 Aug 28, 2023
@lylingzhen lylingzhen changed the title 【使用者文档】弹性运维调度系统本地开发测试文档 【User 文档】弹性运维调度系统本地开发测试文档 Aug 28, 2023
@lylingzhen lylingzhen changed the title 【User 文档】弹性运维调度系统本地开发测试文档 【User 文档】弹性运维调度系统搭建部署文档 Aug 28, 2023
@lylingzhen lylingzhen changed the title 【User 文档】弹性运维调度系统搭建部署文档 【User 文档】弹性运维调度系统 module-controller 搭建部署文档 Aug 28, 2023
yuanyuancin pushed a commit that referenced this issue Dec 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant