GithubHelp home page GithubHelp logo

Comments (4)

wklken avatar wklken commented on May 3, 2024

自定义 supervisor 启动进程, 是希望什么形式的? 能否具体描述下, 如果PaaS提供的这种能力, SaaS如何进行自定义?

from bk-paas.

homholueng avatar homholueng commented on May 3, 2024

提出这个需求是因为以下原因:

  • SaaS 希望启动监听不同队列且使用不同并发策略的 celery worker 来对 worker 进行更加精细的划分,所以希望能够自定义 celery worker 的启动命令

目前看来可以先只满足自定义 celery worker 进程的启动命令,至于启动目录,日志文件等选项可以保持不变。

自定义方式大致如下:

  1. 在 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
  1. 在渲染 supervisord 模板时,根据是否有自定义 celery worker 启动命令来决定渲染策略:
  • 无:走默认渲染策略
  • 有:使用用户配置的命令渲染模板

from bk-paas.

wklken avatar wklken commented on May 3, 2024
  • 这里的逻辑类似heroku buildpack的procfile, 一切启动命令可以由用户自行指定;
  • 当前基于virtualenv/docker的企业版社区版暂时不支持, 这个需求我们会评估下

from bk-paas.

wklken avatar wklken commented on May 3, 2024

企业版的paas_agent 2.5.11 已支持自定义启动命令


社区版或开源版可以自行改造:

  • 在源代码根路径下建立约定文件, 例如 support-files/supervisord.conf
  • 修改paas_agent部署的build shell脚本, 检测源代码目录, 存在的话优先使用源代码中的文件

from bk-paas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.