diff --git a/stack/erp5/buildout.cfg b/stack/erp5/buildout.cfg index 61d30101f718d6c18fc1cdef15b35c18cf8d0a12..1cfe49a17ab7a45a7d7e30c575cdf7f349ddff59 100644 --- a/stack/erp5/buildout.cfg +++ b/stack/erp5/buildout.cfg @@ -50,7 +50,6 @@ extends = ../../component/stunnel/buildout.cfg ../../component/subversion/buildout.cfg ../../component/tesseract/buildout.cfg - ../../component/varnish/buildout.cfg ../../component/w3-validator/buildout.cfg ../../component/w3m/buildout.cfg ../../component/xorg/buildout.cfg @@ -79,7 +78,6 @@ parts = haproxy jsl stunnel - varnish-3.0 w3m poppler libpng @@ -175,11 +173,6 @@ context = filename = instance-mariadb.cfg.in md5sum = 2d3bc3bb5e79519897c96acbdcc4ece6 -[template-zope] -< = download-base -filename = instance-zope.cfg.in -md5sum = 2b68521ebde309d6453336f1a2e46381 - [template-kumofs] < = download-base filename = instance-kumofs.cfg.in @@ -210,7 +203,7 @@ md5sum = 564006953b7d7a12d40a14b6648b32f0 # XXX: "template.cfg" is hardcoded in instanciation recipe filename = template.cfg template = ${:_profile_base_location_}/instance.cfg.in -md5sum = 3465c19d25e14865c6e844c9a26ee984 +md5sum = d2b0f35e82bb0967fef99b3b7d37768e extra-context = key apache_location apache:location key aspell_location aspell:location @@ -258,34 +251,25 @@ extra-context = key stunnel_location stunnel:location key template_balancer template-balancer:target key template_cloudooo template-cloudooo:target - key template_cluster_zope template-cluster-zope:target - key template_erp5_single template-erp5-single:target - key template_erp5_cluster template-erp5-cluster:target + key template_erp5 template-erp5:target key template_kumofs template-kumofs:target key template_logrotate_base template-logrotate-base:rendered key template_mariadb template-mariadb:target key template_mariadb_initial_setup template-mariadb-initial-setup:target key template_my_cnf template-my-cnf:target key template_neo template-neo:target - key template_varnish template-varnish:target key template_zeo template-zeo:target key template_zope template-zope:target key template_zope_conf template-zope-conf:target key tesseract_location tesseract:location - key varnish_location varnish-3.0:location key w3m_location w3m:location key wget_location wget:location key zlib_location zlib:location -[template-erp5-single] -< = download-base -filename = instance-erp5-single.cfg.in -md5sum = 77ec4f095a22b5bd7dfea9dff63bade5 - -[template-erp5-cluster] +[template-erp5] < = download-base filename = instance-erp5-cluster.cfg.in -md5sum = c745d794b28cae64feba527f894d7340 +md5sum = 4a0cd404bed41a58512396af9f964c66 [template-neo] < = download-base @@ -297,7 +281,7 @@ md5sum = 1499c42d196f6627efb904f7e4d48b1b filename = instance-zeo.cfg.in md5sum = 9fff70e6958bccbb3d4982cb3611813f -[template-cluster-zope] +[template-zope] < = download-base filename = instance-cluster-zope.cfg.in md5sum = c5c13fb438aa2a4d9ce22880e16fc2cd @@ -316,11 +300,6 @@ extra-context = key gzip_location gzip:location key logrotate_location logrotate:location -[template-varnish] -< = download-base -filename = instance-varnish.cfg.in -md5sum = b3020e1da069d43ece0de99b106cfb45 - [bt5-repository] # Format: # <url or path> [...] diff --git a/stack/erp5/instance-erp5-cluster.cfg.in b/stack/erp5/instance-erp5-cluster.cfg.in index 9d2a2a2890b573b36727313c07e9e6e1d094ee26..28ea473d2f9ab30d866c84e687183d117fa60bd3 100644 --- a/stack/erp5/instance-erp5-cluster.cfg.in +++ b/stack/erp5/instance-erp5-cluster.cfg.in @@ -81,7 +81,7 @@ config-tidstorage-ip = ${request-zodb:connection-tidstorage-ip} config-tidstorage-port = ${request-zodb:connection-tidstorage-port} config-timezone = {{ slapparameter_dict.get('timezone', 'UTC') }} config-site-id = {{ site_id }} -software-type = cluster-zope +software-type = zope {% set zope_family_dict = {} -%} {% for custom_name, zope_parameter_dict in slapparameter_dict.get('zope-partition-dict', {'1': {}}).items() -%} diff --git a/stack/erp5/instance-erp5-single.cfg.in b/stack/erp5/instance-erp5-single.cfg.in deleted file mode 100644 index 3902b8758d5b7929ba68abe68b967adb54853396..0000000000000000000000000000000000000000 --- a/stack/erp5/instance-erp5-single.cfg.in +++ /dev/null @@ -1,144 +0,0 @@ -############################# -# -# Request erp5 development environnment -# -############################# -[buildout] - -extends = {{ template_zope }} -parts += - request-mariadb - request-cloudooo - request-memcached - request-kumofs - basedirectory - test-runner - erp5-bootstrap - erp5-promise - promise-erp5-site - -eggs-directory = {{ eggs_directory }} -develop-eggs-directory = {{ develop_eggs_directory }} -offline = true - -[slap-parameter] -# default site id -site-id = erp5 -cloudooo-json = -promise-path = ${rootdirectory:etc}/erp5promise.cfg -bt5 = erp5_full_text_myisam_catalog - erp5_configurator_standard - erp5_configurator_maxma_demo - erp5_configurator_ung - erp5_configurator_run_my_doc -bt5-repository-url = {{ local_bt5_repository }} -smtp-url = smtp://localhost:25/ - -[test-runner] -recipe = slapos.cookbook:erp5.test -certificate-authority-path = ${test-certificate-authority:ca-dir} -mysql-url = ${request-mariadb:connection-url} -kumofs-url = ${request-kumofs:connection-url} -memcached-url = ${request-memcached:connection-url} -cloudooo-url = ${request-cloudooo:connection-url} -test-instance-path = ${directory:unit-test-path} - -prepend-path = ${buildout:bin-directory} -run-unit-test = ${buildout:bin-directory}/runUnitTest -run-test-suite = ${buildout:bin-directory}/runTestSuite - -openssl-binary = ${test-certificate-authority:openssl-binary} -run-unit-test-binary = {{ bin_directory }}/runUnitTest -run-test-suite-binary = {{ bin_directory }}/runTestSuite - -[test-certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = {{ openssl_location }}/bin/openssl -ca-dir = ${directory:test-ca-dir} -requests-directory = ${test-cadirectory:requests} -wrapper = ${basedirectory:services}/test-ca -ca-private = ${test-cadirectory:private} -ca-certs = ${test-cadirectory:certs} -ca-newcerts = ${test-cadirectory:newcerts} -ca-crl = ${test-cadirectory:crl} - -[test-cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = ${directory:test-ca-dir}/requests -private = ${directory:test-ca-dir}/private -certs = ${directory:test-ca-dir}/certs -newcerts = ${directory:test-ca-dir}/newcerts -crl = ${directory:test-ca-dir}/crl - -[erp5-bootstrap] -recipe = slapos.cookbook:erp5.bootstrap -runner-path = ${basedirectory:services}/erp5-bootstrap -mysql-url = ${request-mariadb:connection-url} -zope-url = http://${zope-instance:user}:${zope-instance:password}@${zope-instance:ip}:${zope-instance:port}/${slap-parameter:site-id} - -[erp5-promise] -recipe = slapos.cookbook:erp5.promise -promise-path = ${slap-parameter:promise-path} -kumofs-url = ${request-kumofs:connection-url} -memcached-url = ${request-memcached:connection-url} -cloudooo-url = ${request-cloudooo:connection-url} -smtp-url = ${slap-parameter:smtp-url} -bt5 = ${slap-parameter:bt5} -bt5-repository-url = ${slap-parameter:bt5-repository-url} - -[request-common] -recipe = slapos.cookbook:request.serialised -software-url = ${slap-connection:software-release-url} -sla = computer_guid -sla-computer_guid = ${slap-connection:computer-id} -return = url -server-url = ${slap-connection:server-url} -key-file = ${slap-connection:key-file} -cert-file = ${slap-connection:cert-file} -computer-id = ${slap-connection:computer-id} -partition-id = ${slap-connection:partition-id} - -[request-mariadb] -<=request-common -name = MariaDB DataBase -software-type = mariadb -{% set mariadb_dict = slapparameter_dict.get('mariadb-dict', {}) -%} -{% for option, value in mariadb_dict.items() -%} -config-{{ option }} = {{ dumps(value) }} -{% endfor -%} -config = {{ ' '.join(mariadb_dict) }} - -[request-cloudooo] -<=request-common -name = Cloudooo -config = cloudooo-json -config-cloudooo-json = ${slap-parameter:cloudooo-json} -software-type = cloudooo - -[request-memcached] -<=request-common -name = KumoFS-ram -software-type = kumofs -config = ram-storage-size -config-ram-storage-size = 64m - -[request-kumofs] -<=request-common -name = KumoFS -software-type = kumofs - -[zope-instance] -promise-path = ${slap-parameter:promise-path} -site-id = ${slap-parameter:site-id} - -[directory] -test-ca-dir = ${rootdirectory:srv}/test-ca -test-instance-path = ${rootdirectory:srv}/test-instance -unit-test-path = ${:test-instance-path}/unit_test - -[promise-erp5-site] -recipe = slapos.cookbook:check_url_available -path = ${basedirectory:promises}/erp5site -url = http://${zope-instance:ip}:${zope-instance:port}/${slap-parameter:site-id} -dash_path = {{ dash_location }}/bin/dash -curl_path = {{ curl_location }}/bin/curl diff --git a/stack/erp5/instance-varnish.cfg.in b/stack/erp5/instance-varnish.cfg.in deleted file mode 100644 index ab03c36d665299be77a6f5a0e037062b3c32ddae..0000000000000000000000000000000000000000 --- a/stack/erp5/instance-varnish.cfg.in +++ /dev/null @@ -1,139 +0,0 @@ -{% if software_type == slap_software_type -%} -{% set web_checker_parameter = slapparameter_dict['web-checker-mail-address'] -%} -[buildout] -parts = - publish-varnish-connection-information - varnish-instance - cron - cron-entry-logrotate - {# When web_checker related parameter is given, web_checker will be enabled.#} -{% if web_checker_parameter is defined %} - web-checker - cron-entry-web-checker - logrotate-entry-web-checker -{% endif %} - -eggs-directory = {{ eggs_directory }} -develop-eggs-directory = {{ develop_eggs_directory }} -offline = true - -[publish-varnish-connection-information] -recipe = slapos.cookbook:publish.serialised -url = http://${varnish-instance:ip}:${varnish-instance:server-port}/ - -[varnish-instance] -recipe = slapos.cookbook:generic.varnish - -# Network options -ip = ${slap-network-information:local-ipv4} -server-port = 6001 -manager-port = 6002 -stunnel-port = 6003 - -# Paths: Running wrappers -varnishd-wrapper = ${basedirectory:services}/varnishd -varnishlog-wrapper = ${rootdirectory:bin}/varnishlog -stunnel-wrapper = ${basedirectory:services}/stunnel - -# Binary information -varnishd-binary = {{ parameter_dict['varnish'] }}/sbin/varnishd -varnishlog-binary = {{ parameter_dict['varnish'] }}/bin/varnishlog -shell-path = {{ parameter_dict['dash'] }}/bin/dash -stunnel-binary = {{ parameter_dict['stunnel'] }}/bin/stunnel -# Configuration by VCL -vcl-file = ${rootdirectory:etc}/default.vcl -pid-file = ${basedirectory:run}/varnishd.pid -stunnel-conf-file = ${rootdirectory:etc}/stunnel.conf -stunnel-pid-file = ${basedirectory:run}/stunnel.pid -varnish-data = ${directory:varnish-data} -# this will pass at -n option -varnish-instance-name = ${directory:varnish-instance} -web-checker = {{ parameter_dict['buildout-bin-directory'] }}/web_checker_utility - -[cron-entry-web-checker] -<= cron -recipe = slapos.cookbook:cron.d -name = web-checker -frequency = 0 0 * * * -command = ${varnish-instance:web-checker} ${web-checker:web-checker-config} - -[web-checker] -recipe = slapos.cookbook:webchecker -web-checker-config = ${rootdirectory:etc}/web_checker.cfg -web-checker-working-directory = ${directory:web-checker} -frontend-url = ${varnish-instance:ip}:${varnish-instance:server-port} -wget-binary-path = {{ parameter_dict['wget'] }}/bin/wget -varnishlog-binary-path = ${varnish-instance:varnishlog-wrapper} -web-checker-log = ${basedirectory:log}/web-checker.log - -[cron] -recipe = slapos.cookbook:cron -dcrond-binary = {{ parameter_dict['dcron'] }}/sbin/crond -cron-entries = ${directory:cron-entries} -crontabs = ${directory:crontabs} -cronstamps = ${directory:cronstamps} -binary = ${basedirectory:services}/crond -catcher = ${cron-simplelogger:wrapper} - -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -wrapper = ${rootdirectory:bin}/cron_simplelogger -log = ${basedirectory:log}/cron.log - -[cron-entry-logrotate] -<= cron -recipe = slapos.cookbook:cron.d -name = logrotate -frequency = 0 0 * * * -command = ${logrotate:wrapper} - -[logrotate] -recipe = slapos.cookbook:logrotate -# Binaries -logrotate-binary = {{ parameter_dict['logrotate'] }}/usr/sbin/logrotate -gzip-binary = {{ parameter_dict['gzip'] }}/bin/gzip -gunzip-binary = {{ parameter_dict['gzip'] }}/bin/gunzip -# Directories -wrapper = ${rootdirectory:bin}/logrotate -conf = ${rootdirectory:etc}/logrotate.conf -logrotate-entries = ${directory:logrotate-entries} -backup = ${directory:logrotate-backup} -state-file = ${rootdirectory:srv}/logrotate.status - -[logrotate-entry-web-checker] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = web-checker -log = ${web-checker:web-checker-log} -frequency = daily -rotate-num = 30 -sharedscripts = true -notifempty = true -create = true - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -services = ${rootdirectory:etc}/run -run = ${rootdirectory:var}/run -backup = ${rootdirectory:srv}/backup -log = ${rootdirectory:var}/log -backup = ${rootdirectory:srv}/backup - -[directory] -recipe = slapos.cookbook:mkdirectory -varnish-data = ${rootdirectory:srv}/varnish -varnish-instance = ${directory:varnish-data}/instance -cron-entries = ${rootdirectory:etc}/cron.d -crontabs = ${rootdirectory:etc}/crontabs -cronstamps = ${rootdirectory:etc}/cronstamps -logrotate-backup = ${basedirectory:backup}/logrotate -logrotate-entries = ${rootdirectory:etc}/logrotate.d -web-checker = ${rootdirectory:srv}/web-checker - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = ${buildout:directory}/etc -var = ${buildout:directory}/var -srv = ${buildout:directory}/srv -bin = ${buildout:directory}/bin -{% endif %} diff --git a/stack/erp5/instance-zope.cfg.in b/stack/erp5/instance-zope.cfg.in deleted file mode 100644 index d8453e728ad08fc919171669b46c0c471fae2d05..0000000000000000000000000000000000000000 --- a/stack/erp5/instance-zope.cfg.in +++ /dev/null @@ -1,309 +0,0 @@ -[buildout] -parts = - certificate-authority - publish-apache-zope-backend-connection-string - zope-instance - apache-zope-backend-instance - ca-apache-zope-backend - logrotate - erp5-certificate-authority - logrotate-entry-zope - cron - cron-entry-logrotate - binary-link - bt5-erp5-link - promise-zope - promise-apache-zope-backend - -eggs-directory = {{ eggs_directory }} -develop-eggs-directory = {{ develop_eggs_directory }} -offline = true - -{% if 'frontend-software-url' in slapparameter_dict -%} -[request-slave-frontend] -recipe = slapos.cookbook:request.serialised -software-url = {{ slapparameter_dict['frontend-software-url'] }} -software-type = {{ slapparameter_dict.get('frontend-software-type', 'RootSoftwareInstance') }} -sla = instance_guid -sla-instance_guid = {{ slapparameter_dict['frontend-instance-guid'] }} -server-url = ${slap-connection:server-url} -key-file = ${slap-connection:key-file} -cert-file = ${slap-connection:cert-file} -computer-id = ${slap-connection:computer-id} -partition-id = ${slap-connection:partition-id} -name = SlaveFrontend -slave = true -{% set config_dict = { - 'url': '${apache-zope-backend-instance:scheme}://[${apache-zope-backend-instance:ip}]:${apache-zope-backend-instance:port}', - 'type': 'zope', -} -%} -{% if 'frontend-domain' in slapparameter_dict -%} -{% do config_dict.__setitem__('custom_domain', slapparameter_dict['frontend-domain']) -%} -{% endif -%} -config = {{ config_dict.keys() | join(' ') }} -{% for name, value in config_dict.items() -%} -config-{{ name }} = {{ value }} -{% endfor -%} -return = site_url - -[publish-apache-zope-backend-connection-string] -recipe = slapos.cookbook:publish.serialised -url = ${request-slave-frontend:connection-site_url} -login = ${zope-instance:user} -password = ${zope-instance:password} -url-deadlock = ${:url}/${zope-instance:deadlock-path}?${zope-instance:deadlock-password} -{% else %} -[publish-apache-zope-backend-connection-string] -recipe = slapos.cookbook:publish.serialised -url = https://${zope-instance:user}:${zope-instance:password}@[${apache-zope-backend-instance:ip}]:${apache-zope-backend-instance:port} -url-deadlock = ${:url}/${zope-instance:deadlock-path}?${zope-instance:deadlock-password} -{% endif %} - -[apache-zope-backend-instance] -recipe = slapos.cookbook:apache.zope.backend -backend = http://${zope-instance:ip}:${zope-instance:port}/ -ip = ${slap-network-information:global-ipv6} -port = 16001 -wrapper = ${rootdirectory:bin}/apache -key-file = ${directory:apache-conf}/apache.key -cert-file = ${directory:apache-conf}/apache.crt -configuration-file = ${directory:apache-conf}/apache.conf -{# By default, if no white list is specified, backend allows access to everyone -#} -access-control-string = {{ slapparameter_dict.get('access-control-string', 'all') }} -pid-file = ${basedirectory:run}/apache.pid -lock-file = ${basedirectory:run}/apache.lock -ssl-session-cache = ${basedirectory:log}/apache-ssl-session-cache -error-log = ${basedirectory:log}/apache-error.log -access-log = ${basedirectory:log}/apache-access.log -apache-binary = {{ apache_location }}/bin/httpd -scheme = https - -[ca-apache-zope-backend] -<= certificate-authority -recipe = slapos.cookbook:certificate_authority.request -key-file = ${apache-zope-backend-instance:key-file} -cert-file = ${apache-zope-backend-instance:cert-file} -executable = ${apache-zope-backend-instance:wrapper} -wrapper = ${basedirectory:services}/apache - -[zope-instance] -recipe = slapos.cookbook:generic.zope - -# Options -user = zope -port = 12001 -ip = ${slap-network-information:local-ipv4} -zodb-cache-size = 5000 -thread-amount = 4 -zodb-path = ${directory:zodb}/main.fs -deadlock-path = /manage_debug_threads - -# Paths -wrapper = ${basedirectory:services}/zope-development -instance-path = ${directory:instance} -instance-etc = ${directory:instance-etc} -instance-products = ${directory:instance-products} -bt5-repository = ${rootdirectory:var}/bt5_repository -tmp-path = ${rootdirectory:tmp} -bin-path = ${rootdirectory:bin} -site-zcml = ${:instance-etc}/site.zcml -logrotate-post = ${rootdirectory:bin}/zope-post-logrotate -pid-file = ${basedirectory:run}/zope.pid -lock-file = ${basedirectory:run}/zope.lock -event-log = ${basedirectory:log}/zope-event.log -z2-log = ${basedirectory:log}/zope-Z2.log -configuration-file = ${rootdirectory:etc}/zope.conf -inituser = ${:instance-path}/inituser -# Binary information -runzope-binary = {{ bin_directory }}/runzope - -# Defaults -bt5-repository-list = - -[logrotate] -recipe = slapos.cookbook:logrotate -# Binaries -logrotate-binary = {{ logrotate_location }}/usr/sbin/logrotate -gzip-binary = {{ gzip_location }}/bin/gzip -gunzip-binary = {{ gzip_location }}/bin/gunzip -# Directories -wrapper = ${rootdirectory:bin}/logrotate -conf = ${rootdirectory:etc}/logrotate.conf -logrotate-entries = ${directory:logrotate-entries} -backup = ${directory:logrotate-backup} -state-file = ${rootdirectory:srv}/logrotate.status - -[logrotate-entry-zope] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = zope -log = ${zope-instance:event-log} ${zope-instance:z2-log} -frequency = daily -rotate-num = 30 -post = {{ bin_directory }}/killpidfromfile ${zope-instance:pid-file} SIGUSR2 -sharedscripts = true -notifempty = true -create = true - -[logrotate-entry-apache-zope-backend] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = zope -log = ${apache-zope-backend-instance:error-log} ${apache-zope-backend-instance:access-log} -frequency = daily -rotate-num = 30 -post = {{ bin_directory }}/killpidfromfile ${apache-zope-backend-instance:pid-file} SIGUSR1 -sharedscripts = true -notifempty = true -create = true - -[cron] -recipe = slapos.cookbook:cron -dcrond-binary = {{ dcron_location }}/sbin/crond -cron-entries = ${directory:cron-entries} -crontabs = ${directory:crontabs} -cronstamps = ${directory:cronstamps} -catcher = ${cron-simplelogger:wrapper} -binary = ${basedirectory:services}/crond - -[cron-simplelogger] -recipe = slapos.cookbook:simplelogger -wrapper = ${rootdirectory:bin}/cron_simplelogger -log = ${basedirectory:log}/cron.log - -[cron-entry-logrotate] -<= cron -recipe = slapos.cookbook:cron.d -name = logrotate -frequency = 0 0 * * * -command = ${logrotate:wrapper} - -[binary-link] -recipe = slapos.cookbook:symbolic.link -target-directory = ${rootdirectory:bin} -link-binary = - {{ coreutils_location }}/bin/basename - {{ coreutils_location }}/bin/cat - {{ coreutils_location }}/bin/cp - {{ coreutils_location }}/bin/ls - {{ coreutils_location }}/bin/tr - {{ coreutils_location }}/bin/uname - {{ git_location }}/bin/git - {{ graphviz_location }}/bin/dot - {{ grep_location }}/bin/grep - {{ imagemagick_location }}/bin/convert - {{ imagemagick_location }}/bin/identify - {{ librsvg_location }}/bin/rsvg-convert - {{ mariadb_location }}/bin/mysql - {{ mariadb_location }}/bin/mysqldump - {{ sed_location }}/bin/sed - {{ tesseract_location }}/bin/tesseract - {{ w3m_location }}/bin/w3m - {{ openssl_location }}/bin/openssl - {{ poppler_location }}/bin/pdfinfo - {{ poppler_location }}/bin/pdfseparate - {{ poppler_location }}/bin/pdftotext - {{ poppler_location }}/bin/pdftohtml - {{ poppler_location }}/bin/pdfunite - {{ dmtx_utils_location }}/bin/dmtxwrite - {{ aspell_location }}/bin/aspell - {{ jsl_location }}/bin/jsl -[certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = {{ openssl_location }}/bin/openssl -ca-dir = ${directory:ca-dir} -requests-directory = ${cadirectory:requests} -wrapper = ${basedirectory:services}/ca -ca-private = ${cadirectory:private} -ca-certs = ${cadirectory:certs} -ca-newcerts = ${cadirectory:newcerts} -ca-crl = ${cadirectory:crl} - -[bt5-erp5-link] -recipe = slapos.cookbook:symbolic.link -target-directory = ${basedirectory:bt5-erp5} -link-binary = - {{ erp5_location }}/product/ERP5/bootstrap - {{ erp5_location }}/bt5 - -[cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = ${directory:ca-dir}/requests -private = ${directory:ca-dir}/private -certs = ${directory:ca-dir}/certs -newcerts = ${directory:ca-dir}/newcerts -crl = ${directory:ca-dir}/crl - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = ${buildout:directory}/etc -var = ${buildout:directory}/var -srv = ${buildout:directory}/srv -bin = ${buildout:directory}/bin -tmp = ${buildout:directory}/tmp - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = ${rootdirectory:var}/log -services = ${rootdirectory:etc}/run -promises = ${rootdirectory:etc}/promise/ -run = ${rootdirectory:var}/run -backup = ${rootdirectory:srv}/backup -bt5-erp5 = ${rootdirectory:var}/bt5_erp5 - -[erp5-certificate-authority] -recipe = slapos.cookbook:certificate_authority -openssl-binary = {{ openssl_location }}/bin/openssl -ca-dir = ${directory:erp5-ca-dir} -requests-directory = ${erp5-cadirectory:requests} -wrapper = ${basedirectory:services}/erp5-ca -ca-private = ${erp5-cadirectory:private} -ca-certs = ${erp5-cadirectory:certs} -ca-newcerts = ${erp5-cadirectory:newcerts} -ca-crl = ${erp5-cadirectory:crl} - -[erp5-cadirectory] -recipe = slapos.cookbook:mkdirectory -requests = ${directory:erp5-ca-dir}/requests -private = ${directory:erp5-ca-dir}/private -certs = ${directory:erp5-ca-dir}/certs -newcerts = ${directory:erp5-ca-dir}/newcerts -crl = ${directory:erp5-ca-dir}/crl - -[directory] -recipe = slapos.cookbook:mkdirectory -zodb = ${rootdirectory:srv}/zodb -instance = ${rootdirectory:srv}/erp5shared -instance-etc = ${:instance}/etc -apache-conf = ${rootdirectory:etc}/apache -instance-etc-package-include = ${:instance}/etc/package-include -# because of bug in slapos.recipe.template keys are lowercased -instance-document = ${:instance}/Document -instance-propertysheet = ${:instance}/PropertySheet -instance-products = ${:instance}/Products -instance-extensions = ${:instance}/Extensions -instance-constraint = ${:instance}/Constraint -instance-import = ${:instance}/import -instance-lib = ${:instance}/lib -instance-tests = ${:instance}/tests -erp5-ca-dir = ${rootdirectory:srv}/erp5-ca -ca-dir = ${rootdirectory:srv}/ssl -cron-entries = ${rootdirectory:etc}/cron.d -crontabs = ${rootdirectory:etc}/crontabs -cronstamps = ${rootdirectory:etc}/cronstamps -logrotate-backup = ${basedirectory:backup}/logrotate -logrotate-entries = ${rootdirectory:etc}/logrotate.d - -# Deploy zope promises scripts -[promise-zope] -recipe = slapos.cookbook:check_port_listening -path = ${basedirectory:promises}/zope -hostname = ${zope-instance:ip} -port = ${zope-instance:port} - -[promise-apache-zope-backend] -recipe = slapos.cookbook:check_port_listening -path = ${basedirectory:promises}/apache-backend -hostname = ${apache-zope-backend-instance:ip} -port = ${apache-zope-backend-instance:port} - diff --git a/stack/erp5/instance.cfg.in b/stack/erp5/instance.cfg.in index e981c2175f85bc8bffec7bbea91a07e40d31db92..17335506412e496cedfcb66718db569377a099ed 100644 --- a/stack/erp5/instance.cfg.in +++ b/stack/erp5/instance.cfg.in @@ -56,113 +56,27 @@ extra-context = section parameter_dict dynamic-template-cloudooo-parameters # Must match the key id in [switch-softwaretype] which uses this section. raw software_type cloudooo - -[dynamic-template-varnish-parameters] -dash = {{ dash_location }} -dcron = {{ dcron_location }} -gzip = {{ gzip_location }} -logrotate = {{ logrotate_location }} -stunnel = {{ stunnel_location }} -varnish = {{ varnish_location }} -wget = {{ wget_location }} -buildout-bin-directory = {{ buildout_bin_directory }} - -[dynamic-template-varnish] -< = jinja2-template-base -template = {{ template_varnish }} -filename = instance-varnish.cfg -extra-context = - section parameter_dict dynamic-template-varnish-parameters -# Must match the key id in [switch-softwaretype] which uses this section. - raw software_type varnish - -[dynamic-template-zope-parameters] -apache = {{ apache_location }} -aspell = {{ aspell_location }} -bin-directory = {{ bin_directory }} -coreutils = {{ coreutils_location }} -dcron = {{ dcron_location }} -dmtx-utils = {{ dmtx_utils_location }} -erp5 = {{ erp5_location }} -git = {{ git_location }} -graphviz = {{ graphviz_location }} -grep = {{ grep_location }} -gzip = {{ gzip_location }} -imagemagick = {{ imagemagick_location }} -librsvg = {{ librsvg_location }} -logrotate = {{ logrotate_location }} -mariadb = {{ mariadb_location }} -openssl = {{ openssl_location }} -poppler = {{ poppler_location }} -sed = {{ sed_location }} -tesseract = {{ tesseract_location }} -w3m = {{ w3m_location }} -jsl = {{ jsl_location }} - -[dynamic-template-zope] -< = jinja2-template-base -template = {{ template_zope }} -filename = instance-zope.cfg -extensions = jinja2.ext.do -# XXX: duplicates above section, so less is modified in template in this -# commit. Should be replaced by a single "section" line. -extra-context = - key apache_location dynamic-template-zope-parameters:apache - key aspell_location dynamic-template-zope-parameters:aspell - key bin_directory dynamic-template-zope-parameters:bin-directory - key coreutils_location dynamic-template-zope-parameters:coreutils - key dcron_location dynamic-template-zope-parameters:dcron - key dmtx_utils_location dynamic-template-zope-parameters:dmtx-utils - key erp5_location dynamic-template-zope-parameters:erp5 - key git_location dynamic-template-zope-parameters:git - key graphviz_location dynamic-template-zope-parameters:graphviz - key grep_location dynamic-template-zope-parameters:grep - key gzip_location dynamic-template-zope-parameters:gzip - key imagemagick_location dynamic-template-zope-parameters:imagemagick - key librsvg_location dynamic-template-zope-parameters:librsvg - key logrotate_location dynamic-template-zope-parameters:logrotate - key mariadb_location dynamic-template-zope-parameters:mariadb - key openssl_location dynamic-template-zope-parameters:openssl - key poppler_location dynamic-template-zope-parameters:poppler - key sed_location dynamic-template-zope-parameters:sed - key tesseract_location dynamic-template-zope-parameters:tesseract - key w3m_location dynamic-template-zope-parameters:w3m - key jsl_location dynamic-template-zope-parameters:jsl - -[template-erp5-single-parameters] -bin-directory = {{ bin_directory }} -openssl = {{ openssl_location }} -local_bt5_repository = {{ local_bt5_repository }} -dash = {{ dash_location }} -curl = {{ curl_location }} - -[template-erp5-single] -< = jinja2-template-base -template = {{ template_erp5_single }} -filename = instance-erp5-single.cfg -# XXX: duplicates above section, so less is modified in template in this -# commit. Should be replaced by a "section" line (preserving template_zope -# definition). -extra-context = - key bin_directory template-erp5-single-parameters:bin-directory - key openssl_location template-erp5-single-parameters:openssl - key curl_location template-erp5-single-parameters:curl - key dash_location template-erp5-single-parameters:dash - key template_zope dynamic-template-zope:rendered - key local_bt5_repository template-erp5-single-parameters:local_bt5_repository - -[dynamic-template-cluster-erp5-parameters] +[dynamic-template-erp5-parameters] local-bt5-repository = {{ local_bt5_repository }} -[dynamic-template-cluster-erp5] +[dynamic-template-erp5] < = jinja2-template-base -template = {{ template_erp5_cluster }} -filename = instance-cluster-erp5.cfg +template = {{ template_erp5 }} +filename = instance-erp5.cfg extensions = jinja2.ext.do extra-context = - key local_bt5_repository dynamic-template-cluster-erp5-parameters:local-bt5-repository + key local_bt5_repository dynamic-template-erp5-parameters:local-bt5-repository # Must match the key id in [switch-softwaretype] which uses this section. - raw software_type cluster + key software_type :software-type +software-type = default + +[dynamic-template-erp5-cluster] +< = dynamic-template-erp5 +software-type = cluster + +[dynamic-template-erp5-RootSoftwareInstance] +< = dynamic-template-erp5 +software-type = RootSoftwareInstance [dynamic-template-balancer-parameters] apache = {{ apache_location }} @@ -210,7 +124,7 @@ extra-context = # Must match the key id in [switch-softwaretype] which uses this section. raw software_type zodb-zeo -[dynamic-template-cluster-zope-parameters] +[dynamic-template-zope-parameters] zope-conf-template = {{ template_zope_conf }} instance-logrotate-cfg = {{ template_logrotate_base }} git = {{ git_location }} @@ -229,16 +143,21 @@ openssl = {{ openssl_location }} dash = {{ dash_location }} jsl = {{ jsl_location }} -[dynamic-template-cluster-zope] +[dynamic-template-zope] < = jinja2-template-base -template = {{ template_cluster_zope }} -filename = instance-cluster-zope.cfg +template = {{ template_zope }} +filename = instance-zope.cfg extensions = jinja2.ext.do extra-context = key buildout_directory buildout:directory - section parameter_dict dynamic-template-cluster-zope-parameters + section parameter_dict dynamic-template-zope-parameters # Must match the key id in [switch-softwaretype] which uses this section. - raw software_type cluster-zope + key software_type :software-type +software-type = zope + +[dynamic-template-cluster-zope] +< = dynamic-template-zope +software-type = cluster-zope [dynamic-template-kumofs-parameters] dash-location = {{ dash_location }} @@ -283,17 +202,20 @@ extra-context = [switch-softwaretype] recipe = slapos.cookbook:softwaretype -default = ${template-erp5-single:rendered} -cluster = ${dynamic-template-cluster-erp5:rendered} +default = ${dynamic-template-erp5:rendered} +# BBB +cluster = ${dynamic-template-erp5-cluster:rendered} +cluster-zope = ${dynamic-template-cluster-zope:rendered} +# Common misspelling for "default". +RootSoftwareInstance = ${dynamic-template-erp5-RootSoftwareInstance:rendered} + kumofs = ${dynamic-template-kumofs:rendered} cloudooo = ${dynamic-template-cloudooo:rendered} -zope = ${dynamic-template-zope:rendered} mariadb = ${dynamic-template-mariadb:rendered} -varnish = ${dynamic-template-varnish:rendered} balancer = ${dynamic-template-balancer:rendered} zodb-neo = ${dynamic-template-neo:rendered} zodb-zeo = ${dynamic-template-zeo:rendered} -cluster-zope = ${dynamic-template-cluster-zope:rendered} +zope = ${dynamic-template-zope:rendered} [slap-connection] # part to migrate to new - separated words