-
Notifications
You must be signed in to change notification settings - Fork 3
/
test-production.cfg
198 lines (176 loc) · 5.07 KB
/
test-production.cfg
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# Pleiades test-production buildout
[home]
eggcarton = /home/zope/pleiades/eggcarton
[buildout]
extends =
buildout.cfg
versions = versions
parts -=
agx-scripts
parts +=
zeoserver
instance1
instance2
nginx-build
varnish-build
cache
balancer
logrotate.conf
supervisor
find-links =
${home:eggcarton}
http://dist.plone.org/
http://effbot.org/downloads
# http://atlantides.org/eggcarton/
[downloads]
nginx = http://sysoev.ru/nginx/nginx-0.7.30.tar.gz
varnish = http://downloads.sourceforge.net/varnish/varnish-2.0.4.tar.gz
[instance-settings]
environment-vars =
LD_LIBRARY_PATH ${libgeos:location}/lib:${libxml2:location}/lib:${libxslt:location}/lib:${libspatialindex:location}/lib
DYLD_LIBRARY_PATH ${libgeos:location}/lib:${libxml2:location}/lib:${libxslt:location}/lib:${libspatialindex:location}/lib
GMAPS_KEY ABQIAAAAtVyXL2o7HAFbw73xSniLfhQ2dHhbVVaz2wAxXxViKF6CJLVMtxSsxoh3qq0OgSXQYgR-U7rv12D-cQ
eggs =
${buildout:eggs}
${pyproj:eggs}
${shapely:eggs}
Products.CacheSetup
plonetheme.notredame
pleiades.notredame
zcml =
pleiades.policy
pleiades.portlet.references
pleiades.notredame
products =
${buildout:directory}/products
${productdistros:location}
user = admin:admin
zodb-cache-size = 5000
zeo-client-cache-size = 300MB
debug-mode = off
zope2-location = ${zope2:location}
zeo-client = true
zeo-address = ${zeoserver:zeo-address}
effective-user = ${users:zope}
http-address = $${:http-address}
[supervisor-settings]
user = admin
password = admin
[plone-sites]
main = plone
[hosts]
cache = 127.0.0.1
supervisor = 127.0.0.1
balancer = 127.0.0.1
instance1 = 127.0.0.1
instance2 = 127.0.0.1
[ports]
cache = 8101
balancer = 8201
zeo-server = 8301
instance1 = 8401
instance2 = 8402
supervisor = 9901
[users]
cache = zope
balancer = zope
zope = zope
supervisor = zope
[zeoserver]
recipe = plone.recipe.zope2zeoserver
zope2-location = ${zope2:location}
zeo-address = ${ports:zeo-server}
effective-user = ${users:zope}
[instance1]
recipe = collective.recipe.zope2cluster
instance-clone = instance-settings
http-address = ${hosts:instance1}:${ports:instance1}
[instance2]
recipe = collective.recipe.zope2cluster
instance-clone = instance-settings
http-address = ${hosts:instance2}:${ports:instance2}
zope-conf-additional +=
enable-product-installation false
[nginx-build]
recipe = zc.recipe.cmmi
url = ${downloads:nginx}
[varnish-build]
recipe = zc.recipe.cmmi
url = ${downloads:varnish}
[cache]
recipe = plone.recipe.varnish
daemon = ${buildout:directory}/parts/varnish-build/sbin/varnishd
bind = ${hosts:cache}:${ports:cache}
backends = ${hosts:balancer}:${ports:balancer}
cache-size = 1G
user = ${users:cache}
mode = foreground
[balancer]
recipe = gocept.nginx
nginx = nginx-build
configuration =
user ${users:balancer};
error_log ${buildout:directory}/var/log/balancer-error.log warn;
worker_processes 1;
daemon off;
events {
worker_connections 1024;
}
http {
upstream zope {
server ${hosts:instance1}:${ports:instance1} max_fails=3 fail_timeout=30s;
server ${hosts:instance2}:${ports:instance2} max_fails=3 fail_timeout=30s;
}
server {
listen ${hosts:balancer}:${ports:balancer};
server_name ${hosts:balancer};
access_log off;
rewrite ^/(.*) /VirtualHostBase/http/${hosts:balancer}:${ports:balancer}/${plone-sites:main}/VirtualHostRoot/$1 last;
location / {
proxy_pass http://zope;
}
}
}
[supervisor]
recipe = collective.recipe.supervisor
port = ${ports:supervisor}
user = ${supervisor-settings:user}
password = ${supervisor-settings:password}
serverurl = http://${hosts:supervisor}:${ports:supervisor}
programs =
10 zeo ${zeoserver:location}/bin/runzeo true ${users:zope}
20 instance1 ${buildout:directory}/parts/instance1/bin/runzope true ${users:zope}
20 instance2 ${buildout:directory}/parts/instance2/bin/runzope true ${users:zope}
30 cache ${buildout:directory}/bin/cache true ${users:cache}
40 balancer ${nginx-build:location}/sbin/nginx [-c ${balancer:run-directory}/balancer.conf] true ${users:balancer}
[logrotate.conf]
recipe = zc.recipe.deployment:configuration
text =
rotate 4
weekly
create
compress
delaycompress
${buildout:directory}/var/log/instance1*.log {
sharedscripts
postrotate
/bin/kill -USR2 $(cat ${buildout:directory}/var/instance1.pid)
endscript
}
${buildout:directory}/var/log/instance2*.log {
sharedscripts
postrotate
/bin/kill -USR2 $(cat ${buildout:directory}/var/instance2.pid)
endscript
}
${buildout:directory}/var/log/zeoserver.log {
postrotate
/bin/kill -USR2 $(cat ${buildout:directory}/var/zeoserver.pid)
endscript
}
${buildout:directory}/var/log/balancer*.log {
sharedscripts
postrotate
/bin/kill -USR1 $(cat ${balancer:run-directory}/balancer.pid)
endscript
}