-
Notifications
You must be signed in to change notification settings - Fork 1
/
rhaptos-base.cfg
442 lines (398 loc) · 16.1 KB
/
rhaptos-base.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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
[buildout]
extends =
rhaptos-versions.cfg
rhaptos-tests.cfg
versions = versions
download-cache = ${buildout:directory}/downloads
parts =
portcheck
plone
zope2
productdistros
egenix-source
psycopg2
instance
zeoserver
jing
zopepy
# test
tmp
# Add additional egg download sources here. dist.plone.org contains archives
# of Plone packages.
find-links =
http://pypi.rhaptos.org
http://dist.rhaptos.org/simple
https://packages.cnx.org/legacy
http://public.upfronthosting.co.za/eggs
https://downloads.egenix.com/python/index/ucs4/
http://effbot.org/media/downloads/elementtree-1.2.7-20070827-preview.zip
index = https://pypi.python.org/simple/
eggs-directory = ${buildout:directory}/eggs
# Add additional eggs here
# elementtree is required by Plone
eggs =
Products.RhaptosSite
Pillow
demjson
Products.PloneHotfix20110531
Products.PloneHotfix20110720
Products.PloneHotfix20121106
Products.PloneHotfix20130618==1.1
Products.Zope_Hotfix_CVE_2010_3198
rhaptos.mathjax
rhaptos.atompub.plone
rhaptos.swordservice.plone
egenix_mx_base
# Data directories are set here. This is necessary in order to store the Zope and PostgreSQL data
# in a top level /data directory instead of inside the buildout dir.
zope-datadir = ${buildout:directory}
# for the production instances, we put the Zope data on a separate EBS volume as defined in production.cfg
# zope-datadir = /data/zope/
# Make sure the ports are available.
# If not, try stopping the servers
[portcheck]
recipe = iw.recipe.cmd
on_install = true
on_update = true
cmds =
echo "Attempting to shut down server in case it is running..."
${buildout:directory}/scripts/application stop 2> /dev/null
# postgres-datadir = ${postgresql:location}
# for the production instances, we put the Postgres database on a separate EBS volume as defined in production.cfg
# postgres-datadir = /data/postgresql/
squid-proxy-port = ${instance:http-address}
# for the production instances, we want Squid to proxy to HAProxy instead of directly to Zope
# squid-proxy-port = 8000
# Make sure the ports are available.
# If not, try stopping the servers
[portcheck]
recipe = iw.recipe.cmd
on_install = true
on_update = true
cmds =
echo "Attempting to shut down server in case it is running..."
${buildout:directory}/scripts/application stop 2> /dev/null
[plone]
# For more information on this step and configuration options see:
# http://pypi.python.org/pypi/plone.recipe.distros
recipe = plone.recipe.distros
urls = http://launchpad.net/plone/2.5/2.5.5/+download/Plone-2.5.5.tar.gz
nested-packages = Plone-2.5.5.tar.gz
version-suffix-packages = Plone-2.5.5.tar.gz
[zope2]
# For more information on this step and configuration options see:
# http://pypi.python.org/pypi/plone.recipe.zope2install
recipe = plone.recipe.zope2install
fake-zope-eggs = true
additional-fake-eggs =
ZODB3
##url = http://www.zope.org/Products/Zope/2.9.12/Zope-2.9.12-final.tgz
url = https://packages.cnx.org/legacy/Zope-2.9.12-final.tgz
# Use this section to download additional old-style products.
# List any number of URLs for product tarballs under URLs (separate
# with whitespace, or break over several lines, with subsequent lines
# indented). If any archives contain several products inside a top-level
# directory, list the archive file name (i.e. the last part of the URL,
# normally with a .tar.gz suffix or similar) under 'nested-packages'.
# If any archives extract to a product directory with a version suffix, list
# the archive name under 'version-suffix-packages'.
[productdistros]
# For more information on this step and configuration options see:
# http://pypi.python.org/pypi/plone.recipe.distros
recipe = plone.recipe.distros
urls =
nested-packages =
version-suffix-packages =
[instance]
# For more information on this step and configuration options see:
# http://pypi.python.org/pypi/plone.recipe.zope2instance
recipe = plone.recipe.zope2instance
zope2-location = ${zope2:location}
user = ${shared:user}
http-address = 8888
debug-mode = off
verbose-security = off
environment-vars = ${shared:environment-vars}
zope-conf-additional = ${shared:zope-conf-additional}
zserver-threads = ${shared:zserver-threads}
zodb-cache-size = ${shared:zodb-cache-size}
zeo-client = on
zeo-address = ${shared:zeo-port}
# If you want Zope to know about any additional eggs, list them here.
# This should include any development eggs you listed in develop-eggs above,
# e.g. eggs = Plone my.package
eggs = ${shared:eggs}
# If you want to register ZCML slugs for any packages, list them here.
# e.g. zcml = my.package my.other.package
zcml =
products = ${shared:products}
[zeoserver]
recipe = plone.recipe.zope2zeoserver
zope2-location = ${zope2:location}
zeo-address = ${shared:zeo-port}
file-storage = ${buildout:zope-datadir}/var/filestorage/Data.fs
#blob-storage = ${buildout:zope-datadir}/var/blobs/
zeo-conf-additional =
<filestorage 2>
path ${buildout:zope-datadir}/var/filestorage/Data_pdf.fs
</filestorage>
[create-empty-site]
recipe = iw.recipe.cmd
on_install = true
#on_update = false
cmds =
${postgresql:location}/bin/pg_ctl -D ${buildout:postgres-datadir}/var/data start -w
${buildout:directory}/bin/zeoserver start
${buildout:directory}/bin/instance run ${shared:scripts-dir}/create_rhaptos_site.py ${shared:portal-name} "Rhaptos" rhaptos_dba rhaptos ${shared:pgsql_db_name} localhost ${shared:pgsql_db_port}
${buildout:directory}/bin/zeoserver stop
${postgresql:location}/bin/pg_ctl -D ${postgresql:location}/var/data stop
[create-test-users]
recipe = iw.recipe.cmd
on_install = true
#on_update = false
cmds =
${postgresql:location}/bin/pg_ctl -D ${postgresql:location}/var/data start -w
${buildout:directory}/bin/zeoserver start
${buildout:directory}/bin/zeoserver stop
${postgresql:location}/bin/pg_ctl -D ${buildout:postgres-datadir}/var/data stop
[create-test-users]
recipe = iw.recipe.cmd
on_install = true
on_update = false
cmds =
${postgresql:location}/bin/pg_ctl -D ${buildout:postgres-datadir}/var/data start -w
${buildout:directory}/bin/zeoserver start
# create regular users. parematers are portal name, user name, password, first name, surname, and email addy.
# Each argument
${buildout:directory}/bin/instance run ${shared:scripts-dir}/addRhaptosUser.zctl ${shared:portal-name} user1 user1 firstname1 lastname1 useremail1@localhost.net
${buildout:directory}/bin/instance run ${shared:scripts-dir}/addRhaptosUser.zctl ${shared:portal-name} user2 user2 firstname2 lastname2 useremail2@localhost.net
${buildout:directory}/bin/instance run ${shared:scripts-dir}/addRhaptosUser.zctl ${shared:portal-name} user3 user3 firstname3 lastname3 useremail3@localhost.net
${buildout:directory}/bin/instance run ${shared:scripts-dir}/addRhaptosOrgAccount.zctl ${shared:portal-name} siyavula siyavula siya-firstname siya-lastname siya-email@localhost.net
# create organizational account user. parameters are user name, password, full name, short name, and email addy.
${buildout:directory}/bin/instance run ${shared:scripts-dir}/addRhaptosOrgAccount.zctl ${shared:portal-name} org1 org1 'org1 name' org1-name orgemail1@localhost.net
${buildout:directory}/bin/instance run ${shared:scripts-dir}/addRhaptosOrgAccount.zctl ${shared:portal-name} org2 org2 'org2 name' org2-name orgemail2@localhost.net
# create manager user. parematers are portal name, user name, password, first name, surname, and email addy.
${buildout:directory}/bin/instance run ${shared:scripts-dir}/addRhaptosManager.zctl ${shared:portal-name} manager1 manager1 managerfirstname1 managerlastname1 manageremail1@localhost.net
${buildout:directory}/bin/zeoserver stop
${postgresql:location}/bin/pg_ctl -D ${buildout:postgres-datadir}/var/data stop
[shared]
user = admin:admin
effective-user = zope
debug-mode = off
verbose-security = off
zserver-threads = 2
zodb-cache-size = 5000
scripts-dir = ${buildout:directory}/scripts
environment-vars =
SCRIPTSDIR ${shared:scripts-dir}
OOCONVERT ${shared:scripts-dir}/ooconvert_unoconv.sh
LATEXIMPORT ${shared:scripts-dir}/LatexImport.bash
JING_JAR ${buildout:directory}/parts/jing/bin/jing.jar
pgsql_db_name = rhaptos_dev_db
pgsql_db_port = 5555
data_url = http://ds.rhaptos.org/rhaptos_partial
portal-name = site
zeo-port = 8100
zope-conf-additional =
%import Products.ClockServer
<clock-server>
method /${shared:portal-name}/queue_tool/clockTick
period 3
user
password
</clock-server>
<zodb_db pdfs>
# pdfs database
cache-size 5000
# ZEOStorage database
<zeoclient>
server ${shared:zeo-port}
storage 2
name pdfs
var ${buildout:directory}/var
cache-size 30MB
</zeoclient>
mount-point /${shared:portal-name}/pdfs
</zodb_db>
backup-server = backups.cnx.org
backup-directory = /mnt/backups/backups
# latest or of the form 2010_Apr_01
backup-date = latest
# If you want Zope to know about any additional eggs, list them here.
# This should include any development eggs you listed in develop-eggs above,
# e.g. eggs = Plone my.package
eggs = ${buildout:eggs}
# If you want to register ZCML slugs for any packages, list them here.
# e.g. zcml = my.package my.other.package
zcml =
products =
${buildout:directory}/products
${productdistros:location}
${plone:location}
[jing]
recipe = hexagonit.recipe.download
url = http://jing-trang.googlecode.com/files/jing-20081028.zip
strip-top-level-dir = True
environment =
TMP=${tmp:path}
[zopepy]
# For more information on this step and configuration options see:
# http://pypi.python.org/pypi/zc.recipe.egg
recipe = zc.recipe.egg
eggs = ${instance:eggs}
interpreter = zopepy
extra-paths = ${zope2:location}/lib/python
scripts = zopepy
# To start postgres
# ./bin/pg_ctl -D parts/postgresql/var/data/ -l var/log/pgsql.log start
[postgresql]
recipe = zc.recipe.cmmi
url = http://cleaver.cnx.rice.edu/Postgresql-8.3.7.tgz
patch = ${buildout:directory}/scripts/postgresql_tsearch2.patch
extra_options =
--enable-thread-safety
--with-readline
--with-pgport=${shared:pgsql_db_port}
[init-pgsql]
recipe = iw.recipe.cmd
on_install = true
#on_update = false
cmds =
${postgresql:location}/bin/initdb -D ${buildout:postgres-datadir}/var/data -E UNICODE
${postgresql:location}/bin/pg_ctl -D ${buildout:postgres-datadir}/var/data start -w
${postgresql:location}/bin/createdb -E UTF8 ${shared:pgsql_db_name}
${postgresql:location}/bin/createuser -s backups
${postgresql:location}/bin/createuser -s rhaptos_dba
${postgresql:location}/bin/createuser -SdR rhaptos
${postgresql:location}/bin/createuser -SdR postgres
${postgresql:location}/bin/psql ${shared:pgsql_db_name} -f ${postgresql:location}/share/contrib/tsearch2.sql
${postgresql:location}/bin/pg_ctl -D ${buildout:postgres-datadir}/var/data stop
cp -rf ${buildout:directory}/etc/pg_ident.conf.sample ${buildout:postgres-datadir}/var/data/pg_ident.conf
cp -rf ${buildout:directory}/etc/pg_hba.conf.sample ${buildout:postgres-datadir}/var/data/pg_hba.conf
[data-fs]
recipe = hexagonit.recipe.download
url = ${shared:data_url}/Data.fs
download-only = true
destination = ${buildout:directory}/var/filestorage
environment =
TMP=${tmp:path}
[data-pdf-fs]
recipe = hexagonit.recipe.download
url = ${shared:data_url}/Data_pdf.fs
download-only = true
destination = ${buildout:directory}/var/filestorage
environment =
TMP=${tmp:path}
[repository-sql]
recipe = hexagonit.recipe.download
url = ${shared:data_url}/repository.sql.gz
download-only = true
environment =
TMP=${tmp:path}
[bootstrap-data]
recipe = iw.recipe.cmd
on_install = true
#on_update = false
cmds =
${postgresql:location}/bin/pg_ctl -D ${buildout:postgres-datadir}/var/data start -w
zcat ${repository-sql:location}/repository.sql.gz | ${postgresql:location}/bin/psql -U rhaptos_dba ${shared:pgsql_db_name}
${buildout:directory}/bin/zeoserver start
${buildout:directory}/bin/instance run ${buildout:directory}/scripts/set_connect_string.py "dbname=${shared:pgsql_db_name} user=rhaptos host=localhost port=${shared:pgsql_db_port}"
${buildout:directory}/bin/instance run ${shared:scripts-dir}/addRhaptosManager.zctl ${shared:portal-name} manager1 manager1 managerfirstname1 managerlastname1 manageremail1@localhost.net
${buildout:directory}/bin/zeoserver stop
${postgresql:location}/bin/pg_ctl -D ${buildout:postgres-datadir}/var/data stop
[bootstrap-data-from-backup]
recipe = iw.recipe.cmd
on_install = true
on_update = false
cmds =
${postgresql:location}/bin/pg_ctl -D ${buildout:postgres-datadir}/var/data start -w
# load the postgresql database and ZODB
${buildout:directory}/scripts/load_from_backup ${shared:backup-server} ${shared:backup-directory} ${shared:backup-date} ${shared:pgsql_db_name}
# start the ZEO server and futz with data
${buildout:directory}/bin/zeoserver start
${buildout:directory}/bin/instance run ${buildout:directory}/scripts/set_connect_string.py "dbname=${shared:pgsql_db_name} user=rhaptos host=localhost port=${shared:pgsql_db_port}"
# add a manger account
${buildout:directory}/bin/instance run ${shared:scripts-dir}/addRhaptosManager.zctl ${shared:portal-name} manager1 manager1 managerfirstname1 managerlastname1 manageremail1@localhost.net
# shut down servers
${buildout:directory}/bin/zeoserver stop
${postgresql:location}/bin/pg_ctl -D ${buildout:postgres-datadir}/var/data stop
[pgsql-symlinks]
recipe = cns.recipe.symlink
symlink_target = ${buildout:directory}/bin
symlink_base = ${postgresql:location}/bin
symlink =
clusterdb
createdb
createlang
createuser
dropdb
droplang
dropuser
ecpg
initdb
ipcclean
pg_config
pg_controldata
pg_ctl
pg_dump
pg_dumpall
pg_resetxlog
pg_restore
postgres
postmaster
psql
reindexdb
vacuumdb
[funkload]
recipe=enfold.recipe.funkload
working-directory=${buildout:directory}/funkload
server-url=http://localhost:${instance:http-address}
start-runtime-deps =
[('exec',
'${buildout:directory}/bin/pg_ctl' ,
('-D', '${buildout:postgres-datadir}/var/data/', '-l', 'var/log/pgsql.log', 'start',)),
('${buildout:bin-directory}/${zopepy:interpreter}',
'${buildout:directory}/bin/zeoserver' ,
('start',)),
('${buildout:bin-directory}/${zopepy:interpreter}',
'${buildout:directory}/bin/instance' ,
('start',)),
]
stop-runtime-deps =
[('${buildout:bin-directory}/${zopepy:interpreter}',
'${buildout:directory}/bin/instance' ,
('stop',)),
('${buildout:bin-directory}/${zopepy:interpreter}',
'${buildout:directory}/bin/zeoserver' ,
('stop',)),
('exec',
'${buildout:directory}/bin/pg_ctl' ,
('-D', '{buildout:postgres-datadir}', '-l', 'var/log/pgsql.log', 'stop',)),
]
use-lock=True
[tmp]
recipe = ore.recipe.fs:mkdir
path = ${buildout:directory}/var/tmp
[egenix-source]
recipe = hexagonit.recipe.download
# This is where buildout will have cached it when the egg was installed
#url = file://${buildout:directory}/downloads/dist/egenix-mx-base-3.2.5.tar.gz
url = http://downloads.egenix.com/python/egenix-mx-base-3.2.5.tar.gz
strip-top-level-dir = True
environment =
TMP=${tmp:path}
[psycopg2]
recipe = iw.recipe.cmd
on_install = true
on_update = false
cmds =
pip install -i https://pypi.python.org/simple/ --no-install egenix-mx-base==3.2.5
pip install -i https://pypi.python.org/simple/ --no-install --build=./build psycopg2==2.4.6
sed -i 's;#mx_include_dir=;mx_include_dir=${buildout:directory}/parts/egenix-source/mx/DateTime/mxDateTime/;' ${buildout:directory}/build/psycopg2/setup.cfg
pip install -i https://pypi.python.org/simple/ --no-download --build=./build psycopg2
# requires python-egenix-mx-base-dev and libpq-dev system packages
[psycopg1]
recipe = zc.recipe.cmmi
url = http://initd.org/psycopg/tarballs/PSYCOPG-1-1/psycopg-1.1.21.tar.gz
configure-options = --with-python=${buildout:directory}/bin/python --with-postgres-includes=/usr/include/postgresql --with-mxdatetime-includes=${buildout:directory}/parts/egenix-source/mx/DateTime/mxDateTime