common.cfg 9.42 KB
Newer Older
1 2 3 4 5
[buildout]
extends =
  buildout.hash.cfg
  ../../stack/slapos.cfg
  ../../component/dash/buildout.cfg
6
  ../../component/caddy/buildout.cfg
7 8 9 10 11
  ../../component/gzip/buildout.cfg
  ../../component/dcron/buildout.cfg
  ../../component/logrotate/buildout.cfg
  ../../component/rdiff-backup/buildout.cfg
  ../../component/trafficserver/buildout.cfg
12
  ../../component/6tunnel/buildout.cfg
13 14

  ../../stack/nodejs.cfg
15
  ../../stack/caucase/buildout.cfg
16 17 18 19 20
# Monitoring stack (keep on bottom)
  ../../stack/monitor/buildout.cfg

parts +=
  template
21 22 23
  template-caddy-frontend
  template-caddy-replicate
  caddy
24 25 26 27 28 29 30

  dcron
  logrotate
  rdiff-backup
  npm-modules
  proxy-by-url
  http-proxy
31 32
  caddyprofiledeps

33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
  kedifa-develop
  kedifa

[kedifa-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/kedifa.git
git-executable = ${git:location}/bin/git
revision = 67bd60ea1bfb4fc6aafdfe4fa204f725731f20cf

[kedifa-develop]
recipe = zc.recipe.egg:develop
setup = ${kedifa-repository:location}

[kedifa]
recipe = zc.recipe.egg
eggs =
  ${python-cryptography:egg}
  kedifa

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
[caddyprofiledeps-setup]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/setup.py

[caddyprofiledeps-dummy]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/caddyprofiledummy.py

[caddyprofiledeps-prepare]
recipe = plone.recipe.command
stop-on-error = True
location = ${buildout:parts-directory}/${:_buildout_section_name_}
update-command = ${:command}
command =
  rm -fr ${:location} &&
  mkdir -p ${:location} &&
  cp ${caddyprofiledeps-setup:target} ${:location}/ &&
  cp ${caddyprofiledeps-dummy:target} ${:location}/

[caddyprofiledeps-develop]
recipe = zc.recipe.egg:develop
setup = ${caddyprofiledeps-prepare:location}

[caddyprofiledeps]
depends = ${caddyprofiledeps-develop:recipe}
recipe = zc.recipe.egg
eggs =
  caddyprofiledeps
80 81 82 83 84 85

# Extent extra-eggs.
[extra-eggs]
eggs +=
  websockify
  erp5.util
86
  ${caucase-eggs:eggs}
87

88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
[template-common]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-common.cfg.in
rendered = ${buildout:directory}/instance-common.cfg
mode = 0644
context =
  key develop_eggs_directory buildout:develop-eggs-directory
  key eggs_directory buildout:eggs-directory

[template-frontend-parameter-section]
common_profile = ${template-common:rendered}

bin_directory = ${buildout:bin-directory}

sixtunnel = ${6tunnel:location}
caddy = ${caddy:output}
caddy_location = ${caddy:location}
curl = ${curl:location}
dash = ${dash:location}
dcron = ${dcron:location}
gzip = ${gzip:location}
logrotate = ${logrotate:location}
110 111
openssl = ${openssl:location}/bin/openssl
openssl_cnf = ${openssl:location}/etc/ssl/openssl.cnf
112
trafficserver = ${trafficserver:location}
113
sha256sum = ${coreutils:location}/bin/sha256sum
114 115 116
kedifa = ${:bin_directory}/kedifa
kedifa-getter = ${:bin_directory}/kedifa-getter
kedifa-csr = ${:bin_directory}/kedifa-csr
117 118 119 120

monitor_template = ${monitor-template:output}
template_cached_slave_virtualhost = ${template-cached-slave-virtualhost:target}
template_caddy_frontend_configuration = ${template-caddy-frontend-configuration:target}
121 122
template_graceful_script = ${template-graceful-script:target}
template_validate_script = ${template-validate-script:target}
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
template_caddy_lazy_script_call = ${template-caddy-lazy-script-call:target}
template_default_slave_virtualhost = ${template-default-slave-virtualhost:target}
template_empty = ${template-empty:target}
template_log_access = ${template-log-access:target}
template_nging_configuration = ${template-nginx-configuration:output}
template_nginx_eventsource_slave_virtualhost = ${template-nginx-eventsource-slave-virtualhost:target}
template_nginx_notebook_slave_virtualhost = ${template-nginx-notebook-slave-virtualhost:target}
template_not_found_html = ${template-not-found-html:target}
template_slave_configuration = ${template-slave-configuration:target}
template_slave_list = ${template-slave-list:target}
template_trafficserver_records_config = ${template-trafficserver-records-config:location}
template_trafficserver_records_config_filename = ${template-trafficserver-records-config:filename}
template_trafficserver_records_config_location = ${template-trafficserver-records-config:location}
template_trafficserver_storage_config_filename = ${template-trafficserver-storage-config:filename}
template_trafficserver_storage_config_location = ${template-trafficserver-storage-config:location}
template_wrapper = ${template-wrapper:output}

140
[template]
141 142 143
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/template.cfg
144
mode = 0644
145 146 147 148 149 150
context =
  key common_profile template-common:rendered

  key monitor2_template monitor2-template:rendered
  key template_caddy_frontend template-caddy-frontend:target
  key template_caddy_replicate template-caddy-replicate:target
151
  key template_kedifa template-kedifa:target
152 153
  key template_replicate_publish_slave_information template-replicate-publish-slave-information:target
  key caddy_backend_url_validator caddy-backend-url-validator:output
154
  key caddy_custom_http_validator caddy-custom-http-validator:output
155 156

  section template_frontend_parameter_dict template-frontend-parameter-section
157
  key caucase_jinja2_library caucase-jinja2-library:target
158

159
[template-caddy-frontend]
160 161
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-apache-frontend.cfg.in
162 163
mode = 0644

164 165 166 167 168 169 170
[caddy-backend-url-validator]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/${:filename}
filename = caddy-backend-url-validator.in
output = ${buildout:directory}/caddy-backend-url-validator
mode = 0750

171 172 173 174 175 176 177
[caddy-custom-http-validator]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/${:filename}
filename = caddy-custom-http-validator.in
output = ${buildout:directory}/caddy-custom-http-validator
mode = 0750

178
[template-caddy-replicate]
179 180 181 182
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-apache-replicate.cfg.in
mode = 0644

183 184 185 186 187
[template-kedifa]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-kedifa.cfg.in
mode = 0644

188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
[download-template]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/${:filename}
mode = 640

[template-slave-list]
<=download-template
filename = apache-custom-slave-list.cfg.in

[template-slave-configuration]
<=download-template
filename = custom-virtualhost.conf.in

[template-replicate-publish-slave-information]
<=download-template
filename = replicate-publish-slave-information.cfg.in

205
[template-caddy-frontend-configuration]
206
<=download-template
207
filename = Caddyfile.in
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

[template-not-found-html]
<=download-template
filename = notfound.html

[template-default-slave-virtualhost]
<=download-template
filename = default-virtualhost.conf.in

[template-cached-slave-virtualhost]
<=download-template
filename = cached-virtualhost.conf.in

[template-log-access]
<=download-template
filename = template-log-access.conf.in

[template-empty]
<=download-template
filename = empty.in

[template-wrapper]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/wrapper.in
output = ${buildout:directory}/template-wrapper.cfg
mode = 0644

[template-trafficserver-records-config]
236
<=download-template
237 238 239 240
url = ${:_profile_base_location_}/templates/trafficserver/${:filename}
filename = records.config.jinja2

[template-trafficserver-storage-config]
241
<=download-template
242 243 244 245 246 247 248 249 250 251
url = ${:_profile_base_location_}/templates/trafficserver/${:filename}
filename = storage.config.jinja2

# NGINX Configuration
[template-nginx-configuration]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/nginx.cfg.in
output = ${buildout:directory}/template-nginx.cfg.in
mode = 0644

252
[template-caddy-lazy-script-call]
253 254 255
<=download-template
filename = apache-lazy-script-call.sh.in

256
[template-graceful-script]
257
<=download-template
258
filename = graceful-script.sh.in
259

260
[template-validate-script]
261
<=download-template
262
filename = validate-script.sh.in
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
[template-nginx-eventsource-slave-virtualhost]
<=download-template
filename = nginx-eventsource-slave.conf.in

[template-nginx-notebook-slave-virtualhost]
<=download-template
filename = nginx-notebook-slave.conf.in

# Migrated from KVM recipe
[http-proxy]
# https://github.com/nodejitsu/node-http-proxy
recipe = slapos.recipe.build:download-unpacked
# use upstream when merged
url = https://lab.nexedi.com/nexedi/node-http-proxy/repository/archive.zip?ref=a5d3aff428ee8d840068b439f6ce121077f1144f
md5sum = 65602466066444c718215de41f546585

[proxy-by-url]
# https://github.com/dominictarr/proxy-by-url
recipe = slapos.recipe.build:download-unpacked
# use upstream when merged
url = https://lab.nexedi.com/nexedi/proxy-by-url/repository/archive.zip?ref=59fcb11a3e00c45b4b0362e76f29653abb313072
md5sum = c383e0c5ff31b56f7987466e8304c941

[npm-modules]
recipe = plone.recipe.command
destination = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command =
  export HOME=${:location};
  rm -fr ${:destination} &&
  mkdir -p ${:destination} &&
  cd ${:destination} &&
  ${nodejs:location}/bin/node ${nodejs:location}/bin/npm install colors@0.6.0-1 &&
  ${nodejs:location}/bin/node ${nodejs:location}/bin/npm install socket.io@0.8.7 &&
  ${nodejs:location}/bin/node ${nodejs:location}/bin/npm install socket.io-client@0.8.7 &&
  ${nodejs:location}/bin/node ${nodejs:location}/bin/npm install optimist@0.3.1 &&
  ${nodejs:location}/bin/node ${nodejs:location}/bin/npm install pkginfo@0.2.3