forked from rockstor/rockstor-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase-buildout.cfg
219 lines (187 loc) · 6.47 KB
/
base-buildout.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
# Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com>
# This file is part of RockStor.
#
# RockStor is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2 of the License,
# or (at your option) any later version.
#
# RockStor is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
[buildout]
#don't use any site packages for complete isolation
include-site-packages = false
python = python
#i've seen timeouts with nat vms. this seems to help
socket-timeout = 120
#let's lock all versions here and setup.py
versions = myversions
develop =
.
eggs =
rockstor
depdir = ${buildout:directory}
#caches packages downloaded after the first run or buildout
download-cache = /tmp/
[stop-servers]
recipe = plone.recipe.command
ctl = ${buildout:directory}/bin/supervisorctl
command = (if [ -f ${stop-servers:ctl} ]; then ${stop-servers:ctl} shutdown; fi)
update-command = ${stop-servers:command}
stop-on-error = no
[rpm-deps]
recipe = plone.recipe.command
stop-on-error = true
install_cmd = sudo /usr/bin/yum install --setopt=timeout=600 -y
# samba for samba server
# libevent-devel is required for gevent which is required by gevent-socketio
# it seems python-devel is 2.6 version but required and seems to work for
# greenlet
# openssl-devel is for nginx tcp proxy module to work
command =
${rpm-deps:install_cmd} samba samba-client ypbind rpcbind \
systemtap-runtime gcc-c++ python-devel kernel-debuginfo \
kernel-devel systemtap at samba-winbind samba-winbind-clients \
oddjob-mkhomedir pam_krb5 krb5-workstation postgresql \
postgresql-server postgresql-devel kernel-ml btrfs-progs rsync \
nfs-utils kernel-ml avahi netatalk smartmontools net-tools sos hdparm \
postfix cyrus-sasl-plain yum-cron nano usbutils pciutils \
epel-release
[rpm-deps-nut]
recipe = plone.recipe.command
stop-on-error = true
install_cmd = sudo /usr/bin/yum install --setopt=timeout=600 -y
# Install Network UPS Tools from epel: note nut brings with it nut-client
# N.B. We are not in [rpm-deps] as we first need the install of epel-release
# which takes place in [rpm-deps] section.
command =
${rpm-deps-nut:install_cmd} nut nut-xml
[python]
recipe = zc.recipe.cmmi
url = http://python.org/ftp/python/2.7.3/Python-2.7.3.tgz
executable = ${buildout:directory}/parts/python/bin/python2.7
extra_options =
--enable-unicode=ucs4
--with-threads
--with-readline
[extra-stuff]
recipe = plone.recipe.command
command = mkdir -p ${buildout:directory}/var/log &&
mkdir -p ${buildout:directory}/src/rockstor/logs &&
usermod -a -G root nginx &&
systemctl disable nginx
update-command = ${extra-stuff:command}
[db-migrate]
recipe = plone.recipe.command
command = export DJANGO_SETTINGS_MODULE=settings &&
${buildout:directory}/bin/django migrate storageadmin --database=default --noinput &&
${buildout:directory}/bin/django migrate oauth2_provider --database=default --noinput &&
${buildout:directory}/bin/django migrate django_ztask --database=default --noinput &&
${buildout:directory}/bin/django migrate smart_manager --database=smart_manager --noinput &&
${buildout:directory}/bin/prep_db
update-command = ${db-migrate:command}
[myvar]
nginx_websocket_port = 7999
[myversions]
django = 1.6.2
gunicorn = 0.16.1
supervisor = 3.0b1
python = 2.7.3
djangorecipe = 1.9
psycopg2 = 2.6
[django]
recipe = djangorecipe
project = rockstor
projectegg = rockstor
settings = settings
eggs = ${buildout:eggs}
test =
storageadmin
smart_manager
extra-paths = ${buildout:directory}/src
[scripts]
recipe = zc.recipe.egg:scripts
eggs = ${buildout:eggs}
extra-paths = ${buildout:directory}/src
[mime-types]
recipe = collective.recipe.template
input = ${buildout:directory}/conf/mime.types
output = ${buildout:directory}/etc/nginx/mime.types
[gunicorn]
recipe = zc.recipe.egg:scripts
dependent-scripts = true
eggs =
${buildout:eggs}
gunicorn
[supervisor]
recipe = zc.recipe.egg:scripts
dependent-scripts = true
eggs =
${buildout:eggs}
supervisor
[collectstatic]
recipe = collective.recipe.cmd
on_install = true
on_update = true
cmds = ${buildout:directory}/bin/django collectstatic --noinput -i admin -v 0
[docker-conf]
recipe = collective.recipe.template
input = ${buildout:directory}/conf/docker.service.in
output = ${buildout:directory}/conf/docker.service
[rockstor-systemd-conf]
recipe = collective.recipe.template
input = ${buildout:directory}/conf/rockstor.service.in
output = ${buildout:directory}/conf/rockstor.service
[rockstor-pre-systemd-conf]
recipe = collective.recipe.template
input = ${buildout:directory}/conf/rockstor-pre.service.in
output = ${buildout:directory}/conf/rockstor-pre.service
[bootstrap-systemd-conf]
recipe = collective.recipe.template
input = ${buildout:directory}/conf/rockstor-bootstrap.service.in
output = ${buildout:directory}/conf/rockstor-bootstrap.service
[js-clean]
recipe = plone.recipe.command
command = rm -rf ${buildout:directory}/static/js/lib.bkp &&
mv -f ${buildout:directory}/static/js/lib ${buildout:directory}/static/js/lib.bkp
update-command = ${js-clean:command}
[js-libraries]
recipe = hexagonit.recipe.download
url = http://rockstor.com/downloads/jslibs/lib.tgz
md5sum = 1a056dd1c66626039e087fac5868e216
strip-top-level-dir = true
destination = ${buildout:directory}/static/js/lib
on-update = true
ignore-existing = true
[js-sync]
recipe = plone.recipe.command
command = rsync -avz ${buildout:directory}/static/js/lib.bkp/ ${buildout:directory}/static/js/lib/
update-command = ${js-sync:command}
[init-gunicorn]
recipe = collective.recipe.template
bind = 127.0.0.1
port = 8000
workers = 1
user = rocky
pidfile = /run/gunicorn.pid
[supervisord-conf]
recipe = collective.recipe.template
host = 127.0.0.1
port = 9001
logfile = ${supervisord-conf:logdir}/supervisord.log
input = ${buildout:directory}/conf/supervisord.conf.in
output = ${buildout:directory}/etc/supervisord.conf
pidfile = /run/supervisord.pid
[django-settings-conf]
recipe = collective.recipe.template
tapport = 10000
sinkport = 10001
schedulerport = 10001
reppubport = 10002
reprecvport = 10003
input = ${buildout:directory}/conf/settings.conf.in