为什么要在扩建项目中构建supervisord?

发布于 2024-08-30 16:04:45 字数 218 浏览 9 评论 0原文

我见过将 supervisor 构建到构建中的构建配方,我想控制里面的守护进程。然而,在我看来,仍然需要 /etc/init.d 中的某些内容(例如)来在启动时运行所述主管实例。

那么,为什么要在扩建中建立主管呢?为什么不在系统范围内安装它并为内部涉及的守护进程创建一个配置文件?

I've seen buildout recipes that build supervisor into the buildout, I suppose to control the daemons inside. However, it seems to me that one would still need something in /etc/init.d ( for example ) to run said supervisor instance on boot.

So, why build supervisor inside the buildout? Why not install it system wide and just make a config file for the daemons involved inside?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

同尘 2024-09-06 16:04:45

当我们为客户创建构建时,我们希望该构建能够在具有最小依赖性的任意托管环境上运行,所有这些都可以满足系统包的要求。通过将 Supervisord 包含在构建中,我们无需在系统范围内安装它,并且可以精细地调整其参数,而无需要求系统管理员为我们更改设置。

使用 usercrontab 配方,可以很容易地让supervisor在启动时从构建中运行:

[supervisor-cron]
recipe = z3c.recipe.usercrontab
times = @reboot
command = ${buildout:bin-directory}/supervisord -c ${buildout:directory}/etc/supervisord.conf

上面的部分将向crontab添加一个条目,使supervisor在启动时运行。

When we create a buildout for a customer, we want that buildout to run on arbitrary hosting environments with minimal dependencies, all satisfiable with system packages. By including supervisord in the buildout, we eliminate the need for it to be installed system-wide and can tweak it's parameters finely, without having to ask a system admin to change settings for us.

It's easy to get supervisor to run at boot time from a buildout, using the usercrontab recipe:

[supervisor-cron]
recipe = z3c.recipe.usercrontab
times = @reboot
command = ${buildout:bin-directory}/supervisord -c ${buildout:directory}/etc/supervisord.conf

The above part will add an entry to the crontab that causes supervisor to run at boot time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文