diff --git a/software/erp5/instance-kumofs.cfg b/software/erp5/instance-kumofs.cfg deleted file mode 100644 index 4b1acb1b78edcbd3eebddc82afba7e91c6480024..0000000000000000000000000000000000000000 --- a/software/erp5/instance-kumofs.cfg +++ /dev/null @@ -1,111 +0,0 @@ -[buildout] -parts = - publish-kumofs-connection-information - kumofs-instance - logrotate - logrotate-entry-kumofs - cron - cron-entry-logrotate - -eggs-directory = ${buildout:eggs-directory} -develop-eggs-directory = ${buildout:develop-eggs-directory} -offline = true - -[publish-kumofs-connection-information] -recipe = slapos.cookbook:publishurl -url = memcached://$${kumofs-instance:ip}:$${kumofs-instance:gateway-port}/ - -[kumofs-instance] -recipe = slapos.cookbook:generic.kumofs - -# Network options -ip = $${slap-network-information:local-ipv4} -manager-port = 13101 -server-port = 13201 -server-listen-port = 13202 -gateway-port = 13301 - -# Paths: Running wrappers -gateway-wrapper = $${basedirectory:services}/kumofs_gateway -manager-wrapper = $${basedirectory:services}/kumofs_manager -server-wrapper = $${basedirectory:services}/kumofs_server - -# Paths: Data -data-directory = $${directory:kumofs-data} - -# Paths: Logs -kumo-gateway-log = $${basedirectory:log}/kumo-gateway.log -kumo-manager-log = $${basedirectory:log}/kumo-manager.log -kumo-server-log = $${basedirectory:log}/kumo-server.log - -# Binary information -kumo-gateway-binary = ${kumo:location}/bin/kumo-gateway -kumo-manager-binary = ${kumo:location}/bin/kumo-manager -kumo-server-binary = ${kumo:location}/bin/kumo-server -shell-path = ${dash:location}/bin/dash - -[logrotate-entry-kumofs] -<= logrotate -recipe = slapos.cookbook:logrotate.d -name = kumofs -log = $${kumofs-instance:kumo-gateway-log} $${kumofs-instance:kumo-manager-log} - $${kumofs-instance:kumo-server-log} - -# rest of parts are candidates for some generic stuff - -[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 - -[basedirectory] -recipe = slapos.cookbook:mkdirectory -log = $${rootdirectory:var}/log -services = $${rootdirectory:etc}/run -run = $${rootdirectory:var}/run -backup = $${rootdirectory:srv}/backup - -[directory] -recipe = slapos.cookbook:mkdirectory -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 -kumofs-data = $${rootdirectory:srv}/kumofs - -[rootdirectory] -recipe = slapos.cookbook:mkdirectory -etc = $${buildout:directory}/etc -var = $${buildout:directory}/var -srv = $${buildout:directory}/srv -bin = $${buildout:directory}/bin - -[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} diff --git a/software/erp5/instance-kumofs.cfg.in b/software/erp5/instance-kumofs.cfg.in new file mode 100644 index 0000000000000000000000000000000000000000..aeae682c2304d981ca5ca225b569fc75525a1dbe --- /dev/null +++ b/software/erp5/instance-kumofs.cfg.in @@ -0,0 +1,111 @@ +[buildout] +parts = + publish-kumofs-connection-information + kumofs-instance + logrotate + logrotate-entry-kumofs + cron + cron-entry-logrotate + +eggs-directory = {{ eggs_directory }} +develop-eggs-directory = {{ develop_eggs_directory }} +offline = true + +[publish-kumofs-connection-information] +recipe = slapos.cookbook:publishurl +url = memcached://${kumofs-instance:ip}:${kumofs-instance:gateway-port}/ + +[kumofs-instance] +recipe = slapos.cookbook:generic.kumofs + +# Network options +ip = ${slap-network-information:local-ipv4} +manager-port = 13101 +server-port = 13201 +server-listen-port = 13202 +gateway-port = 13301 + +# Paths: Running wrappers +gateway-wrapper = ${basedirectory:services}/kumofs_gateway +manager-wrapper = ${basedirectory:services}/kumofs_manager +server-wrapper = ${basedirectory:services}/kumofs_server + +# Paths: Data +data-directory = ${directory:kumofs-data} + +# Paths: Logs +kumo-gateway-log = ${basedirectory:log}/kumo-gateway.log +kumo-manager-log = ${basedirectory:log}/kumo-manager.log +kumo-server-log = ${basedirectory:log}/kumo-server.log + +# Binary information +kumo-gateway-binary = {{ kumo_location }}/bin/kumo-gateway +kumo-manager-binary = {{ kumo_location }}/bin/kumo-manager +kumo-server-binary = {{ kumo_location }}/bin/kumo-server +shell-path = {{ dash_location }}/bin/dash + +[logrotate-entry-kumofs] +<= logrotate +recipe = slapos.cookbook:logrotate.d +name = kumofs +log = ${kumofs-instance:kumo-gateway-log} ${kumofs-instance:kumo-manager-log} + ${kumofs-instance:kumo-server-log} + +# rest of parts are candidates for some generic stuff + +[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 + +[basedirectory] +recipe = slapos.cookbook:mkdirectory +log = ${rootdirectory:var}/log +services = ${rootdirectory:etc}/run +run = ${rootdirectory:var}/run +backup = ${rootdirectory:srv}/backup + +[directory] +recipe = slapos.cookbook:mkdirectory +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 +kumofs-data = ${rootdirectory:srv}/kumofs + +[rootdirectory] +recipe = slapos.cookbook:mkdirectory +etc = ${buildout:directory}/etc +var = ${buildout:directory}/var +srv = ${buildout:directory}/srv +bin = ${buildout:directory}/bin + +[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} diff --git a/software/erp5/instance.cfg b/software/erp5/instance.cfg index eaf7071843e037b0ecaba758a9a56b9ade433cc7..f3dece0757f0f60341f51a552240f1b2ad6dbb34 100644 --- a/software/erp5/instance.cfg +++ b/software/erp5/instance.cfg @@ -26,7 +26,7 @@ snippet-fontconfig = ${template-snippet-fontconfig:output} recipe = slapos.cookbook:softwaretype default = ${template-erp5-development:rendered} production = ${template-erp5-production:rendered} -kumofs = ${template-kumofs:output} +kumofs = ${template-kumofs:rendered} memcached = ${template-memcached:rendered} cloudooo = $${dynamic-template-cloudooo:output} zope = ${template-zope:rendered} diff --git a/software/erp5/software.cfg b/software/erp5/software.cfg index 93b30d2826a01308bb7233a762d7e99b5308050c..31ffc63f44bf180c4a29caccb9b2c91777a0ad23 100644 --- a/software/erp5/software.cfg +++ b/software/erp5/software.cfg @@ -118,11 +118,15 @@ output = ${buildout:directory}/template-snippet-fontconfig.cfg mode = 0644 [template-kumofs] -recipe = slapos.recipe.template -url = ${:_profile_base_location_}/instance-kumofs.cfg -md5sum = 9746823ccbbedf42b3e759c3e7150252 -output = ${buildout:directory}/template-kumofs.cfg -mode = 0644 +< = template-jinja2-base +filename = instance-kumofs.cfg +md5sum = 700ee7769c89e0959dc3f052e55ada6e +extra-context = + key dash_location dash:location + key dcron_location dcron:location + key gzip_location gzip:location + key kumo_location kumo:location + key logrotate_location logrotate:location [template] recipe = slapos.recipe.template