/
PKG-INFO
174 lines (139 loc) · 6.13 KB
/
PKG-INFO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
Metadata-Version: 1.0
Name: hostout.supervisor
Version: 1.0a4
Summary: Plugin for collective.hostout that starts and stops supervisor
during deployment
Home-page: https://svn.plone.org/svn/collective/hostout.supervisor
Author: Dylan Jay
Author-email: software@pretaweb.com
License: GPL
Description: Introduction
************
This recipe is an example of a hostout_ plugin. It gives you extra commands to control
supervisord_. It will automatically stop and restart all your processes for you
during deployment.
.. contents::
Installing
**********
hostout.supervisor is a plugin for collective.hostout_. Hostout is a zc.buildout
recipe.
First you need a working buildout_ using supervisor. Here's a really simple one.
>>> write('buildout.cfg',
... """
... [buildout]
... parts = helloworld
...
... [helloworld]
... recipe = zc.recipe.egg:scripts
... eggs = zc.recipe.egg
... initialization = import sys
... main=lambda: sys.stdout.write('all your hosts are below to us')
... entry-points = helloworld=__main__:main
...
... [supervisor]
... recipe = collective.recipe.supervisor
... programs = 10 helloworld bin/helloworld
...
... """)
>>> print system('bin/buildout -N')
Installing helloworld.
Generated script '/sample-buildout/bin/helloworld'.
>>> print system('bin/helloworld')
all your hosts are below to us
Google buildout + your fav app framework to findout how to build it.
Next we add a hostout to our buildout and we extend hostout by adding the supervisor plugin using the "extends"
option.
>>> write('buildout.cfg',
... """
... [buildout]
... parts = helloworld host
...
... [helloworld]
... recipe = zc.recipe.egg:scripts
... eggs = zc.recipe.egg
... initialization = import sys
... main=lambda: sys.stdout.write('all your hosts are below to us')
... entry-points = helloworld=__main__:main
...
... [supervisor]
... recipe = collective.recipe.supervisor
... programs = 10 helloworld bin/helloworld
...
... [host]
... recipe = collective.hostout
... host = 127.0.0.1:10022
... extends = hostout.supervisor
... parts = hellowworld supervisor
...
... """)
>>> print system('bin/buildout -N')
Updating helloworld.
Installing host.
Generated script '/sample-buildout/bin/hostout'.
...
Hostout.supervisor commands
***************************
>>> print system('bin/hostout host')
cmdline is: bin/hostout host1 [host2...] [all] cmd1 [cmd2...] [arg1 arg2...]
Valid commands are:
...
supervisorboot : Installs supervisor into your init.d scripts in order to ensure that supervisor is started on boot
...
supervisorctl : Takes command line arguments and runs supervisorctl on the remote host
supervisorshutdown : Shutdown the supervisor daemon
supervisorstartup : Start the supervisor daemon
...
The following options maybe used
supervisor
The name of the supervisor part to stop and restart
init.d
If set the supervisord script will be linked into init.d so any machine restart will also
start supervisor
Automatic startup and shutdown during deployment
************************************************
In addition supervisor plugin will shutdown supervisor during pre-deployment and startup
supervisor during post-deployment.
>>> print system('bin/hostout host1 deploy')
Hostout: Running command 'predeploy' from 'hostout.supervisor.fabfile'
Logging into the following hosts as :
127.0.0.1
[127.0.0.1] sudo: /var/lib/plone/host1/bin/supervisorctl shutdown || echo 'Failed to shutdown'
...
Hostout: Running command 'postdeploy' from 'hostout.supervisor.fabfile'
...
[127.0.0.1] sudo: /var/lib/plone/host1/bin/supervisord
...
[127.0.0.1] sudo: /var/lib/plone/host1/bin/supervisorctl status
...
Hostout: Running command 'postdeploy' from 'collective.hostout.fabfile'
...
Credits
*******
Dylan Jay ( software at pretaweb dot com )
.. _buildout: http://pypi.python.org/pypi/zc.buildout
.. _recipe: http://pypi.python.org/pypi/zc.buildout#recipes
.. _fabric: http://fabfile.org
.. _collective.hostout: http://pypi.python.org/pypi/collective.hostout
.. _hostout: http://pypi.python.org/pypi/collective.hostout
.. _supervisor: http://pypi.python.org/pypi/collective.recipe.supervisor
.. _supervisord: http://supervisord.org
Release History
***************
1.0a4 (2010-04-13)
------------------
- allows buildout user only deploy
1.0a3 (2010-03-21)
------------------
- new sudosupervisor for when you need to boot as root [Dylan Jay]
- Made compatible with collective.hostout 1.0a5 [Dylan Jay]
- Improved startup and shutdown so use only buildout-user + reload rather than "supervisor shutdown" [Dylan Jay]
1.0a2 (2010-06-03)
------------------
- falfile entrypoint
- better init.d script
1.0a1 (2010-02-13)
------------------
- Moved out of collective.hostout
- upgraded it to fabric 1.0 and python 2.6
Keywords: buildout,fabric,deploy,deployment,server,plone,django,host,hosting
Platform: UNKNOWN