Comments (4)
-
目前使用的 supervisord 模板是: https://github.com/Tencent/bk-PaaS/blob/master/paas-ce/paasagent/etc/templates/supervisord.conf
-
而模板渲染的操作是在go代码中做的, 由于存在一系列系统于定义约定, 所以暂时逻辑都在代码中
-
可以根据需求自行修改
自定义 supervisor 启动进程, 是希望什么形式的? 能否具体描述下, 如果PaaS提供的这种能力, SaaS如何进行自定义?
from bk-paas.
提出这个需求是因为以下原因:
- SaaS 希望启动监听不同队列且使用不同并发策略的 celery worker 来对 worker 进行更加精细的划分,所以希望能够自定义 celery worker 的启动命令
目前看来可以先只满足自定义 celery worker 进程的启动命令,至于启动目录,日志文件等选项可以保持不变。
自定义方式大致如下:
- 在 SaaS 软件包中的
app.yml
文件中定义自定义 celery 的命令,例如:
celery workers:
- {{python}} manage.py celery worker -Q pipeline -n pipeline_worker@%h -c 6 -l info --maxtasksperchild=50
- celery worker -A blueapps.core.celery -P gevent -Q service_schedule -c 100 -l info -n schedule_worker@%h --maxtasksperchild=50
- {{python}} manage.py celery worker -Q pipeline_additional_task -n common_worker@%h -c 6 -l info --maxtasksperchild=50
- 在渲染 supervisord 模板时,根据是否有自定义 celery worker 启动命令来决定渲染策略:
- 无:走默认渲染策略
- 有:使用用户配置的命令渲染模板
from bk-paas.
- 这里的逻辑类似heroku buildpack的procfile, 一切启动命令可以由用户自行指定;
- 当前基于virtualenv/docker的企业版社区版暂时不支持, 这个需求我们会评估下
from bk-paas.
企业版的paas_agent 2.5.11 已支持自定义启动命令
社区版或开源版可以自行改造:
- 在源代码根路径下建立约定文件, 例如 support-files/supervisord.conf
- 修改paas_agent部署的build shell脚本, 检测源代码目录, 存在的话优先使用源代码中的文件
from bk-paas.
Related Issues (20)
- 部署后登录报错Invalid APP Code [bk_app_code=bk_paas], please confirm if the APP Code has been registered HOT 1
- 2.4.14 paas部署失败,无法migrate和启动项目
- Lesscode是否能够不依赖社区版Paas独立运行 HOT 1
- 应用创建Secret支持双写 HOT 1
- 支持语义化版本 HOT 2
- Django1.11.29 authenticate接口参数有更新
- paasv3预计什么时候发布? HOT 1
- 绑定私有版企业微信后,扫码认证报“系统出现异常”
- PaaS开发者中心中SaaS可见范围偶发报错 HOT 4
- PaaS源码下载问题 HOT 1
- 开发者中心查询日志通过时间筛选无效 HOT 1
- 开发者中心查询日志带正斜杠的字符串,精确查找可以找到,模糊查找反而为空 HOT 2
- PIP包需要更新,以便适配麒麟V10操作系统和ARM架构 HOT 3
- SaaS多次部署失败,但是在发布历史页面没有看到历史记录 HOT 1
- 个人中心的QQ号改为非必填,和用户管理中保持一致
- login inactive_expire_time频繁续期导致的数据库性能问题
- readme.md存在链接失效
- PaaS 平台 esb组件缺少配置文件 HOT 1
- [前端] 登录页面支持显示密码 HOT 1
- 求助2.14.13的部署文档 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bk-paas.