supervisor 部署

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

supervisor 部署

##0x00

1.创建supervisor.conf
➜  webgp git:(master) ✗ echo_supervisord_conf > supervisor.conf
➜  webgp git:(master) ✗ vi supervisor.conf
add:
[program:foo] 
command=/bin/cat

mod: (web界面查看 / supervisorctl 命令行)
[inet_http_server]         ; inet (TCP) server disabled by default
port=127.0.0.1:9001        ; (ip_address:port specifier, *:port for all iface)
username=user              ; (default is no username (open server))
password=123               ; (default is no password (open server))


2.
➜  webgp git:(master) ✗ sudo supervisord -c supervisor.conf
Unlinking stale socket /tmp/supervisor.sock
➜  webgp git:(master) ✗ supervisorctl 
Server requires authentication
Username:user
Password:

foo                              RUNNING   pid 18794, uptime 0:00:14
supervisor> status
foo                              RUNNING   pid 18794, uptime 0:00:19
supervisor> stop 
Error: stop requires a process name
stop 		Stop a process
stop :*		Stop all processes in a group
stop  	Stop multiple processes or groups
stop all		Stop all processes
supervisor> stop all
foo: stopped
supervisor> status
foo                              STOPPED   Feb 21 12:08 PM
supervisor> start
Error: start requires a process name
start 		Start a process
start :*		Start all processes in a group
start  	Start multiple processes or groups
start all		Start all processes
supervisor> start foo
foo: started
supervisor> status
foo                              RUNNING   pid 18802, uptime 0:00:05
supervisor>
```	

##0x01 部署go
![输入图片说明](https://static.oschina.net/uploads/img/201702/21130703_fyuc.png "在这里输入图片标题")


##0x02 部署abuse-robot 及运行
![输入图片说明](https://static.oschina.net/uploads/img/201702/22182917_0dRw.png "在这里输入图片标题")

转载于:https://my.oschina.net/tplinuxhyh/blog/842724

你可能感兴趣的:(git,网络,python)