-
Notifications
You must be signed in to change notification settings - Fork 0
/
assoc_dataserver_environment.cfg
333 lines (284 loc) · 8.63 KB
/
assoc_dataserver_environment.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
[buildout]
extends =
logrotate.cfg
prometheus.cfg
nginx.cfg
relstorage_environment.cfg
analytics.cfg
sites.cfg
scorm.cfg
solr.cfg
credit.cfg
calendar.cfg
contentrendering.cfg
courseware_content.cfg
invitations.cfg
segments.cfg
presentation.cfg
nltk.cfg
prod_server_versions.cfg
always-checkout = true
# NOTE: When extending multiple base configs,
# only the parts from the bottom config are
# installed by default (even if they all use 'parts +=').
# So if we want to install parts from both configs,
# we need to explicitly list them.
parts =
logrotate-conf
logrotate-cron
node_exporter
statsd_exporter
cython
lxml
pillow
eggs
checkversions
passwords
directories
zcml
main-conf
pserve-conf
gunicorn-conf
library-conf
site-assets-conf
clean-pyc
roles
supervisor
nginx-conf
relstorages
${analytics-ALL-ifsta:conf}
${scorm-ALL-ifsta:conf}
solr-conf
imagemagick
nltk
nltk_data
invitations-signer-conf
stripe-conf
google-sso-conf
dataserver-conf
client-site-package-conf
client-site-package
linkbuilder
default-asset-link
[recipe-versions]
zodb = branch=manual_postgres_dsn
[extra-sources]
nti.deploymenttools.scripts = git git@github.com:NextThought/nti.deploymenttools.scripts.git branch=master
[product-sources]
<= product-courses-sources
product-segment-sources
product-integration-ALL-sources
[solr-sources]
<= solr-ALL-sources
[completion-sources]
<= completion-ALL-sources
[credit-sources]
<= credit-ALL-sources
[calendar-sources]
<= calendar-ALL-sources
[site-sources]
<= site-ifsta-sources
[courseware-ALL-sources]
<= invitations-ALL-sources
presentation-ALL-sources
courseware-content-ALL-sources
[logrotate-cron]
logrotate-bin = /usr/sbin/logrotate
[on-site-logs-cron]
recipe = z3c.recipe.usercrontab
rsync-bin = /usr/bin/rsync
times = 5,20,35,50 * * * *
command = ${:rsync-bin} --numeric-ids -a "${deployment:log-directory}/" "logger1.nti::logs/$HOSTNAME/"
[off-site-logs-cron]
recipe = z3c.recipe.usercrontab
rsync-bin = /usr/bin/rsync
times = 10,25,40,55 * * * *
command = ${:rsync-bin} --numeric-ids -a "${deployment:log-directory}/" "10.50.30.64::logs/assoc/$HOSTNAME/"
[zcml]
package_features += no_avatar
production_env
[eggs]
eggs +=
${analytics-ALL-eggs:eggs}
${assessment-ALL-eggs:eggs}
${completion-ALL-eggs:eggs}
${contentrendering-MAIN-eggs:eggs}
${courseware-content-ALL-eggs:eggs}
${credit-ALL-eggs:eggs}
${calendar-ALL-eggs:eggs}
${invitations-ALL-eggs:eggs}
${product-segment-eggs:eggs}
${presentation-ALL-eggs:eggs}
${product-courses-eggs:eggs}
${site-ifsta-eggs:eggs}
${solr-ALL-eggs:eggs}
psycopg2
nti.deploymenttools.scripts
[MySQL-python]
environment =
rpath =
library-dirs = /usr/lib
include-dirs = /usr/include
[solr-conf]
files = 785-assoc-solr.zcml
[passwords]
file = assoc_passwords.pass.cast5
[roles]
# Permission some accounts with special capabilities
files += 667-assoc-rolemap.zcml
[relstorages]
shared-blob-dir = false
storages = Users
relstorage-name-prefix = xxx
enable-persistent-cache = true
sql_adapter = postgresql
cache-local-mb = 300
cache-local-dir-count = 16
blob-cache-size = 5gb
commit_lock_timeout = 10
[relstorages_users_storage_opts]
sql_adapter_extra_args =
dsn dbname='assoc' user='assoc' host='asci-prod-relstorage01.copkt04mhfzy.us-east-1.rds.amazonaws.com' password='${passwords:relstorage_user_passwd}'
[environment]
sql_user = ntiuser
cache_servers =
smtp_server = email-smtp.us-east-1.amazonaws.com
smtp_username = ***REMOVED***
smtp_port = 587
global_host_name = assoc.nextthought.com
global_content_directory = ${buildout:directory}/../DataserverGlobalLibrary
global_content_location = /content/
global_site_assets_directory = ${buildout:directory}/../SiteAssets
global_site_assets_location = /site-assets/
haproxy_http_port = 2080
# Because of the order of inclusion, we need this here
webapp_path = ${buildout:sources-dir}/nti.web.app
loginapp_path = ${buildout:sources-dir}/NextThoughtLoginApp
### StatsD
statsd_port = 9125
statsd_prefix = 'pserve'
[environment-haproxy]
http_port = 8082
[nginx-conf]
# Core Settings
nginx_root = ${buildout:root-directory}/node_modules/@nti/client-sites-default/dist/
nginx_user = ntiuser
nginx_workers = 9
robots_file = robots.txt
default_site_assets = ${buildout:root-directory}/node_modules/@nti/client-sites-ifsta
nt_site_assets = ${buildout:root-directory}/node_modules/@nti/client-sites-default
sitepackage_location = ${buildout:root-directory}/node_modules/@nti/client-sites-ifsta
sites_basedir = ${deployment:run-directory}/www
# Cache options
global_host_name = ""
nginx_ip = 0.0.0.0
nginx_proxy_port = ${environment:nginx_proxy_port}
nginx_http_port = ${environment:nginx_http_port}
nginx_extra_binds =
listen ${:nginx_http_port};
nginx_dataserver_port = asci-prod-haproxy01.nti:${environment-haproxy:http_port}
[nginx-conf:macosx]
# AIO is not even a directive on osx
aio =
[main-conf]
redis_client_url = redis://redis.assoc:6379
[dataserver-signer]
salt = ${passwords:dataserver_signer_salt}
[stripe]
secret_key = ${passwords:nti_stripe_key}
client_id = ca_1FSbO004zem0zhUJSdNJaYQ5HghVG0T5
[google-oauth]
authorization_url = https://oauth.nextthought.com/google/oauth1
[google-api]
filepicker_key = ***REMOVED***
filepicker_appid = 1064987854606
[google-sso]
api_key = ***REMOVED***
secret_key = ***REMOVED***
[stripe-oauth]
authorization_url = https://oauth.nextthought.com/stripe/oauth1
[pserve-conf]
email_error_subject_prefix = Assoc Error:
dataserver_log_level = INFO
analytics_log_level = INFO
completion_log_level = INFO
purchase_additional_confirmation_addresses = support@nextthought.com
email_externally = true
gc_debug = False
gc_disable = False
gc_gen0_threshold = 7000
gc_gen1_threshold = 1000
gc_gen2_threshold = 10000
[gunicorn-conf]
preload_app = true
reuse_port = true
workers = 2
[library-conf]
library-type = filesystemLibrary
library-args =
directory="${environment:global_content_directory}"
prefix="${environment:global_content_location}"
[client-site-package-conf]
recipe = nti.recipes.json
output-file = ${buildout:directory}/package.json
contents-section = client-site-package-conf-main
[client-site-package-conf-main]
name = nti-buildout
version = 0.0.1
description = NextThought Buildout NodeJS Library
author = NextThought
private = true
dependencies-section = client-site-package-conf-deps
[client-site-package-conf-deps]
@nti/client-sites-default = 1.2.0
@nti/client-sites-ifsta = 1.17.0
@nti/environment-support = 2018.1.0
nti-lib-vendor = 2018.0.0
[client-site-package]
recipe = collective.recipe.cmd
on_install = true
on_update = true
site-asset-package = ${buildout:root-directory}
cmds =
pushd ${:site-asset-package}
npm install
npm update
popd
[linkbuilder]
recipe = collective.recipe.cmd
on_install = true
on_update = true
cmds =
${buildout:bin-directory}/nti_client_linkbuilder --source ${buildout:root-directory}/node_modules --dest ${deployment:run-directory}/www/
[default-asset-link]
recipe = collective.recipe.cmd
on_install = true
on_update = false
cmds =
mkdir -p ${deployment:run-directory}/www/default-assets
pushd ${deployment:run-directory}/www/default-assets
ln -s ${environment:default_site_assets}/dist site-assets
popd
[supervisor]
# Disable supervisord based log rotation because we have switched to using logrotate
logfile-maxbytes = 0
childstdout-logfile-maxbytes = 0
childstderr-logfile-maxbytes = 0
# Don't wipe away existing logs
nocleanup = True
pserve_group_programs = pserve,analytics,metadata,solr_indexer,library_renderer,scheduled_job_dispatcher,scheduled_job_executor
programs =
999 pserve (stopwaitsecs=30) ${deployment:root-directory}/bin/nti_pserve [${:pserve-ini}]
99 solr_indexer (autostart=false stopwaitsecs=30) ${deployment:bin-directory}/nti_solr_indexer [-v]
99 analytics (autostart=false stopwaitsecs=30) ${deployment:bin-directory}/nti_analytics_processor [-v]
99 metadata (autostart=false stopwaitsecs=30) ${deployment:bin-directory}/nti_metadata_processor [-v]
99 library_renderer (autostart=false stopwaitsecs=30) ${deployment:bin-directory}/nti_library_renderer [-v -r 1 -s 2]
99 scheduled_job_dispatcher (autostart=false stopwaitsecs=30) ${deployment:bin-directory}/nti_scheduled_dispatcher [-v]
99 scheduled_job_executor (autostart=false stopwaitsecs=30) ${deployment:bin-directory}/nti_scheduled_executor [-v]
99 nginx /usr/sbin/nginx [-c ${deployment:etc-directory}/nginx/nginx.conf]
99 qp_mailer ${deployment:bin-directory}/nti_mailer_qp_process [-v ${deployment:mail-directory}]
${prometheus-supervisord:node_exporter}
${prometheus-supervisord:statsd_exporter}
[boto]
aws_access_key_id = ***REMOVED***
aws_secret_access_key = ${passwords:aws_secret_access_key}