【云计算】使用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 ...
随机推荐
- SGU 289. Challenging Tic-Tac-Toe
注意一个问题就是不合法状态的判定.一个是点数不对,一个是X赢了,但是0接着下了一个子,一个是0赢了,但X也接着下了子,判断一下就行了. 做法是直接搜索,然后调参数...比较难懂的说. #include ...
- javascript大神修炼记(2)——运算符
读者朋友们好,前面我已经大概的了解了Javascript的作用以及一些基本的函数声明与变量声明,今天我们就接着前面的内容讲解,我们就来看一下javscript的逻辑(正序,分支,循环)以及一些简单的运 ...
- Java实现POI读取Excel文件,兼容后缀名xls和xlsx
1.引入所需的jar包: maven管理项目的话直接添加以下坐标即可: <!-- https://mvnrepository.com/artifact/org.apache.poi/poi -- ...
- Attacking JavaScript Engines: A case study of JavaScriptCore and CVE-2016-4622(转)
转:http://phrack.org/papers/attacking_javascript_engines.html Title : Attacking JavaScript Engines: A ...
- CodeForces 779A Pupils Redistribution
简单题. 因为需要连边的人的个数一样,又要保证和一样,所以必须每个数字的个数都是一样的. #include<map> #include<set> #include<cti ...
- cobol COMP-3最后1位
"C" hex is positive, "D" hex is negative, and "F" hex is unsigned.
- 【BZOJ 1053】 1053: [HAOI2007]反素数ant (反素数)
1053: [HAOI2007]反素数ant Description 对于任何正整数x,其约数的个数记作g(x).例如g(1)=1.g(6)=4.如果某个正整数x满足:g(x)>g(i) 0&l ...
- 【枚举】【SPFA】Urozero Autumn Training Camp 2016 Day 5: NWERC-2016 Problem I. Iron and Coal
那个人派出的队伍的行走的路径一定前半程是重合的,后半程分叉开来. 于是预处理每个点离1号点的最短路,到最近的铁的最短路,到最近的煤的最短路.(三次BFS / SPFA)然后枚举分岔点,尝试更新答案即可 ...
- 【bfs+优先队列】POJ2312-Battle City
[思路] 题目中的“可以沿直线发射打破砖墙”可能会迷惑到很多人,实际上可以等价理解为“通过砖墙的时间为2个单位”,这样题目就迎刃而解了.第一次碰到时可能不能很好把握,第二次基本就可以当作水题了. [错 ...
- 鹦鹉学舌1——C语言初学者百题大战之三
#include<stdio.h> int main() { int a; scanf("%d",&a); printf("%d",a-a+ ...