mrj*_*rjj 16 python deployment configuration supervisord
我试图进行自动部署,包括supervisord和默认设置路径混淆.
每一个部署方案,我发现使用/etc/supervisor/supervisor.conf并/etc/supervisor/conf.d/没有任何预设置和链接,还通过易于得到这条道路是真的示例配置充满安装监督员包后.
在这个示例中,流程看起来像没有任何链接和创建,如下所示/etc/supervisor.conf:
sudo('apt-get -y install supervisor')
put('config/supervisor_gunicorn.conf', '/etc/supervisor/conf.d/gunicorn.conf', use_sudo=True)
sudo('supervisorctl reload')
Run Code Online (Sandbox Code Playgroud)
但是在supervisorctl此路径中未指定为默认值,并且假定默认位置位于某处/etc/supervisor.conf,如手册中所指定
我试图以所有可能的方式安装主管,但我无法得到结果.
我知道这只是一个小小的愚蠢细节,但我将非常感谢您协助我的部署方案保持良好状态.
Mar*_*ers 24
通常默认文件确实如此/etc/supervisor.conf,但是Debian发行版会对此进行补丁(链接到Debian提供的gzip补丁)以查找/etc/supervisor/supervisor.conf:
--- supervisor-3.0a8.orig/src/supervisor/options.py
+++ supervisor-3.0a8/src/supervisor/options.py
@@ -105,7 +105,7 @@
def default_configfile(self):
"""Return the name of the found config file or raise. """
paths = ['supervisord.conf', 'etc/supervisord.conf',
- '/etc/supervisord.conf']
+ '/etc/supervisor/supervisord.conf', '/etc/supervisord.conf']
config = None
for path in paths:
if os.path.exists(path):
Run Code Online (Sandbox Code Playgroud)
因此,使用该补丁,主管supervisord.conf在本地目录,etc/子目录中查找,然后在全局/etc/supervisor/和/etc/目录中查找.
supervisord.confDebian安装的默认文件最后有这个:
[include]
files = /etc/supervisor/conf.d/*.conf
Run Code Online (Sandbox Code Playgroud)
导致supervisord加载放在conf.d目录中的任何额外文件.
您可能已通过pip安装了超级用户,因此未安装修补程序版本
/usr/local/lib/python2.7/dist-packages/supervisor/
优先于补丁版本
/usr/lib/pymodules/python2.7/supervisor
有关补丁的详细信息,请参见Martjin的答案。简单的解决方案是:
pip uninstall supervisor
然后重新运行软件包安装(如果仅部分安装):
apt-get install supervisor
还要确保您/etc/supervisor/supervisord.conf在场。如果没有,您可能需要手动重新创建,我的看起来像这样:
; supervisor config file
[unix_http_server]
file=/var/run//supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run//supervisor.sock ; use a unix:// URL for a unix socket
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.
[include]
files = /etc/supervisor/conf.d/*.conf
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
24583 次 |
| 最近记录: |