【云计算】使用supervisor管理Docker多进程-ntpd+uwsgi+nginx示例最佳实践
supervisor安装启动:
apt-get install supervisor -y # start supervisord nodaemon
/usr/bin/supervisord --nodaemon
nginx示例:
[program:nginx]
command = /usr/sbin/nginx -g 'daemon off;'
process_name = %(program_name)s
stopsignal = QUIT
autostart = true
# startsecs =
# startretries =
autorestart = true
# exitcodes = ,,
stdout_logfile_maxbytes = 10MB
stdout_logfile_backups =
stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
# stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log
redirect_stderr = true
ntpd示例:
[program:ntpd]
command = /usr/sbin/ntpd -d
process_name = %(program_name)s
stopsignal = QUIT
autostart = true
# startsecs =
# startretries =
autorestart = true
# exitcodes = ,,
stdout_logfile_maxbytes = 10MB
stdout_logfile_backups =
stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
# stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log
redirect_stderr = true
uwsgi示例:
[program:uwsgi]
command = uwsgi ${APP_PATH}/server-config/uwsgi/uwsgi.ini
process_name = %(program_name)s
stopsignal = QUIT
autostart = true
# startsecs =
# startretries =
autorestart = true
# exitcodes = ,,
stdout_logfile_maxbytes = 10MB
stdout_logfile_backups =
stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
# stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log
redirect_stderr = true
参考资料:
supervisor 进程控制服务:http://www.litrin.net/2012/08/02/supervisor-%E8%BF%9B%E7%A8%8B%E6%8E%A7%E5%88%B6%E6%9C%8D%E5%8A%A1/
用supervisor管理nginx+uwsgi部署django项目:http://outofmemory.cn/code-snippet/35403/supervisor-manage-uwsgi-python-django-process
nginx and supervisor setup in Ubuntu:http://stackoverflow.com/questions/10716159/nginx-and-supervisor-setup-in-ubuntu
Nginx with Supervisor keep changing status b/w Running and Starting:http://stackoverflow.com/questions/23216819/nginx-with-supervisor-keep-changing-status-b-w-running-and-starting
virtualenv 环境下 Django + Nginx + Gunicorn+ Supervisor 搭建 Python Web:http://www.ituring.com.cn/article/201045?utm_source=tuicool
Dockerfile示例:https://hub.docker.com/r/samuelchen/base/~/dockerfile/
supervisor配置文件示例:https://git.tedomum.net/y0no/docker-shinken/tree/master/supervisor/conf.d
Docker官方示例:https://docs.docker.com/engine/admin/using_supervisord/
Ubuntu14.04+Nginx+Uwsgi+Supervisor部署Django Web App:https://elonbase.com//Archives/article/1
supervisor工具使用:http://blog.chinaunix.net/uid-1757778-id-3066399.html
supervisor安装配置与使用:http://www.2cto.com/os/201503/378878.html
[supervisor] 使用小记(入门教程),supervisor小记:http://www.bkjia.com/xtzh/984198.html
Linux下进程管理工具Supervisor的安装配置和基本使用:http://www.jb51.net/LINUXjishu/409428.html
Supervisor重新加载配置启动新的进程:http://www.codeweblog.com/supervisor%E9%87%8D%E6%96%B0%E5%8A%A0%E8%BD%BD%E9%85%8D%E7%BD%AE%E5%90%AF%E5%8A%A8%E6%96%B0%E7%9A%84%E8%BF%9B%E7%A8%8B/
Linux的NTP配置总结:http://www.cnblogs.com/kerrycode/archive/2015/08/20/4744804.html
ntpd使用:http://blog.csdn.net/feifei_14119/article/details/51003086
uwsgi配置参数详解:http://heipark.iteye.com/blog/1847421
MORE:
Supervisor 管理后台守护进程:http://blog.csdn.net/beerium/article/details/8721906
Supervisor的安装与使用入门:http://www.tuicool.com/articles/Ejm2u2
Configuration File:http://supervisord.org/configuration.html#program-x-section-settings
使用 supervisor 管理进程(配置文件解释):http://www.ttlsa.com/linux/using-supervisor-control-program/
【云计算】使用supervisor管理Docker多进程-ntpd+uwsgi+nginx示例最佳实践的更多相关文章
- Pipenv管理项目环境--Django项目的一些最佳实践
virtualenv --- 使用不方便 提升效率,管理更便捷--- pipenv 新建环境:: pip3 install pipenv 在项目下,用pipenv安装 Djagno pipenv in ...
- 【云计算】Docker 多进程管理方案
docker容器内多进程的管理方案 时间 2015-05-08 00:00:00 涯余 ...
- 【云计算】Docker多进程管理方案-cfengine && supervisord
docker容器内多进程的管理方案 时间 2015-05-08 00:00:00 涯余 原文 http://yayua.github.io/docker/container-process-moni ...
- 在Docker里使用(支持镜像继承的)supervisor管理进程(转)
这篇文章是受 dockboard 之托帮忙翻译的与 docker 有关的技术文章.译自 Using Supervisor with Docker to manage processes (suppor ...
- ubuntu supervisor管理uwsgi+nginx
一.概述 superviosr是一个Linux/Unix系统上的进程监控工具,他/她upervisor是一个Python开发的通用的进程管理程序,可以管理和监控Linux上面的进程,能将一个普通的命令 ...
- docker部署项目: centos+python+redis+mysql+uwsgi+nginx
一.Centos7安装docker 1.1 环境配置 先测试是否下载了docker:查看镜像:docker images没有下载,就依次执行以下环境的安装 ①curl http://mirrors.a ...
- 使用Mesos和Marathon管理Docker集群
分布式系统是难于理解.设计.构建 和管理的,他们将比单个机器成倍还要多的变量引入到设计中,使应用程序的根源问题更难发现.SLA(服务水平协议)是衡量停机和/或性能下降的标准,大多数现代应用程序有一个期 ...
- 使用supervisor管理后台进程
在linux中supervisor是用来管理后台进程的,是一个用python写的进程管理工具,可以让宕机的进程重启.这里我们大概讲一下用他来管理uWSGI. 一.安装supervisor 1.pyth ...
- uWSGI+nginx+django+virtualenv+supervisor部署项目
一.前言 在部署项目前,你已有一个能够在你本机测试过,能正常启动的Django项目(毕竟本文主要讲解部署Django项目),以及掌握了Linux系统的一些基本命令. 相关链接: Centos7安装py ...
随机推荐
- .net 杂项
vs 打印信息到输出窗口 : System.Diagnostics.Debug.WriteLine("打印信息到输出窗口,但是只能在Debug版本运行,到了release版本中,Debug类 ...
- 如何让js在最后执行
$(window).bind("load", function () { var height = $(document.body).height(); $('.syntaxhig ...
- centos6.5 宽带连接
Centos默认不会建立本地连接,至少在虚拟机里是这样,自己新建一个就行了:1.cd /etc/sysconfig/network-scripts/2.vi ifcfg-eth0 DEVICE=eth ...
- 将cmake文件转化为vs方便代码阅读与分析
下面通过“chengxuyuancc”同学的图来说明.通过cmake将winafl cmake编译方式转化为vs2015,方便源码阅读与分析. 1.到官网下载cmake软件.启动图形版 2.选择源码目 ...
- linux 服务器之间文件传送
linux 服务器之间文件传送免密码输入传递: expect -c " set timeout 10 spawn scp ××××××.tar.bz2 root@172.16.17.34:/ ...
- Knockout.js(二):监控数组属性(Observables Arrays)
如果想发现并响应一个对象的变化,就应该使用监控属性(observables),如果想发现并响应一个集合的变化,就需要使用监控属性数组(observableArray).在很多情况下,它都非常有用,比如 ...
- 【数据结构(高效)/暴力】Parencodings
[poj1068] Parencodings Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 26686 Accepted ...
- 【找规律】【二进制拆分】hdu6129 Just do it
给你数列a,问你对它作m次求前缀异或和之后的新数列是什么. 考虑a1对最终生成的数列的每一位的贡献,仅仅考虑奇偶性, 当m为2的幂次的时候,恰好是这样的 2^0 1 1 1 1 1 ... 2^1 1 ...
- Problem A: 零起点学算法91——找出一个数组中出现次数最多的那个元素
#include<stdio.h> int main() { ],b[]={}; while(scanf("%d",&n)!=EOF) { ;i<n;i+ ...
- Team Queue(POJ 2259)
题意:有若干个团体,每个团体有若干个元素,他们按次序来排队,如果队列中已经有同一团体的元素在,则可以插队到它后面,模拟这个过程 思路:用map存下元素与团体的关系,并开2个队列,一个存整体队伍的排列( ...