Commit f5ebda78 authored by Thomas Leymonerie's avatar Thomas Leymonerie

Clean up slapos.recipe.template

Use slapos.recipe.template instead of slapos.recipe.template if possible

Harmonize template keys :
rendered -> output
template -> url
template = inline: -> inline =

Delete "mode" key

See merge request nexedi/slapos!1151
parent 08a696d4
...@@ -60,17 +60,16 @@ eggs += ...@@ -60,17 +60,16 @@ eggs +=
# env.sh for ZODB's python to be on $PATH. # env.sh for ZODB's python to be on $PATH.
[ZODB-env.sh] [ZODB-env.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${buildout:directory}/${:_buildout_section_name_} output = ${buildout:directory}/${:_buildout_section_name_}
template = inline: inline =
export PS1="(ZODB-env) $PS1" export PS1="(ZODB-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH export PATH=${buildout:bin-directory}:$PATH
# .nxdtest to run ZODB tests # .nxdtest to run ZODB tests
[.nxdtest] [.nxdtest]
<= jinja2-template <= jinja2-template
template = inline =
inline:
# determine where ZODB & friends were installed # determine where ZODB & friends were installed
from subprocess import check_output from subprocess import check_output
where = check_output(['python', '-c', """if 1: where = check_output(['python', '-c', """if 1:
...@@ -99,12 +98,12 @@ template = ...@@ -99,12 +98,12 @@ template =
# instance to run nxdtest. # instance to run nxdtest.
[instance.cfg] [instance.cfg]
<= jinja2-template <= jinja2-template
template = inline: inline =
[buildout] [buildout]
extends = ${nxdtest-instance.cfg:rendered} extends = ${nxdtest-instance.cfg:output}
[runTestSuite] [runTestSuite]
env.sh = ${ZODB-env.sh:rendered} env.sh = ${ZODB-env.sh:output}
workdir = ${buildout:directory} workdir = ${buildout:directory}
......
...@@ -18,8 +18,8 @@ md5sum = e5f4b1d997e50ffe4998c68c8ec45403 ...@@ -18,8 +18,8 @@ md5sum = e5f4b1d997e50ffe4998c68c8ec45403
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = bazel_tools_cpp_CROSSTOOL filename = bazel_tools_cpp_CROSSTOOL
template = ${:_profile_base_location_}/${:filename}.in url = ${:_profile_base_location_}/${:filename}.in
rendered = ${:location}/${:filename} output = ${:location}/${:filename}
context = context =
key gcc_location gcc:prefix key gcc_location gcc:prefix
key binutils_location binutils:location key binutils_location binutils:location
...@@ -28,8 +28,8 @@ context = ...@@ -28,8 +28,8 @@ context =
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = bazel_src_main_cpp_BUILD filename = bazel_src_main_cpp_BUILD
template = ${:_profile_base_location_}/${:filename}.in url = ${:_profile_base_location_}/${:filename}.in
rendered = ${:location}/${:filename} output = ${:location}/${:filename}
# We previously passed an argument that we don't want anymore. Rather than # We previously passed an argument that we don't want anymore. Rather than
# changing templates, we pass a dummy argument that will have no effect. # changing templates, we pass a dummy argument that will have no effect.
linkopts = -DSLAPOS_DUMMY= linkopts = -DSLAPOS_DUMMY=
...@@ -50,10 +50,10 @@ url = https://github.com/bazelbuild/bazel/releases/download/0.6.1/bazel-0.6.1-di ...@@ -50,10 +50,10 @@ url = https://github.com/bazelbuild/bazel/releases/download/0.6.1/bazel-0.6.1-di
md5sum = 8c5c827e33d3ff74c263c1299810b485 md5sum = 8c5c827e33d3ff74c263c1299810b485
patch-binary = ${patch:location}/bin/patch patch-binary = ${patch:location}/bin/patch
patch-file-path = ${:_profile_base_location_}/bazel-0.6.1.patch patch-file-path = ${:_profile_base_location_}/bazel-0.6.1.patch
bazel-crosstool-modified-file-path = ${template-bazel-crosstool:rendered} bazel-crosstool-modified-file-path = ${template-bazel-crosstool:output}
bazel-src-main-cpp-build-path = ${template-bazel-src-main-cpp-build:rendered} bazel-src-main-cpp-build-path = ${template-bazel-src-main-cpp-build:output}
bazel-src-main-tools-build-path = ${template-bazel-src-main-tools-build:rendered} bazel-src-main-tools-build-path = ${template-bazel-src-main-tools-build:output}
bazel-src-tools-singlejar-build-path = ${template-bazel-src-tools-singlejar-build:rendered} bazel-src-tools-singlejar-build-path = ${template-bazel-src-tools-singlejar-build:output}
unzip-bin = ${unzip:location}/bin unzip-bin = ${unzip:location}/bin
zip-bin = ${zip:location}/bin zip-bin = ${zip:location}/bin
java_home = ${zulu:location} java_home = ${zulu:location}
......
...@@ -28,9 +28,9 @@ git-executable = ${git:location}/bin/git ...@@ -28,9 +28,9 @@ git-executable = ${git:location}/bin/git
[cythonplus_env.sh] [cythonplus_env.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_} output = ${buildout:directory}/${:_buildout_section_name_}
template = inline =
inline:{% set path, python = os.path.split(python) -%} {% set path, python = os.path.split(python) -%}
{% if 'part' in gcc -%} {% if 'part' in gcc -%}
{% set path = path + ':' + gcc.prefix + '/bin' -%} {% set path = path + ':' + gcc.prefix + '/bin' -%}
{% endif -%} {% endif -%}
......
...@@ -31,7 +31,7 @@ part = firefox ...@@ -31,7 +31,7 @@ part = firefox
recipe = slapos.recipe.build recipe = slapos.recipe.build
location = ${buildout:bin-directory}/${:part} location = ${buildout:bin-directory}/${:part}
fonts-conf = ${firefox-default-fonts-conf:rendered} fonts-conf = ${firefox-default-fonts-conf:output}
init = init =
self.buildout[options['part']] self.buildout[options['part']]
install = install =
...@@ -72,8 +72,8 @@ part = firefox-52 ...@@ -72,8 +72,8 @@ part = firefox-52
[firefox-default-fonts-conf] [firefox-default-fonts-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-fonts-conf:output} url = ${template-fonts-conf:output}
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/fonts.conf output = ${buildout:parts-directory}/${:_buildout_section_name_}/fonts.conf
context = context =
key cachedir :cache-dir key cachedir :cache-dir
key fonts :fonts key fonts :fonts
......
...@@ -119,10 +119,10 @@ environment-extra = ...@@ -119,10 +119,10 @@ environment-extra =
# #
# ${go:exe} is standalone executable that runs go in activated gowork environment. # ${go:exe} is standalone executable that runs go in activated gowork environment.
[go] [go]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
exe = ${buildout:bin-directory}/go exe = ${buildout:bin-directory}/go
rendered= ${:exe} output= ${:exe}
template= inline: inline =
#!/bin/sh -e #!/bin/sh -e
. ${gowork:env.sh} . ${gowork:env.sh}
exec go "$@" exec go "$@"
......
...@@ -132,11 +132,11 @@ promises = ...@@ -132,11 +132,11 @@ promises =
# as future-proof against new versions of Chromium. # as future-proof against new versions of Chromium.
[headless-chromium-wrapper] [headless-chromium-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = inline =
inline:#!/bin/sh #!/bin/sh
export LD_LIBRARY_PATH="{{ nss_location }}/lib:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="{{ nss_location }}/lib:$LD_LIBRARY_PATH"
exec {{ chromium_binary }} "$@" exec {{ chromium_binary }} "$@"
rendered = ${buildout:bin-directory}/headless-chromium output = ${buildout:bin-directory}/headless-chromium
context = context =
key nss_location nss:location key nss_location nss:location
key chromium_binary headless-chromium:binary key chromium_binary headless-chromium:binary
...@@ -34,10 +34,10 @@ install = ...@@ -34,10 +34,10 @@ install =
[helloweb-go] [helloweb-go]
# we already have gowork/bin/helloweb with helloweb Go build. # we already have gowork/bin/helloweb with helloweb Go build.
# Add bin/helloweb-go that runs go version of helloweb without any environment preset needed. # Add bin/helloweb-go that runs go version of helloweb without any environment preset needed.
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${buildout:bin-directory}/${:_buildout_section_name_} output = ${buildout:bin-directory}/${:_buildout_section_name_}
template = inline =
inline:#!/bin/sh -e #!/bin/sh -e
. ${gowork:env.sh} . ${gowork:env.sh}
exec helloweb "$@" exec helloweb "$@"
...@@ -97,9 +97,9 @@ make-targets= ${bundler:bundle} install ...@@ -97,9 +97,9 @@ make-targets= ${bundler:bundle} install
[helloweb-ruby] [helloweb-ruby]
# NOTE slapos.cookbook:wrapper also works, but currently _only_ in instance # NOTE slapos.cookbook:wrapper also works, but currently _only_ in instance
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${buildout:bin-directory}/${:_buildout_section_name_} output = ${buildout:bin-directory}/${:_buildout_section_name_}
template = inline =
inline:#!/bin/sh -e #!/bin/sh -e
export BUNDLE_GEMFILE=${helloweb-ruby-bundle:path}/Gemfile export BUNDLE_GEMFILE=${helloweb-ruby-bundle:path}/Gemfile
exec ${bundler:bundle} exec sh -c 'helloweb.rb "$@"' ${:_buildout_section_name_} "$@" exec ${bundler:bundle} exec sh -c 'helloweb.rb "$@"' ${:_buildout_section_name_} "$@"
...@@ -40,8 +40,8 @@ url = ${:_profile_base_location_}/${:filename} ...@@ -40,8 +40,8 @@ url = ${:_profile_base_location_}/${:filename}
[instance-jupyter-notebook] [instance-jupyter-notebook]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
context = context =
key bin_directory buildout:bin-directory key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[instance-jupyter-notebook] [instance-jupyter-notebook]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 357f28614a13cdbf00a29a83cbfd2642 md5sum = 9f412363ce2c2ac99e3328f7d87d456d
[jupyter-notebook-config] [jupyter-notebook-config]
filename = jupyter_notebook_config.py.jinja filename = jupyter_notebook_config.py.jinja
......
...@@ -73,8 +73,8 @@ environment = ...@@ -73,8 +73,8 @@ environment =
[jupyter-notebook-config] [jupyter-notebook-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ jupyter_config_location }}/{{ jupyter_config_filename }} url = {{ jupyter_config_location }}/{{ jupyter_config_filename }}
rendered = ${directory:jupyter_config_dir}/jupyter_notebook_config.py output = ${directory:jupyter_config_dir}/jupyter_notebook_config.py
context = context =
raw config_cfg ${buildout:directory}/knowledge0.cfg raw config_cfg ${buildout:directory}/knowledge0.cfg
...@@ -130,8 +130,8 @@ target-directory = ${directory:erp5_kernel_dir} ...@@ -130,8 +130,8 @@ target-directory = ${directory:erp5_kernel_dir}
[kernel-json] [kernel-json]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ kernel_json_location }}/{{ kernel_json_filename }} url = {{ kernel_json_location }}/{{ kernel_json_filename }}
rendered = ${directory:erp5_kernel_dir}/kernel.json output = ${directory:erp5_kernel_dir}/kernel.json
# Use python2.7 executable bin file for kernel config # Use python2.7 executable bin file for kernel config
context = context =
raw python_executable {{ python_executable }} raw python_executable {{ python_executable }}
......
...@@ -12,8 +12,8 @@ parts = ...@@ -12,8 +12,8 @@ parts =
[matplotlibrc] [matplotlibrc]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
rendered = ${matplotlibrc:location}/matplotlibrc output = ${matplotlibrc:location}/matplotlibrc
backend = agg backend = agg
context = context =
key backend matplotlibrc:backend key backend matplotlibrc:backend
......
...@@ -21,20 +21,20 @@ eggs += ...@@ -21,20 +21,20 @@ eggs +=
# env.sh for interpreter to be on $PATH. # env.sh for interpreter to be on $PATH.
[nxdtest-env.sh] [nxdtest-env.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${buildout:directory}/${:_buildout_section_name_} output = ${buildout:directory}/${:_buildout_section_name_}
template = inline: inline =
export PS1="(nxdtest-env) $PS1" export PS1="(nxdtest-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH export PATH=${buildout:bin-directory}:$PATH
# instance to run nxdtest. # instance to run nxdtest.
[instance.cfg] [instance.cfg]
<= jinja2-template <= jinja2-template
template = inline: inline =
[buildout] [buildout]
extends = ${nxdtest-instance.cfg:rendered} extends = ${nxdtest-instance.cfg:output}
[runTestSuite] [runTestSuite]
env.sh = ${nxdtest-env.sh:rendered} env.sh = ${nxdtest-env.sh:output}
workdir = ${nxdtest-repository:location} workdir = ${nxdtest-repository:location}
...@@ -73,7 +73,7 @@ perl-PATH = ${:location}/bin/ ...@@ -73,7 +73,7 @@ perl-PATH = ${:location}/bin/
# dependencies # dependencies
perl-bin = ${:perl-PATH}/perl perl-bin = ${:perl-PATH}/perl
perl-PERL5LIB = perl-PERL5LIB =
# Implementation # Implementation
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
...@@ -117,12 +117,12 @@ perl_location = ${perl:location} ...@@ -117,12 +117,12 @@ perl_location = ${perl:location}
# - inc : colon (:) separated site perl of modules to include in @INC # - inc : colon (:) separated site perl of modules to include in @INC
# Outputs: # Outputs:
# - perl-bin : an executable perl # - perl-bin : an executable perl
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline: inline =
#!/bin/sh #!/bin/sh
{% set inc = "${:inc}".split(':') %} {# XXX we could remove duplicates from inc #} {% set inc = "${:inc}".split(':') %} {# XXX we could remove duplicates from inc #}
exec ${perl:location}/bin/perl \ exec ${perl:location}/bin/perl \
{% for item in inc -%}{% if item %} -I "{{ item }}" \ {% for item in inc -%}{% if item %} -I "{{ item }}" \
{% endif %}{% endfor %} "$@" {% endif %}{% endfor %} "$@"
rendered = ${buildout:bin-directory}/${:_buildout_section_name_} output = ${buildout:bin-directory}/${:_buildout_section_name_}
perl-bin = ${:rendered} perl-bin = ${:output}
...@@ -88,12 +88,10 @@ init = ...@@ -88,12 +88,10 @@ init =
# .X.pyprog is python program to start and run entry # .X.pyprog is python program to start and run entry
# it uses .X.pyexe as underlying python interpreter # it uses .X.pyexe as underlying python interpreter
[.%(name)s.pyprog] [.%(name)s.pyprog]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
exe = %(exe)s exe = %(exe)s
rendered= $${:exe} output= $${:exe}
mode = 755 inline =
template=
inline:
#!$${.%(name)s.pyexe:exe} #!$${.%(name)s.pyexe:exe}
import sys import sys
%(__pyinit)s %(__pyinit)s
......
...@@ -28,21 +28,21 @@ eggs = ${pygolang:egg} ...@@ -28,21 +28,21 @@ eggs = ${pygolang:egg}
# env.sh for pygolang's python/gpython to be on $PATH. # env.sh for pygolang's python/gpython to be on $PATH.
[pygolang-env.sh] [pygolang-env.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${buildout:directory}/${:_buildout_section_name_} output = ${buildout:directory}/${:_buildout_section_name_}
template = inline: inline =
export PS1="(pygolang-env) $PS1" export PS1="(pygolang-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH export PATH=${buildout:bin-directory}:$PATH
# instance to run nxdtest. # instance to run nxdtest.
[instance.cfg] [instance.cfg]
<= jinja2-template <= jinja2-template
template = inline: inline =
[buildout] [buildout]
extends = ${nxdtest-instance.cfg:rendered} extends = ${nxdtest-instance.cfg:output}
[runTestSuite] [runTestSuite]
env.sh = ${pygolang-env.sh:rendered} env.sh = ${pygolang-env.sh:output}
workdir = ${pygolang-repository:location} workdir = ${pygolang-repository:location}
......
...@@ -47,19 +47,17 @@ post-install = ...@@ -47,19 +47,17 @@ post-install =
keytar.node keytar.node
[theia-wrapper] [theia-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${buildout:bin-directory}/${:_buildout_section_name_} output = ${buildout:bin-directory}/${:_buildout_section_name_}
template = inline =
inline:
#!/bin/sh #!/bin/sh
cd ${theia:location} cd ${theia:location}
exec ${yarn:location}/bin/yarn theia start "$@" exec ${yarn:location}/bin/yarn theia start "$@"
[theia-open] [theia-open]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${buildout:bin-directory}/${:_buildout_section_name_} output = ${buildout:bin-directory}/${:_buildout_section_name_}
template = inline =
inline:
#!/bin/sh #!/bin/sh
exec ${nodejs:location}/bin/node ${theia:location}/node_modules/.bin/theia-open "$@" exec ${nodejs:location}/bin/node ${theia:location}/node_modules/.bin/theia-open "$@"
......
...@@ -39,9 +39,9 @@ eggs = ...@@ -39,9 +39,9 @@ eggs =
# env.sh for that python + go to be on $PATH # env.sh for that python + go to be on $PATH
[wendelin.core-env.sh] [wendelin.core-env.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${buildout:directory}/${:_buildout_section_name_} output = ${buildout:directory}/${:_buildout_section_name_}
template = inline: inline =
. ${gowork:env.sh} . ${gowork:env.sh}
export PS1="(wendelin.core-env) $PS1" export PS1="(wendelin.core-env) $PS1"
export PATH=${buildout:bin-directory}:${gdb:location}/bin:$PATH export PATH=${buildout:bin-directory}:${gdb:location}/bin:$PATH
...@@ -49,12 +49,12 @@ template = inline: ...@@ -49,12 +49,12 @@ template = inline:
# instance to run nxdtest. # instance to run nxdtest.
[instance.cfg] [instance.cfg]
<= jinja2-template <= jinja2-template
template = inline: inline =
[buildout] [buildout]
extends = ${nxdtest-instance.cfg:rendered} extends = ${nxdtest-instance.cfg:output}
[runTestSuite] [runTestSuite]
env.sh = ${wendelin.core-env.sh:rendered} env.sh = ${wendelin.core-env.sh:output}
workdir = ${wendelin.core-repository:location} workdir = ${wendelin.core-repository:location}
......
...@@ -23,21 +23,21 @@ eggs = ${zodbtools:egg}[test] ...@@ -23,21 +23,21 @@ eggs = ${zodbtools:egg}[test]
# env.sh for zodbtools's python to be on $PATH. # env.sh for zodbtools's python to be on $PATH.
[zodbtools-env.sh] [zodbtools-env.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${buildout:directory}/${:_buildout_section_name_} output = ${buildout:directory}/${:_buildout_section_name_}
template = inline: inline =
export PS1="(zodbtools-env) $PS1" export PS1="(zodbtools-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH export PATH=${buildout:bin-directory}:$PATH
# instance to run nxdtest. # instance to run nxdtest.
[instance.cfg] [instance.cfg]
<= jinja2-template <= jinja2-template
template = inline: inline =
[buildout] [buildout]
extends = ${nxdtest-instance.cfg:rendered} extends = ${nxdtest-instance.cfg:output}
[runTestSuite] [runTestSuite]
env.sh = ${zodbtools-env.sh:rendered} env.sh = ${zodbtools-env.sh:output}
workdir = ${zodbtools-repository:location} workdir = ${zodbtools-repository:location}
......
...@@ -24,7 +24,7 @@ Here is an example of a section to add in your software.cfg : ...@@ -24,7 +24,7 @@ Here is an example of a section to add in your software.cfg :
openoffice-port = 1235 openoffice-port = 1235
ooo-binary-path = ${directory:libreoffice-bin}/program ooo-binary-path = ${directory:libreoffice-bin}/program
environment = environment =
FONTCONFIG_FILE = $${fontconfig-conf:rendered} FONTCONFIG_FILE = $${fontconfig-conf:output}
PATH = ${binary-link:target-directory} PATH = ${binary-link:target-directory}
ooo-uno-path = ${directory:libreoffice-bin}/basis-link/program ooo-uno-path = ${directory:libreoffice-bin}/basis-link/program
......
...@@ -46,8 +46,8 @@ md5sum = ae4a0043414336a521b524d9c95f1c68 ...@@ -46,8 +46,8 @@ md5sum = ae4a0043414336a521b524d9c95f1c68
[template-pullrdiffbackup] [template-pullrdiffbackup]
filename = instance-pullrdiffbackup.cfg.in filename = instance-pullrdiffbackup.cfg.in
md5sum = 45a4faa217ea5b83ecf271791e1632dd md5sum = 931038cfa23216af1628b960a2e10de6
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 3df515def97f1e8a9f181514ae6ef03f md5sum = 974e21f30669e1b83e1e0cd8def0adc3
...@@ -42,7 +42,6 @@ plugin = $${:etc}/plugin ...@@ -42,7 +42,6 @@ plugin = $${:etc}/plugin
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-dcron-service:output} url = ${template-dcron-service:output}
output = $${directory:services}/crond output = $${directory:services}/crond
mode = 0700
logfile = $${directory:log}/crond.log logfile = $${directory:log}/crond.log
################################# #################################
...@@ -122,7 +121,6 @@ config-statistic_name = {{ '$${' ~ slave_reference }}-backup-script:statistic_na ...@@ -122,7 +121,6 @@ config-statistic_name = {{ '$${' ~ slave_reference }}-backup-script:statistic_na
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-backup-script:output} url = ${template-backup-script:output}
output = $${directory:backupscript}/$${:_buildout_section_name_} output = $${directory:backupscript}/$${:_buildout_section_name_}
mode = 0700
datadirectory = {{ '$${' ~ slave_reference }}-backup-directory:directory} datadirectory = {{ '$${' ~ slave_reference }}-backup-directory:directory}
sshkey = {{ '$${' ~ slave_reference }}-backup-private_key:key} sshkey = {{ '$${' ~ slave_reference }}-backup-private_key:key}
connection = {{ connection }} connection = {{ connection }}
...@@ -140,7 +138,6 @@ statistic_log = $${directory:statistic}/$${:statistic_name} ...@@ -140,7 +138,6 @@ statistic_log = $${directory:statistic}/$${:statistic_name}
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-crontab-line:output} url = ${template-crontab-line:output}
output = $${directory:cron-lines}/$${:_buildout_section_name_} output = $${directory:cron-lines}/$${:_buildout_section_name_}
mode = 0600
script = {{ '$${' ~ slave_reference }}-backup-script:output} script = {{ '$${' ~ slave_reference }}-backup-script:output}
frequency = {{ frequency }} frequency = {{ frequency }}
{% do crontab_line_list.append("$${%s-backup-crontab-line:output}" % slave_reference) -%} {% do crontab_line_list.append("$${%s-backup-crontab-line:output}" % slave_reference) -%}
...@@ -155,14 +152,12 @@ frequency = {{ frequency }} ...@@ -155,14 +152,12 @@ frequency = {{ frequency }}
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-update-rss-script:output} url = ${template-update-rss-script:output}
output = $${directory:etc}/$${:_buildout_section_name_} output = $${directory:etc}/$${:_buildout_section_name_}
mode = 0700
global_rss = $${slap-connection:computer-id}-$${slap-connection:partition-id}.rss global_rss = $${slap-connection:computer-id}-$${slap-connection:partition-id}.rss
[update-rss-crontab-line] [update-rss-crontab-line]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-crontab-line:output} url = ${template-crontab-line:output}
output = $${directory:cron-lines}/$${:_buildout_section_name_} output = $${directory:cron-lines}/$${:_buildout_section_name_}
mode = 0600
script = $${update-rss-script:output} script = $${update-rss-script:output}
frequency = */5 * * * * frequency = */5 * * * *
{% do crontab_line_list.append("$${update-rss-crontab-line:output}") -%} {% do crontab_line_list.append("$${update-rss-crontab-line:output}") -%}
...@@ -186,8 +181,7 @@ command = ${coreutils-output:cat} ${template-crontab:output} {{ crontab_line_lis ...@@ -186,8 +181,7 @@ command = ${coreutils-output:cat} ${template-crontab:output} {{ crontab_line_lis
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-nginx-service:output} url = ${template-nginx-service:output}
output = $${directory:services}/nginx output = $${directory:services}/nginx
mode = 0700 virtual-depends =
virtual-depends =
$${nginx-configuration:ip} $${nginx-configuration:ip}
[nginx-listen-promise] [nginx-listen-promise]
...@@ -201,7 +195,6 @@ config-port = $${nginx-configuration:port} ...@@ -201,7 +195,6 @@ config-port = $${nginx-configuration:port}
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-nginx-configuration:output} url = ${template-nginx-configuration:output}
output = $${directory:etc}/nginx.cfg output = $${directory:etc}/nginx.cfg
mode = 0600
access_log = $${directory:log}/nginx-access.log access_log = $${directory:log}/nginx-access.log
error_log = $${directory:log}/nginx-error.log error_log = $${directory:log}/nginx-error.log
ip = {{ partition_ipv6 }} ip = {{ partition_ipv6 }}
...@@ -224,7 +217,7 @@ private-path-list += ...@@ -224,7 +217,7 @@ private-path-list +=
# Add parts generated by template # Add parts generated by template
[buildout] [buildout]
extends = extends =
${monitor-template:rendered} ${monitor-template:output}
parts = parts =
......
...@@ -8,8 +8,8 @@ offline = true ...@@ -8,8 +8,8 @@ offline = true
[dynamic-template-pullrdiffbackup] [dynamic-template-pullrdiffbackup]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-pullrdiffbackup:output} url = ${template-pullrdiffbackup:output}
rendered = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename} output = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename}
filename = instance-pullrdiffbackup.cfg filename = instance-pullrdiffbackup.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
...@@ -20,7 +20,7 @@ context = ...@@ -20,7 +20,7 @@ context =
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = $${:pullrdiffbackup} RootSoftwareInstance = $${:pullrdiffbackup}
pullrdiffbackup = dynamic-template-pullrdiffbackup:rendered pullrdiffbackup = dynamic-template-pullrdiffbackup:output
[slap-configuration] [slap-configuration]
# Fetches parameters defined in SlapOS Master for this instance. # Fetches parameters defined in SlapOS Master for this instance.
......
...@@ -41,49 +41,41 @@ eggs = ...@@ -41,49 +41,41 @@ eggs =
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
mode = 0644
[template-nginx-configuration] [template-nginx-configuration]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
mode = 0644
[template-dcron-service] [template-dcron-service]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
mode = 0644
[template-backup-script] [template-backup-script]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
mode = 0644
[template-crontab-line] [template-crontab-line]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
mode = 0644
[template-crontab] [template-crontab]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
mode = 0644
[status2rss] [status2rss]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
mode = 0644
[template-update-rss-script] [template-update-rss-script]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
mode = 0644
########################################################## ##########################################################
# Buildout instance.cfg templates # Buildout instance.cfg templates
...@@ -92,13 +84,11 @@ mode = 0644 ...@@ -92,13 +84,11 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template-pullrdiffbackup.cfg output = ${buildout:directory}/template-pullrdiffbackup.cfg
mode = 0644
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644
[versions] [versions]
gunicorn = 19.1.1 gunicorn = 19.1.1
...@@ -19,7 +19,7 @@ md5sum = c4079d70ab3268234651bf6c36234b2f ...@@ -19,7 +19,7 @@ md5sum = c4079d70ab3268234651bf6c36234b2f
[template-instance-beremiz] [template-instance-beremiz]
filename = instance-beremiz.cfg.jinja2.in filename = instance-beremiz.cfg.jinja2.in
md5sum = ac05663b9006b7c4c9810a18e1ea4220 md5sum = 51071494633f4ffba700baf935dc6955
[template-instance-beremiz-test] [template-instance-beremiz-test]
filename = instance-beremiz-test.cfg.jinja2.in filename = instance-beremiz-test.cfg.jinja2.in
......
...@@ -95,7 +95,6 @@ inline = ...@@ -95,7 +95,6 @@ inline =
{{ x11vnc_bin }} -storepasswd ${random-password:passwd} ${:passfile}; {{ x11vnc_bin }} -storepasswd ${random-password:passwd} ${:passfile};
fi fi
output = ${directory:bin}/x11vnc_passwd output = ${directory:bin}/x11vnc_passwd
mode = 700
[generate-vnc-password] [generate-vnc-password]
recipe = plone.recipe.command recipe = plone.recipe.command
......
...@@ -116,14 +116,14 @@ context = ...@@ -116,14 +116,14 @@ context =
key buildout_directory buildout:directory key buildout_directory buildout:directory
key template_fluxbox_menu template-fluxbox-menu.in:target key template_fluxbox_menu template-fluxbox-menu.in:target
key template_fonts_conf_target template-fonts-conf:output key template_fonts_conf_target template-fonts-conf:output
key template_monitor_cfg monitor2-template:rendered key template_monitor_cfg monitor2-template:output
key template_instance_beremiz template-instance-beremiz:target key template_instance_beremiz template-instance-beremiz:target
key template_instance_beremiz_test template-instance-beremiz-test:target key template_instance_beremiz_test template-instance-beremiz-test:target
key template_logrotate template-logrotate-base:rendered key template_logrotate template-logrotate-base:output
key fontconfig_location fontconfig:location key fontconfig_location fontconfig:location
key font_dejavu dejavu-fonts:location key font_dejavu dejavu-fonts:location
key font_liberation liberation-fonts:location key font_liberation liberation-fonts:location
key logrotate_cfg template-logrotate-base:rendered key logrotate_cfg template-logrotate-base:output
key bison_location bison:location key bison_location bison:location
key flex_location flex:location key flex_location flex:location
key fluxbox_location fluxbox:location key fluxbox_location fluxbox:location
...@@ -134,7 +134,7 @@ context = ...@@ -134,7 +134,7 @@ context =
key matiec_location matiec:location key matiec_location matiec:location
key mesa_location mesa:location key mesa_location mesa:location
key novnc_location noVNC:location key novnc_location noVNC:location
key nxdtest_template nxdtest-instance.cfg:rendered key nxdtest_template nxdtest-instance.cfg:output
key python_bin :python-bin key python_bin :python-bin
key opencv_location opencv:location key opencv_location opencv:location
key openssl_location openssl:location key openssl_location openssl:location
......
...@@ -50,12 +50,12 @@ eggs = click ...@@ -50,12 +50,12 @@ eggs = click
[instance-profile] [instance-profile]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section buildout buildout section buildout buildout
raw template_monitor ${monitor2-template:rendered} raw template_monitor ${monitor2-template:output}
# md5sum is fetched from buildout.hash.cfg and can be recalculated automatically by # md5sum is fetched from buildout.hash.cfg and can be recalculated automatically by
# calling update-hash # calling update-hash
......
...@@ -11,8 +11,8 @@ download-cache = ${:directory}/download-cache ...@@ -11,8 +11,8 @@ download-cache = ${:directory}/download-cache
[template] [template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
template = inline: inline =
[buildout] [buildout]
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
...@@ -29,9 +29,8 @@ template = inline: ...@@ -29,9 +29,8 @@ template = inline:
bin = $${buildout:directory}/bin bin = $${buildout:directory}/bin
[runTestSuite] [runTestSuite]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/$${:_buildout_section_name_} output = $${directory:bin}/$${:_buildout_section_name_}
template = ${:_profile_base_location_}/$${:_buildout_section_name_}.in url = ${:_profile_base_location_}/$${:_buildout_section_name_}.in
mode = 0755
context = context =
{##} section buildout buildout {##} section buildout buildout
{##} section parameter_dict runTestSuite-parameters {##} section parameter_dict runTestSuite-parameters
......
...@@ -20,11 +20,10 @@ scripts = ${:interpreter} ...@@ -20,11 +20,10 @@ scripts = ${:interpreter}
interpreter = ${:_buildout_section_name_} interpreter = ${:_buildout_section_name_}
[template] [template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
template = inline =
inline:
[buildout] [buildout]
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
...@@ -51,9 +50,8 @@ template = ...@@ -51,9 +50,8 @@ template =
[runTestSuite] [runTestSuite]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/$${:_buildout_section_name_} output = $${directory:bin}/$${:_buildout_section_name_}
template = ${:_profile_base_location_}/$${:_buildout_section_name_}.in url = ${:_profile_base_location_}/$${:_buildout_section_name_}.in
mode = 0755
context = context =
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key slapos_buildout slapos.buildout-repository:location key slapos_buildout slapos.buildout-repository:location
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = fb3a20e7f555a9ce7fe1ec547d0fcdfc md5sum = 051ae51b86f9aba169a6777fa2239901
[profile-common] [profile-common]
filename = instance-common.cfg.in filename = instance-common.cfg.in
...@@ -22,15 +22,15 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68 ...@@ -22,15 +22,15 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-caddy-frontend] [profile-caddy-frontend]
filename = instance-apache-frontend.cfg.in filename = instance-apache-frontend.cfg.in
md5sum = 04e550480d3057ca65d87c6fadbaed6e md5sum = 02ce5d44d49982fda598e3086cfbca99
[profile-caddy-replicate] [profile-caddy-replicate]
filename = instance-apache-replicate.cfg.in filename = instance-apache-replicate.cfg.in
md5sum = 63b418626ef0f8ac54d6359fb6637371 md5sum = bc2a8550c9b603bdfacd3a30a0189218
[profile-slave-list] [profile-slave-list]
_update_hash_filename_ = templates/apache-custom-slave-list.cfg.in _update_hash_filename_ = templates/apache-custom-slave-list.cfg.in
md5sum = e3ba0da5d137dcbd56c2604d200ac3b9 md5sum = 964a7f673f441f3a3e90c88ab03e3351
[profile-replicate-publish-slave-information] [profile-replicate-publish-slave-information]
_update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in _update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in
...@@ -102,7 +102,7 @@ md5sum = b41b8de115ad815d0b0db306ad650365 ...@@ -102,7 +102,7 @@ md5sum = b41b8de115ad815d0b0db306ad650365
[profile-kedifa] [profile-kedifa]
filename = instance-kedifa.cfg.in filename = instance-kedifa.cfg.in
md5sum = 88f3a8cc30d3cf30f4bd2797f5c16221 md5sum = b5426129668f39ace55f14012c4a2fd2
[template-backend-haproxy-rsyslogd-conf] [template-backend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in _update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in
......
...@@ -168,10 +168,10 @@ slave-introspection-var = ${:var}/slave-introspection ...@@ -168,10 +168,10 @@ slave-introspection-var = ${:var}/slave-introspection
[switch-caddy-softwaretype] [switch-caddy-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = dynamic-custom-personal-profile-slave-list:rendered default = dynamic-custom-personal-profile-slave-list:output
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
single-default = dynamic-custom-personal-profile-slave-list:rendered single-default = dynamic-custom-personal-profile-slave-list:output
single-custom-personal = dynamic-custom-personal-profile-slave-list:rendered single-custom-personal = dynamic-custom-personal-profile-slave-list:output
[frontend-configuration] [frontend-configuration]
ip-access-certificate = ${self-signed-ip-access:certificate} ip-access-certificate = ${self-signed-ip-access:certificate}
...@@ -228,7 +228,7 @@ command = ...@@ -228,7 +228,7 @@ command =
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
slapparameter_dict = {{ dumps(slapparameter_dict) }} slapparameter_dict = {{ dumps(slapparameter_dict) }}
...@@ -348,7 +348,7 @@ stop-on-error = True ...@@ -348,7 +348,7 @@ stop-on-error = True
[dynamic-custom-personal-profile-slave-list] [dynamic-custom-personal-profile-slave-list]
< = jinja2-template-base < = jinja2-template-base
depends = ${caddyprofiledeps:recipe} depends = ${caddyprofiledeps:recipe}
template = {{ software_parameter_dict['profile_slave_list'] }} url = {{ software_parameter_dict['profile_slave_list'] }}
filename = custom-personal-instance-slave-list.cfg filename = custom-personal-instance-slave-list.cfg
master_key_download_url = {{ dumps(slapparameter_dict['master-key-download-url']) }} master_key_download_url = {{ dumps(slapparameter_dict['master-key-download-url']) }}
software_type = single-custom-personal software_type = single-custom-personal
...@@ -372,15 +372,15 @@ extra-context = ...@@ -372,15 +372,15 @@ extra-context =
key template_default_slave_configuration software-release-path:template-default-slave-virtualhost key template_default_slave_configuration software-release-path:template-default-slave-virtualhost
key template_expose_csr_nginx_conf software-release-path:template-expose-csr-nginx-conf key template_expose_csr_nginx_conf software-release-path:template-expose-csr-nginx-conf
key software_type :software_type key software_type :software_type
key frontend_lazy_graceful_reload frontend-caddy-lazy-graceful:rendered key frontend_lazy_graceful_reload frontend-caddy-lazy-graceful:output
key monitor_base_url monitor-instance-parameter:monitor-base-url key monitor_base_url monitor-instance-parameter:monitor-base-url
key node_id frontend-node-id:value key node_id frontend-node-id:value
key version_hash version-hash:value key version_hash version-hash:value
key software_release_url version-hash:software-release-url key software_release_url version-hash:software-release-url
key node_information frontend-node-information:value key node_information frontend-node-information:value
key custom_ssl_directory caddy-directory:custom-ssl-directory key custom_ssl_directory caddy-directory:custom-ssl-directory
# BBB: SlapOS Master non-zero knowledge BEGIN # BBB: SlapOS Master non-zero knowledge BEGIN
key apache_certificate apache-certificate:rendered key apache_certificate apache-certificate:output
# BBB: SlapOS Master non-zero knowledge END # BBB: SlapOS Master non-zero knowledge END
## backend haproxy ## backend haproxy
key template_backend_haproxy_configuration software-release-path:template-backend-haproxy-configuration key template_backend_haproxy_configuration software-release-path:template-backend-haproxy-configuration
...@@ -396,8 +396,8 @@ extra-context = ...@@ -396,8 +396,8 @@ extra-context =
# Deploy Caddy Frontend with Jinja power # Deploy Caddy Frontend with Jinja power
[dynamic-caddy-frontend-template] [dynamic-caddy-frontend-template]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_caddy_frontend_configuration'] }} url = {{ software_parameter_dict['template_caddy_frontend_configuration'] }}
rendered = ${caddy-configuration:frontend-configuration} output = ${caddy-configuration:frontend-configuration}
local_ipv4 = {{ dumps(instance_parameter_dict['ipv4-random']) }} local_ipv4 = {{ dumps(instance_parameter_dict['ipv4-random']) }}
extra-context = extra-context =
key instance_home buildout:directory key instance_home buildout:directory
...@@ -414,37 +414,32 @@ extra-context = ...@@ -414,37 +414,32 @@ extra-context =
key username monitor-instance-parameter:username key username monitor-instance-parameter:username
key password monitor-htpasswd:passwd key password monitor-htpasswd:passwd
# BBB: SlapOS Master non-zero knowledge BEGIN # BBB: SlapOS Master non-zero knowledge BEGIN
key apache_certificate apache-certificate:rendered key apache_certificate apache-certificate:output
# BBB: SlapOS Master non-zero knowledge END # BBB: SlapOS Master non-zero knowledge END
[caddy-wrapper] [caddy-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = inline: inline =
#!/bin/sh #!/bin/sh
export CADDYPATH=${directory:frontend_cluster} export CADDYPATH=${directory:frontend_cluster}
ulimit -n $(ulimit -Hn) ulimit -n $(ulimit -Hn)
exec {{ software_parameter_dict['caddy'] }} \ exec {{ software_parameter_dict['caddy'] }} \
-conf ${dynamic-caddy-frontend-template:rendered} \ -conf ${dynamic-caddy-frontend-template:output} \
-log ${caddy-configuration:error-log} \ -log ${caddy-configuration:error-log} \
-log-roll-mb 0 \ -log-roll-mb 0 \
{% if instance_parameter_dict['configuration.global-disable-http2'].lower() in TRUE_VALUES %} {% if instance_parameter_dict['configuration.global-disable-http2'].lower() in TRUE_VALUES %}-http2=false \{% else %}-http2=true \{% endif %}
-http2=false \
{% else %}
-http2=true \
{% endif %}
-grace {{ instance_parameter_dict['configuration.mpm-graceful-shutdown-timeout'] }}s \ -grace {{ instance_parameter_dict['configuration.mpm-graceful-shutdown-timeout'] }}s \
-disable-http-challenge \ -disable-http-challenge \
-disable-tls-alpn-challenge \ -disable-tls-alpn-challenge \
"$@" "$@"
rendered = ${directory:bin}/caddy-wrapper output = ${directory:bin}/caddy-wrapper
mode = 0755
[caddy-frontend] [caddy-frontend]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${caddy-wrapper:rendered} -pidfile ${caddy-configuration:pid-file} command-line = ${caddy-wrapper:output} -pidfile ${caddy-configuration:pid-file}
wrapper-path = ${directory:service}/frontend_caddy wrapper-path = ${directory:service}/frontend_caddy
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
hash-files = ${caddy-wrapper:rendered} hash-files = ${caddy-wrapper:output}
[not-found-html] [not-found-html]
recipe = plone.recipe.command recipe = plone.recipe.command
...@@ -466,7 +461,7 @@ frontend-configuration = ${directory:etc}/Caddyfile ...@@ -466,7 +461,7 @@ frontend-configuration = ${directory:etc}/Caddyfile
access-log = ${directory:log}/frontend-access.log access-log = ${directory:log}/frontend-access.log
error-log = ${directory:log}/frontend-error.log error-log = ${directory:log}/frontend-error.log
pid-file = ${directory:run}/httpd.pid pid-file = ${directory:run}/httpd.pid
frontend-graceful-command = ${frontend-caddy-validate:rendered} && kill -USR1 $(cat ${:pid-file}) frontend-graceful-command = ${frontend-caddy-validate:output} && kill -USR1 $(cat ${:pid-file})
not-found-file = ${caddy-directory:document-root}/${not-found-html:filename} not-found-file = ${caddy-directory:document-root}/${not-found-html:filename}
master-certificate = ${caddy-directory:master-autocert-dir}/master.pem master-certificate = ${caddy-directory:master-autocert-dir}/master.pem
# Communication with ATS # Communication with ATS
...@@ -475,7 +470,7 @@ cache-port = ${trafficserver-variable:input-port} ...@@ -475,7 +470,7 @@ cache-port = ${trafficserver-variable:input-port}
slave-introspection-access-log = ${directory:log}/slave-introspection-access.log slave-introspection-access-log = ${directory:log}/slave-introspection-access.log
slave-introspection-error-log = ${directory:log}/slave-introspection-error.log slave-introspection-error-log = ${directory:log}/slave-introspection-error.log
slave-introspection-pid-file = ${directory:run}/slave-introspection.pid slave-introspection-pid-file = ${directory:run}/slave-introspection.pid
slave-introspection-graceful-command = ${slave-introspection-validate:rendered} && kill -HUP $(cat ${:slave-introspection-pid-file}) slave-introspection-graceful-command = ${slave-introspection-validate:output} && kill -HUP $(cat ${:slave-introspection-pid-file})
# BBB: SlapOS Master non-zero knowledge BEGIN # BBB: SlapOS Master non-zero knowledge BEGIN
[get-self-signed-fallback-access] [get-self-signed-fallback-access]
...@@ -485,7 +480,7 @@ commands = ...@@ -485,7 +480,7 @@ commands =
[apache-certificate] [apache-certificate]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = inline: inline =
{% raw %} {% raw %}
{{ certificate or fallback_certificate }} {{ certificate or fallback_certificate }}
{{ key or '' }} {{ key or '' }}
...@@ -494,7 +489,7 @@ context = ...@@ -494,7 +489,7 @@ context =
key certificate configuration:apache-certificate key certificate configuration:apache-certificate
key key configuration:apache-key key key configuration:apache-key
key fallback_certificate get-self-signed-fallback-access:certificate key fallback_certificate get-self-signed-fallback-access:certificate
rendered = ${directory:bbb-ssl-dir}/frontend.crt output = ${directory:bbb-ssl-dir}/frontend.crt
# BBB: SlapOS Master non-zero knowledge END # BBB: SlapOS Master non-zero knowledge END
[logrotate-entry-caddy] [logrotate-entry-caddy]
...@@ -507,7 +502,7 @@ rotate-num = ${configuration:rotate-num} ...@@ -507,7 +502,7 @@ rotate-num = ${configuration:rotate-num}
# olddir # olddir
# Here we trust that there will be something to be rotated with error # Here we trust that there will be something to be rotated with error
# or access log, and that this will trigger postrotate script. # or access log, and that this will trigger postrotate script.
post = ${frontend-caddy-lazy-graceful:rendered} & post = ${frontend-caddy-lazy-graceful:output} &
delaycompress = delaycompress =
################# #################
...@@ -561,9 +556,8 @@ environment = TS_ROOT=${buildout:directory} ...@@ -561,9 +556,8 @@ environment = TS_ROOT=${buildout:directory}
# XXX Dedicated Jinja Section without slapparameter # XXX Dedicated Jinja Section without slapparameter
[trafficserver-jinja2-template-base] [trafficserver-jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${trafficserver-directory:configuration}/${:filename} output = ${trafficserver-directory:configuration}/${:filename}
extra-context = extra-context =
mode = 600
context = context =
section ats_directory trafficserver-directory section ats_directory trafficserver-directory
section ats_configuration trafficserver-variable section ats_configuration trafficserver-variable
...@@ -571,25 +565,25 @@ context = ...@@ -571,25 +565,25 @@ context =
[trafficserver-records-config] [trafficserver-records-config]
< = trafficserver-jinja2-template-base < = trafficserver-jinja2-template-base
template = {{ software_parameter_dict['template_trafficserver_records_config'] }} url = {{ software_parameter_dict['template_trafficserver_records_config'] }}
filename = records.config filename = records.config
extra-context = extra-context =
import os_module os import os_module os
[trafficserver-storage-config] [trafficserver-storage-config]
< = trafficserver-jinja2-template-base < = trafficserver-jinja2-template-base
template = {{ software_parameter_dict['template_trafficserver_storage_config'] }} url = {{ software_parameter_dict['template_trafficserver_storage_config'] }}
filename = storage.config filename = storage.config
[trafficserver-logging-yaml] [trafficserver-logging-yaml]
< = trafficserver-jinja2-template-base < = trafficserver-jinja2-template-base
template = {{ software_parameter_dict['template_trafficserver_logging_yaml'] }} url = {{ software_parameter_dict['template_trafficserver_logging_yaml'] }}
filename = logging.yaml filename = logging.yaml
[trafficserver-remap-config] [trafficserver-remap-config]
<= trafficserver-jinja2-template-base <= trafficserver-jinja2-template-base
{%- raw %} {%- raw %}
template = inline: inline =
map /HTTPS/ http://{{ ipv4 }}:{{ https_port }} map /HTTPS/ http://{{ ipv4 }}:{{ https_port }}
map /HTTP/ http://{{ ipv4 }}:{{ http_port }} map /HTTP/ http://{{ ipv4 }}:{{ http_port }}
{%- endraw %} {%- endraw %}
...@@ -602,14 +596,14 @@ filename = remap.config ...@@ -602,14 +596,14 @@ filename = remap.config
[trafficserver-plugin-config] [trafficserver-plugin-config]
< = trafficserver-jinja2-template-base < = trafficserver-jinja2-template-base
template = {{ software_parameter_dict['template_empty'] }} url = {{ software_parameter_dict['template_empty'] }}
filename = plugin.config filename = plugin.config
context = context =
key content trafficserver-variable:plugin-config key content trafficserver-variable:plugin-config
[trafficserver-ip-allow-config] [trafficserver-ip-allow-config]
< = trafficserver-jinja2-template-base < = trafficserver-jinja2-template-base
template = {{ software_parameter_dict['template_empty'] }} url = {{ software_parameter_dict['template_empty'] }}
filename = ip_allow.config filename = ip_allow.config
context = context =
key content trafficserver-variable:ip-allow-config key content trafficserver-variable:ip-allow-config
...@@ -635,9 +629,8 @@ config-wrapper-path = ${trafficserver-ctl:wrapper-path} ...@@ -635,9 +629,8 @@ config-wrapper-path = ${trafficserver-ctl:wrapper-path}
[trafficserver-rotate-script] [trafficserver-rotate-script]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_rotate_script'] }} url = {{ software_parameter_dict['template_rotate_script'] }}
rendered = ${directory:bin}/trafficserver-rotate output = ${directory:bin}/trafficserver-rotate
mode = 0700
xz_binary = {{ software_parameter_dict['xz_location'] ~ '/bin/xz' }} xz_binary = {{ software_parameter_dict['xz_location'] ~ '/bin/xz' }}
pattern = *.old pattern = *.old
# days to keep log files # days to keep log files
...@@ -655,16 +648,15 @@ recipe = slapos.cookbook:cron.d ...@@ -655,16 +648,15 @@ recipe = slapos.cookbook:cron.d
cron-entries = ${directory:etc}/cron.d cron-entries = ${directory:etc}/cron.d
name = trafficserver-logrotate name = trafficserver-logrotate
frequency = 0 0 * * * frequency = 0 0 * * *
command = ${trafficserver-rotate-script:rendered} command = ${trafficserver-rotate-script:output}
### End of ATS sections ### End of ATS sections
### Caddy Graceful and promises ### Caddy Graceful and promises
[frontend-caddy-configuration-state] [frontend-caddy-configuration-state]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_configuration_state_script'] }} url = {{ software_parameter_dict['template_configuration_state_script'] }}
rendered = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
mode = 0700
path_list = ${caddy-configuration:frontend-configuration} ${caddy-directory:slave-configuration}/*.conf ${caddy-directory:master-autocert-dir}/*.key ${caddy-directory:master-autocert-dir}/*.crt ${caddy-directory:master-autocert-dir}/*.pem ${caddy-directory:autocert}/*.pem ${caddy-directory:custom-ssl-directory}/*.proxy_ca_crt ${directory:bbb-ssl-dir}/*.crt path_list = ${caddy-configuration:frontend-configuration} ${caddy-directory:slave-configuration}/*.conf ${caddy-directory:master-autocert-dir}/*.key ${caddy-directory:master-autocert-dir}/*.crt ${caddy-directory:master-autocert-dir}/*.pem ${caddy-directory:autocert}/*.pem ${caddy-directory:custom-ssl-directory}/*.proxy_ca_crt ${directory:bbb-ssl-dir}/*.crt
sha256sum = {{ software_parameter_dict['sha256sum'] }} sha256sum = {{ software_parameter_dict['sha256sum'] }}
...@@ -684,31 +676,28 @@ signature_file = ${directory:run}/validate_configuration_state_signature ...@@ -684,31 +676,28 @@ signature_file = ${directory:run}/validate_configuration_state_signature
[frontend-caddy-graceful] [frontend-caddy-graceful]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_graceful_script'] }} url = {{ software_parameter_dict['template_graceful_script'] }}
rendered = ${directory:etc-run}/frontend-caddy-safe-graceful output = ${directory:etc-run}/frontend-caddy-safe-graceful
mode = 0700
extra-context = extra-context =
key graceful_reload_command caddy-configuration:frontend-graceful-command key graceful_reload_command caddy-configuration:frontend-graceful-command
key caddy_configuration_state frontend-caddy-configuration-state-graceful:rendered key caddy_configuration_state frontend-caddy-configuration-state-graceful:output
[frontend-caddy-validate] [frontend-caddy-validate]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_validate_script'] }} url = {{ software_parameter_dict['template_validate_script'] }}
rendered = ${directory:bin}/frontend-caddy-validate output = ${directory:bin}/frontend-caddy-validate
mode = 0700
last_state_file = ${directory:run}/caddy_configuration_last_state last_state_file = ${directory:run}/caddy_configuration_last_state
validate_command = ${caddy-wrapper:rendered} -validate validate_command = ${caddy-wrapper:output} -validate
extra-context = extra-context =
key validate_command :validate_command key validate_command :validate_command
key configuration_state_command frontend-caddy-configuration-state-validate:rendered key configuration_state_command frontend-caddy-configuration-state-validate:output
key last_state_file :last_state_file key last_state_file :last_state_file
[frontend-caddy-lazy-graceful] [frontend-caddy-lazy-graceful]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_caddy_lazy_script_call'] }} url = {{ software_parameter_dict['template_caddy_lazy_script_call'] }}
rendered = ${directory:bin}/frontend-caddy-lazy-graceful output = ${directory:bin}/frontend-caddy-lazy-graceful
mode = 0700
pid-file = ${directory:run}/lazy-graceful.pid pid-file = ${directory:run}/lazy-graceful.pid
wait_time = 60 wait_time = 60
extra-context = extra-context =
...@@ -719,9 +708,8 @@ extra-context = ...@@ -719,9 +708,8 @@ extra-context =
# Promises checking configuration: # Promises checking configuration:
[promise-helper-last-configuration-state] [promise-helper-last-configuration-state]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_empty'] }} url = {{ software_parameter_dict['template_empty'] }}
rendered = ${directory:bin}/frontend-read-last-configuration-state output = ${directory:bin}/frontend-read-last-configuration-state
mode = 0700
content = content =
#!/bin/sh #!/bin/sh
exit `cat ${frontend-caddy-validate:last_state_file}` exit `cat ${frontend-caddy-validate:last_state_file}`
...@@ -732,7 +720,7 @@ context = ...@@ -732,7 +720,7 @@ context =
<= monitor-promise-base <= monitor-promise-base
promise = validate_frontend_configuration promise = validate_frontend_configuration
name = frontend-caddy-configuration-promise.py name = frontend-caddy-configuration-promise.py
config-verification-script = ${promise-helper-last-configuration-state:rendered} config-verification-script = ${promise-helper-last-configuration-state:output}
[promise-caddy-frontend-v4-https] [promise-caddy-frontend-v4-https]
<= monitor-promise-base <= monitor-promise-base
...@@ -780,7 +768,7 @@ config-port = ${backend-haproxy-configuration:https-port} ...@@ -780,7 +768,7 @@ config-port = ${backend-haproxy-configuration:https-port}
file = ${directory:etc}/backend-haproxy.cfg file = ${directory:etc}/backend-haproxy.cfg
pid-file = ${directory:run}/backend-haproxy.pid pid-file = ${directory:run}/backend-haproxy.pid
log-socket = ${backend-haproxy-rsyslogd-config:log-socket} log-socket = ${backend-haproxy-rsyslogd-config:log-socket}
graceful-command = ${backend-haproxy-validate:rendered} && kill -USR2 $(cat ${:pid-file}) graceful-command = ${backend-haproxy-validate:output} && kill -USR2 $(cat ${:pid-file})
http-port = ${configuration:backend-haproxy-http-port} http-port = ${configuration:backend-haproxy-http-port}
https-port = ${configuration:backend-haproxy-https-port} https-port = ${configuration:backend-haproxy-https-port}
# Caucase related configuration # Caucase related configuration
...@@ -806,9 +794,8 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg ...@@ -806,9 +794,8 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
[backend-haproxy-rsyslogd-lazy-graceful] [backend-haproxy-rsyslogd-lazy-graceful]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_caddy_lazy_script_call'] }} url = {{ software_parameter_dict['template_caddy_lazy_script_call'] }}
rendered = ${directory:bin}/backend-haproxy-rsyslogd-lazy-graceful output = ${directory:bin}/backend-haproxy-rsyslogd-lazy-graceful
mode = 0700
pid-file = ${directory:run}/backend-haproxy-rsyslogd-lazy-graceful.pid pid-file = ${directory:run}/backend-haproxy-rsyslogd-lazy-graceful.pid
wait_time = 60 wait_time = 60
extra-context = extra-context =
...@@ -826,14 +813,13 @@ rotate-num = ${configuration:rotate-num} ...@@ -826,14 +813,13 @@ rotate-num = ${configuration:rotate-num}
# olddir # olddir
# Here we trust that there will be something to be rotated with error # Here we trust that there will be something to be rotated with error
# or access log, and that this will trigger postrotate script. # or access log, and that this will trigger postrotate script.
post = ${backend-haproxy-rsyslogd-lazy-graceful:rendered} & post = ${backend-haproxy-rsyslogd-lazy-graceful:output} &
delaycompress = delaycompress =
[backend-haproxy-configuration-state] [backend-haproxy-configuration-state]
<= jinja2-template-base <= jinja2-template-base
template = {{ software_parameter_dict['template_configuration_state_script'] }} url = {{ software_parameter_dict['template_configuration_state_script'] }}
rendered = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
mode = 0700
path_list = ${backend-haproxy-configuration:file} ${backend-client-login-config:certificate} path_list = ${backend-haproxy-configuration:file} ${backend-client-login-config:certificate}
sha256sum = {{ software_parameter_dict['sha256sum'] }} sha256sum = {{ software_parameter_dict['sha256sum'] }}
...@@ -853,37 +839,34 @@ signature_file = ${directory:run}/backend_haproxy_validate_configuration_state_s ...@@ -853,37 +839,34 @@ signature_file = ${directory:run}/backend_haproxy_validate_configuration_state_s
[backend-haproxy-graceful] [backend-haproxy-graceful]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_graceful_script'] }} url = {{ software_parameter_dict['template_graceful_script'] }}
rendered = ${directory:etc-run}/backend-haproxy-safe-graceful output = ${directory:etc-run}/backend-haproxy-safe-graceful
mode = 0700
extra-context = extra-context =
key graceful_reload_command backend-haproxy-configuration:graceful-command key graceful_reload_command backend-haproxy-configuration:graceful-command
key caddy_configuration_state backend-haproxy-configuration-state-graceful:rendered key caddy_configuration_state backend-haproxy-configuration-state-graceful:output
[backend-haproxy-validate] [backend-haproxy-validate]
<= jinja2-template-base <= jinja2-template-base
template = {{ software_parameter_dict['template_validate_script'] }} url = {{ software_parameter_dict['template_validate_script'] }}
rendered = ${directory:bin}/backend-haproxy-validate output = ${directory:bin}/backend-haproxy-validate
mode = 0700
last_state_file = ${directory:run}/backend_haproxy_configuration_last_state last_state_file = ${directory:run}/backend_haproxy_configuration_last_state
validate_command = {{ software_parameter_dict['haproxy_executable'] }} -f ${backend-haproxy-configuration:file} -c validate_command = {{ software_parameter_dict['haproxy_executable'] }} -f ${backend-haproxy-configuration:file} -c
extra-context = extra-context =
key validate_command :validate_command key validate_command :validate_command
key configuration_state_command backend-haproxy-configuration-state-validate:rendered key configuration_state_command backend-haproxy-configuration-state-validate:output
key last_state_file :last_state_file key last_state_file :last_state_file
[promise-backend-haproxy-configuration] [promise-backend-haproxy-configuration]
<= monitor-promise-base <= monitor-promise-base
promise = validate_frontend_configuration promise = validate_frontend_configuration
name = backend-haproxy-configuration.py name = backend-haproxy-configuration.py
config-verification-script = ${promise-backend-haproxy-configuration-helper:rendered} config-verification-script = ${promise-backend-haproxy-configuration-helper:output}
[promise-backend-haproxy-configuration-helper] [promise-backend-haproxy-configuration-helper]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_empty'] }} url = {{ software_parameter_dict['template_empty'] }}
rendered = ${directory:bin}/backend-haproxy-read-last-configuration-state output = ${directory:bin}/backend-haproxy-read-last-configuration-state
mode = 0700
content = content =
#!/bin/sh #!/bin/sh
exit `cat ${backend-haproxy-validate:last_state_file}` exit `cat ${backend-haproxy-validate:last_state_file}`
...@@ -900,14 +883,14 @@ caddy-log-directory = ${caddy-directory:slave-log} ...@@ -900,14 +883,14 @@ caddy-log-directory = ${caddy-directory:slave-log}
[backend-haproxy-rsyslogd-configuration] [backend-haproxy-rsyslogd-configuration]
<= jinja2-template-base <= jinja2-template-base
template = ${software-release-path:template-backend-haproxy-rsyslogd-conf} url = ${software-release-path:template-backend-haproxy-rsyslogd-conf}
rendered = ${directory:etc}/backend-haproxy-rsyslogd.conf output = ${directory:etc}/backend-haproxy-rsyslogd.conf
extra-context = extra-context =
section configuration backend-haproxy-rsyslogd-config section configuration backend-haproxy-rsyslogd-config
[backend-haproxy-rsyslogd] [backend-haproxy-rsyslogd]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ software_parameter_dict['rsyslogd_executable'] }} -i ${backend-haproxy-rsyslogd-config:pid-file} -n -f ${backend-haproxy-rsyslogd-configuration:rendered} command-line = {{ software_parameter_dict['rsyslogd_executable'] }} -i ${backend-haproxy-rsyslogd-config:pid-file} -n -f ${backend-haproxy-rsyslogd-configuration:output}
wrapper-path = ${directory:service}/backend-haproxy-rsyslogd wrapper-path = ${directory:service}/backend-haproxy-rsyslogd
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
...@@ -923,15 +906,14 @@ monitor-httpd-port = {{ instance_parameter_dict['configuration.monitor-httpd-por ...@@ -923,15 +906,14 @@ monitor-httpd-port = {{ instance_parameter_dict['configuration.monitor-httpd-por
password = {{ instance_parameter_dict['configuration.monitor-password'] | string }} password = {{ instance_parameter_dict['configuration.monitor-password'] | string }}
[monitor-conf-parameters] [monitor-conf-parameters]
private-path-list += private-path-list +=
${logrotate-directory:logrotate-backup} ${logrotate-directory:logrotate-backup}
[monitor-traffic-summary-last-stats-wrapper] [monitor-traffic-summary-last-stats-wrapper]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_wrapper'] }} url = {{ software_parameter_dict['template_wrapper'] }}
rendered = ${directory:bin}/traffic-summary-last-stats_every_1_hour output = ${directory:bin}/traffic-summary-last-stats_every_1_hour
mode = 0700
command = export TS_ROOT=${buildout:directory} && echo "<pre>$({{ software_parameter_dict['trafficserver'] }}/bin/traffic_logstats -f ${trafficserver-directory:log}/squid.blog)</pre>" command = export TS_ROOT=${buildout:directory} && echo "<pre>$({{ software_parameter_dict['trafficserver'] }}/bin/traffic_logstats -f ${trafficserver-directory:log}/squid.blog)</pre>"
extra-context = extra-context =
key content monitor-traffic-summary-last-stats-wrapper:command key content monitor-traffic-summary-last-stats-wrapper:command
...@@ -939,27 +921,24 @@ extra-context = ...@@ -939,27 +921,24 @@ extra-context =
# Produce ATS Cache stats # Produce ATS Cache stats
[monitor-ats-cache-stats-wrapper] [monitor-ats-cache-stats-wrapper]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_wrapper'] }} url = {{ software_parameter_dict['template_wrapper'] }}
rendered = ${directory:bin}/ats-cache-stats_every_1_hour output = ${directory:bin}/ats-cache-stats_every_1_hour
mode = 0700 command = export TS_ROOT=${buildout:directory} && echo "<pre>$({{ software_parameter_dict['trafficserver'] }}/bin/traffic_shell ${monitor-ats-cache-stats-config:output})</pre>"
command = export TS_ROOT=${buildout:directory} && echo "<pre>$({{ software_parameter_dict['trafficserver'] }}/bin/traffic_shell ${monitor-ats-cache-stats-config:rendered})</pre>"
extra-context = extra-context =
key content monitor-ats-cache-stats-wrapper:command key content monitor-ats-cache-stats-wrapper:command
[monitor-caddy-server-status-wrapper] [monitor-caddy-server-status-wrapper]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_wrapper'] }} url = {{ software_parameter_dict['template_wrapper'] }}
rendered = ${directory:bin}/monitor-caddy-server-status-wrapper output = ${directory:bin}/monitor-caddy-server-status-wrapper
mode = 0700
command = {{ software_parameter_dict['curl'] }}/bin/curl -s http://{{ instance_parameter_dict['ipv4-random'] }}:${configuration:plain_http_port}/server-status -u ${monitor-instance-parameter:username}:${monitor-htpasswd:passwd} 2>&1 command = {{ software_parameter_dict['curl'] }}/bin/curl -s http://{{ instance_parameter_dict['ipv4-random'] }}:${configuration:plain_http_port}/server-status -u ${monitor-instance-parameter:username}:${monitor-htpasswd:passwd} 2>&1
extra-context = extra-context =
key content monitor-caddy-server-status-wrapper:command key content monitor-caddy-server-status-wrapper:command
[monitor-ats-cache-stats-config] [monitor-ats-cache-stats-config]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_empty'] }} url = {{ software_parameter_dict['template_empty'] }}
rendered = ${trafficserver-configuration-directory:target}/cache-config.stats output = ${trafficserver-configuration-directory:target}/cache-config.stats
mode = 644
context = context =
raw content show:cache-stats raw content show:cache-stats
...@@ -971,10 +950,9 @@ config-url = ${configuration:re6st-verification-url} ...@@ -971,10 +950,9 @@ config-url = ${configuration:re6st-verification-url}
[port-redirection] [port-redirection]
<= jinja2-template-base <= jinja2-template-base
template = inline: inline =
[{"srcPort": 80, "destPort": {{ '{{' }} http_port {{ '}}' }}}, {"srcPort": 443, "destPort": {{ '{{' }} https_port {{ '}}' }}}] [{"srcPort": 80, "destPort": {{ '{{' }} http_port {{ '}}' }}}, {"srcPort": 443, "destPort": {{ '{{' }} https_port {{ '}}' }}}]
rendered = ${buildout:directory}/.slapos-port-redirect output = ${buildout:directory}/.slapos-port-redirect
mode = 0644
extra-context = extra-context =
key http_port configuration:plain_http_port key http_port configuration:plain_http_port
key https_port configuration:port key https_port configuration:port
...@@ -1009,9 +987,8 @@ config-url = ...@@ -1009,9 +987,8 @@ config-url =
[slave-introspection-configuration-state] [slave-introspection-configuration-state]
<= jinja2-template-base <= jinja2-template-base
template = {{ software_parameter_dict['template_configuration_state_script'] }} url = {{ software_parameter_dict['template_configuration_state_script'] }}
rendered = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
mode = 0700
path_list = ${frontend-configuration:slave-introspection-configuration} ${frontend-configuration:ip-access-certificate} path_list = ${frontend-configuration:slave-introspection-configuration} ${frontend-configuration:ip-access-certificate}
sha256sum = {{ software_parameter_dict['sha256sum'] }} sha256sum = {{ software_parameter_dict['sha256sum'] }}
...@@ -1031,37 +1008,34 @@ signature_file = ${directory:run}/slave_introspection_validate_configuration_sta ...@@ -1031,37 +1008,34 @@ signature_file = ${directory:run}/slave_introspection_validate_configuration_sta
[slave-introspection-graceful] [slave-introspection-graceful]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_graceful_script'] }} url = {{ software_parameter_dict['template_graceful_script'] }}
rendered = ${directory:etc-run}/slave-introspection-safe-graceful output = ${directory:etc-run}/slave-introspection-safe-graceful
mode = 0700
extra-context = extra-context =
key graceful_reload_command caddy-configuration:slave-introspection-graceful-command key graceful_reload_command caddy-configuration:slave-introspection-graceful-command
key caddy_configuration_state slave-introspection-configuration-state-graceful:rendered key caddy_configuration_state slave-introspection-configuration-state-graceful:output
[slave-introspection-validate] [slave-introspection-validate]
<= jinja2-template-base <= jinja2-template-base
template = {{ software_parameter_dict['template_validate_script'] }} url = {{ software_parameter_dict['template_validate_script'] }}
rendered = ${directory:bin}/slave-introspection-validate output = ${directory:bin}/slave-introspection-validate
mode = 0700
last_state_file = ${directory:run}/slave_introspection_configuration_last_state last_state_file = ${directory:run}/slave_introspection_configuration_last_state
validate_command = {{ software_parameter_dict['nginx'] }} -c ${frontend-configuration:slave-introspection-configuration} -t validate_command = {{ software_parameter_dict['nginx'] }} -c ${frontend-configuration:slave-introspection-configuration} -t
extra-context = extra-context =
key validate_command :validate_command key validate_command :validate_command
key configuration_state_command slave-introspection-configuration-state-validate:rendered key configuration_state_command slave-introspection-configuration-state-validate:output
key last_state_file :last_state_file key last_state_file :last_state_file
[promise-slave-introspection-configuration] [promise-slave-introspection-configuration]
<= monitor-promise-base <= monitor-promise-base
promise = validate_frontend_configuration promise = validate_frontend_configuration
name = slave-introspection-configuration.py name = slave-introspection-configuration.py
config-verification-script = ${promise-slave-introspection-configuration-helper:rendered} config-verification-script = ${promise-slave-introspection-configuration-helper:output}
[promise-slave-introspection-configuration-helper] [promise-slave-introspection-configuration-helper]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['template_empty'] }} url = {{ software_parameter_dict['template_empty'] }}
rendered = ${directory:bin}/slave-introspection-read-last-configuration-state output = ${directory:bin}/slave-introspection-read-last-configuration-state
mode = 0700
content = content =
#!/bin/sh #!/bin/sh
exit `cat ${slave-introspection-validate:last_state_file}` exit `cat ${slave-introspection-validate:last_state_file}`
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
{% set caucase_url = 'http://' ~ caucase_netloc %} {% set caucase_url = 'http://' ~ caucase_netloc %}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
extra-context = extra-context =
context = context =
import json_module json import json_module json
...@@ -403,11 +403,11 @@ config-url = ...@@ -403,11 +403,11 @@ config-url =
#-- Publish slave information #-- Publish slave information
[publish-slave-information] [publish-slave-information]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = dynamic-publish-slave-information:rendered default = dynamic-publish-slave-information:output
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
replicate = dynamic-publish-slave-information:rendered replicate = dynamic-publish-slave-information:output
custom-personal = dynamic-publish-slave-information:rendered custom-personal = dynamic-publish-slave-information:output
custom-group = dynamic-publish-slave-information:rendered custom-group = dynamic-publish-slave-information:output
[request-kedifa] [request-kedifa]
<= slap-connection <= slap-connection
...@@ -470,7 +470,7 @@ active-slave-instance-list = {{ json_module.dumps(active_slave_instance_list, so ...@@ -470,7 +470,7 @@ active-slave-instance-list = {{ json_module.dumps(active_slave_instance_list, so
[dynamic-publish-slave-information] [dynamic-publish-slave-information]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['profile_replicate_publish_slave_information'] }} url = {{ software_parameter_dict['profile_replicate_publish_slave_information'] }}
filename = dynamic-publish-slave-information.cfg filename = dynamic-publish-slave-information.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
...@@ -538,20 +538,17 @@ stop-on-error = True ...@@ -538,20 +538,17 @@ stop-on-error = True
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
context = context =
key caucase_url aikc-config:caucase-url key caucase_url aikc-config:caucase-url
template = inline:#!{{ software_parameter_dict['dash'] }}/bin/dash inline =
#!{{ software_parameter_dict['dash'] }}/bin/dash
exec {{ software_parameter_dict['bin_directory'] }}/caucase \ exec {{ software_parameter_dict['bin_directory'] }}/caucase \
{# raw block to use context #} --ca-url {{ '{{ caucase_url }}' }} \
{% raw %}
--ca-url {{ caucase_url }} \
{% endraw %}
--ca-crt ${aikc-config:ca-certificate} \ --ca-crt ${aikc-config:ca-certificate} \
--user-ca-crt ${aikc-config:user-ca-certificate} \ --user-ca-crt ${aikc-config:user-ca-certificate} \
--user-crl ${aikc-config:user-crl} \ --user-crl ${aikc-config:user-crl} \
--crl ${aikc-config:crl} \ --crl ${aikc-config:crl} \
"$@" "$@"
rendered = ${directory:bin}/aikc-caucase-wrapper output = ${directory:bin}/aikc-caucase-wrapper
mode = 0700
{% do part_list.append('aikc-create-user') %} {% do part_list.append('aikc-create-user') %}
[aikc-create-user] [aikc-create-user]
...@@ -562,11 +559,11 @@ update-command = ${:command} ...@@ -562,11 +559,11 @@ update-command = ${:command}
csr_id = ${directory:aikc}/csr_id csr_id = ${directory:aikc}/csr_id
command = command =
if ! [ -f ${aikc-config:user-created} ] ; then if ! [ -f ${aikc-config:user-created} ] ; then
${aikc-caucase-wrapper:rendered} --mode user --send-csr ${aikc-user-csr:csr} > ${:csr_id} || exit 1 ${aikc-caucase-wrapper:output} --mode user --send-csr ${aikc-user-csr:csr} > ${:csr_id} || exit 1
cut -d ' ' -f 1 ${:csr_id} || exit 1 cut -d ' ' -f 1 ${:csr_id} || exit 1
csr_id=`cut -d ' ' -f 1 ${:csr_id}` csr_id=`cut -d ' ' -f 1 ${:csr_id}`
sleep 1 sleep 1
${aikc-caucase-wrapper:rendered} --mode user --get-crt $csr_id ${aikc-config:key} || exit 1 ${aikc-caucase-wrapper:output} --mode user --get-crt $csr_id ${aikc-config:key} || exit 1
touch ${aikc-config:user-created} touch ${aikc-config:user-created}
fi fi
...@@ -662,21 +659,18 @@ stop-on-error = True ...@@ -662,21 +659,18 @@ stop-on-error = True
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
context = context =
key caucase_url aibcc-config:caucase-url key caucase_url aibcc-config:caucase-url
template = inline:#!{{ software_parameter_dict['dash'] }}/bin/dash inline =
#!{{ software_parameter_dict['dash'] }}/bin/dash
exec {{ software_parameter_dict['bin_directory'] }}/caucase \ exec {{ software_parameter_dict['bin_directory'] }}/caucase \
{# raw block to use context #} --ca-url {{ '{{ caucase_url }}' }} \
{% raw %}
--ca-url {{ caucase_url }} \
{% endraw %}
--ca-crt ${aibcc-config:ca-certificate} \ --ca-crt ${aibcc-config:ca-certificate} \
--user-ca-crt ${aibcc-config:user-ca-certificate} \ --user-ca-crt ${aibcc-config:user-ca-certificate} \
--user-crl ${aibcc-config:user-crl} \ --user-crl ${aibcc-config:user-crl} \
--crl ${aibcc-config:crl} \ --crl ${aibcc-config:crl} \
"$@" "$@"
rendered = ${directory:bin}/aibcc-caucase-wrapper output = ${directory:bin}/aibcc-caucase-wrapper
mode = 0700
{% do part_list.append('aibcc-create-user') %} {% do part_list.append('aibcc-create-user') %}
[aibcc-create-user] [aibcc-create-user]
...@@ -689,11 +683,11 @@ update-command = ${:command} ...@@ -689,11 +683,11 @@ update-command = ${:command}
csr_id = ${directory:aibcc}/csr_id csr_id = ${directory:aibcc}/csr_id
command = command =
if ! [ -f ${aibcc-config:user-created} ] ; then if ! [ -f ${aibcc-config:user-created} ] ; then
${aibcc-caucase-wrapper:rendered} --mode user --send-csr ${aibcc-user-csr:csr} > ${:csr_id} || exit 1 ${aibcc-caucase-wrapper:output} --mode user --send-csr ${aibcc-user-csr:csr} > ${:csr_id} || exit 1
cut -d ' ' -f 1 ${:csr_id} || exit 1 cut -d ' ' -f 1 ${:csr_id} || exit 1
csr_id=`cut -d ' ' -f 1 ${:csr_id}` csr_id=`cut -d ' ' -f 1 ${:csr_id}`
sleep 1 sleep 1
${aibcc-caucase-wrapper:rendered} --mode user --get-crt $csr_id ${aibcc-config:key} || exit 1 ${aibcc-caucase-wrapper:output} --mode user --get-crt $csr_id ${aibcc-config:key} || exit 1
touch ${aibcc-config:user-created} touch ${aibcc-config:user-created}
fi fi
...@@ -754,8 +748,8 @@ update-command = ${:command} ...@@ -754,8 +748,8 @@ update-command = ${:command}
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
filename = rejected-slave.json filename = rejected-slave.json
directory = ${directory:promise-output} directory = ${directory:promise-output}
rendered = ${:directory}/${:filename} output = ${:directory}/${:filename}
template = {{ software_parameter_dict['template_empty'] }} url = {{ software_parameter_dict['template_empty'] }}
{% if critical_rejected_slave_dict %} {% if critical_rejected_slave_dict %}
{# sort_keys are important in order to avoid shuffling parameters on each run #} {# sort_keys are important in order to avoid shuffling parameters on each run #}
content = {{ dumps(json_module.dumps(critical_rejected_slave_dict, indent=2, sort_keys=True)) }} content = {{ dumps(json_module.dumps(critical_rejected_slave_dict, indent=2, sort_keys=True)) }}
...@@ -778,13 +772,13 @@ directory = ${rejected-slave-json:directory} ...@@ -778,13 +772,13 @@ directory = ${rejected-slave-json:directory}
url = https://${rejected-slave-password:user}:${rejected-slave-password:passwd}@[${rejected-slave-publish-configuration:ip}]:${rejected-slave-publish-configuration:port}/${rejected-slave-json:filename} url = https://${rejected-slave-password:user}:${rejected-slave-password:passwd}@[${rejected-slave-publish-configuration:ip}]:${rejected-slave-publish-configuration:port}/${rejected-slave-json:filename}
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ software_parameter_dict['nginx'] }} command-line = {{ software_parameter_dict['nginx'] }}
-c ${rejected-slave-template:rendered} -c ${rejected-slave-template:output}
wrapper-path = ${directory:service}/rejected-slave-publish wrapper-path = ${directory:service}/rejected-slave-publish
hash-existing-files = hash-existing-files =
${buildout:directory}/software_release/buildout.cfg ${buildout:directory}/software_release/buildout.cfg
hash-files = hash-files =
${rejected-slave-template:rendered} ${rejected-slave-template:output}
${rejected-slave-certificate:certificate} ${rejected-slave-certificate:certificate}
[rejected-slave-certificate] [rejected-slave-certificate]
...@@ -822,7 +816,7 @@ command = {{ software_parameter_dict['htpasswd'] }} -cb ${:file} ${rejected-slav ...@@ -822,7 +816,7 @@ command = {{ software_parameter_dict['htpasswd'] }} -cb ${:file} ${rejected-slav
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
var = ${directory:rejected-var} var = ${directory:rejected-var}
pid = ${directory:var}/nginx-rejected.pid pid = ${directory:var}/nginx-rejected.pid
template = inline: inline =
daemon off; daemon off;
pid ${:pid}; pid ${:pid};
error_log stderr; error_log stderr;
...@@ -856,7 +850,7 @@ template = inline: ...@@ -856,7 +850,7 @@ template = inline:
} }
} }
rendered = ${directory:etc}/nginx-rejected-slave.conf output = ${directory:etc}/nginx-rejected-slave.conf
[promise-rejected-slave-publish-ip-port] [promise-rejected-slave-publish-ip-port]
<= monitor-promise-base <= monitor-promise-base
...@@ -870,7 +864,7 @@ config-port = ${rejected-slave-publish-configuration:port} ...@@ -870,7 +864,7 @@ config-port = ${rejected-slave-publish-configuration:port}
promise = check_socket_listening promise = check_socket_listening
promise = check_file_state promise = check_file_state
name = rejected-slave.py name = rejected-slave.py
config-filename = ${rejected-slave-json:rendered} config-filename = ${rejected-slave-json:output}
config-state = empty config-state = empty
config-url = ${rejected-slave-publish:url} config-url = ${rejected-slave-publish:url}
......
...@@ -108,7 +108,7 @@ stop-on-error = True ...@@ -108,7 +108,7 @@ stop-on-error = True
ca_path='${kedifa-config:ca-certificate}', ca_path='${kedifa-config:ca-certificate}',
crl_path='${kedifa-config:crl}', crl_path='${kedifa-config:crl}',
key_path='${kedifa-csr:key}', key_path='${kedifa-csr:key}',
on_renew='${kedifa-reloader:rendered}', on_renew='${kedifa-reloader:output}',
template_csr='${kedifa-csr:template-csr}' template_csr='${kedifa-csr:template-csr}'
)}} )}}
...@@ -149,8 +149,8 @@ nginx_mime = {{ software_parameter_dict['nginx_mime'] }} ...@@ -149,8 +149,8 @@ nginx_mime = {{ software_parameter_dict['nginx_mime'] }}
[expose-csr-template] [expose-csr-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${directory:expose-csr-etc}/nginx.conf output = ${directory:expose-csr-etc}/nginx.conf
template = {{ software_parameter_dict['template_expose_csr_nginx_conf'] }} url = {{ software_parameter_dict['template_expose_csr_nginx_conf'] }}
context = context =
section configuration expose-csr-configuration section configuration expose-csr-configuration
...@@ -164,7 +164,7 @@ config-port = ${expose-csr-configuration:port} ...@@ -164,7 +164,7 @@ config-port = ${expose-csr-configuration:port}
[expose-csr] [expose-csr]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ software_parameter_dict['nginx'] }} command-line = {{ software_parameter_dict['nginx'] }}
-c ${expose-csr-template:rendered} -c ${expose-csr-template:output}
url = https://[${expose-csr-configuration:ip}]:${expose-csr-configuration:port} url = https://[${expose-csr-configuration:ip}]:${expose-csr-configuration:port}
wrapper-path = ${directory:service}/expose-csr wrapper-path = ${directory:service}/expose-csr
...@@ -177,7 +177,7 @@ commands = ...@@ -177,7 +177,7 @@ commands =
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
extra-context = extra-context =
slapparameter_dict = {{ dumps(slapparameter_dict) }} slapparameter_dict = {{ dumps(slapparameter_dict) }}
slap_software_type = {{ dumps(instance_parameter_dict['slap-software-type']) }} slap_software_type = {{ dumps(instance_parameter_dict['slap-software-type']) }}
...@@ -203,11 +203,10 @@ logfile = ${directory:log}/kedifa.log ...@@ -203,11 +203,10 @@ logfile = ${directory:log}/kedifa.log
[kedifa-reloader] [kedifa-reloader]
<= jinja2-template-base <= jinja2-template-base
template = {{ software_parameter_dict['template_wrapper'] }} url = {{ software_parameter_dict['template_wrapper'] }}
rendered = ${directory:etc-run}/kedifa-reloader output = ${directory:etc-run}/kedifa-reloader
command = command =
kill -HUP `cat ${kedifa-config:pidfile}` kill -HUP `cat ${kedifa-config:pidfile}`
mode = 0700
extra-context = extra-context =
key content :command key content :command
......
...@@ -10,7 +10,7 @@ recipe = caddyprofiledeps ...@@ -10,7 +10,7 @@ recipe = caddyprofiledeps
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
context = context =
...@@ -25,13 +25,13 @@ import-list = ...@@ -25,13 +25,13 @@ import-list =
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = dynamic-profile-caddy-replicate:rendered default = dynamic-profile-caddy-replicate:output
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
custom-personal = dynamic-profile-caddy-replicate:rendered custom-personal = dynamic-profile-caddy-replicate:output
single-default = dynamic-profile-caddy-frontend:rendered single-default = dynamic-profile-caddy-frontend:output
single-custom-personal = dynamic-profile-caddy-frontend:rendered single-custom-personal = dynamic-profile-caddy-frontend:output
replicate = dynamic-profile-caddy-replicate:rendered replicate = dynamic-profile-caddy-replicate:output
kedifa = dynamic-profile-kedifa:rendered kedifa = dynamic-profile-kedifa:output
[software-parameter-section] [software-parameter-section]
{% for key,value in software_parameter_dict.iteritems() %} {% for key,value in software_parameter_dict.iteritems() %}
...@@ -40,7 +40,7 @@ kedifa = dynamic-profile-kedifa:rendered ...@@ -40,7 +40,7 @@ kedifa = dynamic-profile-kedifa:rendered
[dynamic-profile-caddy-frontend] [dynamic-profile-caddy-frontend]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['profile_caddy_frontend'] }} url = {{ software_parameter_dict['profile_caddy_frontend'] }}
filename = instance-caddy-frontend.cfg filename = instance-caddy-frontend.cfg
extra-context = extra-context =
import furl_module furl import furl_module furl
...@@ -49,7 +49,7 @@ extra-context = ...@@ -49,7 +49,7 @@ extra-context =
[dynamic-profile-caddy-replicate] [dynamic-profile-caddy-replicate]
< = jinja2-template-base < = jinja2-template-base
depends = ${caddyprofiledeps:recipe} depends = ${caddyprofiledeps:recipe}
template = {{ software_parameter_dict['profile_caddy_replicate'] }} url = {{ software_parameter_dict['profile_caddy_replicate'] }}
filename = instance-caddy-replicate.cfg filename = instance-caddy-replicate.cfg
extra-context = extra-context =
import subprocess_module subprocess import subprocess_module subprocess
...@@ -61,7 +61,7 @@ extra-context = ...@@ -61,7 +61,7 @@ extra-context =
[dynamic-profile-kedifa] [dynamic-profile-kedifa]
< = jinja2-template-base < = jinja2-template-base
template = {{ software_parameter_dict['profile_kedifa'] }} url = {{ software_parameter_dict['profile_kedifa'] }}
filename = instance-kedifa.cfg filename = instance-kedifa.cfg
extra-context = extra-context =
raw software_type kedifa raw software_type kedifa
......
...@@ -61,8 +61,8 @@ eggs = ...@@ -61,8 +61,8 @@ eggs =
[profile-common] [profile-common]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-common.cfg.in url = ${:_profile_base_location_}/instance-common.cfg.in
rendered = ${buildout:directory}/instance-common.cfg output = ${buildout:directory}/instance-common.cfg
context = context =
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
...@@ -74,11 +74,11 @@ caucase_jinja2_library = ${caucase-jinja2-library:target} ...@@ -74,11 +74,11 @@ caucase_jinja2_library = ${caucase-jinja2-library:target}
# profiles # profiles
profile_caddy_frontend = ${profile-caddy-frontend:target} profile_caddy_frontend = ${profile-caddy-frontend:target}
profile_caddy_replicate = ${profile-caddy-replicate:target} profile_caddy_replicate = ${profile-caddy-replicate:target}
profile_common = ${profile-common:rendered} profile_common = ${profile-common:output}
profile_kedifa = ${profile-kedifa:target} profile_kedifa = ${profile-kedifa:target}
profile_logrotate_base = ${template-logrotate-base:rendered} profile_logrotate_base = ${template-logrotate-base:output}
profile_monitor = ${monitor-template:output} profile_monitor = ${monitor-template:output}
profile_monitor2 = ${monitor2-template:rendered} profile_monitor2 = ${monitor2-template:output}
profile_replicate_publish_slave_information = ${profile-replicate-publish-slave-information:target} profile_replicate_publish_slave_information = ${profile-replicate-publish-slave-information:target}
profile_slave_list = ${profile-slave-list:target} profile_slave_list = ${profile-slave-list:target}
...@@ -129,8 +129,8 @@ caucase_csr_sign_check = ${:bin_directory}/caucase-csr-sign-check ...@@ -129,8 +129,8 @@ caucase_csr_sign_check = ${:bin_directory}/caucase-csr-sign-check
[template] [template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
context = context =
section software_parameter_dict software-parameter-section section software_parameter_dict software-parameter-section
......
...@@ -290,8 +290,8 @@ command = {{ software_parameter_dict['htpasswd'] }} -cb ${:file} {{ slave_refere ...@@ -290,8 +290,8 @@ command = {{ software_parameter_dict['htpasswd'] }} -cb ${:file} {{ slave_refere
{#- Store certificates on fs #} {#- Store certificates on fs #}
[{{ cert_title }}] [{{ cert_title }}]
< = jinja2-template-base < = jinja2-template-base
template = {{ empty_template }} url = {{ empty_template }}
rendered = {{ cert_file }} output = {{ cert_file }}
extra-context = extra-context =
key content {{ cert_title + '-config:value' }} key content {{ cert_title + '-config:value' }}
{#- BBB: SlapOS Master non-zero knowledge BEGIN #} {#- BBB: SlapOS Master non-zero knowledge BEGIN #}
...@@ -312,8 +312,8 @@ value = {{ dumps(slave_instance.get(cert_name)) }} ...@@ -312,8 +312,8 @@ value = {{ dumps(slave_instance.get(cert_name)) }}
[{{cert_title}}] [{{cert_title}}]
< = jinja2-template-base < = jinja2-template-base
template = {{ empty_template }} url = {{ empty_template }}
rendered = {{ cert_file }} output = {{ cert_file }}
cert-content = {{ dumps(slave_instance.get('ssl_crt') + '\n' + slave_instance.get('ssl_ca_crt', '') + '\n' + slave_instance.get('ssl_key')) }} cert-content = {{ dumps(slave_instance.get('ssl_crt') + '\n' + slave_instance.get('ssl_ca_crt', '') + '\n' + slave_instance.get('ssl_key')) }}
extra-context = extra-context =
key content :cert-content key content :cert-content
...@@ -340,9 +340,9 @@ node-id = {{ node_id }} ...@@ -340,9 +340,9 @@ node-id = {{ node_id }}
[{{ slave_section_title }}] [{{ slave_section_title }}]
< = jinja2-template-base < = jinja2-template-base
rendered = {{ caddy_configuration_directory }}/${:filename} output = {{ caddy_configuration_directory }}/${:filename}
template = {{ template_default_slave_configuration }} url = {{ template_default_slave_configuration }}
extra-context = extra-context =
section slave_parameter {{ slave_configuration_section_name }} section slave_parameter {{ slave_configuration_section_name }}
...@@ -430,8 +430,8 @@ pid = {{ caddy_configuration['slave-introspection-pid-file'] }} ...@@ -430,8 +430,8 @@ pid = {{ caddy_configuration['slave-introspection-pid-file'] }}
[slave-introspection-config] [slave-introspection-config]
<= jinja2-template-base <= jinja2-template-base
template = {{ software_parameter_dict['template_slave_introspection_httpd_nginx'] }} url = {{ software_parameter_dict['template_slave_introspection_httpd_nginx'] }}
rendered = {{ frontend_configuration['slave-introspection-configuration'] }} output = {{ frontend_configuration['slave-introspection-configuration'] }}
extra-context = extra-context =
section slave_log_directory slave-log-directory-dict section slave_log_directory slave-log-directory-dict
section slave_htpasswd slave-htpasswd section slave_htpasswd slave-htpasswd
...@@ -440,7 +440,7 @@ extra-context = ...@@ -440,7 +440,7 @@ extra-context =
[slave-introspection] [slave-introspection]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ software_parameter_dict['nginx'] }} command-line = {{ software_parameter_dict['nginx'] }}
-c ${slave-introspection-config:rendered} -c ${slave-introspection-config:output}
wrapper-path = {{ directory['service'] }}/slave-instrospection-nginx wrapper-path = {{ directory['service'] }}/slave-instrospection-nginx
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
...@@ -491,18 +491,18 @@ update-command = ${:command} ...@@ -491,18 +491,18 @@ update-command = ${:command}
[kedifa-updater-mapping] [kedifa-updater-mapping]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
file = {{ kedifa_configuration['kedifa-updater-mapping-file'] }} file = {{ kedifa_configuration['kedifa-updater-mapping-file'] }}
template = inline: inline =
{%- for mapping in kedifa_updater_mapping %} {%- for mapping in kedifa_updater_mapping %}
{{ mapping[0] }} {{ mapping[1] }} {{ mapping[2] }} {{ mapping[0] }} {{ mapping[1] }} {{ mapping[2] }}
{%- endfor %} {%- endfor %}
rendered = ${:file} output = ${:file}
##<Backend haproxy> ##<Backend haproxy>
[backend-haproxy-configuration] [backend-haproxy-configuration]
< = jinja2-template-base < = jinja2-template-base
template = {{ template_backend_haproxy_configuration }} url = {{ template_backend_haproxy_configuration }}
rendered = ${backend-haproxy-config:file} output = ${backend-haproxy-config:file}
backend_slave_list = {{ dumps(sorted(backend_slave_list)) }} backend_slave_list = {{ dumps(sorted(backend_slave_list)) }}
extra-context = extra-context =
key backend_slave_list :backend_slave_list key backend_slave_list :backend_slave_list
...@@ -589,8 +589,8 @@ nginx_mime = {{ software_parameter_dict['nginx_mime'] }} ...@@ -589,8 +589,8 @@ nginx_mime = {{ software_parameter_dict['nginx_mime'] }}
[expose-csr-template] [expose-csr-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = {{ directory['expose-csr-etc'] }}/nginx.conf output = {{ directory['expose-csr-etc'] }}/nginx.conf
template = {{ template_expose_csr_nginx_conf }} url = {{ template_expose_csr_nginx_conf }}
context = context =
section configuration expose-csr-configuration section configuration expose-csr-configuration
...@@ -604,7 +604,7 @@ config-port = ${expose-csr-configuration:port} ...@@ -604,7 +604,7 @@ config-port = ${expose-csr-configuration:port}
[expose-csr] [expose-csr]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ software_parameter_dict['nginx'] }} command-line = {{ software_parameter_dict['nginx'] }}
-c ${expose-csr-template:rendered} -c ${expose-csr-template:output}
url = https://[${expose-csr-configuration:ip}]:${expose-csr-configuration:port} url = https://[${expose-csr-configuration:ip}]:${expose-csr-configuration:port}
wrapper-path = {{ directory['service'] }}/expose-csr wrapper-path = {{ directory['service'] }}/expose-csr
......
...@@ -19,4 +19,4 @@ md5sum = 2e7c1d8c553b398dd68c875a9fa38cdb ...@@ -19,4 +19,4 @@ md5sum = 2e7c1d8c553b398dd68c875a9fa38cdb
[instance] [instance]
filename = instance.cfg.jinja2 filename = instance.cfg.jinja2
md5sum = 687ed460bebc18768ff7b7315e9b6de5 md5sum = b4a50217c68233eb0e2922fd7606a6be
...@@ -18,8 +18,8 @@ instance-caucased = {{ dumps(instance_caucased) }} ...@@ -18,8 +18,8 @@ instance-caucased = {{ dumps(instance_caucased) }}
[caucased] [caucased]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${context:instance-caucased} url = ${context:instance-caucased}
rendered = ${buildout:parts-directory}/instance-caucased.cfg output = ${buildout:parts-directory}/instance-caucased.cfg
monitor = {{ template_monitor }} monitor = {{ template_monitor }}
context = context =
key ipv6_set slap-configuration:ipv6 key ipv6_set slap-configuration:ipv6
...@@ -31,6 +31,6 @@ import-list = ...@@ -31,6 +31,6 @@ import-list =
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = caucased:rendered default = caucased:output
# XXX: When will this name finally go away ? # XXX: When will this name finally go away ?
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
...@@ -14,12 +14,12 @@ url = ${:_profile_base_location_}/${:filename} ...@@ -14,12 +14,12 @@ url = ${:_profile_base_location_}/${:filename}
[instance] [instance]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
context = context =
key bin_directory buildout:bin-directory key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
key caucase_jinja2_library caucase-jinja2-library:target key caucase_jinja2_library caucase-jinja2-library:target
key instance_caucased instance-caucased:target key instance_caucased instance-caucased:target
key template_monitor monitor2-template:rendered key template_monitor monitor2-template:output
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
# not need these here). # not need these here).
[template-cloudooo] [template-cloudooo]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = e986de01a57161b32425f1cd3ccac924 md5sum = d1e4d7306c39f2ebc64d0407860d4301
[template-cloudooo-instance] [template-cloudooo-instance]
filename = instance-cloudooo.cfg.in filename = instance-cloudooo.cfg.in
md5sum = 3e6830c21c206b3ae1140375e5e63b46 md5sum = 90299c1dbdc5f983613794a8e9a7bc9d
...@@ -43,9 +43,6 @@ ...@@ -43,9 +43,6 @@
{% set section_list = [] -%} {% set section_list = [] -%}
{% set cloudooo_section_list = [] -%} {% set cloudooo_section_list = [] -%}
{% macro cloudooo(name) %}{% do cloudooo_section_list.append(name) %}{{ name }}{% endmacro -%} {% macro cloudooo(name) %}{% do cloudooo_section_list.append(name) %}{{ name }}{% endmacro -%}
[simplefile]
recipe = slapos.recipe.template:jinja2
template = inline:{{ '{{ content }}' }}
{% macro simplefile(section_name, file_path, content, mode='') -%} {% macro simplefile(section_name, file_path, content, mode='') -%}
{% set content_section_name = section_name ~ '-content' -%} {% set content_section_name = section_name ~ '-content' -%}
...@@ -53,10 +50,9 @@ template = inline:{{ '{{ content }}' }} ...@@ -53,10 +50,9 @@ template = inline:{{ '{{ content }}' }}
content = {{ dumps(content) }} content = {{ dumps(content) }}
[{{ section_name }}] [{{ section_name }}]
< = simplefile recipe = slapos.recipe.template
rendered = {{ file_path }} output = {{ file_path }}
context = key content {{ content_section_name }}:content inline = {{ '${' + content_section_name + ':content}' }}
mode = {{ mode }}
{%- endmacro %} {%- endmacro %}
...@@ -80,12 +76,12 @@ parts = ...@@ -80,12 +76,12 @@ parts =
[apache] [apache]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:services}/apache wrapper-path = ${directory:services}/apache
command-line = "{{ parameter_dict['apache'] }}/bin/httpd" -f "${apache-conf:rendered}" -DFOREGROUND command-line = "{{ parameter_dict['apache'] }}/bin/httpd" -f "${apache-conf:output}" -DFOREGROUND
[apache-conf] [apache-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-apache-conf'] }} url = {{ parameter_dict['template-apache-conf'] }}
rendered = ${directory:apache-conf}/apache.conf output = ${directory:apache-conf}/apache.conf
context = section parameter_dict apache-conf-parameter-dict context = section parameter_dict apache-conf-parameter-dict
[apache-conf-parameter-dict] [apache-conf-parameter-dict]
...@@ -139,8 +135,8 @@ recipe = slapos.cookbook:publish.serialised ...@@ -139,8 +135,8 @@ recipe = slapos.cookbook:publish.serialised
[fontconfig-conf] [fontconfig-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-fonts-conf'] }} url = {{ parameter_dict['template-fonts-conf'] }}
rendered = ${directory:etc}/fonts.conf output = ${directory:etc}/fonts.conf
context = context =
key cachedir directory:fontconfig-cache key cachedir directory:fontconfig-cache
key fonts :fonts key fonts :fonts
...@@ -160,7 +156,7 @@ recipe = slapos.cookbook:generic.cloudooo ...@@ -160,7 +156,7 @@ recipe = slapos.cookbook:generic.cloudooo
ip = {{ ipv4 }} ip = {{ ipv4 }}
environment = environment =
LD_LIBRARY_PATH = {{ parameter_dict['cairo'] }}/lib:{{ parameter_dict['cups'] }}/lib:{{ parameter_dict['cups'] }}/lib64:{{ parameter_dict['dbus'] }}/lib:{{ parameter_dict['dbus-glib'] }}/lib:{{ parameter_dict['file'] }}/lib:{{ parameter_dict['fontconfig'] }}/lib:{{ parameter_dict['freetype'] }}/lib:{{ parameter_dict['gcc'] }}/lib:{{ parameter_dict['gcc'] }}/lib64:{{ parameter_dict['glib'] }}/lib:{{ parameter_dict['glu'] }}/lib:{{ parameter_dict['libICE'] }}/lib:{{ parameter_dict['libSM'] }}/lib:{{ parameter_dict['libX11'] }}/lib:{{ parameter_dict['libXau'] }}/lib:{{ parameter_dict['libXdmcp'] }}/lib:{{ parameter_dict['libXext'] }}/lib:{{ parameter_dict['libXrender'] }}/lib:{{ parameter_dict['libexpat'] }}/lib:{{ parameter_dict['libffi'] }}/lib:{{ parameter_dict['libffi'] }}/lib64:{{ parameter_dict['libpng12'] }}/lib:{{ parameter_dict['libxcb'] }}/lib:{{ parameter_dict['mesa'] }}/lib:{{ parameter_dict['pixman'] }}/lib:{{ parameter_dict['xdamage'] }}/lib:{{ parameter_dict['xfixes'] }}/lib:{{ parameter_dict['zlib'] }}/lib LD_LIBRARY_PATH = {{ parameter_dict['cairo'] }}/lib:{{ parameter_dict['cups'] }}/lib:{{ parameter_dict['cups'] }}/lib64:{{ parameter_dict['dbus'] }}/lib:{{ parameter_dict['dbus-glib'] }}/lib:{{ parameter_dict['file'] }}/lib:{{ parameter_dict['fontconfig'] }}/lib:{{ parameter_dict['freetype'] }}/lib:{{ parameter_dict['gcc'] }}/lib:{{ parameter_dict['gcc'] }}/lib64:{{ parameter_dict['glib'] }}/lib:{{ parameter_dict['glu'] }}/lib:{{ parameter_dict['libICE'] }}/lib:{{ parameter_dict['libSM'] }}/lib:{{ parameter_dict['libX11'] }}/lib:{{ parameter_dict['libXau'] }}/lib:{{ parameter_dict['libXdmcp'] }}/lib:{{ parameter_dict['libXext'] }}/lib:{{ parameter_dict['libXrender'] }}/lib:{{ parameter_dict['libexpat'] }}/lib:{{ parameter_dict['libffi'] }}/lib:{{ parameter_dict['libffi'] }}/lib64:{{ parameter_dict['libpng12'] }}/lib:{{ parameter_dict['libxcb'] }}/lib:{{ parameter_dict['mesa'] }}/lib:{{ parameter_dict['pixman'] }}/lib:{{ parameter_dict['xdamage'] }}/lib:{{ parameter_dict['xfixes'] }}/lib:{{ parameter_dict['zlib'] }}/lib
FONTCONFIG_FILE = ${fontconfig-conf:rendered} FONTCONFIG_FILE = ${fontconfig-conf:output}
PATH = ${binary-link:target-directory} PATH = ${binary-link:target-directory}
LANG = C.UTF-8 LANG = C.UTF-8
mimetype_entry_addition = mimetype_entry_addition =
......
...@@ -16,7 +16,7 @@ cert = ${slap-connection:cert-file} ...@@ -16,7 +16,7 @@ cert = ${slap-connection:cert-file}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename} output = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
extra-context = extra-context =
context = context =
key ipv6_set slap-configuration:ipv6 key ipv6_set slap-configuration:ipv6
...@@ -33,7 +33,7 @@ instance-parameter-dict = {{ dumps(cloudooo_parameter_dict) }} ...@@ -33,7 +33,7 @@ instance-parameter-dict = {{ dumps(cloudooo_parameter_dict) }}
[cloudooo-dynamic-template] [cloudooo-dynamic-template]
< = jinja2-template-base < = jinja2-template-base
template = {{ template_cloudooo_instance }} url = {{ template_cloudooo_instance }}
filename = instance-cloudooo.cfg filename = instance-cloudooo.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
...@@ -43,5 +43,5 @@ extra-context = ...@@ -43,5 +43,5 @@ extra-context =
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = cloudooo-dynamic-template:rendered default = cloudooo-dynamic-template:output
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
...@@ -27,9 +27,8 @@ cert = ${slap-connection:cert-file} ...@@ -27,9 +27,8 @@ cert = ${slap-connection:cert-file}
< = template-cloudooo-base < = template-cloudooo-base
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 640
[template-cloudooo-base] [template-cloudooo-base]
context = context =
...@@ -91,8 +90,8 @@ xfixes = ${xfixes:location} ...@@ -91,8 +90,8 @@ xfixes = ${xfixes:location}
xserver = ${xserver:location} xserver = ${xserver:location}
zlib = ${zlib:location} zlib = ${zlib:location}
template-apache-conf = ${template-apache-backend-conf:target} template-apache-conf = ${template-apache-backend-conf:target}
template-logrotate-base = ${template-logrotate-base:rendered} template-logrotate-base = ${template-logrotate-base:output}
template-monitor = ${monitor2-template:rendered} template-monitor = ${monitor2-template:output}
[template-cloudooo-instance] [template-cloudooo-instance]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
......
[instance.cfg] [instance.cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = a24384487467a07e827edab17a0b7206 md5sum = 156dcfedd4b5fcbeefb3ac05a062edba
[runTestSuite.in] [runTestSuite.in]
_update_hash_filename_ = runTestSuite.in _update_hash_filename_ = runTestSuite.in
......
...@@ -10,7 +10,7 @@ develop-eggs-directory = ${buildout:develop-eggs-directory} ...@@ -10,7 +10,7 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
[publish-env-path] [publish-env-path]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
readme = Source the script to set up the environment. readme = Source the script to set up the environment.
script = ${cythonplus_env.sh:rendered} script = ${cythonplus_env.sh:output}
repository = ${cythonplus-repository:repository} repository = ${cythonplus-repository:repository}
[slap-configuration] [slap-configuration]
...@@ -34,12 +34,11 @@ shared = true ...@@ -34,12 +34,11 @@ shared = true
[runTestSuite] [runTestSuite]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/$${:_buildout_section_name_} output = $${directory:bin}/$${:_buildout_section_name_}
template = ${runTestSuite.in:target} url = ${runTestSuite.in:target}
mode = 0755
context = context =
key tmpdir directory:tmp key tmpdir directory:tmp
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key cythonplus_repository cythonplus-repository:location key cythonplus_repository cythonplus-repository:location
raw runTestSuite_interpreter ${runTestSuite_interpreter:bin-directory}/${runTestSuite_interpreter:interpreter} raw runTestSuite_interpreter ${runTestSuite_interpreter:bin-directory}/${runTestSuite_interpreter:interpreter}
raw cythonplus_env_sh ${cythonplus_env.sh:rendered} raw cythonplus_env_sh ${cythonplus_env.sh:output}
[instance] [instance]
filename = instance.cfg filename = instance.cfg
md5sum = ddd17fab15afa5a27cdc0761fbc8f34c md5sum = a4e19280bc672cc98e0fef241c8439ba
...@@ -11,7 +11,7 @@ parts = ...@@ -11,7 +11,7 @@ parts =
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
extends = ${monitor-template:rendered} extends = ${monitor-template:output}
# parameters # parameters
[instance-parameter] [instance-parameter]
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = 6dcbe21f99aa6675e8e3b74bc9cbb0e6 md5sum = 5bd72da73a8b84f70f568686924d7d6c
[template-default] [template-default]
filename = instance-default.cfg.jinja.in filename = instance-default.cfg.jinja.in
md5sum = 536a28ff250c691ca374f75aa5f0aa76 md5sum = 0c9ea9fa7417885889a536ec2cf2093f
...@@ -7,7 +7,7 @@ eggs-directory = ${buildout:eggs-directory} ...@@ -7,7 +7,7 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
extends = ${monitor2-template:rendered} extends = ${monitor2-template:output}
parts = parts =
testnode-service testnode-service
...@@ -97,21 +97,20 @@ hash-files = ...@@ -97,21 +97,20 @@ hash-files =
shell = ${bash:location}/bin/bash shell = ${bash:location}/bin/bash
[shellinabox] [shellinabox]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
# We cannot use slapos.cookbook:wrapper here because this recipe escapes too much # We cannot use slapos.cookbook:wrapper here because this recipe escapes too much
socket = $${directory:run}/siab.sock socket = $${directory:run}/siab.sock
mode = 0700 output = $${basedirectory:services}/shellinaboxd
rendered = $${basedirectory:services}/shellinaboxd inline =
template = inline:
#!/bin/sh #!/bin/sh
exec ${shellinabox:location}/bin/shellinaboxd \ exec ${shellinabox:location}/bin/shellinaboxd \
--unixdomain-only=$${:socket}:$(id -u):$(id -g):0600 \ --unixdomain-only=$${:socket}:$(id -u):$(id -g):0600 \
--service "/:$(id -u):$(id -g):HOME:$${shell-environment:shell} -l" --service "/:$(id -u):$(id -g):HOME:$${shell-environment:shell} -l"
[shellinabox-frontend-config] [shellinabox-frontend-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:etc}/$${:_buildout_section_name_} output = $${directory:etc}/$${:_buildout_section_name_}
template = inline: inline =
https://$${:hostname}:$${:port} { https://$${:hostname}:$${:port} {
bind $${:ipv6} bind $${:ipv6}
tls self_signed tls self_signed
...@@ -131,15 +130,15 @@ username = testnode ...@@ -131,15 +130,15 @@ username = testnode
passwd = $${pwgen:passwd} passwd = $${pwgen:passwd}
cert-file = $${directory:shellinabox}/public.crt cert-file = $${directory:shellinabox}/public.crt
key-file = $${directory:shellinabox}/private.key key-file = $${directory:shellinabox}/private.key
url = https://$${:username}:$${:passwd}@$${:hostname}:$${:port} backend-url = https://$${:username}:$${:passwd}@$${:hostname}:$${:port}
[shellinabox-frontend] [shellinabox-frontend]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = $${rootdirectory:bin}/$${:_buildout_section_name_} wrapper-path = $${rootdirectory:bin}/$${:_buildout_section_name_}
command-line = command-line =
${caddy:output} -conf $${shellinabox-frontend-config:rendered} -pidfile $${:pidfile} ${caddy:output} -conf $${shellinabox-frontend-config:output} -pidfile $${:pidfile}
url = $${shellinabox-frontend-config:url} url = $${shellinabox-frontend-config:backend-url}
hostname = $${shellinabox-frontend-config:ipv6} hostname = $${shellinabox-frontend-config:ipv6}
port = $${shellinabox-frontend-config:port} port = $${shellinabox-frontend-config:port}
pidfile = $${basedirectory:run}/$${:_buildout_section_name_}.pid pidfile = $${basedirectory:run}/$${:_buildout_section_name_}.pid
...@@ -152,7 +151,7 @@ command-line = ...@@ -152,7 +151,7 @@ command-line =
"kill -s USR1 $$(${coreutils:location}/bin/cat $${shellinabox-frontend:pidfile}) \ "kill -s USR1 $$(${coreutils:location}/bin/cat $${shellinabox-frontend:pidfile}) \
&& ${coreutils:location}/bin/sleep infinity" && ${coreutils:location}/bin/sleep infinity"
hash-files = hash-files =
$${shellinabox-frontend-config:rendered} $${shellinabox-frontend-config:output}
$${shellinabox-frontend:wrapper-path} $${shellinabox-frontend:wrapper-path}
[certificate-authority] [certificate-authority]
......
...@@ -17,12 +17,12 @@ cert = $${slap-connection:cert-file} ...@@ -17,12 +17,12 @@ cert = $${slap-connection:cert-file}
[switch_softwaretype] [switch_softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = $${:default} RootSoftwareInstance = $${:default}
default = instance-default:rendered default = instance-default:output
[instance-default] [instance-default]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-default:output} url = ${template-default:output}
rendered = $${buildout:directory}/instance-default.cfg output = $${buildout:directory}/instance-default.cfg
context = context =
import json json import json json
jsonkey default_parameter_dict :default-parameters jsonkey default_parameter_dict :default-parameters
......
...@@ -36,13 +36,11 @@ eggs = ...@@ -36,13 +36,11 @@ eggs =
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644
[template-default] [template-default]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template-default.cfg.jinja output = ${buildout:directory}/template-default.cfg.jinja
mode = 0644
[versions] [versions]
dnspython = 1.15.0 dnspython = 1.15.0
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[template-erp5testnode] [template-erp5testnode]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = bbfe2f0e83df4d6cd2120c0ef3c483cd md5sum = 681f4159e4ac2542d0fbc7a894e43d79
...@@ -18,4 +18,4 @@ md5sum = 8357771b70efd0740561b1cb46f6955e ...@@ -18,4 +18,4 @@ md5sum = 8357771b70efd0740561b1cb46f6955e
[template-deploy-test] [template-deploy-test]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = c5db797980951b764b69aaa4b60a0380 md5sum = 9013ba5a4a2c80c7d96d0a6bfe0be0be
...@@ -25,24 +25,23 @@ command = ...@@ -25,24 +25,23 @@ command =
[runTestSuite] [runTestSuite]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/bin/$${:_buildout_section_name_} output = $${buildout:directory}/bin/$${:_buildout_section_name_}
template = inline: inline =
#!/bin/sh #!/bin/sh
export PATH=${python2.7-with-eggs:location}:$PATH export PATH=${python2.7-with-eggs:location}:$PATH
exec ${buildout:bin-directory}/${runTestSuite_py:interpreter} ${:_profile_base_location_}/runTestSuite.py --partition_ipv4 {{ list(partition_ipv4)[0] }} --partition_path $${buildout:directory} --test_reference "{{ slapparameter_dict.get('image-to-test-url') }} {{ slapparameter_dict.get('script-to-test-url')}}" --test_location "${test-location:base}/{{ slapparameter_dict.get('test-relative-directory', 'playbook/roles/standalone-shared') }}" --python_interpreter=${buildout:bin-directory}/${runTestSuite_py:interpreter} "$@" exec ${buildout:bin-directory}/${runTestSuite_py:interpreter} ${:_profile_base_location_}/runTestSuite.py --partition_ipv4 {{ list(partition_ipv4)[0] }} --partition_path $${buildout:directory} --test_reference "{{ slapparameter_dict.get('image-to-test-url') }} {{ slapparameter_dict.get('script-to-test-url')}}" --test_location "${test-location:base}/{{ slapparameter_dict.get('test-relative-directory', 'playbook/roles/standalone-shared') }}" --python_interpreter=${buildout:bin-directory}/${runTestSuite_py:interpreter} "$@"
mode = 0755
context = context =
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key partition_ipv4 slap-configuration:ipv4 key partition_ipv4 slap-configuration:ipv4
[switch_softwaretype] [switch_softwaretype]
default = $${:deploy-test} default = $${:deploy-test}
deploy-test = dynamic-template-deploy-test:rendered deploy-test = dynamic-template-deploy-test:output
[dynamic-template-deploy-test] [dynamic-template-deploy-test]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-deploy-test.cfg.jinja2 url = ${:_profile_base_location_}/instance-deploy-test.cfg.jinja2
rendered = $${buildout:directory}/template-deploy-test.cfg output = $${buildout:directory}/template-deploy-test.cfg
context = context =
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
...@@ -52,4 +51,3 @@ context = ...@@ -52,4 +51,3 @@ context =
raw in_vm_test_script_md5 ${deploy-script-controller-script:md5sum} raw in_vm_test_script_md5 ${deploy-script-controller-script:md5sum}
raw waittime ${deploy-script-controller-script:waittime} raw waittime ${deploy-script-controller-script:waittime}
raw tries ${deploy-script-controller-script:tries} raw tries ${deploy-script-controller-script:tries}
mode = 0644
...@@ -69,4 +69,3 @@ location = ${:_profile_base_location_}/${:filename} ...@@ -69,4 +69,3 @@ location = ${:_profile_base_location_}/${:filename}
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644
...@@ -18,8 +18,8 @@ var = $${:home}/var ...@@ -18,8 +18,8 @@ var = $${:home}/var
log = $${:var}/log log = $${:var}/log
[log-writer] [log-writer]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline:#!/bin/sh inline =
#!/bin/sh
echo "Hello : $(date)" >> $${directory:log}/log.log echo "Hello : $(date)" >> $${directory:log}/log.log
rendered = $${directory:script}/log-writer output = $${directory:script}/log-writer
mode = 700
...@@ -12,4 +12,3 @@ recipe = slapos.recipe.template ...@@ -12,4 +12,3 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
md5sum = 9fccb9600a085691ab0f9a20cd615c01 md5sum = 9fccb9600a085691ab0f9a20cd615c01
mode = 0644
...@@ -6,12 +6,12 @@ default = $${:test} ...@@ -6,12 +6,12 @@ default = $${:test}
RootSoftwareInstance = $${:test} RootSoftwareInstance = $${:test}
# Used for the test of resiliency. The system wants a "test" software_type. # Used for the test of resiliency. The system wants a "test" software_type.
test = dynamic-template-resilient-test:rendered test = dynamic-template-resilient-test:output
[dynamic-template-resilient-test] [dynamic-template-resilient-test]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-resilient-test:target} url = ${template-resilient-test:target}
rendered = $${buildout:directory}/template-resilient-test.cfg output = $${buildout:directory}/template-resilient-test.cfg
bin-directory = ${buildout:bin-directory} bin-directory = ${buildout:bin-directory}
context = context =
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[instance-profile] [instance-profile]
filename = instance.cfg filename = instance.cfg
md5sum = c265bf7ec199190ba9f77960cac5da38 md5sum = 41f5acc071609a0c4b5ada295ede6bac
[template-fluentd] [template-fluentd]
filename = instance-fluentd.cfg filename = instance-fluentd.cfg
......
...@@ -8,7 +8,7 @@ offline = true ...@@ -8,7 +8,7 @@ offline = true
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = dynamic-template-fluentd:rendered default = dynamic-template-fluentd:output
RootSoftwareInstance = $${:default} RootSoftwareInstance = $${:default}
[directory] [directory]
...@@ -29,11 +29,11 @@ cert = $${slap_connection:cert_file} ...@@ -29,11 +29,11 @@ cert = $${slap_connection:cert_file}
[dynamic-template-fluentd] [dynamic-template-fluentd]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-fluentd:output} url = ${template-fluentd:output}
rendered = $${buildout:directory}/instance-fluentd.cfg output = $${buildout:directory}/instance-fluentd.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
key fluentd_agent_conf fluentd-agent-conf:rendered key fluentd_agent_conf fluentd-agent-conf:output
key port_list fluentd-conf:port-list key port_list fluentd-conf:port-list
section directory directory section directory directory
...@@ -46,9 +46,6 @@ init = ...@@ -46,9 +46,6 @@ init =
options['port-list'] = re.findall(r'<source>.*port (\d+).*<\/source>', options['text'], re.DOTALL) options['port-list'] = re.findall(r'<source>.*port (\d+).*<\/source>', options['text'], re.DOTALL)
[fluentd-agent-conf] [fluentd-agent-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline:{{ conf }} inline = $${fluentd-conf:text}
rendered = $${directory:etc}/fluentd-agent.conf output = $${directory:etc}/fluentd-agent.conf
mode = 0644
context =
key conf fluentd-conf:text
...@@ -15,7 +15,6 @@ part = python3 ...@@ -15,7 +15,6 @@ part = python3
[template-base] [template-base]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 0644
[instance-profile] [instance-profile]
< = template-base < = template-base
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[instance-cfg] [instance-cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = c24f3241af0123c9570a60ccc0fb8fdc md5sum = 38c79a4952a7cb63698135f1d1ed6c8c
...@@ -51,34 +51,35 @@ storage-path = $${directory:data}/.passwd ...@@ -51,34 +51,35 @@ storage-path = $${directory:data}/.passwd
username = admin username = admin
[stat-password] [stat-password]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline: inline =
$${admin-password:username}:$${admin-password:passwd} $${admin-password:username}:$${admin-password:passwd}
rendered = $${directory:data}/passwd output = $${directory:data}/passwd
[ice-servers.json] [ice-servers.json]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline: inline =
$${slap-configuration:configuration.ice-servers.json} $${slap-configuration:configuration.ice-servers.json}
rendered = $${directory:data}/ice-servers.json output = $${directory:data}/ice-servers.json
[groups-json] [groups-json]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline:{ inline =
{
"public":true, "public":true,
"op": [{"username":"$${admin-password:username}","password":"$${admin-password:passwd}"}], "op": [{"username":"$${admin-password:username}","password":"$${admin-password:passwd}"}],
"other": [], "other": [],
"presenter": [{"username": "", "password": "nexedi"}] "presenter": [{"username": "", "password": "nexedi"}]
} }
rendered = $${directory:groups}/public.json output = $${directory:groups}/public.json
[galene-wrapper] [galene-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
port = 8443 port = 8443
ip = $${slap-configuration:ipv6-random} ip = $${slap-configuration:ipv6-random}
template = inline =
inline:#!/bin/sh #!/bin/sh
ulimit -n $(ulimit -Hn) ulimit -n $(ulimit -Hn)
exec ${gowork:bin}/galene \ exec ${gowork:bin}/galene \
-static ${galene:location}/static \ -static ${galene:location}/static \
...@@ -87,7 +88,7 @@ template = ...@@ -87,7 +88,7 @@ template =
-data $${directory:data} \ -data $${directory:data} \
-http [$${:ip}]:$${:port} \ -http [$${:ip}]:$${:port} \
-turn "" -turn ""
rendered = $${directory:services}/galene output = $${directory:services}/galene
depends = depends =
$${ice-servers.json:recipe} $${ice-servers.json:recipe}
$${groups-json:recipe} $${groups-json:recipe}
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[instance.cfg] [instance.cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 47e8092404feaf3f28ee6469523689ac md5sum = 8e8edd7dadb9c331fdba826312e7e8d2
[watcher] [watcher]
_update_hash_filename_ = watcher.in _update_hash_filename_ = watcher.in
...@@ -42,7 +42,7 @@ md5sum = 52d18b521b8cd16352fc88b1e1d79d53 ...@@ -42,7 +42,7 @@ md5sum = 52d18b521b8cd16352fc88b1e1d79d53
[gitlab-unicorn-startup.in] [gitlab-unicorn-startup.in]
_update_hash_filename_ = gitlab-unicorn-startup.in _update_hash_filename_ = gitlab-unicorn-startup.in
md5sum = aff91edaf9786c213db8ea703ab3571e md5sum = b0c3d465a8aaad9d2274934dcf208645
[gitlab.yml.in] [gitlab.yml.in]
_update_hash_filename_ = template/gitlab.yml.in _update_hash_filename_ = template/gitlab.yml.in
...@@ -54,11 +54,11 @@ md5sum = 0f1ec4077dab586cc003ae13f689eda2 ...@@ -54,11 +54,11 @@ md5sum = 0f1ec4077dab586cc003ae13f689eda2
[instance-gitlab.cfg.in] [instance-gitlab.cfg.in]
_update_hash_filename_ = instance-gitlab.cfg.in _update_hash_filename_ = instance-gitlab.cfg.in
md5sum = f099d01baefe41c8f0944c2437b30881 md5sum = c115c88d5798dcb5e16b9d50432f2551
[instance-gitlab-export.cfg.in] [instance-gitlab-export.cfg.in]
_update_hash_filename_ = instance-gitlab-export.cfg.in _update_hash_filename_ = instance-gitlab-export.cfg.in
md5sum = 2af7dcf63f74e5edc53a3ff11fa4989b md5sum = da2e3d6f67c92233d370dae55fb3b35f
[instance-gitlab-test.cfg.in] [instance-gitlab-test.cfg.in]
_update_hash_filename_ = instance-gitlab-test.cfg.in _update_hash_filename_ = instance-gitlab-test.cfg.in
......
...@@ -73,5 +73,5 @@ $RAKE cache:clear || die "cache:clear failed" ...@@ -73,5 +73,5 @@ $RAKE cache:clear || die "cache:clear failed"
# 3. finally exec to unicorn # 3. finally exec to unicorn
exec {{ gitlab_unicorn }} \ exec {{ gitlab_unicorn }} \
-E production \ -E production \
-c {{ unicorn_rb.rendered }} \ -c {{ unicorn_rb.output }} \
{{ gitlab_work.location }}/config.ru {{ gitlab_work.location }}/config.ru
...@@ -60,8 +60,8 @@ output = ${directory:srv}/exporter.exclude ...@@ -60,8 +60,8 @@ output = ${directory:srv}/exporter.exclude
# this section should be added only on runner import instance # this section should be added only on runner import instance
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 0700 mode = 0700
template= {{ gitlab_restore_sh_in }} url = {{ gitlab_restore_sh_in }}
rendered= ${directory:srv}/runner-import-restore output= ${directory:srv}/runner-import-restore
context = context =
raw bash_bin {{ bash_bin }} raw bash_bin {{ bash_bin }}
raw go_work_bin {{ gopath_bin }} raw go_work_bin {{ gopath_bin }}
......
...@@ -198,29 +198,29 @@ context-extra = ...@@ -198,29 +198,29 @@ context-extra =
[gitlab-etc-template] [gitlab-etc-template]
<= etc-template <= etc-template
rendered= ${gitlab:etc}/${:_buildout_section_name_} output= ${gitlab:etc}/${:_buildout_section_name_}
[nginx-etc-template] [nginx-etc-template]
<= etc-template <= etc-template
rendered= ${nginx:etc}/${:_buildout_section_name_} output= ${nginx:etc}/${:_buildout_section_name_}
[database.yml] [database.yml]
<= gitlab-etc-template <= gitlab-etc-template
template= {{ database_yml_in }} url = {{ database_yml_in }}
context-extra = context-extra =
section pgsql service-postgresql section pgsql service-postgresql
[gitconfig] [gitconfig]
<= etc-template <= etc-template
template= {{ gitconfig_in }} url = {{ gitconfig_in }}
# NOTE put directly into $HOME/ - this way git will pick it up # NOTE put directly into $HOME/ - this way git will pick it up
rendered= ${directory:home}/.${:_buildout_section_name_} output= ${directory:home}/.${:_buildout_section_name_}
[gitlab-shell-config.yml] [gitlab-shell-config.yml]
<= etc-template <= etc-template
template= {{ gitlab_shell_config_yml_in }} url = {{ gitlab_shell_config_yml_in }}
rendered= ${gitlab-shell:etc}/config.yml output= ${gitlab-shell:etc}/config.yml
context-extra = context-extra =
import urllib urllib import urllib urllib
section gitlab gitlab section gitlab gitlab
...@@ -232,7 +232,7 @@ context-extra = ...@@ -232,7 +232,7 @@ context-extra =
[gitlab.yml] [gitlab.yml]
<= gitlab-etc-template <= gitlab-etc-template
template= {{ gitlab_yml_in }} url = {{ gitlab_yml_in }}
context-extra = context-extra =
import urllib urllib import urllib urllib
section gitlab gitlab section gitlab gitlab
...@@ -242,16 +242,16 @@ context-extra = ...@@ -242,16 +242,16 @@ context-extra =
[nginx.conf] [nginx.conf]
<= nginx-etc-template <= nginx-etc-template
template= {{ nginx_conf_in }} url = {{ nginx_conf_in }}
context-extra = context-extra =
section directory directory section directory directory
section gitlab_workhorse gitlab-workhorse section gitlab_workhorse gitlab-workhorse
raw nginx_mime_types {{ nginx_mime_types }} raw nginx_mime_types {{ nginx_mime_types }}
raw nginx_gitlab_http_conf ${nginx-gitlab-http.conf:rendered} raw nginx_gitlab_http_conf ${nginx-gitlab-http.conf:output}
[nginx-gitlab-http.conf] [nginx-gitlab-http.conf]
<= nginx-etc-template <= nginx-etc-template
template= {{ nginx_gitlab_http_conf_in }} url = {{ nginx_gitlab_http_conf_in }}
context-extra = context-extra =
section nginx nginx section nginx nginx
section gitlab_work gitlab-work section gitlab_work gitlab-work
...@@ -259,8 +259,8 @@ context-extra = ...@@ -259,8 +259,8 @@ context-extra =
[gitaly-config.toml] [gitaly-config.toml]
<= etc-template <= etc-template
template= {{ gitaly_config_toml_in }} url = {{ gitaly_config_toml_in }}
rendered= ${directory:etc}/${:_buildout_section_name_} output= ${directory:etc}/${:_buildout_section_name_}
context-extra = context-extra =
import urllib urllib import urllib urllib
section gitlab gitlab section gitlab gitlab
...@@ -269,23 +269,23 @@ context-extra = ...@@ -269,23 +269,23 @@ context-extra =
[rack_attack.rb] [rack_attack.rb]
<= gitlab-etc-template <= gitlab-etc-template
template = {{ rack_attack_rb_in }} url = {{ rack_attack_rb_in }}
[resque.yml] [resque.yml]
<= gitlab-etc-template <= gitlab-etc-template
template= {{ resque_yml_in }} url = {{ resque_yml_in }}
context-extra = context-extra =
section redis service-redis section redis service-redis
[smtp_settings.rb] [smtp_settings.rb]
<= gitlab-etc-template <= gitlab-etc-template
template= {{ smtp_settings_rb_in }} url = {{ smtp_settings_rb_in }}
# contains smtp password # contains smtp password
mode = 0600 mode = 0600
[unicorn.rb] [unicorn.rb]
<= gitlab-etc-template <= gitlab-etc-template
template = {{ unicorn_rb_in }} url = {{ unicorn_rb_in }}
context-extra = context-extra =
section unicorn unicorn section unicorn unicorn
section directory directory section directory directory
...@@ -320,8 +320,8 @@ prog = {{ prog }} ...@@ -320,8 +320,8 @@ prog = {{ prog }}
[gitlab-unicorn-startup] [gitlab-unicorn-startup]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 0755 mode = 0755
template= {{ gitlab_unicorn_startup_in }} url = {{ gitlab_unicorn_startup_in }}
rendered= ${directory:bin}/${:_buildout_section_name_} output= ${directory:bin}/${:_buildout_section_name_}
context = context =
raw bash_bin {{ bash_bin }} raw bash_bin {{ bash_bin }}
raw gitlab_rake ${gitlab-rake:wrapper-path} raw gitlab_rake ${gitlab-rake:wrapper-path}
...@@ -397,15 +397,15 @@ tune-command = ...@@ -397,15 +397,15 @@ tune-command =
ln -sf ${gitlab-workhorse:secret} .gitlab_workhorse_secret ln -sf ${gitlab-workhorse:secret} .gitlab_workhorse_secret
# config/ # config/
cd config && cd config &&
ln -sf ${unicorn.rb:rendered} unicorn.rb && ln -sf ${unicorn.rb:output} unicorn.rb &&
ln -sf ${gitlab.yml:rendered} gitlab.yml && ln -sf ${gitlab.yml:output} gitlab.yml &&
ln -sf ${database.yml:rendered} database.yml && ln -sf ${database.yml:output} database.yml &&
ln -sf ${resque.yml:rendered} resque.yml && ln -sf ${resque.yml:output} resque.yml &&
ln -sf ${secrets:secrets}/gitlab_secrets.yml secrets.yml && ln -sf ${secrets:secrets}/gitlab_secrets.yml secrets.yml &&
# config/initializers/ # config/initializers/
cd initializers && cd initializers &&
ln -sf ${rack_attack.rb:rendered} rack_attack.rb && ln -sf ${rack_attack.rb:output} rack_attack.rb &&
ln -sf ${smtp_settings.rb:rendered} smtp_settings.rb && ln -sf ${smtp_settings.rb:output} smtp_settings.rb &&
# public/ # public/
cd ../../public && cd ../../public &&
rm -rf uploads assets && rm -rf uploads assets &&
...@@ -420,7 +420,7 @@ tune-command = ...@@ -420,7 +420,7 @@ tune-command =
software = {{ gitlab_shell_repository_location }} software = {{ gitlab_shell_repository_location }}
tune-command = tune-command =
ln -sf ${gitlab-shell-config.yml:rendered} config.yml && ln -sf ${gitlab-shell-config.yml:output} config.yml &&
true true
...@@ -597,7 +597,7 @@ wrapper-path = ${directory:service}/unicorn ...@@ -597,7 +597,7 @@ wrapper-path = ${directory:service}/unicorn
# NOTE we perform db setup / migrations as part of unicorn startup. # NOTE we perform db setup / migrations as part of unicorn startup.
# Those operations require PG and Redis to be up and running already, that's # Those operations require PG and Redis to be up and running already, that's
# why we do it here. See gitlab-unicorn-startup for details. # why we do it here. See gitlab-unicorn-startup for details.
command-line = ${gitlab-unicorn-startup:rendered} command-line = ${gitlab-unicorn-startup:output}
depend = depend =
${promise-unicorn:recipe} ${promise-unicorn:recipe}
...@@ -757,7 +757,7 @@ symlink = ${nginx:log} = ${nginx:srv}/logs ...@@ -757,7 +757,7 @@ symlink = ${nginx:log} = ${nginx:srv}/logs
[service-nginx] [service-nginx]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:service}/nginx wrapper-path = ${directory:service}/nginx
command-line = {{ nginx_bin }} -p ${nginx:srv} -c ${nginx.conf:rendered} command-line = {{ nginx_bin }} -p ${nginx:srv} -c ${nginx.conf:output}
depend = depend =
${nginx-symlinks:recipe} ${nginx-symlinks:recipe}
${promise-nginx:recipe} ${promise-nginx:recipe}
...@@ -796,7 +796,7 @@ cron-entries = ${cron:cron-entries} ...@@ -796,7 +796,7 @@ cron-entries = ${cron:cron-entries}
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:service}/gitaly wrapper-path = ${directory:service}/gitaly
#command-line = ${gitlab-work:location}/bin/daemon_with_pidfile ${gitaly:pid} #command-line = ${gitlab-work:location}/bin/daemon_with_pidfile ${gitaly:pid}
command-line = {{ gitaly_location }}/gitaly ${gitaly-config.toml:rendered} command-line = {{ gitaly_location }}/gitaly ${gitaly-config.toml:output}
environment = environment =
PATH={{ bundler_1_17_3_dir }}:{{ ruby_location }}/bin:/bin:/usr/bin PATH={{ bundler_1_17_3_dir }}:{{ ruby_location }}/bin:/bin:/usr/bin
......
...@@ -13,9 +13,9 @@ offline = true ...@@ -13,9 +13,9 @@ offline = true
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
gitlab = instance-gitlab.cfg:rendered gitlab = instance-gitlab.cfg:output
gitlab-export = instance-gitlab-export.cfg:rendered gitlab-export = instance-gitlab-export.cfg:output
gitlab-test = instance-gitlab-test.cfg:rendered gitlab-test = instance-gitlab-test.cfg:output
RootSoftwareInstance = $${:gitlab} RootSoftwareInstance = $${:gitlab}
# TODO -import, -pull-backup # TODO -import, -pull-backup
...@@ -56,7 +56,7 @@ configuration.icp_license = ...@@ -56,7 +56,7 @@ configuration.icp_license =
[instance-cfg] [instance-cfg]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 0644 mode = 0644
rendered= $${buildout:directory}/$${:_buildout_section_name_} output= $${buildout:directory}/$${:_buildout_section_name_}
context = context =
import os os import os os
import pwd pwd import pwd pwd
...@@ -79,7 +79,7 @@ context = ...@@ -79,7 +79,7 @@ context =
raw git ${git:location}/bin/git raw git ${git:location}/bin/git
raw git_location ${git:location} raw git_location ${git:location}
raw gitaly_location ${gitaly-repository:location} raw gitaly_location ${gitaly-repository:location}
raw gitlab_export ${gitlab-export:rendered} raw gitlab_export ${gitlab-export:output}
raw gitlab_workhorse ${gowork:bin}/gitlab-workhorse raw gitlab_workhorse ${gowork:bin}/gitlab-workhorse
raw gopath_bin ${gowork:bin} raw gopath_bin ${gowork:bin}
raw gunzip_bin ${gzip:location}/bin/gunzip raw gunzip_bin ${gzip:location}/bin/gunzip
...@@ -95,14 +95,14 @@ context = ...@@ -95,14 +95,14 @@ context =
raw redis_binprefix ${redis28:location}/bin raw redis_binprefix ${redis28:location}/bin
raw ruby_location ${bundler-4gitlab:ruby-location} raw ruby_location ${bundler-4gitlab:ruby-location}
raw tar_location ${tar:location} raw tar_location ${tar:location}
raw watcher ${watcher:rendered} raw watcher ${watcher:output}
raw xnice_repository_location ${xnice-repository:location} raw xnice_repository_location ${xnice-repository:location}
raw yarn_location ${yarn:location} raw yarn_location ${yarn:location}
# config files # config files
raw database_yml_in ${database.yml.in:target} raw database_yml_in ${database.yml.in:target}
raw gitconfig_in ${gitconfig.in:target} raw gitconfig_in ${gitconfig.in:target}
raw monitor_template ${monitor2-template:rendered} raw monitor_template ${monitor2-template:output}
raw gitlab_shell_config_yml_in ${gitlab-shell-config.yml.in:target} raw gitlab_shell_config_yml_in ${gitlab-shell-config.yml.in:target}
raw gitlab_unicorn_startup_in ${gitlab-unicorn-startup.in:target} raw gitlab_unicorn_startup_in ${gitlab-unicorn-startup.in:target}
raw gitlab_yml_in ${gitlab.yml.in:target} raw gitlab_yml_in ${gitlab.yml.in:target}
...@@ -121,18 +121,18 @@ context-extra = ...@@ -121,18 +121,18 @@ context-extra =
[instance-gitlab.cfg] [instance-gitlab.cfg]
<= instance-cfg <= instance-cfg
template= ${instance-gitlab.cfg.in:target} url = ${instance-gitlab.cfg.in:target}
[instance-gitlab-export.cfg] [instance-gitlab-export.cfg]
<= instance-cfg <= instance-cfg
template= ${instance-gitlab-export.cfg.in:target} url = ${instance-gitlab-export.cfg.in:target}
context-extra = context-extra =
raw instance_gitlab_cfg $${instance-gitlab.cfg:rendered} raw instance_gitlab_cfg $${instance-gitlab.cfg:output}
[instance-gitlab-test.cfg] [instance-gitlab-test.cfg]
<= instance-cfg <= instance-cfg
template= ${instance-gitlab-test.cfg.in:target} url = ${instance-gitlab-test.cfg.in:target}
context-extra = context-extra =
raw instance_gitlab_cfg $${instance-gitlab.cfg:rendered} raw instance_gitlab_cfg $${instance-gitlab.cfg:output}
raw instance_gitlab_export_cfg $${instance-gitlab-export.cfg:rendered} raw instance_gitlab_export_cfg $${instance-gitlab-export.cfg:output}
raw gitlab_demo_backup_path ${gitlab-demo-backup.git:location} raw gitlab_demo_backup_path ${gitlab-demo-backup.git:location}
...@@ -319,8 +319,8 @@ output = ${buildout:directory}/instance.cfg ...@@ -319,8 +319,8 @@ output = ${buildout:directory}/instance.cfg
# macro: download a shell script and put it rendered into <software>/bin/ # macro: download a shell script and put it rendered into <software>/bin/
[binsh] [binsh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template= ${:_profile_base_location_}/${:_update_hash_filename_} url = ${:_profile_base_location_}/${:_update_hash_filename_}
rendered= ${buildout:bin-directory}/${:_buildout_section_name_} output= ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755 mode = 0755
context = context =
section bash bash section bash bash
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 3ccdd2299e759488545b62368c7a0b91 md5sum = 6fb42f5663864789ff7b375a9a86888e
[influxdb-config-file] [influxdb-config-file]
filename = influxdb-config-file.cfg.in filename = influxdb-config-file.cfg.in
......
...@@ -67,9 +67,8 @@ common-name = ${:_buildout_section_name_} ...@@ -67,9 +67,8 @@ common-name = ${:_buildout_section_name_}
[config-file] [config-file]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ buildout['parts-directory'] }}/${:_buildout_section_name_}/${:_buildout_section_name_}.cfg.in url = {{ buildout['parts-directory'] }}/${:_buildout_section_name_}/${:_buildout_section_name_}.cfg.in
rendered = ${directory:etc}/${:_buildout_section_name_}.cfg output = ${directory:etc}/${:_buildout_section_name_}.cfg
mode = 0644
extensions = jinja2.ext.do extensions = jinja2.ext.do
[check-port-listening-promise] [check-port-listening-promise]
...@@ -100,7 +99,7 @@ database = telegraf ...@@ -100,7 +99,7 @@ database = telegraf
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = command-line =
nice -19 chrt --idle 0 ionice -c3 {{ influxd_bin }} -config ${influxdb-config-file:rendered} nice -19 chrt --idle 0 ionice -c3 {{ influxd_bin }} -config ${influxdb-config-file:output}
wrapper-path = ${directory:service}/influxdb wrapper-path = ${directory:service}/influxdb
[influxdb-config-file] [influxdb-config-file]
...@@ -158,7 +157,7 @@ ssl-cert-file = ${grafana-certificate:cert-file} ...@@ -158,7 +157,7 @@ ssl-cert-file = ${grafana-certificate:cert-file}
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = command-line =
{{ grafana_bin }} -config ${grafana-config-file:rendered} -homepath {{ grafana_homepath }} {{ grafana_bin }} -config ${grafana-config-file:output} -homepath {{ grafana_homepath }}
wrapper-path = ${directory:service}/grafana wrapper-path = ${directory:service}/grafana
[grafana-certificate] [grafana-certificate]
...@@ -178,11 +177,11 @@ context = ...@@ -178,11 +177,11 @@ context =
section apache_frontend apache-frontend section apache_frontend apache-frontend
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
depends = depends =
${grafana-provisioning-config-file:rendered} ${grafana-provisioning-config-file:output}
[grafana-provisioning-config-file] [grafana-provisioning-config-file]
<= config-file <= config-file
rendered = ${grafana:provisioning-datasources-dir}/datasource.yaml output = ${grafana:provisioning-datasources-dir}/datasource.yaml
context = context =
section influxdb influxdb section influxdb influxdb
section loki loki section loki loki
...@@ -199,7 +198,7 @@ recipe = slapos.cookbook:wrapper ...@@ -199,7 +198,7 @@ recipe = slapos.cookbook:wrapper
extra-config-dir = ${directory:telegraf-extra-config-dir} extra-config-dir = ${directory:telegraf-extra-config-dir}
# telegraf needs influxdb to be already listening before starting # telegraf needs influxdb to be already listening before starting
command-line = command-line =
bash -c '${influxdb-listen-promise:path} && nice -19 chrt --idle 0 ionice -c3 {{ telegraf_bin }} --config ${telegraf-config-file:rendered} --config-directory ${:extra-config-dir}' bash -c '${influxdb-listen-promise:path} && nice -19 chrt --idle 0 ionice -c3 {{ telegraf_bin }} --config ${telegraf-config-file:output} --config-directory ${:extra-config-dir}'
wrapper-path = ${directory:service}/telegraf wrapper-path = ${directory:service}/telegraf
[telegraf-config-file] [telegraf-config-file]
...@@ -212,7 +211,7 @@ context = ...@@ -212,7 +211,7 @@ context =
[loki] [loki]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = command-line =
bash -c 'nice -19 chrt --idle 0 ionice -c3 {{ loki_bin }} -config.file=${loki-config-file:rendered}' bash -c 'nice -19 chrt --idle 0 ionice -c3 {{ loki_bin }} -config.file=${loki-config-file:output}'
wrapper-path = ${directory:service}/loki wrapper-path = ${directory:service}/loki
storage-boltdb-dir = ${directory:loki-storage-boltdb-dir} storage-boltdb-dir = ${directory:loki-storage-boltdb-dir}
...@@ -235,7 +234,7 @@ url = ${loki:url}/ready ...@@ -235,7 +234,7 @@ url = ${loki:url}/ready
[promtail] [promtail]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = command-line =
bash -c 'nice -19 chrt --idle 0 ionice -c3 {{ promtail_bin }} -config.file=${promtail-config-file:rendered}' bash -c 'nice -19 chrt --idle 0 ionice -c3 {{ promtail_bin }} -config.file=${promtail-config-file:output}'
wrapper-path = ${directory:service}/promtail wrapper-path = ${directory:service}/promtail
dir = ${directory:promtail-dir} dir = ${directory:promtail-dir}
......
...@@ -117,9 +117,8 @@ url = ${:_profile_base_location_}/${:filename} ...@@ -117,9 +117,8 @@ url = ${:_profile_base_location_}/${:filename}
[instance-profile] [instance-profile]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
mode = 0644
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section buildout buildout section buildout buildout
......
[template-cfg] [template-cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 5dfeeb5eca125dcaa5f9e537f941dd41 md5sum = 4d73fe3c5d286163974bdb79c838e030
[instance-headless-chromium] [instance-headless-chromium]
_update_hash_filename_ = instance-headless-chromium.cfg.in _update_hash_filename_ = instance-headless-chromium.cfg.in
md5sum = 7392d20e48dbc599eb8e9d02e8095bbf md5sum = d72e5f6e159081f1c204ceb7ec0c0caf
[template-nginx-conf] [template-nginx-conf]
_update_hash_filename_ = templates/nginx.conf.in _update_hash_filename_ = templates/nginx.conf.in
......
...@@ -54,31 +54,30 @@ nginx-mime-types = ${directory:etc}/mime-types ...@@ -54,31 +54,30 @@ nginx-mime-types = ${directory:etc}/mime-types
# Create a launcher script in /etc/service for the headless shell # Create a launcher script in /etc/service for the headless shell
# executable. # executable.
[chromium-launcher] [chromium-launcher]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline =
inline:#!/bin/sh #!/bin/sh
export FONTCONFIG_FILE=${font-config:rendered} export FONTCONFIG_FILE=${font-config:output}
exec {{ parameter_list['chromium-wrapper'] }} \ exec {{ parameter_list['chromium-wrapper'] }} \
--remote-debugging-address=${headless-chromium:ipv4} \ --remote-debugging-address=${headless-chromium:ipv4} \
--remote-debugging-port=${headless-chromium:remote-debugging-port} \ --remote-debugging-port=${headless-chromium:remote-debugging-port} \
${headless-chromium:url} ${headless-chromium:url}
rendered = ${directory:service}/chromium output = ${directory:service}/chromium
# Configure and launch the proxy server. # Configure and launch the proxy server.
[nginx-config] [nginx-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template-nginx-config'] }} url = {{ parameter_list['template-nginx-config'] }}
rendered = ${headless-chromium:nginx-config-target} output = ${headless-chromium:nginx-config-target}
mode = 700
context = context =
section param_headless_chromium headless-chromium section param_headless_chromium headless-chromium
[nginx-mime-types] [nginx-mime-types]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = {{ parameter_list['template-mime-types'] }} url = {{ parameter_list['template-mime-types'] }}
rendered = ${headless-chromium:nginx-mime-types} output = ${headless-chromium:nginx-mime-types}
[nginx-launcher] [nginx-launcher]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
...@@ -128,8 +127,8 @@ environment = ...@@ -128,8 +127,8 @@ environment =
# Generate a fonts.conf file. # Generate a fonts.conf file.
[font-config] [font-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template-fonts-conf'] }} url = {{ parameter_list['template-fonts-conf'] }}
rendered = ${directory:etc}/fonts.conf output = ${directory:etc}/fonts.conf
context = context =
key cachedir :cache-dir key cachedir :cache-dir
key fonts :fonts key fonts :fonts
......
...@@ -20,8 +20,8 @@ template-mime-types = {{ template_mime_types_target }} ...@@ -20,8 +20,8 @@ template-mime-types = {{ template_mime_types_target }}
[instance-headless-chromium] [instance-headless-chromium]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_instance_headless_chromium_target }} url = {{ template_instance_headless_chromium_target }}
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
filename = instance-headless-chromium.cfg filename = instance-headless-chromium.cfg
context = context =
section buildout buildout section buildout buildout
...@@ -41,7 +41,7 @@ default-parameters = ...@@ -41,7 +41,7 @@ default-parameters =
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
default = instance-headless-chromium:rendered default = instance-headless-chromium:output
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration recipe = slapos.cookbook:slapconfiguration
......
...@@ -18,22 +18,21 @@ part = python3 ...@@ -18,22 +18,21 @@ part = python3
[template-cfg] [template-cfg]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 0644
context = context =
section buildout buildout section buildout buildout
key openssl_location openssl:location key openssl_location openssl:location
key nginx_location nginx:location key nginx_location nginx:location
key liberation_fonts_location liberation-fonts:location key liberation_fonts_location liberation-fonts:location
key fontconfig_location fontconfig:location key fontconfig_location fontconfig:location
key chromium_wrapper headless-chromium-wrapper:rendered key chromium_wrapper headless-chromium-wrapper:output
key devtools_frontend headless-chromium:devtools-frontend key devtools_frontend headless-chromium:devtools-frontend
key template_nginx_config_target template-nginx-conf:target key template_nginx_config_target template-nginx-conf:target
key template_mime_types_target template-mime-types:target key template_mime_types_target template-mime-types:target
key template_fonts_conf_target template-fonts-conf:output key template_fonts_conf_target template-fonts-conf:output
key template_instance_headless_chromium_target instance-headless-chromium:target key template_instance_headless_chromium_target instance-headless-chromium:target
key template_monitor monitor2-template:rendered key template_monitor monitor2-template:output
[download-base] [download-base]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
......
...@@ -14,7 +14,7 @@ cert = ${slap-connection:cert-file} ...@@ -14,7 +14,7 @@ cert = ${slap-connection:cert-file}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
filename = ${:_buildout_section_name_}.cfg filename = ${:_buildout_section_name_}.cfg
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename} output = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
context = context =
...@@ -24,7 +24,7 @@ context = ...@@ -24,7 +24,7 @@ context =
[root] [root]
<= jinja2-template-base <= jinja2-template-base
template = {{ instance_root }} url = {{ instance_root }}
extra-context = extra-context =
import urlparse urlparse import urlparse urlparse
key ipv6 slap-configuration:ipv6-random key ipv6 slap-configuration:ipv6-random
...@@ -32,14 +32,14 @@ extra-context = ...@@ -32,14 +32,14 @@ extra-context =
[server] [server]
<= jinja2-template-base <= jinja2-template-base
template = {{ instance_server }} url = {{ instance_server }}
extra-context = extra-context =
key instance_guid slap-configuration:instance-guid key instance_guid slap-configuration:instance-guid
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
override = {{ dumps(override_switch_softwaretype |default) }} override = {{ dumps(override_switch_softwaretype |default) }}
default = root:rendered default = root:output
# BBB # BBB
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
server = server:rendered server = server:output
...@@ -16,10 +16,10 @@ environment += ...@@ -16,10 +16,10 @@ environment +=
[template] [template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
md5sum = d7506e861ef87977eaa554b8928d2c99 md5sum = d7506e861ef87977eaa554b8928d2c99
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
context = context =
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
......
...@@ -39,8 +39,7 @@ golang = ${golang1.17:location} ...@@ -39,8 +39,7 @@ golang = ${golang1.17:location}
# in the section using this template # in the section using this template
[jinja-template] [jinja-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 0644
# Download instance.cfg.in (buildout profile used to deployment of instance), # Download instance.cfg.in (buildout profile used to deployment of instance),
# replace all ${foo:bar} parameters by real values, and change $${foo:bar} to # replace all ${foo:bar} parameters by real values, and change $${foo:bar} to
...@@ -49,10 +48,10 @@ mode = 0644 ...@@ -49,10 +48,10 @@ mode = 0644
[instance-profile] [instance-profile]
# The <= is buildout verb to use defined template # The <= is buildout verb to use defined template
<= jinja-template <= jinja-template
rendered = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section buildout buildout section buildout buildout
raw template_monitor ${monitor2-template:rendered} raw template_monitor ${monitor2-template:output}
# md5sum is fetched from buildout.hash.cfg and can be recalculated automatically by # md5sum is fetched from buildout.hash.cfg and can be recalculated automatically by
# calling update-hash # calling update-hash
...@@ -15,8 +15,8 @@ template_launcher = {{ template_launcher_target }} ...@@ -15,8 +15,8 @@ template_launcher = {{ template_launcher_target }}
[instance-html5as] [instance-html5as]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_instance_html5as_target }} url = {{ template_instance_html5as_target }}
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
filename = instance-html5as.cfg filename = instance-html5as.cfg
context = context =
section buildout buildout section buildout buildout
...@@ -27,7 +27,7 @@ context = ...@@ -27,7 +27,7 @@ context =
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
default = instance-html5as:rendered default = instance-html5as:output
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration recipe = slapos.cookbook:slapconfiguration
......
...@@ -99,25 +99,24 @@ path_nginx = {{ parameter_list['nginx_location'] }}/sbin/nginx ...@@ -99,25 +99,24 @@ path_nginx = {{ parameter_list['nginx_location'] }}/sbin/nginx
# Render nginx conf # Render nginx conf
[nginx_conf] [nginx_conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_nginx_conf'] }} url = {{ parameter_list['template_nginx_conf'] }}
rendered = ${html5as:path_nginx_conf} output = ${html5as:path_nginx_conf}
context = context =
section param_html5as html5as section param_html5as html5as
section param_tempdir tempdirectory section param_tempdir tempdirectory
# Render necessary mime types file for nginx # Render necessary mime types file for nginx
[mime_types] [mime_types]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = {{ parameter_list['template_mime_types'] }} url = {{ parameter_list['template_mime_types'] }}
rendered = ${html5as:path_mime_types} output = ${html5as:path_mime_types}
# Render the script launching nginx # Render the script launching nginx
[launcher] [launcher]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_launcher'] }} url = {{ parameter_list['template_launcher'] }}
rendered = ${html5as:bin_launcher} output = ${html5as:bin_launcher}
mode = 700 context =
context =
section param_html5as html5as section param_html5as html5as
# Simple command to put content in the docroot # Simple command to put content in the docroot
......
...@@ -24,10 +24,10 @@ parts = ...@@ -24,10 +24,10 @@ parts =
# The recipe, template and mode are fetched from jijna-template # The recipe, template and mode are fetched from jijna-template
[template-cfg] [template-cfg]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 310aab063704794065ee3bc8f81fdc70 md5sum = 861e7ce5d65252067d31c7325c97917d
context = context =
section buildout buildout section buildout buildout
key nginx_location nginx:location key nginx_location nginx:location
...@@ -42,7 +42,7 @@ context = ...@@ -42,7 +42,7 @@ context =
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_} url = ${:_profile_base_location_}/${:_update_hash_filename_}
_update_hash_filename_ = instance_html5as.cfg.in _update_hash_filename_ = instance_html5as.cfg.in
md5sum = 9b7ed68551cac5967915979383238669 md5sum = 2c2bcd723694bc88df13c139c96e8bad
[template_nginx_conf] [template_nginx_conf]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
[template-cfg] [template-cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 9e486efe4ab1aba8cb72b04f6c6da8ad md5sum = ef264514b64a4b2c77c9965c587c6d34
[instance_html5as] [instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in _update_hash_filename_ = instance_html5as.cfg.in
md5sum = f86b2f37c0acd21ca1f41d90c5477d75 md5sum = a48e0026e2b949cc334efcb21478a6ed
[template_nginx_conf] [template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in _update_hash_filename_ = templates/nginx_conf.in
......
...@@ -18,8 +18,8 @@ template_monitor = {{ template_monitor }} ...@@ -18,8 +18,8 @@ template_monitor = {{ template_monitor }}
[instance-html5as] [instance-html5as]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_instance_html5as_target }} url = {{ template_instance_html5as_target }}
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
filename = instance-html5as.cfg filename = instance-html5as.cfg
context = context =
section buildout buildout section buildout buildout
...@@ -40,8 +40,8 @@ default-parameters = ...@@ -40,8 +40,8 @@ default-parameters =
[instance-replicate] [instance-replicate]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do extensions = jinja2.ext.do
template = {{ template_instance_replicate }} url = {{ template_instance_replicate }}
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
filename = instance-replicate-html5as.cfg filename = instance-replicate-html5as.cfg
context = context =
section buildout buildout section buildout buildout
...@@ -57,8 +57,8 @@ default-parameters = ...@@ -57,8 +57,8 @@ default-parameters =
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
default = instance-html5as:rendered default = instance-html5as:output
replicate = instance-replicate:rendered replicate = instance-replicate:output
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration recipe = slapos.cookbook:slapconfiguration
......
...@@ -107,25 +107,24 @@ path_nginx = {{ parameter_list['nginx_location'] }}/sbin/nginx ...@@ -107,25 +107,24 @@ path_nginx = {{ parameter_list['nginx_location'] }}/sbin/nginx
# Render nginx conf # Render nginx conf
[nginx_conf] [nginx_conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_nginx_conf'] }} url = {{ parameter_list['template_nginx_conf'] }}
rendered = ${html5as:path_nginx_conf} output = ${html5as:path_nginx_conf}
context = context =
section param_html5as html5as section param_html5as html5as
section param_tempdir tempdirectory section param_tempdir tempdirectory
# Render necessary mime types file for nginx # Render necessary mime types file for nginx
[mime_types] [mime_types]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = {{ parameter_list['template_mime_types'] }} url = {{ parameter_list['template_mime_types'] }}
rendered = ${html5as:path_mime_types} output = ${html5as:path_mime_types}
# Render the script launching nginx # Render the script launching nginx
[launcher] [launcher]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_launcher'] }} url = {{ parameter_list['template_launcher'] }}
rendered = ${html5as:bin_launcher} output = ${html5as:bin_launcher}
mode = 700 context =
context =
section param_html5as html5as section param_html5as html5as
# Command to put content in the docroot # Command to put content in the docroot
...@@ -137,7 +136,7 @@ location = ${directory:srv}/html5as ...@@ -137,7 +136,7 @@ location = ${directory:srv}/html5as
# All the keys in this section will be available as a dict called "self.options" # All the keys in this section will be available as a dict called "self.options"
# We add: or '', otherwise jinja2 will render a 'None' string # We add: or '', otherwise jinja2 will render a 'None' string
url = {{ parameter_dict['download_url'] or '' }} url = {{ parameter_dict['download_url'] or '' }}
default_index_html = ${default_index_html:rendered} default_index_html = ${default_index_html:output}
# If a tarball is passed as a parameter in download url # If a tarball is passed as a parameter in download url
# it's content will be served by the instance. # it's content will be served by the instance.
# If the parameter is not provided it fallback to the default template # If the parameter is not provided it fallback to the default template
...@@ -167,8 +166,8 @@ install = ...@@ -167,8 +166,8 @@ install =
[default_index_html] [default_index_html]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_index_html'] }} url = {{ parameter_list['template_index_html'] }}
rendered = ${directory:srv}/index.html output = ${directory:srv}/index.html
title = {{ parameter_dict['title'] }} title = {{ parameter_dict['title'] }}
context = context =
key title :title key title :title
...@@ -176,9 +175,8 @@ context = ...@@ -176,9 +175,8 @@ context =
### Nginx Graceful ### Nginx Graceful
[nginx-graceful] [nginx-graceful]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_graceful'] }} url = {{ parameter_list['template_graceful'] }}
rendered = ${basedirectory:script}/nginx-graceful output = ${basedirectory:script}/nginx-graceful
mode = 0700
context = context =
section param_html5as html5as section param_html5as html5as
......
...@@ -27,8 +27,8 @@ parts = ...@@ -27,8 +27,8 @@ parts =
# The recipe, template and mode are fetched from jijna-template # The recipe, template and mode are fetched from jijna-template
[template-cfg] [template-cfg]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
context = context =
section buildout buildout section buildout buildout
key nginx_location nginx:location key nginx_location nginx:location
...@@ -41,7 +41,7 @@ context = ...@@ -41,7 +41,7 @@ context =
key template_graceful_target template_graceful:target key template_graceful_target template_graceful:target
key template_instance_replicate template_instance_replicate:target key template_instance_replicate template_instance_replicate:target
# Monitor stack also provides a template for the instance # Monitor stack also provides a template for the instance
key template_monitor monitor2-template:rendered key template_monitor monitor2-template:output
# Have one shared section to define the default behaviour to download # Have one shared section to define the default behaviour to download
# templates. Sections inheriting from this one won't need to redefine # templates. Sections inheriting from this one won't need to redefine
......
...@@ -22,8 +22,8 @@ md5sum = 87781e6bcb523bb8434888d5f984f36c ...@@ -22,8 +22,8 @@ md5sum = 87781e6bcb523bb8434888d5f984f36c
[template-validator] [template-validator]
filename = instance-validator.cfg.in filename = instance-validator.cfg.in
md5sum = dc8b8d03b0af9cd32398d1fe86267bb7 md5sum = 3733c484371115831721341f9b65dc0f
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = c5b18ea5d353f96c41294541186f2528 md5sum = c86d4c6b5cc67139810399b1032c3410
...@@ -40,15 +40,13 @@ pass = insecure ...@@ -40,15 +40,13 @@ pass = insecure
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-tomcat-service:output} url = ${template-tomcat-service:output}
output = $${basedirectory:services}/tomcat output = $${basedirectory:services}/tomcat
mode = 0700 virtual-depends =
virtual-depends =
$${tomcat-configuration:ip} $${tomcat-configuration:ip}
[tomcat-configuration] [tomcat-configuration]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-tomcat-configuration:output} url = ${template-tomcat-configuration:output}
output = $${basedirectory:catalina_conf}/server.xml output = $${basedirectory:catalina_conf}/server.xml
mode = 0600
ip = {{ partition_ipv6 }} ip = {{ partition_ipv6 }}
port = 8899 port = 8899
scheme = https scheme = https
...@@ -74,7 +72,7 @@ monitor-httpd-port = 8333 ...@@ -74,7 +72,7 @@ monitor-httpd-port = 8333
# Add parts generated by template # Add parts generated by template
[buildout] [buildout]
extends = extends =
${monitor-template:rendered} ${monitor-template:output}
parts = parts =
publish-url publish-url
tomcat-service tomcat-service
......
...@@ -8,8 +8,8 @@ offline = true ...@@ -8,8 +8,8 @@ offline = true
[dynamic-template-validator] [dynamic-template-validator]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-validator:output} url = ${template-validator:output}
rendered = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename} output = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename}
filename = instance-validator.cfg filename = instance-validator.cfg
context = context =
# partition_ipv6 is the random ipv6 allocated to the local partition # partition_ipv6 is the random ipv6 allocated to the local partition
...@@ -19,7 +19,7 @@ context = ...@@ -19,7 +19,7 @@ context =
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = $${:validator} RootSoftwareInstance = $${:validator}
default = $${:validator} default = $${:validator}
validator = dynamic-template-validator:rendered validator = dynamic-template-validator:output
[slap-configuration] [slap-configuration]
# Fetches parameters defined in SlapOS Master for this instance. # Fetches parameters defined in SlapOS Master for this instance.
......
...@@ -22,13 +22,11 @@ parts = ...@@ -22,13 +22,11 @@ parts =
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
mode = 0644
[template-tomcat-service] [template-tomcat-service]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
mode = 0644
########################################################## ##########################################################
# Buildout instance.cfg templates # Buildout instance.cfg templates
...@@ -37,13 +35,11 @@ mode = 0644 ...@@ -37,13 +35,11 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template-validator.cfg output = ${buildout:directory}/template-validator.cfg
mode = 0644
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644
[versions] [versions]
# 1.3.4nxd2 is invalid version string, thus pached version string is not '1.3.4nxd2+SlapOSPatched001' # 1.3.4nxd2 is invalid version string, thus pached version string is not '1.3.4nxd2+SlapOSPatched001'
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[template-cfg] [template-cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 6f5acc546a7e9ad502d5fe586a3c3072 md5sum = 34f7ab6fe20f685d7d03f2e36f3be207
[template_nginx_conf] [template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in _update_hash_filename_ = templates/nginx_conf.in
......
...@@ -105,23 +105,22 @@ path-nginx = {{ parameter_list['nginx_location'] }}/sbin/nginx ...@@ -105,23 +105,22 @@ path-nginx = {{ parameter_list['nginx_location'] }}/sbin/nginx
docroot = ${basedirectory:data}/${slap-configuration:configuration.site}/public docroot = ${basedirectory:data}/${slap-configuration:configuration.site}/public
[hugo-server] [hugo-server]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${directory:bin}/hugo-server output = ${directory:bin}/hugo-server
mode = 0700 inline =
template = #!/bin/sh
inline:#!/bin/sh
. ${hugo:go-environment} . ${hugo:go-environment}
cd ${basedirectory:data}/${slap-configuration:configuration.site} cd ${basedirectory:data}/${slap-configuration:configuration.site}
if [ -d "public" ]; then rm -Rf public; fi if [ -d "public" ]; then rm -Rf public; fi
export TMPDIR=${hugo:path-tmp} export TMPDIR=${hugo:path-tmp}
hugo && hugo server --bind=${hugo:ip} --port=${hugo:hugo-port} --baseURL=${hugo-frontend:connection-secure_access} --appendPort=false hugo && hugo server --bind=${hugo:ip} --port=${hugo:hugo-port} --baseURL=${hugo-frontend:connection-secure_access} --appendPort=false
[hugo-server-service] [hugo-server-service]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${basedirectory:service}/hugo-server wrapper-path = ${basedirectory:service}/hugo-server
command-line = ${hugo-server:rendered} command-line = ${hugo-server:output}
hash-files = hash-files =
${hugo-server:rendered} ${hugo-server:output}
[hugo-port-listening-promise] [hugo-port-listening-promise]
<= monitor-promise-base <= monitor-promise-base
...@@ -152,17 +151,17 @@ config-url = ${:url} ...@@ -152,17 +151,17 @@ config-url = ${:url}
[nginx-conf] [nginx-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_nginx_conf'] }} url = {{ parameter_list['template_nginx_conf'] }}
rendered = ${hugo:path-nginx-conf} output = ${hugo:path-nginx-conf}
context = context =
section param_hugo hugo section param_hugo hugo
section param_tempdir tempdirectory section param_tempdir tempdirectory
section param_nginxcert nginx-certificate section param_nginxcert nginx-certificate
[mime-types] [mime-types]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = {{ parameter_list['template_mime_types'] }} url = {{ parameter_list['template_mime_types'] }}
rendered = ${hugo:path-mime-types} output = ${hugo:path-mime-types}
[nginx-launcher] [nginx-launcher]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
...@@ -188,27 +187,25 @@ stop-on-error = true ...@@ -188,27 +187,25 @@ stop-on-error = true
[default-index-html] [default-index-html]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_index_html'] }} url = {{ parameter_list['template_index_html'] }}
rendered = ${basedirectory:default-public}/index.html output = ${basedirectory:default-public}/index.html
context = context =
key go_environment hugo:go-environment key go_environment hugo:go-environment
key data basedirectory:data key data basedirectory:data
[default-config-toml] [default-config-toml]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${basedirectory:default-site}/config.toml output = ${basedirectory:default-site}/config.toml
template = inline =
inline:
baseURL = "${hugo-frontend:connection-secure_access}" baseURL = "${hugo-frontend:connection-secure_access}"
languageCode = "en-us" languageCode = "en-us"
title = "My New Hugo Site" title = "My New Hugo Site"
[nginx-graceful] [nginx-graceful]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${basedirectory:script}/nginx-graceful output = ${basedirectory:script}/nginx-graceful
mode = 0700 inline =
template = #!/bin/sh
inline:#!/bin/sh
exec kill -s SIGHUP $(cat ${hugo:path-pid}) exec kill -s SIGHUP $(cat ${hugo:path-pid})
[nginx-port-listening-promise] [nginx-port-listening-promise]
......
...@@ -23,12 +23,12 @@ openssl_location = ${openssl:location} ...@@ -23,12 +23,12 @@ openssl_location = ${openssl:location}
template_nginx_conf = ${template_nginx_conf:target} template_nginx_conf = ${template_nginx_conf:target}
template_mime_types = ${template_mime_types:target} template_mime_types = ${template_mime_types:target}
template_index_html = ${template_index_html:target} template_index_html = ${template_index_html:target}
template_monitor = ${monitor-template:rendered} template_monitor = ${monitor-template:output}
[template-cfg] [template-cfg]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
context = context =
section buildout buildout section buildout buildout
section parameter_list profile-common section parameter_list profile-common
......
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 6c17361a49cfc47564063b867aab6e8c md5sum = 7333d1dfd4e8e4c375f7f1748292f554
[template-jscrawler] [template-jscrawler]
filename = instance-jscrawler.cfg.jinja2.in filename = instance-jscrawler.cfg.jinja2.in
md5sum = 33bfddbc23fa794ab97770ef7776b390 md5sum = ae9269ab5b1cce77016f822024d2d996
[template-jscrawler-builder] [template-jscrawler-builder]
filename = template-jscrawler.builder.sh.in filename = template-jscrawler.builder.sh.in
......
...@@ -67,15 +67,14 @@ config-port = ${httpd-wrapper:port} ...@@ -67,15 +67,14 @@ config-port = ${httpd-wrapper:port}
[jscrawler-wrapper] [jscrawler-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = command-line =
{{ parameter_dict['nodejs-location'] }} {{ parameter_dict['jscrawler-location'] }} {{ parameter_dict['nodejs-location'] }} {{ parameter_dict['jscrawler-location'] }}
wrapper-path = ${directory:bin}/jscrawler wrapper-path = ${directory:bin}/jscrawler
[jscrawler-build-wrapper] [jscrawler-build-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-jscrawler'] }} url = {{ parameter_dict['template-jscrawler'] }}
rendered = ${directory:bin}/jscrawler-build output = ${directory:bin}/jscrawler-build
extensions = jinja2.ext.do extensions = jinja2.ext.do
mode = 0700
list = {{ slapparameter_dict.get('urls', "").split("\n") | join('\n ') }} list = {{ slapparameter_dict.get('urls', "").split("\n") | join('\n ') }}
period = {{ slapparameter_dict.get('crawl-periodicity', 0) }} period = {{ slapparameter_dict.get('crawl-periodicity', 0) }}
context = context =
...@@ -92,7 +91,7 @@ context = ...@@ -92,7 +91,7 @@ context =
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
name = jscrawler-build name = jscrawler-build
frequency = * * * * * frequency = * * * * *
command = ${jscrawler-build-wrapper:rendered} command = ${jscrawler-build-wrapper:output}
[publish-connection-information] [publish-connection-information]
......
...@@ -9,7 +9,7 @@ offline = true ...@@ -9,7 +9,7 @@ offline = true
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = dynamic-template-jscrawler:rendered default = dynamic-template-jscrawler:output
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
[slap-configuration] [slap-configuration]
...@@ -22,9 +22,8 @@ cert = ${slap-connection:cert-file} ...@@ -22,9 +22,8 @@ cert = ${slap-connection:cert-file}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
extensions = jinja2.ext.do extensions = jinja2.ext.do
mode = 0644
extra-context = extra-context =
context = context =
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
...@@ -49,7 +48,7 @@ template-jscrawler = {{ template_jscrawler_builder }} ...@@ -49,7 +48,7 @@ template-jscrawler = {{ template_jscrawler_builder }}
[dynamic-template-jscrawler] [dynamic-template-jscrawler]
<= jinja2-template-base <= jinja2-template-base
template = {{ template_jscrawler }} url = {{ template_jscrawler }}
filename = instance-jscrawler.cfg filename = instance-jscrawler.cfg
extra-context = extra-context =
section parameter_dict dynamic-template-jscrawler-parameters section parameter_dict dynamic-template-jscrawler-parameters
...@@ -39,16 +39,16 @@ url = ${:_profile_base_location_}/${:filename} ...@@ -39,16 +39,16 @@ url = ${:_profile_base_location_}/${:filename}
[instance] [instance]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
context = context =
key bash_location bash:location key bash_location bash:location
key bin_directory buildout:bin-directory key bin_directory buildout:bin-directory
key buildout_egg_directory buildout:eggs-directory key buildout_egg_directory buildout:eggs-directory
key buildout_develop_directory buildout:develop-eggs-directory key buildout_develop_directory buildout:develop-eggs-directory
key buildout_directory buildout:directory key buildout_directory buildout:directory
key template_monitor_cfg monitor2-template:rendered key template_monitor_cfg monitor2-template:output
key logrotate_cfg template-logrotate-base:rendered key logrotate_cfg template-logrotate-base:output
key jscrawler_location jscrawler:location key jscrawler_location jscrawler:location
key nodejs_location nodejs:location key nodejs_location nodejs:location
key openssl_location openssl:location key openssl_location openssl:location
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 342fcf3fc18e33fa4f940518dab6af5c md5sum = 84380fe6c268301a1e1f501e53943f58
[template-nginx-service] [template-nginx-service]
filename = template-nginx-service.sh.in filename = template-nginx-service.sh.in
...@@ -27,4 +27,4 @@ md5sum = 98faa5ad8cfb23a11d97a459078a1d05 ...@@ -27,4 +27,4 @@ md5sum = 98faa5ad8cfb23a11d97a459078a1d05
[template-runTestSuite] [template-runTestSuite]
filename = runTestSuite.in filename = runTestSuite.in
md5sum = 9d82f8afa0de8ec2b9c4f32e058fb2bc md5sum = 70d10e7005b98620ddbbf30030b08198
...@@ -32,8 +32,8 @@ fontconfig-cache = $${buildout:directory}/.fontconfig ...@@ -32,8 +32,8 @@ fontconfig-cache = $${buildout:directory}/.fontconfig
[fontconfig-conf] [fontconfig-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-fonts-conf:output} url = ${template-fonts-conf:output}
rendered = $${directory:etc}/fonts.conf output = $${directory:etc}/fonts.conf
context = context =
key cachedir directory:fontconfig-cache key cachedir directory:fontconfig-cache
key fonts :fonts key fonts :fonts
...@@ -52,12 +52,11 @@ recipe = slapos.recipe.template ...@@ -52,12 +52,11 @@ recipe = slapos.recipe.template
url = ${template-runTestSuite:output} url = ${template-runTestSuite:output}
output = $${directory:bin}/runTestSuite output = $${directory:bin}/runTestSuite
buildout-directory = $${buildout:directory} buildout-directory = $${buildout:directory}
mode = 0700
[runTestSuite-config-file] [runTestSuite-config-file]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:etc}/$${:_buildout_section_name_}.json output = $${directory:etc}/$${:_buildout_section_name_}.json
template = inline: inline =
$${instance-parameter:configuration._} $${instance-parameter:configuration._}
################################# #################################
...@@ -91,7 +90,6 @@ command-line = bash -c "[ -S $${xvfb-instance:lock-dir}/.X11-unix/X$${xvfb-insta ...@@ -91,7 +90,6 @@ command-line = bash -c "[ -S $${xvfb-instance:lock-dir}/.X11-unix/X$${xvfb-insta
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-nginx-service:output} url = ${template-nginx-service:output}
output = $${directory:services}/nginx output = $${directory:services}/nginx
mode = 0700
virtual-depends = virtual-depends =
$${nginx-configuration:ip} $${nginx-configuration:ip}
...@@ -99,7 +97,6 @@ virtual-depends = ...@@ -99,7 +97,6 @@ virtual-depends =
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-nginx-configuration:output} url = ${template-nginx-configuration:output}
output = $${directory:etc}/nginx.cfg output = $${directory:etc}/nginx.cfg
mode = 0600
access_log = $${directory:log}/nginx-access.log access_log = $${directory:log}/nginx-access.log
error_log = $${directory:log}/nginx-error.log error_log = $${directory:log}/nginx-error.log
ip = $${instance-parameter:ipv6-random} ip = $${instance-parameter:ipv6-random}
......
...@@ -20,14 +20,14 @@ import json ...@@ -20,14 +20,14 @@ import json
os.environ['XORG_LOCK_DIR'] = '$${xvfb-instance:lock-dir}' os.environ['XORG_LOCK_DIR'] = '$${xvfb-instance:lock-dir}'
os.environ['DISPLAY'] = '$${xvfb-instance:display}' os.environ['DISPLAY'] = '$${xvfb-instance:display}'
os.environ['FONTCONFIG_FILE'] = '$${fontconfig-conf:rendered}' os.environ['FONTCONFIG_FILE'] = '$${fontconfig-conf:output}'
BASE_URL = 'http://[$${nginx-configuration:ip}]:$${nginx-configuration:port}/' BASE_URL = 'http://[$${nginx-configuration:ip}]:$${nginx-configuration:port}/'
ETC_DIRECTORY = '$${directory:etc}' ETC_DIRECTORY = '$${directory:etc}'
def main(): def main():
parsed_parameters = json.load( parsed_parameters = json.load(
open('$${runTestSuite-config-file:rendered}', 'rb')) open('$${runTestSuite-config-file:output}', 'rb'))
test_runner = parsed_parameters.get('test-runner', {}) test_runner = parsed_parameters.get('test-runner', {})
parser = argparse.ArgumentParser(description='Run a test suite.') parser = argparse.ArgumentParser(description='Run a test suite.')
......
...@@ -110,7 +110,6 @@ update-command = ${:command} ...@@ -110,7 +110,6 @@ update-command = ${:command}
[macro-template] [macro-template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 0644
[instance] [instance]
<= macro-template <= macro-template
......
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = de37ec3d4adb0be4c67bcc7397f27c91 md5sum = 5f39952f94095b1f12f41db76867e71e
[instance-jupyter] [instance-jupyter]
filename = instance-jupyter.cfg.in filename = instance-jupyter.cfg.in
md5sum = 1136bb108aa8d703e0ecf2005b4a1f28 md5sum = ee2fbb01b4143c19fa16f8449ca4ec29
[jupyter-notebook-config] [jupyter-notebook-config]
filename = jupyter_notebook_config.py.jinja filename = jupyter_notebook_config.py.jinja
......
...@@ -95,8 +95,8 @@ bytes = 10 ...@@ -95,8 +95,8 @@ bytes = 10
[jupyter-notebook-config] [jupyter-notebook-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ jupyter_config_location }}/{{ jupyter_config_filename }} url = {{ jupyter_config_location }}/{{ jupyter_config_filename }}
rendered = ${directory:jupyter_config_dir}/jupyter_notebook_config.py output = ${directory:jupyter_config_dir}/jupyter_notebook_config.py
context = context =
key password jupyter-password:passwd key password jupyter-password:passwd
raw gcc_location {{ gcc_location }} raw gcc_location {{ gcc_location }}
...@@ -188,8 +188,8 @@ target-directory = ${directory:erp5_kernel_dir} ...@@ -188,8 +188,8 @@ target-directory = ${directory:erp5_kernel_dir}
[kernel-json] [kernel-json]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ kernel_json_location }}/{{ kernel_json_filename }} url = {{ kernel_json_location }}/{{ kernel_json_filename }}
rendered = ${directory:erp5_kernel_dir}/kernel.json output = ${directory:erp5_kernel_dir}/kernel.json
# Use python2.7 executable bin file for kernel config # Use python2.7 executable bin file for kernel config
context = context =
raw python_executable {{ python_executable }} raw python_executable {{ python_executable }}
......
...@@ -8,7 +8,7 @@ develop-eggs-directory = ${buildout:develop-eggs-directory} ...@@ -8,7 +8,7 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
[switch_softwaretype] [switch_softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = $${:jupyter} default = $${:jupyter}
jupyter = instance-jupyter:rendered jupyter = instance-jupyter:output
RootSoftwareInstance = $${:default} RootSoftwareInstance = $${:default}
[slap-configuration] [slap-configuration]
...@@ -22,9 +22,8 @@ cert = $${slap-connection:cert-file} ...@@ -22,9 +22,8 @@ cert = $${slap-connection:cert-file}
[instance-jupyter] [instance-jupyter]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
filename = instance-jupyter.cfg.in filename = instance-jupyter.cfg.in
template = ${instance-jupyter:location}/$${:filename} url = ${instance-jupyter:location}/$${:filename}
rendered = $${buildout:directory}/template.cfg output = $${buildout:directory}/template.cfg
mode = 0644
context = context =
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
raw bin_directory ${buildout:bin-directory} raw bin_directory ${buildout:bin-directory}
......
[buildout] [buildout]
extends = extends =
buildout.hash.cfg buildout.hash.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
../../component/cythonplus/buildout.cfg ../../component/cythonplus/buildout.cfg
...@@ -42,7 +42,6 @@ url = ${:_profile_base_location_}/${:filename} ...@@ -42,7 +42,6 @@ url = ${:_profile_base_location_}/${:filename}
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644
[instance-jupyter] [instance-jupyter]
<= download-file-base <= download-file-base
......
...@@ -15,15 +15,15 @@ ...@@ -15,15 +15,15 @@
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 087f226ba90928dcc5a722d7008c867a md5sum = 7e90da1f6dac4233e1aa3248f48e357c
[template-kvm] [template-kvm]
filename = instance-kvm.cfg.jinja2 filename = instance-kvm.cfg.jinja2
md5sum = 2ff55931eab48f7992e8e1cb16b44b95 md5sum = fb8f9a962cc1c0d986305c6a6ce59082
[template-kvm-cluster] [template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in filename = instance-kvm-cluster.cfg.jinja2.in
md5sum = 67901b7a97b324aa36851d8e8b43cad6 md5sum = 8562882ac4a888d18db50e2a22e3ca86
[template-kvm-resilient] [template-kvm-resilient]
filename = instance-kvm-resilient.cfg.jinja2 filename = instance-kvm-resilient.cfg.jinja2
...@@ -31,7 +31,7 @@ md5sum = a0fd4911401cbbda74323e8d1c7b18ad ...@@ -31,7 +31,7 @@ md5sum = a0fd4911401cbbda74323e8d1c7b18ad
[template-kvm-import] [template-kvm-import]
filename = instance-kvm-import.cfg.jinja2.in filename = instance-kvm-import.cfg.jinja2.in
md5sum = 0415353c961ece593dd5d6457dab5200 md5sum = a463a5e3cd2287d275d6943c2a11b7e4
[template-kvm-import-script] [template-kvm-import-script]
filename = template/kvm-import.sh.jinja2 filename = template/kvm-import.sh.jinja2
...@@ -39,7 +39,7 @@ md5sum = cd0008f1689dfca9b77370bc4d275b70 ...@@ -39,7 +39,7 @@ md5sum = cd0008f1689dfca9b77370bc4d275b70
[template-kvm-export] [template-kvm-export]
filename = instance-kvm-export.cfg.jinja2 filename = instance-kvm-export.cfg.jinja2
md5sum = 09252c282ef86f4bb3a88e91869b0f97 md5sum = 34d1b7cc8ca62bfdfce759a1dfbbaccd
[template-kvm-export-script] [template-kvm-export-script]
filename = template/kvm-export.sh.jinja2 filename = template/kvm-export.sh.jinja2
...@@ -47,7 +47,7 @@ md5sum = 64aa1ce8785f6b94aabd787fa3443082 ...@@ -47,7 +47,7 @@ md5sum = 64aa1ce8785f6b94aabd787fa3443082
[template-nbd] [template-nbd]
filename = instance-nbd.cfg.jinja2 filename = instance-nbd.cfg.jinja2
md5sum = 4bcb07c1a9223e2d956651aa25d23654 md5sum = e041e8011ad2ec7f104be173ef76f5e9
[template-ansible-promise] [template-ansible-promise]
filename = template/ansible-promise.in filename = template/ansible-promise.in
...@@ -75,7 +75,7 @@ md5sum = fb330a796fadb6cd5c85217f80a42af3 ...@@ -75,7 +75,7 @@ md5sum = fb330a796fadb6cd5c85217f80a42af3
[template-httpd] [template-httpd]
filename = instance-kvm-http.cfg.in filename = instance-kvm-http.cfg.in
md5sum = d57764bb7135037b4d21543b2f56ce1d md5sum = 438192aab9f11e40dc521b46a4854dcf
[image-download-controller] [image-download-controller]
filename = template/image-download-controller.py filename = template/image-download-controller.py
......
...@@ -50,7 +50,7 @@ config-use-ipv6 = {{ dumps(slapparameter_dict.get('use-ipv6', False)) }} ...@@ -50,7 +50,7 @@ config-use-ipv6 = {{ dumps(slapparameter_dict.get('use-ipv6', False)) }}
software-type = kvm software-type = kvm
name = {{ instance_name }} name = {{ instance_name }}
{% if kvm_parameter_dict.get('sticky-computer', '') -%} {% if kvm_parameter_dict.get('sticky-computer', '') -%}
sla-computer_guid = ${slap-connection:computer-id} sla-computer_guid = ${slap-connection:computer-id}
{% else -%} {% else -%}
sla-computer_guid = {{ dumps(kvm_parameter_dict.get('computer-guid', '')) }} sla-computer_guid = {{ dumps(kvm_parameter_dict.get('computer-guid', '')) }}
{% endif -%} {% endif -%}
...@@ -159,7 +159,7 @@ sla-fw_authorized_sources = {{ authorized_source_list | join(' ') }} ...@@ -159,7 +159,7 @@ sla-fw_authorized_sources = {{ authorized_source_list | join(' ') }}
sla-fw_rejected_sources = {{ rejected_source_list | join(' ') }} sla-fw_rejected_sources = {{ rejected_source_list | join(' ') }}
sla-fw_restricted_access = {{ dumps(slapparameter_dict.get('fw-restricted-access', 'off')) }} sla-fw_restricted_access = {{ dumps(slapparameter_dict.get('fw-restricted-access', 'off')) }}
return = return =
url url
{% if frontend_dict.get('frontend-additional-instance-guid') %} {% if frontend_dict.get('frontend-additional-instance-guid') %}
url-additional url-additional
...@@ -231,7 +231,7 @@ config-type = {{ dumps(frontend_parameter_dict['type']) }} ...@@ -231,7 +231,7 @@ config-type = {{ dumps(frontend_parameter_dict['type']) }}
config-path = {{ dumps(frontend_parameter_dict['path']) }} config-path = {{ dumps(frontend_parameter_dict['path']) }}
{% endif -%} {% endif -%}
{% endif -%} {% endif -%}
return = return =
site_url site_url
sla-instance_guid = {{ slave_frontend_iguid }} sla-instance_guid = {{ slave_frontend_iguid }}
{% do publish_dict.__setitem__(name ~ '-url', '${' ~ section ~ ':connection-site_url}') -%} {% do publish_dict.__setitem__(name ~ '-url', '${' ~ section ~ ':connection-site_url}') -%}
...@@ -272,9 +272,9 @@ port = 9002 ...@@ -272,9 +272,9 @@ port = 9002
{% do part_list.append('write-vm-hostname') -%} {% do part_list.append('write-vm-hostname') -%}
[write-vm-hostname] [write-vm-hostname]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_content }} url = {{ template_content }}
filename = hosts filename = hosts
rendered = ${directory:webroot}/${hash-code:passwd}/${:filename} output = ${directory:webroot}/${hash-code:passwd}/${:filename}
context = context =
raw content_list {{ kvm_hostname_list | join('#') }} raw content_list {{ kvm_hostname_list | join('#') }}
raw sep # raw sep #
...@@ -313,7 +313,7 @@ password = ${publish-early:monitor-password} ...@@ -313,7 +313,7 @@ password = ${publish-early:monitor-password}
{% endfor %} {% endfor %}
[monitor-conf-parameters] [monitor-conf-parameters]
private-path-list += private-path-list +=
${directory:webroot}/ ${directory:webroot}/
[publish-connection-information] [publish-connection-information]
...@@ -326,11 +326,11 @@ recipe = slapos.cookbook:publish ...@@ -326,11 +326,11 @@ recipe = slapos.cookbook:publish
{% do part_list.append('monitor-base') -%} {% do part_list.append('monitor-base') -%}
[buildout] [buildout]
extends = extends =
{{ template_httpd_cfg }} {{ template_httpd_cfg }}
{{ ' ' ~ template_monitor }} {{ ' ' ~ template_monitor }}
parts = parts =
httpd httpd
httpd-graceful httpd-graceful
httpd-promise httpd-promise
...@@ -339,7 +339,7 @@ parts = ...@@ -339,7 +339,7 @@ parts =
# Complete parts with sections # Complete parts with sections
{{ part_list | join('\n ') }} {{ part_list | join('\n ') }}
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
...@@ -19,11 +19,10 @@ parts += ...@@ -19,11 +19,10 @@ parts +=
# Create the exporter executable, which is a simple shell script # Create the exporter executable, which is a simple shell script
[exporter] [exporter]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_kvm_export }} url = {{ template_kvm_export }}
rendered = ${directory:bin}/${slap-parameter:namebase}-exporter output = ${directory:bin}/${slap-parameter:namebase}-exporter
# Resilient stack wants a "wrapper" parameter # Resilient stack wants a "wrapper" parameter
wrapper = ${:rendered} wrapper = ${:output}
mode = 0700
{%- set disk_type = slapparameter_dict.get('disk-type', 'virtio') %} {%- set disk_type = slapparameter_dict.get('disk-type', 'virtio') %}
{%- if disk_type == "virtio" %} {%- if disk_type == "virtio" %}
device = virtio0 device = virtio0
......
[buildout] [buildout]
parts = parts =
httpd httpd
httpd-graceful httpd-graceful
httpd-promise httpd-promise
...@@ -20,8 +20,8 @@ ssl = ${:etc}/ssl ...@@ -20,8 +20,8 @@ ssl = ${:etc}/ssl
[apache-conf] [apache-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_apache_conf }} url = {{ template_apache_conf }}
rendered = ${directory:etc}/apache.conf output = ${directory:etc}/apache.conf
ip = ${slap-network-information:global-ipv6} ip = ${slap-network-information:global-ipv6}
#ipv4 = ${slap-network-information:local-ipv4} #ipv4 = ${slap-network-information:local-ipv4}
port = ${slap-parameter:httpd-port} port = ${slap-parameter:httpd-port}
...@@ -31,7 +31,7 @@ pid-file = ${directory:run}/apache.pid ...@@ -31,7 +31,7 @@ pid-file = ${directory:run}/apache.pid
index = ${directory:public} index = ${directory:public}
root = {:index} root = {:index}
denied-root-access = false denied-root-access = false
context = context =
key port :port key port :port
key ip :ip key ip :ip
key access_log :access-log key access_log :access-log
...@@ -45,7 +45,7 @@ context = ...@@ -45,7 +45,7 @@ context =
[httpd] [httpd]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:services}/httpd wrapper-path = ${directory:services}/httpd
command-line = "{{ apache_location }}/bin/httpd" -f "${apache-conf:rendered}" -DFOREGROUND command-line = "{{ apache_location }}/bin/httpd" -f "${apache-conf:output}" -DFOREGROUND
[httpd-graceful] [httpd-graceful]
recipe = collective.recipe.template recipe = collective.recipe.template
...@@ -60,7 +60,7 @@ recipe = plone.recipe.command ...@@ -60,7 +60,7 @@ recipe = plone.recipe.command
command = "{{ openssl_executable_location }}" req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout "${:key}" -out "${:cert}" command = "{{ openssl_executable_location }}" req -newkey rsa -batch -new -x509 -days 3650 -nodes -keyout "${:key}" -out "${:cert}"
key = ${directory:ssl}/key key = ${directory:ssl}/key
cert = ${directory:ssl}/cert cert = ${directory:ssl}/cert
update-command = update-command =
stop-on-error = true stop-on-error = true
[httpd-promise] [httpd-promise]
......
...@@ -4,12 +4,12 @@ eggs-directory = {{ eggs_directory }} ...@@ -4,12 +4,12 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }} develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
parts += parts +=
kvm-disk-image-corruption-promise kvm-disk-image-corruption-promise
# Here, we don't need KVM to run to import data, so we don't # Here, we don't need KVM to run to import data, so we don't
# even extend the kvm instance profile. # even extend the kvm instance profile.
extends = extends =
{{ pbsready_import_template }} {{ pbsready_import_template }}
[slap-parameter] [slap-parameter]
...@@ -59,11 +59,10 @@ cronstamps = ${:etc}/cronstamps ...@@ -59,11 +59,10 @@ cronstamps = ${:etc}/cronstamps
[importer] [importer]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_kvm_import }} url = {{ template_kvm_import }}
rendered = ${directory:bin}/${slap-parameter:namebase}-importer output = ${directory:bin}/${slap-parameter:namebase}-importer
mode = 0700
# Resilient stack wants a "wrapper" parameter # Resilient stack wants a "wrapper" parameter
wrapper = ${:rendered} wrapper = ${:output}
context = context =
section directory directory section directory directory
raw zcat_binary {{ zcat_binary }} raw zcat_binary {{ zcat_binary }}
......
...@@ -99,14 +99,14 @@ config-url = ${monitor-base:base-url}/private/boot-image-url-select/${:filename} ...@@ -99,14 +99,14 @@ config-url = ${monitor-base:base-url}/private/boot-image-url-select/${:filename}
[boot-image-url-select-source-config] [boot-image-url-select-source-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = inline: inline =
{%- raw %} {%- raw %}
{{ boot_image_url_select }} {{ boot_image_url_select }}
{% endraw -%} {% endraw -%}
boot-image-url-select = {{ dumps(slapparameter_dict['boot-image-url-select']) }} boot-image-url-select = {{ dumps(slapparameter_dict['boot-image-url-select']) }}
context = context =
key boot_image_url_select :boot-image-url-select key boot_image_url_select :boot-image-url-select
rendered = ${directory:etc}/boot-image-url-select.json output = ${directory:etc}/boot-image-url-select.json
[boot-image-url-select-processed-config] [boot-image-url-select-processed-config]
# compares if the current configuration has been used by # compares if the current configuration has been used by
...@@ -131,7 +131,7 @@ install = ...@@ -131,7 +131,7 @@ install =
state_handler.write(str(e)) state_handler.write(str(e))
update = ${:install} update = ${:install}
config-file = ${boot-image-url-select-source-config:rendered} config-file = ${boot-image-url-select-source-config:output}
state-filename = boot-image-url-select-processed-config.state state-filename = boot-image-url-select-processed-config.state
state-file = ${directory:boot-image-url-select-expose}/${:state-filename} state-file = ${directory:boot-image-url-select-expose}/${:state-filename}
processed-md5sum = ${directory:boot-image-url-select-var}/update-image-processed.md5sum processed-md5sum = ${directory:boot-image-url-select-var}/update-image-processed.md5sum
...@@ -146,9 +146,9 @@ config-filename = ${boot-image-url-select-processed-config:state-file} ...@@ -146,9 +146,9 @@ config-filename = ${boot-image-url-select-processed-config:state-file}
[boot-image-url-select-json-config] [boot-image-url-select-json-config]
# generates json configuration from user configuration # generates json configuration from user configuration
recipe = plone.recipe.command recipe = plone.recipe.command
command = {{ python_executable }} {{ image_download_config_creator }} ${boot-image-url-select-source-config:rendered} ${:rendered} ${directory:boot-image-url-select-repository} ${:error-state-file} command = {{ python_executable }} {{ image_download_config_creator }} ${boot-image-url-select-source-config:output} ${:output} ${directory:boot-image-url-select-repository} ${:error-state-file}
update-command = ${:command} update-command = ${:command}
rendered = ${directory:boot-image-url-select-var}/boot-image-url-select.json output = ${directory:boot-image-url-select-var}/boot-image-url-select.json
error-state-filename = boot-image-url-select-json-config-error.txt error-state-filename = boot-image-url-select-json-config-error.txt
error-state-file = ${directory:boot-image-url-select-expose}/${:error-state-filename} error-state-file = ${directory:boot-image-url-select-expose}/${:error-state-filename}
...@@ -163,7 +163,7 @@ config-filename = ${boot-image-url-select-json-config:error-state-file} ...@@ -163,7 +163,7 @@ config-filename = ${boot-image-url-select-json-config:error-state-file}
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:scripts}/boot-image-url-select-updater wrapper-path = ${directory:scripts}/boot-image-url-select-updater
command-line = {{ python_executable }} {{ image_download_controller }} ${:config} {{ curl_executable_location }} ${:md5sum-state-file} ${:error-state-file} ${boot-image-url-select-processed-config:processed-md5sum} command-line = {{ python_executable }} {{ image_download_controller }} ${:config} {{ curl_executable_location }} ${:md5sum-state-file} ${:error-state-file} ${boot-image-url-select-processed-config:processed-md5sum}
config = ${boot-image-url-select-json-config:rendered} config = ${boot-image-url-select-json-config:output}
md5sum-state-filename = boot-image-url-select-download-controller-md5sum-fail.json md5sum-state-filename = boot-image-url-select-download-controller-md5sum-fail.json
md5sum-state-file = ${directory:boot-image-url-select-expose}/${:md5sum-state-filename} md5sum-state-file = ${directory:boot-image-url-select-expose}/${:md5sum-state-filename}
error-state-filename = boot-image-url-select-download-controller-error.text error-state-filename = boot-image-url-select-download-controller-error.text
...@@ -196,14 +196,14 @@ config-url = ${monitor-base:base-url}/private/boot-image-url-list/${:filename} ...@@ -196,14 +196,14 @@ config-url = ${monitor-base:base-url}/private/boot-image-url-list/${:filename}
[boot-image-url-list-source-config] [boot-image-url-list-source-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = inline: inline =
{%- raw %} {%- raw %}
{{ boot_image_url_list }} {{ boot_image_url_list }}
{% endraw -%} {% endraw -%}
boot-image-url-list = {{ dumps(slapparameter_dict['boot-image-url-list']) }} boot-image-url-list = {{ dumps(slapparameter_dict['boot-image-url-list']) }}
context = context =
key boot_image_url_list :boot-image-url-list key boot_image_url_list :boot-image-url-list
rendered = ${directory:etc}/boot-image-url-list.conf output = ${directory:etc}/boot-image-url-list.conf
[boot-image-url-list-processed-config] [boot-image-url-list-processed-config]
# compares if the current configuration has been used by # compares if the current configuration has been used by
...@@ -228,7 +228,7 @@ install = ...@@ -228,7 +228,7 @@ install =
state_handler.write(str(e)) state_handler.write(str(e))
update = ${:install} update = ${:install}
config-file = ${boot-image-url-list-source-config:rendered} config-file = ${boot-image-url-list-source-config:output}
state-filename = boot-image-url-list-processed-config.state state-filename = boot-image-url-list-processed-config.state
state-file = ${directory:boot-image-url-list-expose}/${:state-filename} state-file = ${directory:boot-image-url-list-expose}/${:state-filename}
processed-md5sum = ${directory:boot-image-url-list-var}/update-image-processed.md5sum processed-md5sum = ${directory:boot-image-url-list-var}/update-image-processed.md5sum
...@@ -243,9 +243,9 @@ config-filename = ${boot-image-url-list-processed-config:state-file} ...@@ -243,9 +243,9 @@ config-filename = ${boot-image-url-list-processed-config:state-file}
[boot-image-url-list-json-config] [boot-image-url-list-json-config]
# generates json configuration from user configuration # generates json configuration from user configuration
recipe = plone.recipe.command recipe = plone.recipe.command
command = {{ python_executable }} {{ image_download_config_creator }} ${boot-image-url-list-source-config:rendered} ${:rendered} ${directory:boot-image-url-list-repository} ${:error-state-file} command = {{ python_executable }} {{ image_download_config_creator }} ${boot-image-url-list-source-config:output} ${:output} ${directory:boot-image-url-list-repository} ${:error-state-file}
update-command = ${:command} update-command = ${:command}
rendered = ${directory:boot-image-url-list-var}/boot-image-url-list.json output = ${directory:boot-image-url-list-var}/boot-image-url-list.json
error-state-filename = boot-image-url-list-json-config-error.txt error-state-filename = boot-image-url-list-json-config-error.txt
error-state-file = ${directory:boot-image-url-list-expose}/${:error-state-filename} error-state-file = ${directory:boot-image-url-list-expose}/${:error-state-filename}
...@@ -260,7 +260,7 @@ config-filename = ${boot-image-url-list-json-config:error-state-file} ...@@ -260,7 +260,7 @@ config-filename = ${boot-image-url-list-json-config:error-state-file}
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:scripts}/boot-image-url-list-updater wrapper-path = ${directory:scripts}/boot-image-url-list-updater
command-line = {{ python_executable }} {{ image_download_controller }} ${:config} {{ curl_executable_location }} ${:md5sum-state-file} ${:error-state-file} ${boot-image-url-list-processed-config:processed-md5sum} command-line = {{ python_executable }} {{ image_download_controller }} ${:config} {{ curl_executable_location }} ${:md5sum-state-file} ${:error-state-file} ${boot-image-url-list-processed-config:processed-md5sum}
config = ${boot-image-url-list-json-config:rendered} config = ${boot-image-url-list-json-config:output}
md5sum-state-filename = boot-image-url-list-download-controller-md5sum-fail.json md5sum-state-filename = boot-image-url-list-download-controller-md5sum-fail.json
md5sum-state-file = ${directory:boot-image-url-list-expose}/${:md5sum-state-filename} md5sum-state-file = ${directory:boot-image-url-list-expose}/${:md5sum-state-filename}
error-state-filename = boot-image-url-list-download-controller-error.text error-state-filename = boot-image-url-list-download-controller-error.text
...@@ -293,7 +293,7 @@ config-url = ${monitor-base:base-url}/private/virtual-hard-drive-url/${:filename ...@@ -293,7 +293,7 @@ config-url = ${monitor-base:base-url}/private/virtual-hard-drive-url/${:filename
[virtual-hard-drive-url-source-config] [virtual-hard-drive-url-source-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = inline: inline =
{%- raw %} {%- raw %}
{{ virtual_hard_drive_url }} {{ virtual_hard_drive_url }}
{% endraw -%} {% endraw -%}
...@@ -301,7 +301,7 @@ template = inline: ...@@ -301,7 +301,7 @@ template = inline:
virtual-hard-drive-url = {{ slapparameter_dict['virtual-hard-drive-url'] }}#{{ slapparameter_dict['virtual-hard-drive-md5sum'] }} virtual-hard-drive-url = {{ slapparameter_dict['virtual-hard-drive-url'] }}#{{ slapparameter_dict['virtual-hard-drive-md5sum'] }}
context = context =
key virtual_hard_drive_url :virtual-hard-drive-url key virtual_hard_drive_url :virtual-hard-drive-url
rendered = ${directory:etc}/virtual-hard-drive-url.conf output = ${directory:etc}/virtual-hard-drive-url.conf
[virtual-hard-drive-url-processed-config] [virtual-hard-drive-url-processed-config]
# compares if the current configuration has been used by # compares if the current configuration has been used by
...@@ -326,7 +326,7 @@ install = ...@@ -326,7 +326,7 @@ install =
state_handler.write(str(e)) state_handler.write(str(e))
update = ${:install} update = ${:install}
config-file = ${virtual-hard-drive-url-source-config:rendered} config-file = ${virtual-hard-drive-url-source-config:output}
state-filename = virtual-hard-drive-url-processed-config.state state-filename = virtual-hard-drive-url-processed-config.state
state-file = ${directory:virtual-hard-drive-url-expose}/${:state-filename} state-file = ${directory:virtual-hard-drive-url-expose}/${:state-filename}
processed-md5sum = ${directory:virtual-hard-drive-url-var}/update-image-processed.md5sum processed-md5sum = ${directory:virtual-hard-drive-url-var}/update-image-processed.md5sum
...@@ -341,9 +341,9 @@ config-filename = ${virtual-hard-drive-url-processed-config:state-file} ...@@ -341,9 +341,9 @@ config-filename = ${virtual-hard-drive-url-processed-config:state-file}
[virtual-hard-drive-url-json-config] [virtual-hard-drive-url-json-config]
# generates json configuration from user configuration # generates json configuration from user configuration
recipe = plone.recipe.command recipe = plone.recipe.command
command = {{ python_executable }} {{ image_download_config_creator }} ${virtual-hard-drive-url-source-config:rendered} ${:rendered} ${directory:virtual-hard-drive-url-repository} ${:error-state-file} command = {{ python_executable }} {{ image_download_config_creator }} ${virtual-hard-drive-url-source-config:output} ${:output} ${directory:virtual-hard-drive-url-repository} ${:error-state-file}
update-command = ${:command} update-command = ${:command}
rendered = ${directory:virtual-hard-drive-url-var}/virtual-hard-drive-url.json output = ${directory:virtual-hard-drive-url-var}/virtual-hard-drive-url.json
error-state-filename = virtual-hard-drive-url-json-config-error.txt error-state-filename = virtual-hard-drive-url-json-config-error.txt
error-state-file = ${directory:virtual-hard-drive-url-expose}/${:error-state-filename} error-state-file = ${directory:virtual-hard-drive-url-expose}/${:error-state-filename}
...@@ -358,7 +358,7 @@ config-filename = ${virtual-hard-drive-url-json-config:error-state-file} ...@@ -358,7 +358,7 @@ config-filename = ${virtual-hard-drive-url-json-config:error-state-file}
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:scripts}/virtual-hard-drive-url-updater wrapper-path = ${directory:scripts}/virtual-hard-drive-url-updater
command-line = {{ python_executable }} {{ image_download_controller }} ${:config} {{ curl_executable_location }} ${:md5sum-state-file} ${:error-state-file} ${virtual-hard-drive-url-processed-config:processed-md5sum} command-line = {{ python_executable }} {{ image_download_controller }} ${:config} {{ curl_executable_location }} ${:md5sum-state-file} ${:error-state-file} ${virtual-hard-drive-url-processed-config:processed-md5sum}
config = ${virtual-hard-drive-url-json-config:rendered} config = ${virtual-hard-drive-url-json-config:output}
md5sum-state-filename = virtual-hard-drive-url-download-controller-md5sum-fail.json md5sum-state-filename = virtual-hard-drive-url-download-controller-md5sum-fail.json
md5sum-state-file = ${directory:virtual-hard-drive-url-expose}/${:md5sum-state-filename} md5sum-state-file = ${directory:virtual-hard-drive-url-expose}/${:md5sum-state-filename}
error-state-filename = virtual-hard-drive-url-download-controller-error.text error-state-filename = virtual-hard-drive-url-download-controller-error.text
...@@ -401,17 +401,17 @@ vnc-port = 5901 ...@@ -401,17 +401,17 @@ vnc-port = 5901
default-cdrom-iso = {{ debian_amd64_netinst_location }} default-cdrom-iso = {{ debian_amd64_netinst_location }}
{% if virtual_hard_drive_url_enabled %} {% if virtual_hard_drive_url_enabled %}
virtual-hard-drive-url-json-config = ${virtual-hard-drive-url-json-config:rendered} virtual-hard-drive-url-json-config = ${virtual-hard-drive-url-json-config:output}
{% else %} {% else %}
virtual-hard-drive-url-json-config = virtual-hard-drive-url-json-config =
{% endif %} {% endif %}
{% if boot_image_url_list_enabled %} {% if boot_image_url_list_enabled %}
boot-image-url-list-json-config = ${boot-image-url-list-json-config:rendered} boot-image-url-list-json-config = ${boot-image-url-list-json-config:output}
{% else %} {% else %}
boot-image-url-list-json-config = boot-image-url-list-json-config =
{% endif %} {% endif %}
{% if boot_image_url_select_enabled %} {% if boot_image_url_select_enabled %}
boot-image-url-select-json-config = ${boot-image-url-select-json-config:rendered} boot-image-url-select-json-config = ${boot-image-url-select-json-config:output}
{% else %} {% else %}
boot-image-url-select-json-config = boot-image-url-select-json-config =
{% endif %} {% endif %}
...@@ -499,17 +499,15 @@ log-file = ${directory:log}/qemu.log ...@@ -499,17 +499,15 @@ log-file = ${directory:log}/qemu.log
[kvm-run] [kvm-run]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_kvm_run }} url = {{ template_kvm_run }}
rendered = ${directory:bin}/kvm_raw output = ${directory:bin}/kvm_raw
mode = 700
context = context =
section parameter_dict kvm-parameter-dict section parameter_dict kvm-parameter-dict
[kvm-controller] [kvm-controller]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_kvm_controller_run }} url = {{ template_kvm_controller_run }}
rendered = ${directory:bin}/kvm_controller_raw output = ${directory:bin}/kvm_controller_raw
mode = 700
context = context =
section parameter_dict kvm-controller-parameter-dict section parameter_dict kvm-controller-parameter-dict
...@@ -539,7 +537,7 @@ ipv6-port = {{ external_port }} ...@@ -539,7 +537,7 @@ ipv6-port = {{ external_port }}
{% endif -%} {% endif -%}
{%- set depend_section_list = [] %} {%- set depend_section_list = [] %}
{%- set hash_file_list = ['${kvm-run:rendered}'] %} {%- set hash_file_list = ['${kvm-run:output}'] %}
{%- macro generate_depend_section(section, key) %} {%- macro generate_depend_section(section, key) %}
{%- do depend_section_list.append('${' + section + ':command}' ) %} {%- do depend_section_list.append('${' + section + ':command}' ) %}
{%- do hash_file_list.append('${' + key + '}') %} {%- do hash_file_list.append('${' + key + '}') %}
...@@ -567,7 +565,7 @@ depends = ...@@ -567,7 +565,7 @@ depends =
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
socket-path = ${kvm-controller-parameter-dict:socket-path} socket-path = ${kvm-controller-parameter-dict:socket-path}
wrapper-path = ${directory:services}/kvm wrapper-path = ${directory:services}/kvm
command-line = ${kvm-run:rendered} command-line = ${kvm-run:output}
kvm-controller = ${kvm-controller-wrapper:wrapper-path} kvm-controller = ${kvm-controller-wrapper:wrapper-path}
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
hash-files = hash-files =
...@@ -578,7 +576,7 @@ hash-files = ...@@ -578,7 +576,7 @@ hash-files =
[kvm-controller-wrapper] [kvm-controller-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:scripts}/kvm_controller wrapper-path = ${directory:scripts}/kvm_controller
command-line = ${kvm-controller:rendered} command-line = ${kvm-controller:output}
[kvm-vnc-promise] [kvm-vnc-promise]
...@@ -630,9 +628,8 @@ command-line = ...@@ -630,9 +628,8 @@ command-line =
[kvm-started-bin] [kvm-started-bin]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ qemu_start_promise_tpl }} url = {{ qemu_start_promise_tpl }}
rendered = ${directory:bin}/qemu-virtual-machine-is-ready output = ${directory:bin}/qemu-virtual-machine-is-ready
mode = 700
context = context =
raw dash {{ dash_executable_location }} raw dash {{ dash_executable_location }}
raw qemu_ready_path ${kvm-controller-parameter-dict:kvm-status-path} raw qemu_ready_path ${kvm-controller-parameter-dict:kvm-status-path}
...@@ -642,7 +639,7 @@ context = ...@@ -642,7 +639,7 @@ context =
<= monitor-promise-base <= monitor-promise-base
promise = check_command_execute promise = check_command_execute
name = qemu-virtual-machine-is-ready.py name = qemu-virtual-machine-is-ready.py
config-command = ${kvm-started-bin:rendered} config-command = ${kvm-started-bin:output}
[novnc-instance] [novnc-instance]
recipe = slapos.cookbook:novnc recipe = slapos.cookbook:novnc
...@@ -943,7 +940,7 @@ mode = {{ mode }} ...@@ -943,7 +940,7 @@ mode = {{ mode }}
{% endmacro -%} {% endmacro -%}
# write vm-data into file public/data # write vm-data into file public/data
{{ writefile('vm-data-content', '${directory:public}/data', slapparameter_dict.get('data-to-vm', ''), '700') }} {{ writefile('vm-data-content', '${directory:public}/data', slapparameter_dict.get('data-to-vm', '')) }}
{% if slapparameter_dict.get('authorized-key', '') -%} {% if slapparameter_dict.get('authorized-key', '') -%}
# write public key for vms to public/authorized_keys # write public key for vms to public/authorized_keys
...@@ -991,9 +988,9 @@ update-command = ${:command} ...@@ -991,9 +988,9 @@ update-command = ${:command}
# To access documents of main instance (in case of kvm-cluster) through http # To access documents of main instance (in case of kvm-cluster) through http
[cluster-url-path] [cluster-url-path]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_content }} url = {{ template_content }}
filename = cluster.hash filename = cluster.hash
rendered = ${directory:public}/${:filename} output = ${directory:public}/${:filename}
hash-url = https://10.0.2.101:443/{{ slapparameter_dict.get('document-path', '') }} hash-url = https://10.0.2.101:443/{{ slapparameter_dict.get('document-path', '') }}
context = context =
key content_list :hash-url key content_list :hash-url
...@@ -1018,8 +1015,8 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg ...@@ -1018,8 +1015,8 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
[ansible-vm-bin] [ansible-vm-bin]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ ansible_promise_tpl }} url = {{ ansible_promise_tpl }}
rendered = ${directory:bin}/ansible_{{ name }} output = ${directory:bin}/ansible_{{ name }}
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
raw logs ${directory:public}/ansible raw logs ${directory:public}/ansible
...@@ -1029,7 +1026,7 @@ context = ...@@ -1029,7 +1026,7 @@ context =
<= monitor-promise-base <= monitor-promise-base
promise = check_command_execute promise = check_command_execute
name = ansible_{{ name }}.py name = ansible_{{ name }}.py
config-command = ${ansible-vm-bin:rendered} config-command = ${ansible-vm-bin:output}
{% if bootstrap_script_url -%} {% if bootstrap_script_url -%}
[download-bootstrap-script] [download-bootstrap-script]
...@@ -1152,7 +1149,7 @@ data-to-vm = ...@@ -1152,7 +1149,7 @@ data-to-vm =
{% do part_list.append('disk-device-permission') -%} {% do part_list.append('disk-device-permission') -%}
[disk-device-permission] [disk-device-permission]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = inline: inline =
{%- raw %} {%- raw %}
{%- set disk_list = [] %} {%- set disk_list = [] %}
{%- for disk in disk_device_path.split() %} {%- for disk in disk_device_path.split() %}
...@@ -1160,7 +1157,7 @@ template = inline: ...@@ -1160,7 +1157,7 @@ template = inline:
{%- endfor -%} {%- endfor -%}
{{ json_module.dumps(disk_list) }} {{ json_module.dumps(disk_list) }}
{% endraw -%} {% endraw -%}
rendered = ${buildout:directory}/.slapos-disk-permission output = ${buildout:directory}/.slapos-disk-permission
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
import json_module json import json_module json
...@@ -1168,14 +1165,13 @@ context = ...@@ -1168,14 +1165,13 @@ context =
{% do part_list.append('wipe-disk-device-wrapper') -%} {% do part_list.append('wipe-disk-device-wrapper') -%}
[wipe-disk-device-wrapper] [wipe-disk-device-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline: inline =
#!/bin/sh #!/bin/sh
{%- for disk_device in disk_device_path.split() %} {%- for disk_device in disk_device_path.split() %}
dd if=/dev/zero of={{ disk_device }} bs=4096 count=500k dd if=/dev/zero of={{ disk_device }} bs=4096 count=500k
{%- endfor %} {%- endfor %}
rendered = ${directory:prerm}/slapos_wipe_device_disk output = ${directory:prerm}/slapos_wipe_device_disk
mode = 0700
{% endif -%} {% endif -%}
{% do part_list.append('whitelist-firewall') -%} {% do part_list.append('whitelist-firewall') -%}
...@@ -1190,7 +1186,7 @@ command-line = ...@@ -1190,7 +1186,7 @@ command-line =
${:source} ${:source}
source = source =
${whitelist-domains-request:rendered} ${whitelist-domains-request:output}
{{ whitelist_domains_default }} {{ whitelist_domains_default }}
${whitelist-domains-resolv.conf:output} ${whitelist-domains-resolv.conf:output}
${whitelist-domains-download:output} ${whitelist-domains-download:output}
...@@ -1204,13 +1200,13 @@ update-command = ${:command} ...@@ -1204,13 +1200,13 @@ update-command = ${:command}
[whitelist-domains-request] [whitelist-domains-request]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = inline: inline =
{%- raw %} {%- raw %}
{%- for domain in whitelist_domains.split() %} {%- for domain in whitelist_domains.split() %}
{{ domain }} {{ domain }}
{%- endfor %} {%- endfor %}
{% endraw -%} {% endraw -%}
rendered = ${whitelist-firewall-directory:location}/${:_buildout_section_name_}.txt output = ${whitelist-firewall-directory:location}/${:_buildout_section_name_}.txt
whitelist-domains = {{ dumps(whitelist_domains) }} whitelist-domains = {{ dumps(whitelist_domains) }}
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
......
...@@ -35,17 +35,18 @@ shell-path = {{ dash_executable_location }} ...@@ -35,17 +35,18 @@ shell-path = {{ dash_executable_location }}
path = ${basedirectory:services}/nbdserver path = ${basedirectory:services}/nbdserver
[nbd-checker-bin] [nbd-checker-bin]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline:#!/bin/sh inline =
#!/bin/sh
[ ! -f ${onetimeupload-instance:image-path} ] || [ ! -f ${onetimeupload-instance:image-path} ] ||
${buildout:executable} -c 'import socket ; socket.create_connection(("${nbd-instance:ip}","${nbd-instance:port}")).close()' ${buildout:executable} -c 'import socket ; socket.create_connection(("${nbd-instance:ip}","${nbd-instance:port}")).close()'
rendered = ${rootdirectory:bin}/check-nbd-running.sh output = ${rootdirectory:bin}/check-nbd-running.sh
[nbd-promise] [nbd-promise]
<= monitor-promise-base <= monitor-promise-base
promise = check_command_execute promise = check_command_execute
name = nbd_promise.py name = nbd_promise.py
config-command = ${nbd-checker-bin:rendered} config-command = ${nbd-checker-bin:output}
[gen-passwd] [gen-passwd]
recipe = slapos.cookbook:generate.password recipe = slapos.cookbook:generate.password
......
...@@ -10,16 +10,16 @@ extends = ${template-resilient-templates:output} ...@@ -10,16 +10,16 @@ extends = ${template-resilient-templates:output}
[switch_softwaretype] [switch_softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = $${:kvm} default = $${:kvm}
kvm-cluster = dynamic-template-kvm-cluster:rendered kvm-cluster = dynamic-template-kvm-cluster:output
kvm = dynamic-template-kvm:rendered kvm = dynamic-template-kvm:output
nbd = dynamic-template-nbd:rendered nbd = dynamic-template-nbd:output
kvm-resilient = dynamic-template-kvm-resilient:rendered kvm-resilient = dynamic-template-kvm-resilient:output
kvm-import = dynamic-template-kvm-import:rendered kvm-import = dynamic-template-kvm-import:output
kvm-export = dynamic-template-kvm-export:rendered kvm-export = dynamic-template-kvm-export:output
frozen = instance-frozen:rendered frozen = instance-frozen:output
pull-backup = template-pull-backup:rendered pull-backup = template-pull-backup:output
# BBB # BBB
RootSoftwareInstance = $${:default} RootSoftwareInstance = $${:default}
...@@ -42,9 +42,8 @@ storage-home = $${storage-configuration:storage-home} ...@@ -42,9 +42,8 @@ storage-home = $${storage-configuration:storage-home}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/$${:filename} output = $${buildout:directory}/$${:filename}
extensions = jinja2.ext.do extensions = jinja2.ext.do
mode = 0644
extra-context = extra-context =
context = context =
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
...@@ -62,18 +61,18 @@ context = ...@@ -62,18 +61,18 @@ context =
[dynamic-template-kvm-cluster] [dynamic-template-kvm-cluster]
<= jinja2-template-base <= jinja2-template-base
template = ${template-kvm-cluster:location}/instance-kvm-cluster.cfg.jinja2.in url = ${template-kvm-cluster:location}/instance-kvm-cluster.cfg.jinja2.in
filename = template-kvm-cluster.cfg filename = template-kvm-cluster.cfg
extra-context = extra-context =
section parameter_dict dynamic-template-kvm-cluster-parameters section parameter_dict dynamic-template-kvm-cluster-parameters
raw logrotate_cfg ${template-logrotate-base:rendered} raw logrotate_cfg ${template-logrotate-base:output}
raw template_content ${template-content:target} raw template_content ${template-content:target}
raw template_httpd_cfg ${template-httpd:rendered} raw template_httpd_cfg ${template-httpd:output}
raw template_monitor ${monitor2-template:rendered} raw template_monitor ${monitor2-template:output}
[dynamic-template-kvm] [dynamic-template-kvm]
<= jinja2-template-base <= jinja2-template-base
template = ${template-kvm:location}/instance-kvm.cfg.jinja2 url = ${template-kvm:location}/instance-kvm.cfg.jinja2
filename = template-kvm.cfg filename = template-kvm.cfg
extra-context = extra-context =
section slap_configuration slap-configuration section slap_configuration slap-configuration
...@@ -87,7 +86,7 @@ extra-context = ...@@ -87,7 +86,7 @@ extra-context =
raw whitelist_firewall_download_controller ${whitelist-firewall-download-controller:target} raw whitelist_firewall_download_controller ${whitelist-firewall-download-controller:target}
raw image_download_controller ${image-download-controller:target} raw image_download_controller ${image-download-controller:target}
raw image_download_config_creator ${image-download-config-creator:target} raw image_download_config_creator ${image-download-config-creator:target}
raw logrotate_cfg ${template-logrotate-base:rendered} raw logrotate_cfg ${template-logrotate-base:output}
raw novnc_location ${noVNC:location} raw novnc_location ${noVNC:location}
raw netcat_bin ${netcat:location}/bin/netcat raw netcat_bin ${netcat:location}/bin/netcat
raw python_executable ${buildout:executable} raw python_executable ${buildout:executable}
...@@ -96,11 +95,11 @@ extra-context = ...@@ -96,11 +95,11 @@ extra-context =
raw qemu_img_executable_location ${qemu:location}/bin/qemu-img raw qemu_img_executable_location ${qemu:location}/bin/qemu-img
raw qemu_start_promise_tpl ${template-qemu-ready:target} raw qemu_start_promise_tpl ${template-qemu-ready:target}
raw sixtunnel_executable_location ${6tunnel:location}/bin/6tunnel raw sixtunnel_executable_location ${6tunnel:location}/bin/6tunnel
raw template_httpd_cfg ${template-httpd:rendered} raw template_httpd_cfg ${template-httpd:output}
raw template_content ${template-content:target} raw template_content ${template-content:target}
raw template_kvm_controller_run ${template-kvm-controller:target} raw template_kvm_controller_run ${template-kvm-controller:target}
raw template_kvm_run ${template-kvm-run:target} raw template_kvm_run ${template-kvm-run:target}
raw template_monitor ${monitor2-template:rendered} raw template_monitor ${monitor2-template:output}
raw websockify_executable_location ${buildout:directory}/bin/websockify raw websockify_executable_location ${buildout:directory}/bin/websockify
raw wipe_disk_wrapper ${buildout:directory}/bin/securedelete raw wipe_disk_wrapper ${buildout:directory}/bin/securedelete
template-parts-destination = ${template-parts:target} template-parts-destination = ${template-parts:target}
...@@ -110,55 +109,52 @@ import-list = file parts :template-parts-destination ...@@ -110,55 +109,52 @@ import-list = file parts :template-parts-destination
[dynamic-template-kvm-resilient] [dynamic-template-kvm-resilient]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-kvm-resilient:location}/instance-kvm-resilient.cfg.jinja2 url = ${template-kvm-resilient:location}/instance-kvm-resilient.cfg.jinja2
rendered = $${buildout:directory}/template-kvm-resilient.cfg output = $${buildout:directory}/template-kvm-resilient.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
raw curl_executable_location ${curl:location}/bin/curl raw curl_executable_location ${curl:location}/bin/curl
raw template_monitor ${monitor2-template:rendered} raw template_monitor ${monitor2-template:output}
template-parts-destination = ${template-parts:target} template-parts-destination = ${template-parts:target}
template-replicated-destination = ${template-replicated:target} template-replicated-destination = ${template-replicated:target}
import-list = file parts :template-parts-destination import-list = file parts :template-parts-destination
file replicated :template-replicated-destination file replicated :template-replicated-destination
mode = 0644
[dynamic-template-kvm-export] [dynamic-template-kvm-export]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-kvm-export:location}/instance-kvm-export.cfg.jinja2 url = ${template-kvm-export:location}/instance-kvm-export.cfg.jinja2
rendered = $${buildout:directory}/template-kvm-export.cfg output = $${buildout:directory}/template-kvm-export.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
raw kvm_template $${dynamic-template-kvm:rendered} raw kvm_template $${dynamic-template-kvm:output}
raw template_kvm_export ${template-kvm-export-script:target} raw template_kvm_export ${template-kvm-export-script:target}
key pbsready_export_template template-pbsready-export:rendered key pbsready_export_template template-pbsready-export:output
raw gzip_binary ${gzip:location}/bin/gzip raw gzip_binary ${gzip:location}/bin/gzip
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
mode = 0644
[dynamic-template-kvm-import] [dynamic-template-kvm-import]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-kvm-import:location}/instance-kvm-import.cfg.jinja2.in url = ${template-kvm-import:location}/instance-kvm-import.cfg.jinja2.in
rendered = $${buildout:directory}/template-kvm-import.cfg output = $${buildout:directory}/template-kvm-import.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
raw qemu_location ${qemu:location} raw qemu_location ${qemu:location}
raw template_kvm_import ${template-kvm-import-script:target} raw template_kvm_import ${template-kvm-import-script:target}
key pbsready_import_template template-pbsready-import:rendered key pbsready_import_template template-pbsready-import:output
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
raw zcat_binary ${gzip:location}/bin/zcat raw zcat_binary ${gzip:location}/bin/zcat
raw gzip_binary ${gzip:location}/bin/gzip raw gzip_binary ${gzip:location}/bin/gzip
mode = 0644
[dynamic-template-nbd] [dynamic-template-nbd]
<= jinja2-template-base <= jinja2-template-base
template = ${template-nbd:location}/instance-nbd.cfg.jinja2 url = ${template-nbd:location}/instance-nbd.cfg.jinja2
filename = template-nbd.cfg filename = template-nbd.cfg
context = context =
section slap_configuration slap-configuration section slap_configuration slap-configuration
...@@ -168,4 +164,4 @@ context = ...@@ -168,4 +164,4 @@ context =
raw qemu_nbd_executable_location ${qemu:location}/bin/qemu-nbd raw qemu_nbd_executable_location ${qemu:location}/bin/qemu-nbd
raw dash_executable_location ${dash:location}/bin/dash raw dash_executable_location ${dash:location}/bin/dash
raw onetimeupload_executable_location ${buildout:bin-directory}/onetimeupload raw onetimeupload_executable_location ${buildout:bin-directory}/onetimeupload
raw template_monitor ${monitor2-template:rendered} raw template_monitor ${monitor2-template:output}
...@@ -110,8 +110,8 @@ output = ${buildout:directory}/template.cfg ...@@ -110,8 +110,8 @@ output = ${buildout:directory}/template.cfg
[template-httpd] [template-httpd]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-kvm-http.cfg.in url = ${:_profile_base_location_}/instance-kvm-http.cfg.in
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/instance-kvm-http.cfg output = ${buildout:parts-directory}/${:_buildout_section_name_}/instance-kvm-http.cfg
context = context =
key apache_location apache:location key apache_location apache:location
raw openssl_executable_location ${openssl:location}/bin/openssl raw openssl_executable_location ${openssl:location}/bin/openssl
......
...@@ -19,7 +19,7 @@ md5sum = 9940e05d5e624a7884f4e6e062355798 ...@@ -19,7 +19,7 @@ md5sum = 9940e05d5e624a7884f4e6e062355798
[template-matomo-instance] [template-matomo-instance]
filename = matomo-instance.cfg.in filename = matomo-instance.cfg.in
md5sum = 34925db56b5f97e5a29080fb83fbefa8 md5sum = 83cc1478a59409a6ef19d6f4fcd7380f
[template-matomo-backup.sh] [template-matomo-backup.sh]
filename = matomo-backup.sh.in filename = matomo-backup.sh.in
......
...@@ -19,26 +19,26 @@ php.max_file_uploads = 100 ...@@ -19,26 +19,26 @@ php.max_file_uploads = 100
[php-bin] [php-bin]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:bin}/php wrapper-path = ${directory:bin}/php
command-line = ${instance-parameter:php-bin} -c ${php.ini-conf:rendered} command-line = ${instance-parameter:php-bin} -c ${php.ini-conf:output}
[matomo-backup-cron] [matomo-backup-cron]
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries} cron-entries = ${cron:cron-entries}
name = matomo-backup name = matomo-backup
frequency = 0 0 * * * frequency = 0 0 * * *
command = ${matomo-backup.sh:rendered} command = ${matomo-backup.sh:output}
[matomo-apache-httpd] [matomo-apache-httpd]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ matomo_apache_httpd }} url = {{ matomo_apache_httpd }}
rendered = ${directory:apache.d}/matomo.conf output = ${directory:apache.d}/matomo.conf
context = context =
section parameter_dict apache-php-configuration section parameter_dict apache-php-configuration
[matomo-backup.sh] [matomo-backup.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ matomo_backup_sh }} url = {{ matomo_backup_sh }}
rendered = ${directory:scripts}/matomo-backup output = ${directory:scripts}/matomo-backup
context = context =
section parameter_dict instance-parameter section parameter_dict instance-parameter
key php_bin php-bin:wrapper-path key php_bin php-bin:wrapper-path
......
...@@ -36,13 +36,13 @@ md5sum = 8d592676bc2c0d51363ad7b2caf171fe ...@@ -36,13 +36,13 @@ md5sum = 8d592676bc2c0d51363ad7b2caf171fe
# give the location of the instance-matomo.cfg fil # give the location of the instance-matomo.cfg fil
# Without it the instance-matomo.cfg file will not be executed # Without it the instance-matomo.cfg file will not be executed
[custom-application-deployment] [custom-application-deployment]
path = ${template-matomo-instance:rendered} path = ${template-matomo-instance:output}
part-list = matomo-backup.sh matomo-backup-cron matomo-apache-httpd part-list = matomo-backup.sh matomo-backup-cron matomo-apache-httpd
[template-matomo-instance] [template-matomo-instance]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance-matomo.cfg output = ${buildout:directory}/instance-matomo.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
key findutils_location findutils:location key findutils_location findutils:location
......
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 5f2f7c4c2f793d609ad3c4fa0aa2f8a5 md5sum = a0a375dcd29a21ef121931f40e5e6d51
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
parts = parts =
publish-connection-parameter publish-connection-parameter
extends = ${monitor2-template:rendered} extends = ${monitor2-template:output}
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
[fontconfig-conf] [fontconfig-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-fonts-conf:output} url = ${template-fonts-conf:output}
rendered = $${directory:etc}/fonts.conf output = $${directory:etc}/fonts.conf
context = context =
key cachedir directory:fontconfig-cache key cachedir directory:fontconfig-cache
key fonts :fonts key fonts :fonts
...@@ -46,7 +46,7 @@ environment = ...@@ -46,7 +46,7 @@ environment =
MB_DB_USER=$${postgresql:superuser} MB_DB_USER=$${postgresql:superuser}
MB_DB_PASS=$${postgresql:password} MB_DB_PASS=$${postgresql:password}
MB_DB_HOST=$${postgresql:ipv4} MB_DB_HOST=$${postgresql:ipv4}
FONTCONFIG_FILE=$${fontconfig-conf:rendered} FONTCONFIG_FILE=$${fontconfig-conf:output}
JAVA_ARGS=-Dorg.quartz.scheduler.instanceId=$${slap-connection:computer-id}.$${slap-connection:partition-id} -Djava.io.tmpdir="$${directory:tmp}" JAVA_ARGS=-Dorg.quartz.scheduler.instanceId=$${slap-connection:computer-id}.$${slap-connection:partition-id} -Djava.io.tmpdir="$${directory:tmp}"
hash-existing-files = hash-existing-files =
$${buildout:directory}/software_release/buildout.cfg $${buildout:directory}/software_release/buildout.cfg
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = 37966f5f7c6b82137c0388ca3520cb71 md5sum = 0d26da3f83b293efbf330fd2b0350bf6
[template-monitor] [template-monitor]
_update_hash_filename_ = instance-monitor.cfg.jinja2 _update_hash_filename_ = instance-monitor.cfg.jinja2
md5sum = f23c007d6d6aed137cfd54aaa7ba52ab md5sum = 5afba85a7aca9e716f61d59a524adc12
[json-test-template] [json-test-template]
_update_hash_filename_ = json-test-template.json.in.jinja2 _update_hash_filename_ = json-test-template.json.in.jinja2
...@@ -26,15 +26,15 @@ md5sum = 2eb5596544d9c341acf653d4f7ce2680 ...@@ -26,15 +26,15 @@ md5sum = 2eb5596544d9c341acf653d4f7ce2680
[template-monitor-edgetest-basic] [template-monitor-edgetest-basic]
_update_hash_filename_ = instance-monitor-edgetest-basic.cfg.jinja2 _update_hash_filename_ = instance-monitor-edgetest-basic.cfg.jinja2
md5sum = 05c00ac393b50cfdef5d3bc5af93fe98 md5sum = 8e0c4041f680312ff054687d7f28275a
[template-monitor-edgetest] [template-monitor-edgetest]
_update_hash_filename_ = instance-monitor-edgetest.cfg.jinja2 _update_hash_filename_ = instance-monitor-edgetest.cfg.jinja2
md5sum = 3c8ab4e78f66c974eb95afc595a13514 md5sum = a16fb139d9f3d01a88f499450fac50b4
[template-monitor-edgebot] [template-monitor-edgebot]
_update_hash_filename_ = instance-monitor-edgebot.cfg.jinja2 _update_hash_filename_ = instance-monitor-edgebot.cfg.jinja2
md5sum = 436bb5251c8f1cd1e64bd5d3987d699c md5sum = 7b927af12934c228d2763c5a40c634b5
[network-bench-cfg] [network-bench-cfg]
filename = network_bench.cfg.in filename = network_bench.cfg.in
......
...@@ -59,8 +59,8 @@ config-json-file = ${surykatka-config-{{ class }}:json} ...@@ -59,8 +59,8 @@ config-json-file = ${surykatka-config-{{ class }}:json}
[surykatka-config-{{ class }}] [surykatka-config-{{ class }}]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
db = ${directory:srv}/surykatka-{{ class }}.db db = ${directory:srv}/surykatka-{{ class }}.db
rendered = ${directory:etc}/surykatka-{{ class }}.ini output = ${directory:etc}/surykatka-{{ class }}.ini
template = {{ template_surykatka_ini }} url = {{ template_surykatka_ini }}
url_list = {{ dumps(URL_LIST) }} url_list = {{ dumps(URL_LIST) }}
nameserver_list = {{ dumps(CONFIGURATION['nameserver-list']) }} nameserver_list = {{ dumps(CONFIGURATION['nameserver-list']) }}
json = ${directory:srv}/surykatka-{{ class }}.json json = ${directory:srv}/surykatka-{{ class }}.json
...@@ -76,26 +76,26 @@ context = ...@@ -76,26 +76,26 @@ context =
[surykatka-{{ class }}] [surykatka-{{ class }}]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
config = ${surykatka-config-{{ class }}:rendered} config = ${surykatka-config-{{ class }}:output}
command-line = command-line =
{{ surykatka_binary }} --run crawl --reload --configuration ${:config} {{ surykatka_binary }} --run crawl --reload --configuration ${:config}
wrapper-path = ${monitor-directory:service}/${:_buildout_section_name_} wrapper-path = ${monitor-directory:service}/${:_buildout_section_name_}
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
[surykatka-status-json-{{ class }}] [surykatka-status-json-{{ class }}]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
json = ${surykatka-config-{{ class }}:json} json = ${surykatka-config-{{ class }}:json}
template = inline:#!/bin/sh inline =
#!/bin/sh
{{ surykatka_binary }} --run status --configuration ${surykatka-{{ class }}:config} --output json --stdout ${:json} {{ surykatka_binary }} --run status --configuration ${surykatka-{{ class }}:config} --output json --stdout ${:json}
rendered = ${monitor-directory:bin}/${:_buildout_section_name_} output = ${monitor-directory:bin}/${:_buildout_section_name_}
mode = 0755
[cron-entry-surykatka-status-{{ class }}] [cron-entry-surykatka-status-{{ class }}]
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
cron-entries = ${directory:etc}/cron.d cron-entries = ${directory:etc}/cron.d
name = surykatka-status-{{ class }} name = surykatka-status-{{ class }}
frequency = */2 * * * * frequency = */2 * * * *
command = ${surykatka-status-json-{{ class }}:rendered} command = ${surykatka-status-json-{{ class }}:output}
{%- do part_list.append('surykatka-%i'% (class,)) %} {%- do part_list.append('surykatka-%i'% (class,)) %}
{%- do part_list.append('surykatka-bot-promise-%i' % (class,)) %} {%- do part_list.append('surykatka-bot-promise-%i' % (class,)) %}
{%- do part_list.append('cron-entry-surykatka-status-%i' % (class,)) %} {%- do part_list.append('cron-entry-surykatka-status-%i' % (class,)) %}
......
...@@ -83,8 +83,8 @@ config-json-file = ${surykatka-config-{{ class }}:json} ...@@ -83,8 +83,8 @@ config-json-file = ${surykatka-config-{{ class }}:json}
[surykatka-config-{{ class }}] [surykatka-config-{{ class }}]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
db = ${directory:srv}/surykatka-{{ class }}.db db = ${directory:srv}/surykatka-{{ class }}.db
rendered = ${directory:etc}/surykatka-{{ class }}.ini output = ${directory:etc}/surykatka-{{ class }}.ini
template = {{ template_surykatka_ini }} url = {{ template_surykatka_ini }}
url_list = {{ dumps(CLASS_URL_LIST) }} url_list = {{ dumps(CLASS_URL_LIST) }}
nameserver_list = {{ dumps(DEFAULT_DICT['nameserver-list']) }} nameserver_list = {{ dumps(DEFAULT_DICT['nameserver-list']) }}
json = ${directory:srv}/surykatka-{{ class }}.json json = ${directory:srv}/surykatka-{{ class }}.json
...@@ -101,7 +101,7 @@ context = ...@@ -101,7 +101,7 @@ context =
{%- do PART_LIST.append('surykatka-%i'% (class,)) %} {%- do PART_LIST.append('surykatka-%i'% (class,)) %}
[surykatka-{{ class }}] [surykatka-{{ class }}]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
config = ${surykatka-config-{{ class }}:rendered} config = ${surykatka-config-{{ class }}:output}
command-line = command-line =
{{ surykatka_binary }} --run crawl --reload --configuration ${:config} {{ surykatka_binary }} --run crawl --reload --configuration ${:config}
wrapper-path = ${monitor-directory:service}/${:_buildout_section_name_} wrapper-path = ${monitor-directory:service}/${:_buildout_section_name_}
...@@ -118,12 +118,12 @@ config-state = not-empty ...@@ -118,12 +118,12 @@ config-state = not-empty
config-url = config-url =
[surykatka-status-json-{{ class }}] [surykatka-status-json-{{ class }}]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
json = ${surykatka-config-{{ class }}:json} json = ${surykatka-config-{{ class }}:json}
template = inline:#!/bin/sh inline =
#!/bin/sh
{{ surykatka_binary }} --run status --configuration ${surykatka-{{ class }}:config} --output json --stdout ${:json} {{ surykatka_binary }} --run status --configuration ${surykatka-{{ class }}:config} --output json --stdout ${:json}
rendered = ${monitor-directory:bin}/${:_buildout_section_name_} output = ${monitor-directory:bin}/${:_buildout_section_name_}
mode = 0755
{%- do PART_LIST.append('cron-entry-surykatka-status-%i' % (class,)) %} {%- do PART_LIST.append('cron-entry-surykatka-status-%i' % (class,)) %}
[cron-entry-surykatka-status-{{ class }}] [cron-entry-surykatka-status-{{ class }}]
...@@ -131,7 +131,7 @@ recipe = slapos.cookbook:cron.d ...@@ -131,7 +131,7 @@ recipe = slapos.cookbook:cron.d
cron-entries = ${directory:etc}/cron.d cron-entries = ${directory:etc}/cron.d
name = surykatka-status-{{ class }} name = surykatka-status-{{ class }}
frequency = */2 * * * * frequency = */2 * * * *
command = ${surykatka-status-json-{{ class }}:rendered} command = ${surykatka-status-json-{{ class }}:output}
{%- endfor %} {#- for class, class_check_list in CHECK_DICT.items() #} {%- endfor %} {#- for class, class_check_list in CHECK_DICT.items() #}
[buildout] [buildout]
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
extra-context = extra-context =
context = context =
import json_module json import json_module json
...@@ -10,7 +10,7 @@ context = ...@@ -10,7 +10,7 @@ context =
[slave-test-configuration] [slave-test-configuration]
<=jinja2-template-base <=jinja2-template-base
template = {{ template_json_edgetest_test }} url = {{ template_json_edgetest_test }}
filename = srv/monitor/private/test.json filename = srv/monitor/private/test.json
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
......
...@@ -25,7 +25,7 @@ recipe = slapos.cookbook:cron.d ...@@ -25,7 +25,7 @@ recipe = slapos.cookbook:cron.d
name = network-bench-test name = network-bench-test
frequency = */10 * * * * frequency = */10 * * * *
# skip to not fill cron log file. # skip to not fill cron log file.
# command = {{ buildout_bin }}/networkbench ${network-bench-configuration:rendered} ${monitor-directory:monitor-log} # command = {{ buildout_bin }}/networkbench ${network-bench-configuration:output} ${monitor-directory:monitor-log}
command = true command = true
...@@ -41,9 +41,8 @@ autocreate = true ...@@ -41,9 +41,8 @@ autocreate = true
[network-bench-configuration] [network-bench-configuration]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ network_benck_cfg_output }} url = {{ network_benck_cfg_output }}
rendered = ${monitor-directory:etc}/network_bench.cfg output = ${monitor-directory:etc}/network_bench.cfg
mode = 0744
context = context =
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
......
...@@ -7,16 +7,16 @@ develop-eggs-directory = ${buildout:develop-eggs-directory} ...@@ -7,16 +7,16 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
[switch_softwaretype] [switch_softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = instance-base-monitor:rendered default = instance-base-monitor:output
edgetest = instance-base-edgetest:rendered edgetest = instance-base-edgetest:output
edgebot = instance-base-edgebot:rendered edgebot = instance-base-edgebot:output
edgetest-basic = instance-edgetest-basic:rendered edgetest-basic = instance-edgetest-basic:output
RootSoftwareInstance = $${:default} RootSoftwareInstance = $${:default}
[instance-base-monitor] [instance-base-monitor]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-monitor:target} url = ${template-monitor:target}
rendered = $${buildout:directory}/template-base-monitor.cfg output = $${buildout:directory}/template-base-monitor.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = key develop_eggs_directory buildout:develop-eggs-directory context = key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
...@@ -26,12 +26,11 @@ context = key develop_eggs_directory buildout:develop-eggs-directory ...@@ -26,12 +26,11 @@ context = key develop_eggs_directory buildout:develop-eggs-directory
raw monitor_template_output ${monitor-template:output} raw monitor_template_output ${monitor-template:output}
raw network_benck_cfg_output ${network-bench-cfg:output} raw network_benck_cfg_output ${network-bench-cfg:output}
raw monitor_collect_csv_dump ${monitor-collect-csv-dump:target} raw monitor_collect_csv_dump ${monitor-collect-csv-dump:target}
mode = 0644
[instance-template] [instance-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do extensions = jinja2.ext.do
rendered = $${buildout:directory}/$${:_buildout_section_name_}.cfg output = $${buildout:directory}/$${:_buildout_section_name_}.cfg
context = context =
import json_module json import json_module json
import hashlib_module hashlib import hashlib_module hashlib
...@@ -39,10 +38,9 @@ context = ...@@ -39,10 +38,9 @@ context =
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key slap_software_type slap-configuration:slap-software-type key slap_software_type slap-configuration:slap-software-type
key instance_base_monitor instance-base-monitor:rendered key instance_base_monitor instance-base-monitor:output
raw buildout_bin ${buildout:bin-directory} raw buildout_bin ${buildout:bin-directory}
$${:extra-context} $${:extra-context}
mode = 0644
[surykatka] [surykatka]
binary = ${buildout:bin-directory}/${surykatka:script-name} binary = ${buildout:bin-directory}/${surykatka:script-name}
...@@ -50,7 +48,7 @@ ini = ${template-surykatka-ini:target} ...@@ -50,7 +48,7 @@ ini = ${template-surykatka-ini:target}
[instance-edgetest-basic] [instance-edgetest-basic]
<= instance-template <= instance-template
template = ${template-monitor-edgetest-basic:target} url = ${template-monitor-edgetest-basic:target}
extra-context = extra-context =
raw software_type edgetest-basic raw software_type edgetest-basic
key template_surykatka_ini surykatka:ini key template_surykatka_ini surykatka:ini
...@@ -58,8 +56,8 @@ extra-context = ...@@ -58,8 +56,8 @@ extra-context =
[instance-base-edgetest] [instance-base-edgetest]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-monitor-edgetest:target} url = ${template-monitor-edgetest:target}
rendered = $${buildout:directory}/template-monitor-base-edgetest.cfg output = $${buildout:directory}/template-monitor-base-edgetest.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = import json_module json context = import json_module json
import hashlib_module hashlib import hashlib_module hashlib
...@@ -69,16 +67,15 @@ context = import json_module json ...@@ -69,16 +67,15 @@ context = import json_module json
key slap_software_type slap-configuration:slap-software-type key slap_software_type slap-configuration:slap-software-type
section slap_configuration slap-configuration section slap_configuration slap-configuration
raw software_type edgetest raw software_type edgetest
key instance_base_monitor instance-base-monitor:rendered key instance_base_monitor instance-base-monitor:output
key slave_instance_list slap-configuration:slave-instance-list key slave_instance_list slap-configuration:slave-instance-list
raw buildout_bin ${buildout:bin-directory} raw buildout_bin ${buildout:bin-directory}
raw template_json_edgetest_test ${json-test-template:target} raw template_json_edgetest_test ${json-test-template:target}
mode = 0644
[instance-base-edgebot] [instance-base-edgebot]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-monitor-edgebot:target} url = ${template-monitor-edgebot:target}
rendered = $${buildout:directory}/template-monitor-edgebot.cfg output = $${buildout:directory}/template-monitor-edgebot.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = import json_module json context = import json_module json
...@@ -94,7 +91,6 @@ context = import json_module json ...@@ -94,7 +91,6 @@ context = import json_module json
raw buildout_bin ${buildout:bin-directory} raw buildout_bin ${buildout:bin-directory}
raw monitor_template_output ${monitor-template:output} raw monitor_template_output ${monitor-template:output}
raw monitor_collect_csv_dump ${monitor-collect-csv-dump:target} raw monitor_collect_csv_dump ${monitor-collect-csv-dump:target}
mode = 0644
[slap-configuration] [slap-configuration]
......
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
# not need these here). # not need these here).
[template-instance] [template-instance]
filename = instance.cfg filename = instance.cfg
md5sum = 14132bba14a1e66e7abb1a7c58b333e5 md5sum = 7a558c2b9461ec588c9d77bdeef64e4d
...@@ -44,7 +44,7 @@ git-executable = {{ git_path }}/bin/git ...@@ -44,7 +44,7 @@ git-executable = {{ git_path }}/bin/git
[parameters] [parameters]
# for use of the "parameters" XML configuration given from the # for use of the "parameters" XML configuration given from the
# webrunner interface # webrunner interface
# if needed, .serialized => json (more complex structures are OK, but need another # if needed, .serialized => json (more complex structures are OK, but need another
# jinja template for reading the content of the parameters) # jinja template for reading the content of the parameters)
recipe = slapos.cookbook:slapconfiguration recipe = slapos.cookbook:slapconfiguration
computer = ${slap_connection:computer_id} computer = ${slap_connection:computer_id}
...@@ -82,10 +82,9 @@ config-command = ${promise-sudo-on-host-bin:wrapper-path} ...@@ -82,10 +82,9 @@ config-command = ${promise-sudo-on-host-bin:wrapper-path}
[template-sudo-wrapper] [template-sudo-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ project_dir }}/scripts/wrapper_sudo.in url = {{ project_dir }}/scripts/wrapper_sudo.in
rendered = ${directory:wrapper_dir}/sudo output = ${directory:wrapper_dir}/sudo
md5sum = ded5a92be4e37ec32eb9d3087d3e19bd md5sum = ded5a92be4e37ec32eb9d3087d3e19bd
mode = 0700
context = context =
key fake_cros_sdk_path bin:wrapper_cros_sdk key fake_cros_sdk_path bin:wrapper_cros_sdk
key bash_path bin:bash key bash_path bin:bash
...@@ -93,10 +92,9 @@ context = ...@@ -93,10 +92,9 @@ context =
[template-cros-sdk-wrapper] [template-cros-sdk-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ project_dir }}/scripts/wrapper_cros_sdk.in url = {{ project_dir }}/scripts/wrapper_cros_sdk.in
rendered = ${bin:wrapper_cros_sdk} output = ${bin:wrapper_cros_sdk}
md5sum = 7159fe3d5b85a283733cf686c4ee0a74 md5sum = 7159fe3d5b85a283733cf686c4ee0a74
mode = 0700
context = context =
# XXX bash path is the one from the host # XXX bash path is the one from the host
key bash_path bin:bash key bash_path bin:bash
...@@ -107,10 +105,9 @@ context = ...@@ -107,10 +105,9 @@ context =
# create the rendered script in the buildout-directory/etc/run # create the rendered script in the buildout-directory/etc/run
# (use jinja for templating) # (use jinja for templating)
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ project_dir }}/scripts/cros_full_build.in url = {{ project_dir }}/scripts/cros_full_build.in
rendered = ${directory:run}/cros_full_build output = ${directory:run}/cros_full_build
#md5sum = f3b3b5408b69f752f2221d3965caf590 #md5sum = f3b3b5408b69f752f2221d3965caf590
mode = 0700
context = context =
key bash_path bin:bash key bash_path bin:bash
key instance_log_dir directory:log key instance_log_dir directory:log
......
...@@ -35,9 +35,8 @@ eggs = ...@@ -35,9 +35,8 @@ eggs =
[template-instance] [template-instance]
# jinja2 render instance.cfg file in the buildout directory # jinja2 render instance.cfg file in the buildout directory
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
mode = 0644
context = context =
key project_dir :_profile_base_location_ key project_dir :_profile_base_location_
key software_dir buildout:directory key software_dir buildout:directory
...@@ -47,7 +46,7 @@ context = ...@@ -47,7 +46,7 @@ context =
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
key thin_provisioning_tools thin-provisioning-tools:location key thin_provisioning_tools thin-provisioning-tools:location
key monitor_template monitor2-template:rendered key monitor_template monitor2-template:output
[thin-provisioning-tools] [thin-provisioning-tools]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[instance-common] [instance-common]
filename = instance-common.cfg.in filename = instance-common.cfg.in
md5sum = 2bd1779425b7561682c0de5496d808ed md5sum = 402d09fbe2927f4f744ad6c0dc4329b9
[root-common] [root-common]
filename = root-common.cfg.in filename = root-common.cfg.in
...@@ -30,7 +30,7 @@ md5sum = 9f27195d770b2f57461c60a82c851ab9 ...@@ -30,7 +30,7 @@ md5sum = 9f27195d770b2f57461c60a82c851ab9
[instance-neo] [instance-neo]
filename = instance-neo.cfg.in filename = instance-neo.cfg.in
md5sum = 74e0361f3ec3424c905acc4cd55fd8bf md5sum = 03a6c72619b02f5100fa7ccc8dc0e5ea
[template-neo-my-cnf] [template-neo-my-cnf]
filename = my.cnf.in filename = my.cnf.in
...@@ -38,7 +38,7 @@ md5sum = a8939dcf440126a30db661b5a0a1bfb7 ...@@ -38,7 +38,7 @@ md5sum = a8939dcf440126a30db661b5a0a1bfb7
[template-neo] [template-neo]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 3c7770c03c51ee12d5a94f0924e98990 md5sum = 78c46af020ebd0ff25a1b474a119695f
[cluster] [cluster]
filename = cluster.cfg.in filename = cluster.cfg.in
......
...@@ -14,7 +14,7 @@ cert = ${slap-connection:cert-file} ...@@ -14,7 +14,7 @@ cert = ${slap-connection:cert-file}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
filename = ${:_buildout_section_name_}.cfg filename = ${:_buildout_section_name_}.cfg
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename} output = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
extensions = extensions =
jinja2.ext.do jinja2.ext.do
jinja2.ext.loopcontrols jinja2.ext.loopcontrols
...@@ -31,18 +31,18 @@ context = ...@@ -31,18 +31,18 @@ context =
[neo-admin] [neo-admin]
<= jinja2-template-base <= jinja2-template-base
template = {{ neo_admin }} url = {{ neo_admin }}
[neo-master] [neo-master]
<= jinja2-template-base <= jinja2-template-base
template = {{ neo_master }} url = {{ neo_master }}
[neo] [neo]
<= jinja2-template-base <= jinja2-template-base
template = {{ neo }} url = {{ neo }}
extra-context = extra-context =
key master_cfg neo-master:rendered key master_cfg neo-master:output
key admin_cfg neo-admin:rendered key admin_cfg neo-admin:output
{%- if mariadb_location is defined %} {%- if mariadb_location is defined %}
raw mariadb_location {{ mariadb_location }} raw mariadb_location {{ mariadb_location }}
raw template_mysqld_wrapper {{ template_mysqld_wrapper }} raw template_mysqld_wrapper {{ template_mysqld_wrapper }}
......
...@@ -13,16 +13,16 @@ ...@@ -13,16 +13,16 @@
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:etc_run}/mariadb wrapper-path = ${directory:etc_run}/mariadb
private-tmpfs = {{ private_tmpfs }} ${my-cnf-parameters:tmp-directory} private-tmpfs = {{ private_tmpfs }} ${my-cnf-parameters:tmp-directory}
command-line = ${mariadb-ns:rendered} command-line = ${mariadb-ns:output}
[mariadb-ns] [mariadb-ns]
rendered = ${directory:bin}/mariadb-ns output = ${directory:bin}/mariadb-ns
{% else -%} {% else -%}
rendered = ${directory:etc_run}/mariadb output = ${directory:etc_run}/mariadb
{% endif -%} {% endif -%}
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_mysqld_wrapper }} url = {{ template_mysqld_wrapper }}
context = context =
key defaults_file my-cnf:rendered key defaults_file my-cnf:output
key datadir my-cnf-parameters:data-directory key datadir my-cnf-parameters:data-directory
[my-cnf-parameters] [my-cnf-parameters]
...@@ -37,19 +37,19 @@ pid-file = ${directory:var_run}/mariadb.pid ...@@ -37,19 +37,19 @@ pid-file = ${directory:var_run}/mariadb.pid
error-log = ${directory:log}/mariadb_error.log error-log = ${directory:log}/mariadb_error.log
slow-query-log = ${directory:log}/mariadb_slowquery.log slow-query-log = ${directory:log}/mariadb_slowquery.log
extra-dict = {{ dumps(slapparameter_dict.get('mysql', {})) }} extra-dict = {{ dumps(slapparameter_dict.get('mysql', {})) }}
init-file = ${init-script:rendered} init-file = ${init-script:output}
engine = {{ slapparameter_dict.get('engine', '') }} engine = {{ slapparameter_dict.get('engine', '') }}
[my-cnf] [my-cnf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do extensions = jinja2.ext.do
rendered = ${directory:etc}/mariadb.cnf output = ${directory:etc}/mariadb.cnf
template = {{ template_neo_my_cnf }} url = {{ template_neo_my_cnf }}
context = section parameter_dict my-cnf-parameters context = section parameter_dict my-cnf-parameters
[binary-wrap-mysql] [binary-wrap-mysql]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = '{{ mariadb_location }}/bin/${:command}' --defaults-file="${my-cnf:rendered}" command-line = '{{ mariadb_location }}/bin/${:command}' --defaults-file="${my-cnf:output}"
wrapper-path = ${directory:bin}/${:command} wrapper-path = ${directory:bin}/${:command}
command = mysql command = mysql
...@@ -89,8 +89,9 @@ admin = ...@@ -89,8 +89,9 @@ admin =
[{{ section(name) }}] [{{ section(name) }}]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${directory:etc}/{{name}} output = ${directory:etc}/{{name}}
template = inline:{{'{{'}}pem}} inline =
{{'{{'}}pem}}
context = key pem :pem context = key pem :pem
pem = {{dumps(pem)}} pem = {{dumps(pem)}}
{%- endif %} {%- endif %}
...@@ -152,10 +153,10 @@ srv = ${buildout:directory}/srv ...@@ -152,10 +153,10 @@ srv = ${buildout:directory}/srv
{% if mysql -%} {% if mysql -%}
[init-script] [init-script]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
# XXX: is there a better location ? # XXX: is there a better location ?
rendered = ${directory:etc}/mariadb_initial_setup.sql output = ${directory:etc}/mariadb_initial_setup.sql
template = inline: inline =
{{ init_list | join('\n\t') }} {{ init_list | join('\n\t') }}
[{{ section('logrotate-mysql') }}] [{{ section('logrotate-mysql') }}]
...@@ -171,14 +172,13 @@ post = ${binary-wrap-mysql:command-line} -e "FLUSH LOGS" ...@@ -171,14 +172,13 @@ post = ${binary-wrap-mysql:command-line} -e "FLUSH LOGS"
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:bin}/${:_buildout_section_name_} wrapper-path = ${directory:bin}/${:_buildout_section_name_}
private-tmpfs = {{ private_tmpfs }} ${directory:tmp} private-tmpfs = {{ private_tmpfs }} ${directory:tmp}
command-line = ${runTestSuite-ns:rendered} command-line = ${runTestSuite-ns:output}
[runTestSuite-ns] [runTestSuite-ns]
{%- endif %} {%- endif %}
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
template = {{ runTestSuite_in }} url = {{ runTestSuite_in }}
mode = 0755
context = context =
section directory directory section directory directory
section my_cnf_parameters my-cnf-parameters section my_cnf_parameters my-cnf-parameters
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
extends = {{ instance_common_cfg }} extends = {{ instance_common_cfg }}
[jinja2-template-base] [jinja2-template-base]
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}.cfg output = ${buildout:parts-directory}/${:_buildout_section_name_}.cfg
[neo-cluster] [neo-cluster]
<= jinja2-template-base <= jinja2-template-base
template = {{ cluster }} url = {{ cluster }}
extra-context = extra-context =
import re re import re re
import urllib_parse six.moves.urllib.parse import urllib_parse six.moves.urllib.parse
...@@ -22,7 +22,7 @@ extra-context += ...@@ -22,7 +22,7 @@ extra-context +=
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
override = {{ dumps(override_switch_softwaretype |default) }} override = {{ dumps(override_switch_softwaretype |default) }}
default = neo-cluster:rendered default = neo-cluster:output
# BBB # BBB
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
neo = neo:rendered neo = neo:output
...@@ -63,8 +63,8 @@ url = ${:_profile_base_location_}/${:filename} ...@@ -63,8 +63,8 @@ url = ${:_profile_base_location_}/${:filename}
# XXX: must be rendered, not just dled # XXX: must be rendered, not just dled
[instance-common] [instance-common]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/${:_buildout_section_name_}.cfg output = ${buildout:directory}/${:_buildout_section_name_}.cfg
context = context =
key bin_directory buildout:bin-directory key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
...@@ -72,12 +72,12 @@ context = ...@@ -72,12 +72,12 @@ context =
key neo_admin instance-neo-admin:target key neo_admin instance-neo-admin:target
key neo_master instance-neo-master:target key neo_master instance-neo-master:target
key neo instance-neo:target key neo instance-neo:target
key template_logrotate_base template-logrotate-base:rendered key template_logrotate_base template-logrotate-base:output
key template_monitor monitor2-template:rendered key template_monitor monitor2-template:output
${:adapter-context} ${:adapter-context}
adapter-context = adapter-context =
key mariadb_location mariadb:location key mariadb_location mariadb:location
key template_mysqld_wrapper template-mysqld-wrapper:rendered key template_mysqld_wrapper template-mysqld-wrapper:output
key template_neo_my_cnf template-neo-my-cnf:target key template_neo_my_cnf template-neo-my-cnf:target
[root-common] [root-common]
...@@ -96,11 +96,10 @@ adapter-context = ...@@ -96,11 +96,10 @@ adapter-context =
<= download-base-neo <= download-base-neo
[template-mysqld-wrapper] [template-mysqld-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/mysqld.in output = ${buildout:parts-directory}/${:_buildout_section_name_}/mysqld.in
mode = 644 inline =
template = #!/bin/sh -e
inline:{% raw %}#!/bin/sh -e
basedir='${mariadb:location}' basedir='${mariadb:location}'
datadir='{{datadir}}' datadir='{{datadir}}'
marker=$datadir/.slapos_initializing marker=$datadir/.slapos_initializing
...@@ -121,7 +120,6 @@ template = ...@@ -121,7 +120,6 @@ template =
{%- endfor %} {%- endfor %}
{%- endif %} {%- endif %}
exec "$basedir/bin/mysqld" --defaults-file='{{defaults_file}}' "$@" exec "$basedir/bin/mysqld" --defaults-file='{{defaults_file}}' "$@"
{% endraw %}
[versions] [versions]
coverage = 4.5.1 coverage = 4.5.1
......
...@@ -10,12 +10,12 @@ parts += ...@@ -10,12 +10,12 @@ parts +=
[template-neo] [template-neo]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
context = context =
key cluster cluster:target key cluster cluster:target
key instance_common_cfg instance-common:rendered key instance_common_cfg instance-common:output
key root_common root-common:target key root_common root-common:target
key runTestSuite_in runTestSuite.in:target key runTestSuite_in runTestSuite.in:target
${instance-common:adapter-context} ${instance-common:adapter-context}
......
...@@ -10,9 +10,8 @@ parts = ...@@ -10,9 +10,8 @@ parts =
[template] [template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
template = inline =[buildout]
inline:[buildout]
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
parts = runTestSuite parts = runTestSuite
...@@ -28,9 +27,8 @@ template = ...@@ -28,9 +27,8 @@ template =
bin = $${buildout:directory}/bin bin = $${buildout:directory}/bin
[runTestSuite] [runTestSuite]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/$${:_buildout_section_name_} output = $${directory:bin}/$${:_buildout_section_name_}
template = ${:_profile_base_location_}/$${:_buildout_section_name_}.in url = ${:_profile_base_location_}/$${:_buildout_section_name_}.in
mode = 0755
context = context =
section buildout buildout section buildout buildout
section parameter_dict runTestSuite-parameters section parameter_dict runTestSuite-parameters
......
...@@ -93,9 +93,9 @@ mode = 0755 ...@@ -93,9 +93,9 @@ mode = 0755
# instance to run nxdtest. # instance to run nxdtest.
[instance.cfg] [instance.cfg]
<= jinja2-template <= jinja2-template
template = inline: inline =
[buildout] [buildout]
extends = ${nxdtest-instance.cfg:rendered} extends = ${nxdtest-instance.cfg:output}
parts += tnxdtest parts += tnxdtest
[runTestSuite] [runTestSuite]
......
...@@ -26,4 +26,4 @@ md5sum = 6f42f0a8c5e5c0c657541a65c4d9ee57 ...@@ -26,4 +26,4 @@ md5sum = 6f42f0a8c5e5c0c657541a65c4d9ee57
[template-nextcloud-instance] [template-nextcloud-instance]
filename = nextcloud-instance.cfg.in filename = nextcloud-instance.cfg.in
md5sum = 05f946a6523677e5dcf80e9fad230d1c md5sum = 495b1693e451f6c5044c67ce5f1194fe
...@@ -43,7 +43,7 @@ rotate-num = 30 ...@@ -43,7 +43,7 @@ rotate-num = 30
nextcloud = ${:document-root} nextcloud = ${:document-root}
admin-user = admin admin-user = admin
admin-password = admin admin-password = admin
trusted-domain-list = trusted-domain-list =
[${apache-php-configuration:ip}]:${apache-php-configuration:port} [${apache-php-configuration:ip}]:${apache-php-configuration:port}
${slap-parameter:instance.trusted-domain-1} ${slap-parameter:instance.trusted-domain-1}
${slap-parameter:instance.trusted-domain-2} ${slap-parameter:instance.trusted-domain-2}
...@@ -82,12 +82,11 @@ turn-secret = ${slap-parameter:instance.turn-secret} ...@@ -82,12 +82,11 @@ turn-secret = ${slap-parameter:instance.turn-secret}
[nextcloud-install.sh] [nextcloud-install.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ nextcloud_install_sh }} url = {{ nextcloud_install_sh }}
rendered = ${directory:scripts}/nextcloud-install output = ${directory:scripts}/nextcloud-install
context = context =
section parameter_dict instance-parameter section parameter_dict instance-parameter
section nextcloud_apps nextcloud-apps section nextcloud_apps nextcloud-apps
mode = 744
depends = depends =
${service-redis:recipe} ${service-redis:recipe}
${redis-promise:recipe} ${redis-promise:recipe}
...@@ -122,11 +121,10 @@ mode = 744 ...@@ -122,11 +121,10 @@ mode = 744
[nextcloud-apache-httpd] [nextcloud-apache-httpd]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ nextcloud_apache_httpd }} url = {{ nextcloud_apache_httpd }}
rendered = ${directory:apache.d}/nextcloud.conf output = ${directory:apache.d}/nextcloud.conf
context = context =
section parameter_dict apache-php-configuration section parameter_dict apache-php-configuration
mode = 744
[nextcloud-cron] [nextcloud-cron]
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
...@@ -176,19 +174,18 @@ recipe = collective.recipe.template ...@@ -176,19 +174,18 @@ recipe = collective.recipe.template
input = inline:#!/bin/sh input = inline:#!/bin/sh
cd {{ news_updater_location }} cd {{ news_updater_location }}
export PATH={{ php_location }}/bin:$PATH export PATH={{ php_location }}/bin:$PATH
{{ python3_location}}/bin/python3 -m nextcloud_news_updater --phpini ${php.ini-conf:rendered} \ {{ python3_location}}/bin/python3 -m nextcloud_news_updater --phpini ${php.ini-conf:output} \
--interval 300 --mode endless --loglevel info ${instance-parameter:nextcloud} --interval 300 --mode endless --loglevel info ${instance-parameter:nextcloud}
output = ${directory:scripts}/nextcloud-news-updater output = ${directory:scripts}/nextcloud-news-updater
mode = 744 mode = 744
[nextcloud-config.json] [nextcloud-config.json]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ nextcloud_parameter_json }} url = {{ nextcloud_parameter_json }}
rendered = ${directory:etc}/nextcloud-config.json output = ${directory:etc}/nextcloud-config.json
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section parameter_dict instance-parameter section parameter_dict instance-parameter
mode = 600
[nextcloud-config-update] [nextcloud-config-update]
output = ${directory:scripts}/nextcloud-update output = ${directory:scripts}/nextcloud-update
...@@ -198,13 +195,13 @@ input = inline:#!/bin/sh ...@@ -198,13 +195,13 @@ input = inline:#!/bin/sh
# do not run this script if nextcloud is not installed yet. # do not run this script if nextcloud is not installed yet.
exit 1; exit 1;
fi fi
${php-bin:wrapper-path} ${instance-parameter:nextcloud}/occ config:import ${nextcloud-config.json:rendered} ${php-bin:wrapper-path} ${instance-parameter:nextcloud}/occ config:import ${nextcloud-config.json:output}
mode = 744 mode = 744
[php-bin] [php-bin]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:bin}/php wrapper-path = ${directory:bin}/php
command-line = ${instance-parameter:php-bin} -c ${php.ini-conf:rendered} command-line = ${instance-parameter:php-bin} -c ${php.ini-conf:output}
[publish-connection-information] [publish-connection-information]
admin-user = ${instance-parameter:admin-user} admin-user = ${instance-parameter:admin-user}
......
...@@ -23,8 +23,8 @@ md5sum = d81902d2dec5d547779bec6336a438be ...@@ -23,8 +23,8 @@ md5sum = d81902d2dec5d547779bec6336a438be
[template-nextcloud-instance] [template-nextcloud-instance]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance-nextcloud.cfg output = ${buildout:directory}/instance-nextcloud.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
key gzip_location gzip:location key gzip_location gzip:location
...@@ -39,7 +39,7 @@ context = ...@@ -39,7 +39,7 @@ context =
section nextcloud_apps nextcloud-apps section nextcloud_apps nextcloud-apps
[custom-application-deployment] [custom-application-deployment]
path = ${template-nextcloud-instance:rendered} path = ${template-nextcloud-instance:output}
part-list = nextcloud-install.sh part-list = nextcloud-install.sh
[nc-download-unpacked] [nc-download-unpacked]
......
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 87fd83d33ba786550a45f484b3ae2b24 md5sum = 6482b6aea742357350f0d7e350f9baa6
[template-nginx-configuration] [template-nginx-configuration]
filename = template-nginx.cfg.in filename = template-nginx.cfg.in
......
...@@ -6,7 +6,7 @@ parts = ...@@ -6,7 +6,7 @@ parts =
logrotate-entry-nginx logrotate-entry-nginx
promises promises
publish-connection-information publish-connection-information
extends = ${monitor-template:rendered} extends = ${monitor-template:output}
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
...@@ -46,7 +46,6 @@ command-line = ...@@ -46,7 +46,6 @@ command-line =
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-nginx-configuration:output} url = ${template-nginx-configuration:output}
output = $${directory:etc}/nginx.cfg output = $${directory:etc}/nginx.cfg
mode = 0600
access-log = $${directory:log}/nginx-access.log access-log = $${directory:log}/nginx-access.log
error-log = $${directory:log}/nginx-error.log error-log = $${directory:log}/nginx-error.log
pid-file = $${directory:run}/nginx.pid pid-file = $${directory:run}/nginx.pid
......
...@@ -19,10 +19,8 @@ part = python3 ...@@ -19,10 +19,8 @@ part = python3
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644
[template-nginx-configuration] [template-nginx-configuration]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template-nginx.cfg.in output = ${buildout:directory}/template-nginx.cfg.in
mode = 0644
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = 6ea4fa210a91c15278c847a809de5991 md5sum = cdda32a8e0b4a5037b5d42fe53a32fe6
[template-lte-enb-epc] [template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg _update_hash_filename_ = instance-enb-epc.jinja2.cfg
...@@ -24,7 +24,7 @@ md5sum = 1358f8e0a4cecefe4cdf389b69067f34 ...@@ -24,7 +24,7 @@ md5sum = 1358f8e0a4cecefe4cdf389b69067f34
[template-lte-enb] [template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = e4c224da723ad56091f27ed5c0b0bbca md5sum = 71ca45e186afbc3be8e6d6f541142bf7
[template-lte-gnb-epc] [template-lte-gnb-epc]
_update_hash_filename_ = instance-gnb-epc.jinja2.cfg _update_hash_filename_ = instance-gnb-epc.jinja2.cfg
...@@ -32,11 +32,11 @@ md5sum = b15e678779dee0a26746487990fedc01 ...@@ -32,11 +32,11 @@ md5sum = b15e678779dee0a26746487990fedc01
[template-lte-gnb] [template-lte-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg _update_hash_filename_ = instance-gnb.jinja2.cfg
md5sum = 9c275dde5c485c05f92a9be053f10593 md5sum = b1bb29784c9f71ab0dd41e5cd9970784
[template-lte-epc] [template-lte-epc]
_update_hash_filename_ = instance-epc.jinja2.cfg _update_hash_filename_ = instance-epc.jinja2.cfg
md5sum = 35556ebd82be804584482a7fe5eff0be md5sum = 7266e97e2aad20c4c224e1663139535b
[ue_db.jinja2.cfg] [ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg filename = config/ue_db.jinja2.cfg
......
...@@ -53,9 +53,8 @@ log = ${:var}/log ...@@ -53,9 +53,8 @@ log = ${:var}/log
[ltelogs] [ltelogs]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ ltelogs_template }} url = {{ ltelogs_template }}
rendered = ${directory:home}/ltelogs.sh output = ${directory:home}/ltelogs.sh
mode = 0775
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section directory directory section directory directory
...@@ -69,33 +68,31 @@ offline = false ...@@ -69,33 +68,31 @@ offline = false
{% endif %} {% endif %}
[lte-enb-sh-wrapper] [lte-enb-sh-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
mode = 0700 inline =
template = #!/bin/sh
inline:#!/bin/sh
sudo /opt/amarisoft/rm-tmp-lte | true; sudo /opt/amarisoft/rm-tmp-lte | true;
{{ enb }}/lteenb ${directory:etc}/enb.cfg >> ${directory:log}/enb-output.cfg 2>> ${directory:log}/enb-output.cfg {{ enb }}/lteenb ${directory:etc}/enb.cfg >> ${directory:log}/enb-output.cfg 2>> ${directory:log}/enb-output.cfg
### eNodeB (enb) ### eNodeB (enb)
[lte-enb-service] [lte-enb-service]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
init = ${ltelogs:rendered} ${directory:log}/enb.log; sleep 2 init = ${ltelogs:output} ${directory:log}/enb.log; sleep 2
command-line = ${lte-enb-sh-wrapper:rendered} command-line = ${lte-enb-sh-wrapper:output}
wrapper-path = ${directory:service}/lte-enb wrapper-path = ${directory:service}/lte-enb
mode = 0775 mode = 0775
reserve-cpu = True reserve-cpu = True
pidfile = ${directory:run}/enb.pid pidfile = ${directory:run}/enb.pid
hash-files = hash-files =
${lte-enb-config:rendered} ${lte-enb-config:output}
${lte-enb-sh-wrapper:rendered} ${lte-enb-sh-wrapper:output}
environment = environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib LD_LIBRARY_PATH={{ openssl_location }}/lib
AMARISOFT_PATH=/opt/amarisoft/.amarisoft AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[config-base] [config-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 0664
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section directory directory section directory directory
...@@ -107,11 +104,11 @@ context = ...@@ -107,11 +104,11 @@ context =
[lte-enb-config] [lte-enb-config]
<= config-base <= config-base
{% if slapparameter_dict.get("enb_config_link", None) %} {% if slapparameter_dict.get("enb_config_link", None) %}
template = ${enb-config-dl:target} url = ${enb-config-dl:target}
{% else %} {% else %}
template = {{ enb_template }} url = {{ enb_template }}
{% endif %} {% endif %}
rendered = ${directory:etc}/enb.cfg output = ${directory:etc}/enb.cfg
[publish-connection-information] [publish-connection-information]
<= monitor-publish <= monitor-publish
......
...@@ -51,9 +51,8 @@ log = ${:var}/log ...@@ -51,9 +51,8 @@ log = ${:var}/log
[ltelogs] [ltelogs]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ ltelogs_template }} url = {{ ltelogs_template }}
rendered = ${directory:home}/ltelogs.sh output = ${directory:home}/ltelogs.sh
mode = 0775
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section directory directory section directory directory
...@@ -69,22 +68,21 @@ offline = false ...@@ -69,22 +68,21 @@ offline = false
### IMS ### IMS
[lte-ims-service] [lte-ims-service]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
init = ${ltelogs:rendered} ${directory:log}/ims.log; sleep 1 init = ${ltelogs:output} ${directory:log}/ims.log; sleep 1
command-line = {{ mme }}/lteims ${directory:etc}/ims.cfg command-line = {{ mme }}/lteims ${directory:etc}/ims.cfg
wrapper-path = ${directory:service}/lte-ims wrapper-path = ${directory:service}/lte-ims
mode = 0775 mode = 0775
pidfile = ${directory:run}/ims.pid pidfile = ${directory:run}/ims.pid
hash-files = hash-files =
${lte-ims-config:rendered} ${lte-ims-config:output}
{{ ue_db_path }} {{ ue_db_path }}
environment = AMARISOFT_PATH=/opt/amarisoft/.amarisoft environment = AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[lte-mme-sh-wrapper] [lte-mme-sh-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
mode = 0700 inline =
template = #!/bin/sh
inline:#!/bin/sh
rm -f ${directory:var}/lte_ue.db; rm -f ${directory:var}/lte_ue.db;
{{ mme }}/ltemme ${directory:etc}/mme.cfg >> ${directory:log}/mme-output.cfg 2>> ${directory:log}/mme-output.cfg {{ mme }}/ltemme ${directory:etc}/mme.cfg >> ${directory:log}/mme-output.cfg 2>> ${directory:log}/mme-output.cfg
...@@ -93,15 +91,15 @@ template = ...@@ -93,15 +91,15 @@ template =
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
# When the machine shutdowns abruptly, lte_ue is not cleaned up which causes # When the machine shutdowns abruptly, lte_ue is not cleaned up which causes
# amarisoft ltemme to fail. TODO: find a cleaner way to handle this # amarisoft ltemme to fail. TODO: find a cleaner way to handle this
init = ${ltelogs:rendered} ${directory:log}/mme.log init = ${ltelogs:output} ${directory:log}/mme.log
command-line = ${lte-mme-sh-wrapper:rendered} command-line = ${lte-mme-sh-wrapper:output}
wrapper-path = ${directory:service}/lte-mme wrapper-path = ${directory:service}/lte-mme
mode = 0775 mode = 0775
pidfile = ${directory:run}/mme.pid pidfile = ${directory:run}/mme.pid
hash-files = hash-files =
${lte-mme-config:rendered} ${lte-mme-config:output}
{{ ue_db_path }} {{ ue_db_path }}
${lte-mme-sh-wrapper:rendered} ${lte-mme-sh-wrapper:output}
environment = environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib:{{ nghttp2_location }}/lib LD_LIBRARY_PATH={{ openssl_location }}/lib:{{ nghttp2_location }}/lib
AMARISOFT_PATH=/opt/amarisoft/.amarisoft AMARISOFT_PATH=/opt/amarisoft/.amarisoft
...@@ -115,7 +113,6 @@ mode = 775 ...@@ -115,7 +113,6 @@ mode = 775
[config-base] [config-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 0664
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section directory directory section directory directory
...@@ -125,17 +122,17 @@ context = ...@@ -125,17 +122,17 @@ context =
[lte-ims-config] [lte-ims-config]
<= config-base <= config-base
template = {{ ims_template }} url = {{ ims_template }}
rendered = ${directory:etc}/ims.cfg output = ${directory:etc}/ims.cfg
[lte-mme-config] [lte-mme-config]
<= config-base <= config-base
{% if slapparameter_dict.get("mme_config_link", None) %} {% if slapparameter_dict.get("mme_config_link", None) %}
template = ${mme-config-dl:target} url = ${mme-config-dl:target}
{% else %} {% else %}
template = {{ mme_template }} url = {{ mme_template }}
{% endif %} {% endif %}
rendered = ${directory:etc}/mme.cfg output = ${directory:etc}/mme.cfg
context = context =
section directory directory section directory directory
section slap_configuration slap-configuration section slap_configuration slap-configuration
......
...@@ -60,9 +60,8 @@ log = ${:var}/log ...@@ -60,9 +60,8 @@ log = ${:var}/log
[ltelogs] [ltelogs]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ ltelogs_template }} url = {{ ltelogs_template }}
rendered = ${directory:home}/ltelogs.sh output = ${directory:home}/ltelogs.sh
mode = 0775
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section directory directory section directory directory
...@@ -76,33 +75,31 @@ offline = false ...@@ -76,33 +75,31 @@ offline = false
{% endif %} {% endif %}
[lte-enb-sh-wrapper] [lte-enb-sh-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
mode = 0700 inline =
template = #!/bin/sh
inline:#!/bin/sh
sudo /opt/amarisoft/rm-tmp-lte | true; sudo /opt/amarisoft/rm-tmp-lte | true;
{{ enb }}/lteenb ${directory:etc}/gnb.cfg >> ${directory:log}/gnb-output.cfg 2>> ${directory:log}/gnb-output.cfg {{ enb }}/lteenb ${directory:etc}/gnb.cfg >> ${directory:log}/gnb-output.cfg 2>> ${directory:log}/gnb-output.cfg
### eNodeB (enb) ### eNodeB (enb)
[lte-enb-service] [lte-enb-service]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
init = ${ltelogs:rendered} ${directory:log}/enb.log; sleep 2 init = ${ltelogs:output} ${directory:log}/enb.log; sleep 2
command-line = ${lte-enb-sh-wrapper:rendered} command-line = ${lte-enb-sh-wrapper:output}
wrapper-path = ${directory:service}/lte-enb wrapper-path = ${directory:service}/lte-enb
mode = 0775 mode = 0775
reserve-cpu = True reserve-cpu = True
pidfile = ${directory:run}/enb.pid pidfile = ${directory:run}/enb.pid
hash-files = hash-files =
${lte-gnb-config:rendered} ${lte-gnb-config:output}
${lte-enb-sh-wrapper:rendered} ${lte-enb-sh-wrapper:output}
environment = environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib LD_LIBRARY_PATH={{ openssl_location }}/lib
AMARISOFT_PATH=/opt/amarisoft/.amarisoft AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[config-base] [config-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 0664
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section directory directory section directory directory
...@@ -114,11 +111,11 @@ context = ...@@ -114,11 +111,11 @@ context =
[lte-gnb-config] [lte-gnb-config]
<= config-base <= config-base
{% if slapparameter_dict.get("gnb_config_link", None) %} {% if slapparameter_dict.get("gnb_config_link", None) %}
template = ${gnb-config-dl:target} url = ${gnb-config-dl:target}
{% else %} {% else %}
template = {{ gnb_template }} url = {{ gnb_template }}
{% endif %} {% endif %}
rendered = ${directory:etc}/gnb.cfg output = ${directory:etc}/gnb.cfg
[publish-connection-information] [publish-connection-information]
<= monitor-publish <= monitor-publish
......
...@@ -16,7 +16,7 @@ cert = $${slap-connection:cert-file} ...@@ -16,7 +16,7 @@ cert = $${slap-connection:cert-file}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/$${:filename} output = $${buildout:directory}/$${:filename}
extra-context = extra-context =
context = context =
import json_module json import json_module json
...@@ -29,11 +29,11 @@ context = ...@@ -29,11 +29,11 @@ context =
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
enb-epc = dynamic-template-lte-enb-epc:rendered enb-epc = dynamic-template-lte-enb-epc:output
gnb-epc = dynamic-template-lte-gnb-epc:rendered gnb-epc = dynamic-template-lte-gnb-epc:output
enb = dynamic-template-lte-enb:rendered enb = dynamic-template-lte-enb:output
gnb = dynamic-template-lte-gnb:rendered gnb = dynamic-template-lte-gnb:output
epc = dynamic-template-lte-epc:rendered epc = dynamic-template-lte-epc:output
RootSoftwareInstance = $${:enb-epc} RootSoftwareInstance = $${:enb-epc}
[local-ipv4-address] [local-ipv4-address]
...@@ -52,29 +52,29 @@ init = ...@@ -52,29 +52,29 @@ init =
[dynamic-template-lte-enb-epc] [dynamic-template-lte-enb-epc]
< = jinja2-template-base < = jinja2-template-base
template = ${template-lte-enb-epc:target} url = ${template-lte-enb-epc:target}
filename = instance-lte-enb-epc.cfg filename = instance-lte-enb-epc.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
raw monitor_template ${monitor2-template:rendered} raw monitor_template ${monitor2-template:output}
key local_ipv4 local-ipv4-address:local-ipv4 key local_ipv4 local-ipv4-address:local-ipv4
[dynamic-template-lte-gnb-epc] [dynamic-template-lte-gnb-epc]
< = jinja2-template-base < = jinja2-template-base
template = ${template-lte-gnb-epc:target} url = ${template-lte-gnb-epc:target}
filename = instance-lte-gnb-epc.cfg filename = instance-lte-gnb-epc.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
raw monitor_template ${monitor2-template:rendered} raw monitor_template ${monitor2-template:output}
key local_ipv4 local-ipv4-address:local-ipv4 key local_ipv4 local-ipv4-address:local-ipv4
[dynamic-template-lte-enb] [dynamic-template-lte-enb]
< = jinja2-template-base < = jinja2-template-base
template = ${template-lte-enb:target} url = ${template-lte-enb:target}
filename = instance-lte-enb.cfg filename = instance-lte-enb.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
raw monitor_template ${monitor2-template:rendered} raw monitor_template ${monitor2-template:output}
raw enb ${enb:destination} raw enb ${enb:destination}
raw enb_template ${enb.jinja2.cfg:target} raw enb_template ${enb.jinja2.cfg:target}
raw ltelogs_template ${ltelogs.jinja2.sh:target} raw ltelogs_template ${ltelogs.jinja2.sh:target}
...@@ -92,11 +92,11 @@ extra-context = ...@@ -92,11 +92,11 @@ extra-context =
[dynamic-template-lte-gnb] [dynamic-template-lte-gnb]
< = jinja2-template-base < = jinja2-template-base
template = ${template-lte-gnb:target} url = ${template-lte-gnb:target}
filename = instance-lte-gnb.cfg filename = instance-lte-gnb.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
raw monitor_template ${monitor2-template:rendered} raw monitor_template ${monitor2-template:output}
raw enb ${enb:destination} raw enb ${enb:destination}
raw gnb_template ${gnb.jinja2.cfg:target} raw gnb_template ${gnb.jinja2.cfg:target}
raw ltelogs_template ${ltelogs.jinja2.sh:target} raw ltelogs_template ${ltelogs.jinja2.sh:target}
...@@ -114,11 +114,11 @@ extra-context = ...@@ -114,11 +114,11 @@ extra-context =
[dynamic-template-lte-epc] [dynamic-template-lte-epc]
< = jinja2-template-base < = jinja2-template-base
template = ${template-lte-epc:target} url = ${template-lte-epc:target}
filename = instance-lte-epc.cfg filename = instance-lte-epc.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
raw monitor_template ${monitor2-template:rendered} raw monitor_template ${monitor2-template:output}
raw interface_up_promise ${interface-up-promise:target} raw interface_up_promise ${interface-up-promise:target}
raw mme ${mme:destination} raw mme ${mme:destination}
raw mme_template ${mme.jinja2.cfg:target} raw mme_template ${mme.jinja2.cfg:target}
...@@ -126,13 +126,13 @@ extra-context = ...@@ -126,13 +126,13 @@ extra-context =
raw ltelogs_template ${ltelogs.jinja2.sh:target} raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw openssl_location ${openssl:location} raw openssl_location ${openssl:location}
raw nghttp2_location ${nghttp2:location} raw nghttp2_location ${nghttp2:location}
key ue_db_path ue-db-config:rendered key ue_db_path ue-db-config:output
[ue-db-config] [ue-db-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${ue_db.jinja2.cfg:target} url = ${ue_db.jinja2.cfg:target}
filename = ue_db.cfg filename = ue_db.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
rendered = $${buildout:directory}/$${:filename} output = $${buildout:directory}/$${:filename}
context = context =
key slave_instance_list slap-configuration:slave-instance-list key slave_instance_list slap-configuration:slave-instance-list
...@@ -28,7 +28,6 @@ parts += ...@@ -28,7 +28,6 @@ parts +=
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644
[download-base] [download-base]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
...@@ -58,7 +57,7 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_} ...@@ -58,7 +57,7 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
[amarisoft] [amarisoft]
recipe = slapos.recipe.build recipe = slapos.recipe.build
path = /opt/amarisoft/lte path = /opt/amarisoft/lte
init = init =
import os import os
options['lte-version'] = os.readlink(options["path"])[:-1] options['lte-version'] = os.readlink(options["path"])[:-1]
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = de38ed0348a9d50e01dbf383a661d53e md5sum = 51597d8161458028ea8b46962d378a70
[tomcat-server-xml] [tomcat-server-xml]
filename = server.xml.in filename = server.xml.in
......
...@@ -7,12 +7,12 @@ eggs-directory = ${buildout:eggs-directory} ...@@ -7,12 +7,12 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
extends = ${monitor2-template:rendered} extends = ${monitor2-template:output}
[fontconfig-conf] [fontconfig-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-fonts-conf:output} url = ${template-fonts-conf:output}
rendered = $${directory:etc}/fonts.conf output = $${directory:etc}/fonts.conf
context = context =
key cachedir directory:fontconfig-cache key cachedir directory:fontconfig-cache
key fonts :fonts key fonts :fonts
...@@ -62,7 +62,7 @@ environment = ...@@ -62,7 +62,7 @@ environment =
JRE_HOME=${java-re-8:location} JRE_HOME=${java-re-8:location}
CATALINA_BASE=$${directory:catalina_base} CATALINA_BASE=$${directory:catalina_base}
GRAPHVIZ_DOT=${graphviz:location}/bin/dot GRAPHVIZ_DOT=${graphviz:location}/bin/dot
FONTCONFIG_FILE=$${fontconfig-conf:rendered} FONTCONFIG_FILE=$${fontconfig-conf:output}
LD_LIBRARY_PATH=${fontconfig:location}/lib:${freetype:location}/lib LD_LIBRARY_PATH=${fontconfig:location}/lib:${freetype:location}/lib
# XXX java is still loading system fonts ... ( even with $JAVA_FONTS or -Djava.awt.fonts ) # XXX java is still loading system fonts ... ( even with $JAVA_FONTS or -Djava.awt.fonts )
# related links: # related links:
......
[buildout] [buildout]
extends = extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
../../component/postgresql/buildout.cfg ../../component/postgresql/buildout.cfg
...@@ -18,4 +18,3 @@ recipe = slapos.recipe.template ...@@ -18,4 +18,3 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
md5sum = d8b833a2054b82b6031a9420008b58fd md5sum = d8b833a2054b82b6031a9420008b58fd
mode = 0644
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = fddea033e1aa9d6147a1a47bd7cc4b62 md5sum = 2f812f4814a0cc78a8b96d8014ac3104
[template-powerdns] [template-powerdns]
filename = instance-powerdns.cfg filename = instance-powerdns.cfg
md5sum = a6fcfcef942cd9b57c2b0c69e318362c md5sum = 3aab17e4228bd33a9d25d9a8910ffa5c
[template-pdns-configuration] [template-pdns-configuration]
_update_hash_filename_ = template/pdns.conf.jinja2 _update_hash_filename_ = template/pdns.conf.jinja2
...@@ -26,7 +26,7 @@ md5sum = 851353e1d4dd562ace58b3345c2da515 ...@@ -26,7 +26,7 @@ md5sum = 851353e1d4dd562ace58b3345c2da515
[template-dns-replicate] [template-dns-replicate]
_update_hash_filename_ = instance-powerdns-replicate.cfg.jinja2 _update_hash_filename_ = instance-powerdns-replicate.cfg.jinja2
md5sum = 5b4b46136c6547c27508c4789ac5d0ee md5sum = f0a127e858f49beff4a5fcd2e71c088d
[iso-list] [iso-list]
_update_hash_filename_ = template/zz.countries.nexedi.dk.rbldnsd _update_hash_filename_ = template/zz.countries.nexedi.dk.rbldnsd
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
extra-context = extra-context =
context = context =
import json_module json import json_module json
......
...@@ -8,7 +8,7 @@ bin = $${buildout:directory}/bin/ ...@@ -8,7 +8,7 @@ bin = $${buildout:directory}/bin/
etc = $${buildout:directory}/etc/ etc = $${buildout:directory}/etc/
srv = $${buildout:directory}/srv/ srv = $${buildout:directory}/srv/
var = $${buildout:directory}/var/ var = $${buildout:directory}/var/
template = $${buildout:directory}/template/ url = $${buildout:directory}/template/
backup = $${:srv}/backup backup = $${:srv}/backup
log = $${:var}/log log = $${:var}/log
...@@ -39,7 +39,7 @@ cert = $${slap-connection:cert-file} ...@@ -39,7 +39,7 @@ cert = $${slap-connection:cert-file}
# Generic jinja section to extend # Generic jinja section to extend
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/$${:filename} output = $${buildout:directory}/$${:filename}
extra-context = extra-context =
context = context =
import json_module json import json_module json
...@@ -62,7 +62,7 @@ socket-directory = $${pdns-directory:socket-directory} ...@@ -62,7 +62,7 @@ socket-directory = $${pdns-directory:socket-directory}
webserver-port = 8088 webserver-port = 8088
[geo] [geo]
zones-file = $${zones-file-template:rendered} zones-file = $${zones-file-template:output}
database = ${geolite2-country:location}/GeoLite2-Country.mmdb database = ${geolite2-country:location}/GeoLite2-Country.mmdb
[pdns-directory] [pdns-directory]
...@@ -72,8 +72,8 @@ socket-directory = $${directory:run}/ ...@@ -72,8 +72,8 @@ socket-directory = $${directory:run}/
[pdns-configuration-template] [pdns-configuration-template]
< = jinja2-template-base < = jinja2-template-base
template = ${template-pdns-configuration:target} url = ${template-pdns-configuration:target}
rendered = $${pdns:configuration} output = $${pdns:configuration}
extra-context = extra-context =
section pdns pdns section pdns pdns
section geo geo section geo geo
...@@ -104,9 +104,9 @@ init = ...@@ -104,9 +104,9 @@ init =
[zones-file-template] [zones-file-template]
< = jinja2-template-base < = jinja2-template-base
template = ${template-zones-file:target} url = ${template-zones-file:target}
extensions = jinja2.ext.do extensions = jinja2.ext.do
rendered = $${pdns-directory:configuration}/zones-file.yml output = $${pdns-directory:configuration}/zones-file.yml
extra-context = extra-context =
section asia asia section asia asia
key china china:ip-split key china china:ip-split
...@@ -126,11 +126,11 @@ wrapper-path = $${directory:etc-run}/pdns-reload ...@@ -126,11 +126,11 @@ wrapper-path = $${directory:etc-run}/pdns-reload
# Port redirection # Port redirection
[port-redirection] [port-redirection]
<= jinja2-template-base <= jinja2-template-base
template = inline: inline =
{%- raw %} {%- raw %}
[{"srcPort": 53, "destPort": {{ pdns['port'] }}}] [{"srcPort": 53, "destPort": {{ pdns['port'] }}}]
{% endraw -%} {% endraw -%}
rendered = $${buildout:directory}/.slapos-port-redirect output = $${buildout:directory}/.slapos-port-redirect
extra-context = extra-context =
section pdns pdns section pdns pdns
......
...@@ -9,15 +9,15 @@ offline = true ...@@ -9,15 +9,15 @@ offline = true
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = dynamic-powerdns-replicate:rendered default = dynamic-powerdns-replicate:output
single-default = dynamic-template-powerdns:rendered single-default = dynamic-template-powerdns:output
# BBB # BBB
RootSoftwareInstance = $${:default} RootSoftwareInstance = $${:default}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/$${:filename} output = $${buildout:directory}/$${:filename}
extra-context = extra-context =
context = context =
import json_module json import json_module json
...@@ -30,7 +30,7 @@ context = ...@@ -30,7 +30,7 @@ context =
[dynamic-template-powerdns] [dynamic-template-powerdns]
< = jinja2-template-base < = jinja2-template-base
template = ${template-powerdns:output} url = ${template-powerdns:output}
filename = instance-powerdns.cfg filename = instance-powerdns.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
...@@ -39,13 +39,13 @@ extra-context = ...@@ -39,13 +39,13 @@ extra-context =
[dynamic-powerdns-replicate] [dynamic-powerdns-replicate]
< = jinja2-template-base < = jinja2-template-base
template = ${template-dns-replicate:target} url = ${template-dns-replicate:target}
filename = instance-powerdns-replicate.cfg filename = instance-powerdns-replicate.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
# Must match the key id in [switch-softwaretype] which uses this section. # Must match the key id in [switch-softwaretype] which uses this section.
raw software_type RootSoftwareInstance-default raw software_type RootSoftwareInstance-default
raw template_monitor ${monitor2-template:rendered} raw template_monitor ${monitor2-template:output}
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration recipe = slapos.cookbook:slapconfiguration
......
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = b62dd8dd89ef6627ebac20987a89a069 md5sum = 39cdfbd3bdfcd48eddb4132ff9dcda62
[instance-default] [instance-default]
filename = instance-default.cfg.in filename = instance-default.cfg.in
md5sum = 16d592805c6c1756e54924242148ba85 md5sum = 6b8ab50d49136291024c8327aa0931e9
[proftpd-config-file] [proftpd-config-file]
filename = proftpd-config-file.cfg.in filename = proftpd-config-file.cfg.in
......
...@@ -38,9 +38,8 @@ ssh-authorized-keys-dir = ${:etc}/authorized_keys/ ...@@ -38,9 +38,8 @@ ssh-authorized-keys-dir = ${:etc}/authorized_keys/
[config-file] [config-file]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ software_parts_directory }}/${:_buildout_section_name_}/${:_buildout_section_name_}.cfg.in url = {{ software_parts_directory }}/${:_buildout_section_name_}/${:_buildout_section_name_}.cfg.in
rendered = ${directory:etc}/${:_buildout_section_name_}.cfg output = ${directory:etc}/${:_buildout_section_name_}.cfg
mode = 0644
extensions = jinja2.ext.do extensions = jinja2.ext.do
[proftpd-userinfo] [proftpd-userinfo]
...@@ -69,7 +68,7 @@ ban-log=${directory:log}/proftpd-ban.log ...@@ -69,7 +68,7 @@ ban-log=${directory:log}/proftpd-ban.log
ssh-host-rsa-key=${ssh-host-rsa-key:output} ssh-host-rsa-key=${ssh-host-rsa-key:output}
ssh-host-dsa-key=${ssh-host-dsa-key:output} ssh-host-dsa-key=${ssh-host-dsa-key:output}
ssh-host-ecdsa-key=${ssh-host-ecdsa-key:output} ssh-host-ecdsa-key=${ssh-host-ecdsa-key:output}
ssh-authorized-key = ${ssh-authorized-keys:rendered} ssh-authorized-key = ${ssh-authorized-keys:output}
ban-table=${directory:srv}/proftpd-ban-table ban-table=${directory:srv}/proftpd-ban-table
control-socket=${directory:var}/proftpd.sock control-socket=${directory:var}/proftpd.sock
auth-user-file=${auth-user-file:output} auth-user-file=${auth-user-file:output}
...@@ -77,14 +76,14 @@ authentication-url = {{ slapparameter_dict.get('authentication-url', '')}} ...@@ -77,14 +76,14 @@ authentication-url = {{ slapparameter_dict.get('authentication-url', '')}}
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = command-line =
{{ proftpd_bin }} --nodaemon --config ${proftpd-config-file:rendered} {{ proftpd_bin }} --nodaemon --config ${proftpd-config-file:output}
wrapper-path = ${directory:service}/proftpd wrapper-path = ${directory:service}/proftpd
[ssh-authorized-keys] [ssh-authorized-keys]
rendered = ${directory:ssh-authorized-keys-dir}/authorized_keys output = ${directory:ssh-authorized-keys-dir}/authorized_keys
{% if slapparameter_dict.get('ssh-key') %} {% if slapparameter_dict.get('ssh-key') %}
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline:{{ slapparameter_dict['ssh-key'] | indent }} inline ={{ slapparameter_dict['ssh-key'] | indent }}
{% endif %} {% endif %}
[proftpd-listen-promise] [proftpd-listen-promise]
......
...@@ -14,8 +14,7 @@ cert = ${slap-connection:cert-file} ...@@ -14,8 +14,7 @@ cert = ${slap-connection:cert-file}
[instance-template] [instance-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
filename = ${:_buildout_section_name_}.cfg filename = ${:_buildout_section_name_}.cfg
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename} output = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
mode = 0644
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
...@@ -28,12 +27,12 @@ context = ...@@ -28,12 +27,12 @@ context =
[instance-default] [instance-default]
<= instance-template <= instance-template
template = {{ instance_default }} url = {{ instance_default }}
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
# XXX Jerome: what is this override for ? # XXX Jerome: what is this override for ?
override = {{ dumps(override_switch_softwaretype |default) }} override = {{ dumps(override_switch_softwaretype |default) }}
default = instance-default:rendered default = instance-default:output
# BBB # BBB
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
...@@ -27,8 +27,8 @@ url = ${:_profile_base_location_}/${:filename} ...@@ -27,8 +27,8 @@ url = ${:_profile_base_location_}/${:filename}
[instance-profile] [instance-profile]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section buildout buildout section buildout buildout
...@@ -37,7 +37,7 @@ context = ...@@ -37,7 +37,7 @@ context =
key ftpasswd_bin proftpd-output:ftpasswd key ftpasswd_bin proftpd-output:ftpasswd
key ftpdctl_bin proftpd-output:ftpdctl key ftpdctl_bin proftpd-output:ftpdctl
key ssh_keygen_bin openssh-output:keygen key ssh_keygen_bin openssh-output:keygen
raw template_monitor ${monitor2-template:rendered} raw template_monitor ${monitor2-template:output}
[versions] [versions]
plone.recipe.command = 1.1 plone.recipe.command = 1.1
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 9c4336f1f5143d3281c6706ff14abdd3 md5sum = 1bc53986f27cc513d4fbe8beb4f98c50
...@@ -59,10 +59,10 @@ data-dir = ${directory:pureftpd-dir} ...@@ -59,10 +59,10 @@ data-dir = ${directory:pureftpd-dir}
pid-file=${directory:run}/pureftpd.pid pid-file=${directory:run}/pureftpd.pid
auth-user-file=${auth-user-file:output} auth-user-file=${auth-user-file:output}
recipe =slapos.recipe.template:jinja2 recipe =slapos.recipe.template
# WARNING pure-uploadscript must be launched AFTER pure-ftpd so keep them in the same wrapper # WARNING pure-uploadscript must be launched AFTER pure-ftpd so keep them in the same wrapper
# and make sure they are both killed if one of them is killed. # and make sure they are both killed if one of them is killed.
template = inline: inline =
#!{{ bash_location }}/bin/bash #!{{ bash_location }}/bin/bash
{{ pureftpd_bin }} --uploadscript --customerproof --bind ${:host},${:ftp-port} --login puredb:${:auth-user-file} --pidfile ${:pid-file} & {{ pureftpd_bin }} --uploadscript --customerproof --bind ${:host},${:ftp-port} --login puredb:${:auth-user-file} --pidfile ${:pid-file} &
while ! [ -p ${directory:run}/pure-ftpd.upload.pipe ] while ! [ -p ${directory:run}/pure-ftpd.upload.pipe ]
...@@ -72,8 +72,8 @@ template = inline: ...@@ -72,8 +72,8 @@ template = inline:
{{ pureuploadscript_bin }} -r /opt/pureftpd/upload_script & {{ pureuploadscript_bin }} -r /opt/pureftpd/upload_script &
wait -n wait -n
kill 0 kill 0
rendered = ${directory:service}/pureftpd output = ${directory:service}/pureftpd
wrapper-path = ${:rendered} wrapper-path = ${:output}
[pure-pw] [pure-pw]
# command line to add a user, invoke with: # command line to add a user, invoke with:
...@@ -89,7 +89,7 @@ command-line = ...@@ -89,7 +89,7 @@ command-line =
recipe = plone.recipe.command recipe = plone.recipe.command
passwd-file = ${directory:etc}/pureftpd.passwd passwd-file = ${directory:etc}/pureftpd.passwd
output = ${directory:etc}/pureftpd.pdb output = ${directory:etc}/pureftpd.pdb
command = command =
if [ -f ${:passwd-file} ] && {{ purepw_bin }} show ${pureftpd-password:username} -f ${:passwd-file} if [ -f ${:passwd-file} ] && {{ purepw_bin }} show ${pureftpd-password:username} -f ${:passwd-file}
then then
( echo ${pureftpd-password:passwd} ; echo ${pureftpd-password:passwd}) | {{ purepw_bin }} passwd ${pureftpd-password:username} -f ${:passwd-file} ( echo ${pureftpd-password:passwd} ; echo ${pureftpd-password:passwd}) | {{ purepw_bin }} passwd ${pureftpd-password:username} -f ${:passwd-file}
......
...@@ -9,13 +9,13 @@ extends = ...@@ -9,13 +9,13 @@ extends =
parts = parts =
slapos-cookbook slapos-cookbook
instance-profile instance-profile
[python] [python]
part = python3 part = python3
# force to install plone.recipe.command as it will be used during instanciation # force to install plone.recipe.command as it will be used during instanciation
[slapos-cookbook] [slapos-cookbook]
eggs += eggs +=
plone.recipe.command plone.recipe.command
...@@ -23,14 +23,13 @@ eggs += ...@@ -23,14 +23,13 @@ eggs +=
[instance-profile] [instance-profile]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
mode = 0644
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
section buildout buildout section buildout buildout
key bash_location bash:location key bash_location bash:location
raw monitor_rendered ${monitor-template:rendered} raw monitor_rendered ${monitor-template:output}
raw pureftpd_bin ${pure-ftpd:location}/sbin/pure-ftpd raw pureftpd_bin ${pure-ftpd:location}/sbin/pure-ftpd
raw pureuploadscript_bin ${pure-ftpd:location}/sbin/pure-uploadscript raw pureuploadscript_bin ${pure-ftpd:location}/sbin/pure-uploadscript
raw purepw_bin ${pure-ftpd:location}/bin/pure-pw raw purepw_bin ${pure-ftpd:location}/bin/pure-pw
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 71531ed9c9b79fa769ab367e7ea2d2a5 md5sum = 7be0c21751f8385ef876c3d7192d4057
[template-re6stnet] [template-re6stnet]
filename = instance-re6stnet.cfg.in filename = instance-re6stnet.cfg.in
md5sum = a9cd303d17c4f07ad11fc8099afeed24 md5sum = 416b5c94810332adf938608e0556fdb4
[template-apache-conf] [template-apache-conf]
filename = apache.conf.in filename = apache.conf.in
......
...@@ -25,8 +25,8 @@ run = ${directory:run}/re6stnet ...@@ -25,8 +25,8 @@ run = ${directory:run}/re6stnet
[apache-conf] [apache-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-apache-conf'] }} url = {{ parameter_dict['template-apache-conf'] }}
rendered = ${directory:etc}/apache.conf output = ${directory:etc}/apache.conf
ipv6 = {{ ipv6 }} ipv6 = {{ ipv6 }}
port = 9026 port = 9026
error-log = ${directory:log}/apache-error.log error-log = ${directory:log}/apache-error.log
...@@ -44,16 +44,17 @@ context = ...@@ -44,16 +44,17 @@ context =
[apache-httpd] [apache-httpd]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:services}/httpd wrapper-path = ${directory:services}/httpd
command-line = "{{ parameter_dict['apache-location'] }}/bin/httpd" -f "${apache-conf:rendered}" -DFOREGROUND command-line = "{{ parameter_dict['apache-location'] }}/bin/httpd" -f "${apache-conf:output}" -DFOREGROUND
[apache-httpd-graceful] [apache-httpd-graceful]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${directory:script}/httpd-graceful output = ${directory:script}/httpd-graceful
template = inline:{{'{{content}}'}} inline =
{{'{{content}}'}}
context = key content :script context = key content :script
script = script =
#!/bin/sh -e #!/bin/sh -e
{{ parameter_dict['apache-location'] }}/bin/httpd -Sf ${apache-conf:rendered} {{ parameter_dict['apache-location'] }}/bin/httpd -Sf ${apache-conf:output}
{{ bin_directory }}/slapos-kill --pidfile ${apache-conf:pid-file} -s USR1 {{ bin_directory }}/slapos-kill --pidfile ${apache-conf:pid-file} -s USR1
[logrotate-apache] [logrotate-apache]
...@@ -89,21 +90,22 @@ community-path = ${re6st-community-conf:output} ...@@ -89,21 +90,22 @@ community-path = ${re6st-community-conf:output}
[re6st-community-conf] [re6st-community-conf]
recipe = slapos.recipe.template recipe = slapos.recipe.template
inline = {{ dumps(community) }} inline =
{{ dumps(community) }}
output = ${re6stnet-dirs:conf}/community.conf output = ${re6stnet-dirs:conf}/community.conf
{%- endif %} {%- endif %}
[re6st-registry-conf] [re6st-registry-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-re6st-registry-conf'] }} url = {{ parameter_dict['template-re6st-registry-conf'] }}
rendered = ${re6stnet-dirs:conf}/registry.conf output = ${re6stnet-dirs:conf}/registry.conf
context = section parameter_dict re6st-registry-conf-dict context = section parameter_dict re6st-registry-conf-dict
[re6st-registry-wrapper] [re6st-registry-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:services}/re6st-registry wrapper-path = ${directory:services}/re6st-registry
pidfile = ${directory:run}/registry.pid pidfile = ${directory:run}/registry.pid
command-line = {{ bin_directory }}/re6st-registry @${re6st-registry-conf:rendered} command-line = {{ bin_directory }}/re6st-registry @${re6st-registry-conf:output}
[cron-entry-re6st-backup] [cron-entry-re6st-backup]
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
...@@ -123,7 +125,7 @@ conf-dir = ${re6stnet-dirs:conf} ...@@ -123,7 +125,7 @@ conf-dir = ${re6stnet-dirs:conf}
token-dir = ${re6stnet-dirs:token} token-dir = ${re6stnet-dirs:token}
#Re6st config #Re6st config
config-file = ${re6st-registry-conf:rendered} config-file = ${re6st-registry-conf:output}
port = ${re6st-registry-conf-dict:port} port = ${re6st-registry-conf-dict:port}
ipv4 = ${re6st-registry-conf-dict:ipv4} ipv4 = ${re6st-registry-conf-dict:ipv4}
db-path = ${re6st-registry-conf-dict:db} db-path = ${re6st-registry-conf-dict:db}
...@@ -155,11 +157,11 @@ post = [ ! -s ${re6st-registry-wrapper:pidfile} ] || {{ bin_directory }}/slapos- ...@@ -155,11 +157,11 @@ post = [ ! -s ${re6st-registry-wrapper:pidfile} ] || {{ bin_directory }}/slapos-
[port-redirection] [port-redirection]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = inline: inline =
{%- raw %} {%- raw %}
[{"srcPort": 9201, "destPort": 9201, "destAddress": "{{ parameter_dict['ipv4'] }}"}] [{"srcPort": 9201, "destPort": 9201, "destAddress": "{{ parameter_dict['ipv4'] }}"}]
{% endraw -%} {% endraw -%}
rendered = ${buildout:directory}/.slapos-port-redirect output = ${buildout:directory}/.slapos-port-redirect
context = context =
section parameter_dict re6st-registry-conf-dict section parameter_dict re6st-registry-conf-dict
......
...@@ -13,7 +13,7 @@ cert = ${slap-connection:cert-file} ...@@ -13,7 +13,7 @@ cert = ${slap-connection:cert-file}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename} output = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
extra-context = extra-context =
context = context =
key ipv6_set slap-configuration:ipv6 key ipv6_set slap-configuration:ipv6
...@@ -34,7 +34,7 @@ template-re6st-registry-conf = {{ template_re6st_registry_conf }} ...@@ -34,7 +34,7 @@ template-re6st-registry-conf = {{ template_re6st_registry_conf }}
[dynamic-template-re6stnet] [dynamic-template-re6stnet]
< = jinja2-template-base < = jinja2-template-base
template = {{ template_re6stnet }} url = {{ template_re6stnet }}
filename = instance-re6stnet.cfg filename = instance-re6stnet.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
...@@ -45,7 +45,7 @@ extra-context = ...@@ -45,7 +45,7 @@ extra-context =
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = dynamic-template-re6stnet:rendered default = dynamic-template-re6stnet:output
registry = ${:default} registry = ${:default}
# BBB # BBB
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
...@@ -48,9 +48,9 @@ depends = ${re6stnet-develop:recipe} ...@@ -48,9 +48,9 @@ depends = ${re6stnet-develop:recipe}
[re6stnet-backup] [re6stnet-backup]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/re6st-backup output = ${buildout:bin-directory}/re6st-backup
template = inline =
inline:#!/bin/sh -e #!/bin/sh -e
PATH={{git_location}}/bin:{{sqlite3_location}}/bin:$PATH PATH={{git_location}}/bin:{{sqlite3_location}}/bin:$PATH
cd "$1" || { cd "$1" || {
rm -rf "$1.new" rm -rf "$1.new"
...@@ -75,8 +75,8 @@ url = ${:_profile_base_location_}/${:filename} ...@@ -75,8 +75,8 @@ url = ${:_profile_base_location_}/${:filename}
[template] [template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
context = context =
key bin_directory buildout:bin-directory key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
...@@ -84,12 +84,12 @@ context = ...@@ -84,12 +84,12 @@ context =
key apache_location apache:location key apache_location apache:location
key logrotate_location logrotate:location key logrotate_location logrotate:location
key openssl_location openssl:location key openssl_location openssl:location
key re6stnet_backup re6stnet-backup:rendered key re6stnet_backup re6stnet-backup:output
key template_apache_conf template-apache-conf:target key template_apache_conf template-apache-conf:target
key template_re6stnet template-re6stnet:target key template_re6stnet template-re6stnet:target
key template_re6st_registry_conf template-re6st-registry-conf:target key template_re6st_registry_conf template-re6st-registry-conf:target
key template_logrotate_base template-logrotate-base:rendered key template_logrotate_base template-logrotate-base:output
key monitor2_template_rendered monitor2-template:rendered key monitor2_template_rendered monitor2-template:output
raw python_with_eggs ${buildout:bin-directory}/${re6stnet:interpreter} raw python_with_eggs ${buildout:bin-directory}/${re6stnet:interpreter}
[template-re6stnet] [template-re6stnet]
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
# not need these here). # not need these here).
[instance.cfg] [instance.cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 1c9c4c254f371337fe08b7922901f8a9 md5sum = 55c7fd4dd6a39b31878889fbfb00f995
[instance-repman.cfg] [instance-repman.cfg]
_update_hash_filename_ = instance-repman.cfg.jinja2.in _update_hash_filename_ = instance-repman.cfg.jinja2.in
md5sum = 7782adde357c9444fed51f2dcc230a52 md5sum = 4ce8808677773a033f4b59bdf6b8e653
[config-toml.in] [config-toml.in]
_update_hash_filename_ = templates/config.toml.in _update_hash_filename_ = templates/config.toml.in
...@@ -34,7 +34,7 @@ md5sum = 0eeb24c6aa0760f0d33c4cc2828ddf30 ...@@ -34,7 +34,7 @@ md5sum = 0eeb24c6aa0760f0d33c4cc2828ddf30
[template-mariadb.cfg] [template-mariadb.cfg]
_update_hash_filename_ = instance-mariadb.cfg.jinja2.in _update_hash_filename_ = instance-mariadb.cfg.jinja2.in
md5sum = aa25693b324ce5acc00f29b96a2516c0 md5sum = 34eed1b6d7fc45dc078f30235e22d04f
[template-my-cnf] [template-my-cnf]
_update_hash_filename_ = templates/my.cnf.in _update_hash_filename_ = templates/my.cnf.in
......
...@@ -23,16 +23,8 @@ partition-path = ${buildout:directory} ...@@ -23,16 +23,8 @@ partition-path = ${buildout:directory}
receiver-port = ${dbjob-parameter:socat-port} receiver-port = ${dbjob-parameter:socat-port}
csr-id = ${caucase-csr-id:csr-id} csr-id = ${caucase-csr-id:csr-id}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
mode = 644
[jinja2-template-executable]
< = jinja2-template-base
mode = 755
[jinja2-template-script-base] [jinja2-template-script-base]
< = jinja2-template-executable recipe = slapos.recipe.template:jinja2
context = context =
key tmp_dir directory:tmp key tmp_dir directory:tmp
key partition_dir buildout:directory key partition_dir buildout:directory
...@@ -48,8 +40,9 @@ context = ...@@ -48,8 +40,9 @@ context =
${:extra-context} ${:extra-context}
[simplefile] [simplefile]
< = jinja2-template-base recipe = slapos.recipe.template:jinja2
template = inline:{{ '{{ content }}' }} inline =
{{ '{{ content }}' }}
{% macro simplefile(section_name, file_path, content, mode='') -%} {% macro simplefile(section_name, file_path, content, mode='') -%}
{% set content_section_name = section_name ~ '-content' -%} {% set content_section_name = section_name ~ '-content' -%}
...@@ -58,7 +51,7 @@ content = {{ dumps(content) }} ...@@ -58,7 +51,7 @@ content = {{ dumps(content) }}
[{{ section(section_name) }}] [{{ section(section_name) }}]
< = simplefile < = simplefile
rendered = {{ file_path }} output = {{ file_path }}
context = key content {{content_section_name}}:content context = key content {{content_section_name}}:content
mode = {{ mode }} mode = {{ mode }}
{%- endmacro %} {%- endmacro %}
...@@ -85,7 +78,7 @@ mode = {{ mode }} ...@@ -85,7 +78,7 @@ mode = {{ mode }}
[get-csr-id] [get-csr-id]
recipe = plone.recipe.command recipe = plone.recipe.command
output = ${directory:tmp}/csr_id output = ${directory:tmp}/csr_id
command = command =
if [ -s "${mysql-directory:ssl}/server-cert.pem" ]; then if [ -s "${mysql-directory:ssl}/server-cert.pem" ]; then
RESULT="None"; RESULT="None";
else else
...@@ -122,17 +115,16 @@ innodb-log-buffer-size = {{ dumps(slapparameter_dict.get('innodb-log-buffer-size ...@@ -122,17 +115,16 @@ innodb-log-buffer-size = {{ dumps(slapparameter_dict.get('innodb-log-buffer-size
relaxed-writes = {{ dumps(slapparameter_dict.get('relaxed-writes', False)) }} relaxed-writes = {{ dumps(slapparameter_dict.get('relaxed-writes', False)) }}
[my-cnf] [my-cnf]
< = jinja2-template-base recipe = slapos.recipe.template:jinja2
rendered = ${directory:etc}/mariadb.cnf output = ${directory:etc}/mariadb.cnf
template = {{ parameter_dict['template-my-cnf'] }} url = {{ parameter_dict['template-my-cnf'] }}
context = section parameter_dict my-cnf-parameters context = section parameter_dict my-cnf-parameters
[init-root-sql] [init-root-sql]
< = jinja2-template-base recipe = slapos.recipe.template:jinja2
rendered = ${directory:etc}/.init-root.sql output = ${directory:etc}/.init-root.sql
template = {{ parameter_dict['template-mariadb-init-root'] }} url = {{ parameter_dict['template-mariadb-init-root'] }}
context = section parameter_dict init-script-parameters context = section parameter_dict init-script-parameters
mode = 600
[init-script-parameters] [init-script-parameters]
password = {{ slapparameter_dict['root-password'] }} password = {{ slapparameter_dict['root-password'] }}
...@@ -143,11 +135,11 @@ heartbeat-user = {{ slapparameter_dict['heartbeat-user'] }} ...@@ -143,11 +135,11 @@ heartbeat-user = {{ slapparameter_dict['heartbeat-user'] }}
require-ssl = {{ dumps(slapparameter_dict['require-ssl']) }} require-ssl = {{ dumps(slapparameter_dict['require-ssl']) }}
[init-script] [init-script]
< = jinja2-template-executable recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do extensions = jinja2.ext.do
# XXX: is there a better location ? # XXX: is there a better location ?
rendered = ${directory:etc}/mariadb_initial_setup.sql output = ${directory:etc}/mariadb_initial_setup.sql
template = {{ parameter_dict['template-mariadb-initial-setup'] }} url = {{ parameter_dict['template-mariadb-initial-setup'] }}
context = section parameter_dict init-script-parameters context = section parameter_dict init-script-parameters
[update-mysql] [update-mysql]
...@@ -155,34 +147,34 @@ recipe = slapos.cookbook:generic.mysql.wrap_update_mysql ...@@ -155,34 +147,34 @@ recipe = slapos.cookbook:generic.mysql.wrap_update_mysql
output = ${directory:bin}/mariadb_update output = ${directory:bin}/mariadb_update
binary = ${binary-wrap-mysql_upgrade:wrapper-path} binary = ${binary-wrap-mysql_upgrade:wrapper-path}
mysql = ${binary-wrap-mysql:wrapper-path} mysql = ${binary-wrap-mysql:wrapper-path}
init-script = ${init-script:rendered} init-script = ${init-script:output}
mysql_tzinfo_to_sql = ${binary-wrap-mysql_tzinfo_to_sql:wrapper-path} mysql_tzinfo_to_sql = ${binary-wrap-mysql_tzinfo_to_sql:wrapper-path}
[{{ section('update-mysql-script') }}] [{{ section('update-mysql-script') }}]
< = jinja2-template-script-base < = jinja2-template-script-base
rendered = ${directory:scripts}/mariadb_update output = ${directory:scripts}/mariadb_update
init-password = ${directory:etc}/.init-passwd.done init-password = ${directory:etc}/.init-passwd.done
upgrade-done = ${directory:lib}/mariadb-update-done upgrade-done = ${directory:lib}/mariadb-update-done
extra-context = extra-context =
key init_password_done :init-password key init_password_done :init-password
key upgrade_done :upgrade-done key upgrade_done :upgrade-done
key init_root_sql init-root-sql:rendered key init_root_sql init-root-sql:output
key mysql_update update-mysql:output key mysql_update update-mysql:output
key init_database_sql init-script:rendered key init_database_sql init-script:output
template = {{ parameter_dict['template-init-root-wrapper'] }} url = {{ parameter_dict['template-init-root-wrapper'] }}
[{{ section('mysql-slave-db-cleanup') }}] [{{ section('mysql-slave-db-cleanup') }}]
< = jinja2-template-script-base < = jinja2-template-script-base
rendered = ${directory:scripts}/manage-slave-db output = ${directory:scripts}/manage-slave-db
db-name = {{ slapparameter_dict['database-name'] }} db-name = {{ slapparameter_dict['database-name'] }}
extra-context = extra-context =
key database_name :db-name key database_name :db-name
template = {{ parameter_dict['template-manage-db'] }} url = {{ parameter_dict['template-manage-db'] }}
[mysqld] [mysqld]
< = jinja2-template-executable recipe = slapos.recipe.template:jinja2
rendered = ${directory:bin}/mysqld output = ${directory:bin}/mysqld
template = {{ parameter_dict['template-mysqld-wrapper'] }} url = {{ parameter_dict['template-mysqld-wrapper'] }}
context = context =
key defaults_file install-mysql-config:config key defaults_file install-mysql-config:config
key datadir my-cnf-parameters:data-directory key datadir my-cnf-parameters:data-directory
...@@ -197,7 +189,7 @@ environ = ...@@ -197,7 +189,7 @@ environ =
[mysqld-launcher] [mysqld-launcher]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${mysqld:rendered} command-line = ${mysqld:output}
wrapper-path = ${directory:controller}/mariadb wrapper-path = ${directory:controller}/mariadb
wait-for-files = wait-for-files =
${mysql-directory:mysql}/my.cnf ${mysql-directory:mysql}/my.cnf
...@@ -234,15 +226,14 @@ link-binary = {{ dumps(parameter_dict['link-binary']) }} ...@@ -234,15 +226,14 @@ link-binary = {{ dumps(parameter_dict['link-binary']) }}
# Note: --defaults-file must be the first argument, otherwise wrapped binary # Note: --defaults-file must be the first argument, otherwise wrapped binary
# will reject it. # will reject it.
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${directory:bin}/${:command} output = ${directory:bin}/${:command}
mode = 755 inline =
template = #!/bin/sh
inline:#!/bin/sh
exec {{ parameter_dict['mariadb-location'] }}/bin/${:command} \ exec {{ parameter_dict['mariadb-location'] }}/bin/${:command} \
--defaults-file="${directory:etc}/mysql/my.cnf" \ --defaults-file="${directory:etc}/mysql/my.cnf" \
--protocol=socket \ --protocol=socket \
${:extra-args} "$@" ${:extra-args} "$@"
wrapper-path = ${:rendered} wrapper-path = ${:output}
extra-args = extra-args =
[binary-wrap-mysql] [binary-wrap-mysql]
...@@ -266,8 +257,8 @@ command = mysqladmin ...@@ -266,8 +257,8 @@ command = mysqladmin
<= binary-wrap-base <= binary-wrap-base
command-line = "{{ parameter_dict['mariadb-location'] }}/bin/${:command}" --skip-write-binlog command-line = "{{ parameter_dict['mariadb-location'] }}/bin/${:command}" --skip-write-binlog
command = mysql_tzinfo_to_sql command = mysql_tzinfo_to_sql
template = inline =
inline:#!/bin/sh #!/bin/sh
exec {{ parameter_dict['mariadb-location'] }}/bin/${:command} \ exec {{ parameter_dict['mariadb-location'] }}/bin/${:command} \
--defaults-file="${directory:etc}/mysql/my.cnf" \ --defaults-file="${directory:etc}/mysql/my.cnf" \
--skip-write-binlog "$@" --skip-write-binlog "$@"
...@@ -313,7 +304,7 @@ tmp-dir = ${directory:tmp} ...@@ -313,7 +304,7 @@ tmp-dir = ${directory:tmp}
mysqld-socket = ${my-cnf-parameters:socket} mysqld-socket = ${my-cnf-parameters:socket}
mysql-client = ${binary-wrap-mysql:wrapper-path} mysql-client = ${binary-wrap-mysql:wrapper-path}
socat-port = {{ int(port) + 9 }} socat-port = {{ int(port) + 9 }}
restart-script = ${mysqld-restart-script:rendered} restart-script = ${mysqld-restart-script:output}
socat-location = {{ parameter_dict['socat-location'] }} socat-location = {{ parameter_dict['socat-location'] }}
mysql-location = {{ parameter_dict['mariadb-location'] }} mysql-location = {{ parameter_dict['mariadb-location'] }}
gzip-location = {{ parameter_dict['gzip-location'] }} gzip-location = {{ parameter_dict['gzip-location'] }}
...@@ -323,23 +314,24 @@ port = {{ port }} ...@@ -323,23 +314,24 @@ port = {{ port }}
use-ipv6 = {{ dumps(use_ipv6) }} use-ipv6 = {{ dumps(use_ipv6) }}
[dbjobs-executable] [dbjobs-executable]
< = jinja2-template-executable recipe = slapos.recipe.template:jinja2
rendered = ${directory:bin}/dbjobs output = ${directory:bin}/dbjobs
context = context =
section parameter_dict dbjob-parameter section parameter_dict dbjob-parameter
template = {{ parameter_dict['dbjobs-template'] }} url = {{ parameter_dict['dbjobs-template'] }}
[{{ section('dbjobs-cron-entry') }}] [{{ section('dbjobs-cron-entry') }}]
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries} cron-entries = ${cron:cron-entries}
name = dbjobs name = dbjobs
frequency = * * * * * frequency = * * * * *
command = ${dbjobs-executable:rendered} command = ${dbjobs-executable:output}
[mysqld-restart-script] [mysqld-restart-script]
< = jinja2-template-executable recipe = slapos.recipe.template:jinja2
rendered = ${directory:bin}/mysqld_restart output = ${directory:bin}/mysqld_restart
template = inline:#!/bin/sh inline =
#!/bin/sh
# This script is disabled on SlapOS # This script is disabled on SlapOS
echo "RESTART FROM dbjbos WAS DISABLED" echo "RESTART FROM dbjbos WAS DISABLED"
...@@ -348,15 +340,15 @@ recipe = slapos.cookbook:cron.d ...@@ -348,15 +340,15 @@ recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries} cron-entries = ${cron:cron-entries}
name = mariadb-need-start name = mariadb-need-start
frequency = * * * * * frequency = * * * * *
command = ${template-mysqld-need-start:rendered} command = ${template-mysqld-need-start:output}
[template-mysqld-need-start] [template-mysqld-need-start]
< = jinja2-template-executable recipe = slapos.recipe.template:jinja2
rendered = ${directory:bin}/mysqld_need_start output = ${directory:bin}/mysqld_need_start
template = {{ parameter_dict['template-mysqld-need-start'] }} url = {{ parameter_dict['template-mysqld-need-start'] }}
context = context =
key mariadb_controller mariadb-ctl-bin:wrapper-path key mariadb_controller mariadb-ctl-bin:wrapper-path
key update_config mysql-get-config:rendered key update_config mysql-get-config:output
raw username {{ slapparameter_dict['repman-user'] }} raw username {{ slapparameter_dict['repman-user'] }}
raw repman_url {{ slapparameter_dict['repman-url'] }} raw repman_url {{ slapparameter_dict['repman-url'] }}
raw jq_bin {{ jq_bin }} raw jq_bin {{ jq_bin }}
...@@ -368,10 +360,11 @@ context = ...@@ -368,10 +360,11 @@ context =
# Donwnload mariadb configuration from repman # Donwnload mariadb configuration from repman
[mysql-get-config] [mysql-get-config]
< = jinja2-template-executable recipe = slapos.recipe.template:jinja2
rendered = ${directory:bin}/mysqld-update-config output = ${directory:bin}/mysqld-update-config
cluster = {{ slapparameter_dict['cluster'] }} cluster = {{ slapparameter_dict['cluster'] }}
template = inline:#!{{ bash_bin }} inline =
#!{{ bash_bin }}
cd ${directory:config-tmp} && cd ${directory:config-tmp} &&
{{ curl_bin }} -o config.tar.gz {{ slapparameter_dict['repman-url'] }}/api/clusters/${:cluster}/servers/{{ host }}/{{ port }}/config {{ curl_bin }} -o config.tar.gz {{ slapparameter_dict['repman-url'] }}/api/clusters/${:cluster}/servers/{{ host }}/{{ port }}/config
tar -xzf config.tar.gz tar -xzf config.tar.gz
...@@ -379,13 +372,13 @@ template = inline:#!{{ bash_bin }} ...@@ -379,13 +372,13 @@ template = inline:#!{{ bash_bin }}
cp -r data/.system ${mysql-directory:data} cp -r data/.system ${mysql-directory:data}
cp -r etc/mysql/* ${mysql-directory:mysql} cp -r etc/mysql/* ${mysql-directory:mysql}
ln -sf ${mysql-directory:data}/.system ${directory:var}/system ln -sf ${mysql-directory:data}/.system ${directory:var}/system
ln -sf ${my-cnf:rendered} ${mysql-directory:custom}/01_mariadb.cnf ln -sf ${my-cnf:output} ${mysql-directory:custom}/01_mariadb.cnf
[{{ section('install-mysql-config') }}] [{{ section('install-mysql-config') }}]
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = true stop-on-error = true
config = ${directory:etc}/mysql/my.cnf config = ${directory:etc}/mysql/my.cnf
command = ${mysql-get-config:rendered} command = ${mysql-get-config:output}
update-command = ${:command} update-command = ${:command}
[dash] [dash]
......
...@@ -72,7 +72,8 @@ config-caucase-url = {{ caucase_url }} ...@@ -72,7 +72,8 @@ config-caucase-url = {{ caucase_url }}
[download-proxy-config] [download-proxy-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = inline:#!{{ bash_bin }} inline =
#!{{ bash_bin }}
NAME=$1 NAME=$1
HOST=$2 HOST=$2
PORT=$3 PORT=$3
...@@ -85,8 +86,7 @@ template = inline:#!{{ bash_bin }} ...@@ -85,8 +86,7 @@ template = inline:#!{{ bash_bin }}
{{ curl_bin }} -o proxies-$NAME.tar.gz ${nginx-parameter:repman-url}/api/clusters/$NAME/servers/$HOST/$PORT/config {{ curl_bin }} -o proxies-$NAME.tar.gz ${nginx-parameter:repman-url}/api/clusters/$NAME/servers/$HOST/$PORT/config
tar -xzf proxies-$NAME.tar.gz tar -xzf proxies-$NAME.tar.gz
cp etc/proxysql/proxysql.cnf $CONFIG cp etc/proxysql/proxysql.cnf $CONFIG
rendered = ${directory:bin}/update-proxysql-config output = ${directory:bin}/update-proxysql-config
mode = 755
{% for instance_dict in slave_instance_list -%} {% for instance_dict in slave_instance_list -%}
{% set slave_dict = { {% set slave_dict = {
...@@ -237,8 +237,8 @@ switchover-wait-write-query = {{ parameter_dict.get('switchover-wait-write-query ...@@ -237,8 +237,8 @@ switchover-wait-write-query = {{ parameter_dict.get('switchover-wait-write-query
[{{ 'config-' ~ name }}] [{{ 'config-' ~ name }}]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ config_cluster_toml_in }} url = {{ config_cluster_toml_in }}
rendered = ${repman:clusters}/config-{{ name }}.toml output = ${repman:clusters}/config-{{ name }}.toml
extra-context = extra-context =
context = context =
section parameter_dict {{ name ~ '-cluster-parameter' }} section parameter_dict {{ name ~ '-cluster-parameter' }}
...@@ -252,7 +252,7 @@ config = ${proxysql-directory:config}/proxysql.cnf ...@@ -252,7 +252,7 @@ config = ${proxysql-directory:config}/proxysql.cnf
data = ${repman:proxy-data}/{{ name }} data = ${repman:proxy-data}/{{ name }}
command = command =
mkdir -p ${:data} && mkdir -p ${:data} &&
${download-proxy-config:rendered} {{ name }} {{ ipv4 }} {{ '${' ~ name ~ '-cluster-parameter:proxy-admin-port}' }} ${:config} ${download-proxy-config:output} {{ name }} {{ ipv4 }} {{ '${' ~ name ~ '-cluster-parameter:proxy-admin-port}' }} ${:config}
update-command = ${:command} update-command = ${:command}
[proxysql-{{ name }}-wrapper] [proxysql-{{ name }}-wrapper]
...@@ -308,14 +308,14 @@ config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-port}' }} ...@@ -308,14 +308,14 @@ config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-port}' }}
[{{ name}}-publish-slave-information] [{{ name}}-publish-slave-information]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = {{ 'dynamic-' ~name ~ '-publish-slave-information:rendered' }} default = {{ 'dynamic-' ~name ~ '-publish-slave-information:output' }}
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
[dynamic-{{ name}}-publish-slave-information] [dynamic-{{ name}}-publish-slave-information]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/database-publish-slave-information.cfg output = ${buildout:directory}/database-publish-slave-information.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
template = {{ template_publish_slave_information }} url = {{ template_publish_slave_information }}
context = context =
import json_module json import json_module json
key proxy_port {{ name }}-cluster-parameter:proxy-port key proxy_port {{ name }}-cluster-parameter:proxy-port
...@@ -404,10 +404,9 @@ context = ...@@ -404,10 +404,9 @@ context =
[caucase-sign-csr] [caucase-sign-csr]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 755 output = ${directory:bin}/caucase-sign
rendered = ${directory:bin}/caucase-sign inline =
template = #!/bin/sh
inline:#!/bin/sh
cp ${directory:ssl}/caucase.user.key ${directory:ssl}/caucase-full.key cp ${directory:ssl}/caucase.user.key ${directory:ssl}/caucase-full.key
cat ${directory:ssl}/caucase.user.crt >> ${directory:ssl}/caucase-full.key cat ${directory:ssl}/caucase.user.crt >> ${directory:ssl}/caucase-full.key
for csr_id in {{ csrid_list | join(' ') }}; do for csr_id in {{ csrid_list | join(' ') }}; do
...@@ -422,7 +421,7 @@ recipe = slapos.cookbook:cron.d ...@@ -422,7 +421,7 @@ recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries} cron-entries = ${cron:cron-entries}
name = caucase-sign-csr name = caucase-sign-csr
frequency = * * * * * frequency = * * * * *
command = ${caucase-sign-csr:rendered} command = ${caucase-sign-csr:output}
{% do part_list.append('cron-caucase-sign-csr') -%} {% do part_list.append('cron-caucase-sign-csr') -%}
[slap-configuration] [slap-configuration]
...@@ -520,7 +519,7 @@ update-command = ${:command} ...@@ -520,7 +519,7 @@ update-command = ${:command}
[replication-manager-reload] [replication-manager-reload]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_repman_manager_sh }} url = {{ template_repman_manager_sh }}
cluster-list = {{ dumps( list(slapparameter_dict.get('repman-cluster-dict', default_parameter_dict)) ) }} cluster-list = {{ dumps( list(slapparameter_dict.get('repman-cluster-dict', default_parameter_dict)) ) }}
context = context =
section parameter_dict repman section parameter_dict repman
...@@ -531,8 +530,7 @@ context = ...@@ -531,8 +530,7 @@ context =
raw jq_bin {{ jq_bin }} raw jq_bin {{ jq_bin }}
raw curl_bin {{ curl_bin }} raw curl_bin {{ curl_bin }}
raw bash_bin {{ bash_bin }} raw bash_bin {{ bash_bin }}
rendered = ${directory:scripts}/repman-reload output = ${directory:scripts}/repman-reload
mode = 755
[replication-manager] [replication-manager]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
...@@ -542,7 +540,7 @@ command-line = ...@@ -542,7 +540,7 @@ command-line =
--monitoring-sharedir=${repman-parameter:share-dir} --monitoring-sharedir=${repman-parameter:share-dir}
--http-root=${repman-parameter:http-root} --http-root=${repman-parameter:http-root}
--monitoring-datadir=${repman:data-dir} --monitoring-datadir=${repman:data-dir}
--config=${repman-config.toml:rendered} --config=${repman-config.toml:output}
--log-file=${repman-parameter:log} --log-file=${repman-parameter:log}
--memprofile=${directory:tmp}/repmgr.mprof --memprofile=${directory:tmp}/repmgr.mprof
monitor monitor
...@@ -560,8 +558,8 @@ wait-for-files = ...@@ -560,8 +558,8 @@ wait-for-files =
[repman-config.toml] [repman-config.toml]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ config_toml_in }} url = {{ config_toml_in }}
rendered = ${repman:etc}/config.toml output = ${repman:etc}/config.toml
extra-context = extra-context =
context = context =
section parameter_dict repman-parameter section parameter_dict repman-parameter
...@@ -582,8 +580,8 @@ config-port = ${repman-parameter:secure-port} ...@@ -582,8 +580,8 @@ config-port = ${repman-parameter:secure-port}
[nginx-conf] [nginx-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ nginx_conf_in }} url = {{ nginx_conf_in }}
rendered = ${nginx-parameter:config-file} output = ${nginx-parameter:config-file}
context = context =
section parameter_dict nginx-parameter section parameter_dict nginx-parameter
...@@ -592,7 +590,7 @@ recipe = slapos.cookbook:wrapper ...@@ -592,7 +590,7 @@ recipe = slapos.cookbook:wrapper
command-line = command-line =
{{ nginx_bin }} {{ nginx_bin }}
-p ${directory:nginx-prefix} -p ${directory:nginx-prefix}
-c ${nginx-conf:rendered} -c ${nginx-conf:output}
wrapper-path = ${directory:services}/nginx wrapper-path = ${directory:services}/nginx
wait-for-files = wait-for-files =
${directory:ssl}/repman-cert.crt ${directory:ssl}/repman-cert.crt
...@@ -601,12 +599,11 @@ wait-for-files = ...@@ -601,12 +599,11 @@ wait-for-files =
[nginx-graceful-wrapper] [nginx-graceful-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline:#!{{ bash_bin }} inline =
#!{{ bash_bin }}
kill -USR1 "$(cat ${nginx-parameter:pid-file})" kill -USR1 "$(cat ${nginx-parameter:pid-file})"
rendered = ${directory:scripts}/nginx-graceful output = ${directory:scripts}/nginx-graceful
context =
mode = 755
[logrotate-entry-nginx] [logrotate-entry-nginx]
<= logrotate-entry-base <= logrotate-entry-base
...@@ -637,7 +634,7 @@ database-list = {{ db_list }} ...@@ -637,7 +634,7 @@ database-list = {{ db_list }}
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-httpd-port = 8060 monitor-httpd-port = 8060
cors-domains = {{ slapparameter_dict.get('monitor-cors-domains', 'monitor.app.officejs.com') }} cors-domains = {{ slapparameter_dict.get('monitor-cors-domains', 'monitor.app.officejs.com') }}
username = admin username = admin
password = ${publish-early:monitor-password} password = ${publish-early:monitor-password}
...@@ -674,14 +671,13 @@ config-url = ${nginx-parameter:backend-ssl-url} ...@@ -674,14 +671,13 @@ config-url = ${nginx-parameter:backend-ssl-url}
[template-proxysql-need-stop-start] [template-proxysql-need-stop-start]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${directory:bin}/proxysql_check_stop_start output = ${directory:bin}/proxysql_check_stop_start
template = {{ template_proxy_need_stopstart }} url = {{ template_proxy_need_stopstart }}
mode = 755
cluster-list = !py![{{ cluster_list | join(', ') }}] cluster-list = !py![{{ cluster_list | join(', ') }}]
context = context =
key proxysql_controller {{proxysql_controller}}-bin:wrapper-path key proxysql_controller {{proxysql_controller}}-bin:wrapper-path
key repman_url nginx-parameter:backend-url key repman_url nginx-parameter:backend-url
key get_proxy_config download-proxy-config:rendered key get_proxy_config download-proxy-config:output
key cluster_list :cluster-list key cluster_list :cluster-list
raw jq_bin {{ jq_bin }} raw jq_bin {{ jq_bin }}
raw bash_bin {{ bash_bin }} raw bash_bin {{ bash_bin }}
...@@ -692,7 +688,7 @@ recipe = slapos.cookbook:cron.d ...@@ -692,7 +688,7 @@ recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries} cron-entries = ${cron:cron-entries}
name = proxysql-need-stop-start name = proxysql-need-stop-start
frequency = * * * * * frequency = * * * * *
command = ${template-proxysql-need-stop-start:rendered} command = ${template-proxysql-need-stop-start:output}
############################# #############################
# #
......
...@@ -8,9 +8,9 @@ offline = true ...@@ -8,9 +8,9 @@ offline = true
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = template-instance-repman.cfg:rendered default = template-instance-repman.cfg:output
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
mariadb = template-instance-mariadb.cfg:rendered mariadb = template-instance-mariadb.cfg:output
[slap-configuration] [slap-configuration]
...@@ -24,9 +24,8 @@ cert = ${slap-connection:cert-file} ...@@ -24,9 +24,8 @@ cert = ${slap-connection:cert-file}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 0644
extensions = jinja2.ext.do extensions = jinja2.ext.do
rendered= ${buildout:directory}/${:_buildout_section_name_} output= ${buildout:directory}/${:_buildout_section_name_}
supervisord-lib = {{ supervisord_lib }} supervisord-lib = {{ supervisord_lib }}
causace-lib = {{ caucase_library }} causace-lib = {{ caucase_library }}
import-list = import-list =
...@@ -58,7 +57,7 @@ extra-context = ...@@ -58,7 +57,7 @@ extra-context =
[template-instance-repman.cfg] [template-instance-repman.cfg]
<= jinja2-template-base <= jinja2-template-base
template= {{ template_repman_cfg }} url = {{ template_repman_cfg }}
extra-context = extra-context =
key slave_instance_list slap-configuration:slave-instance-list key slave_instance_list slap-configuration:slave-instance-list
raw gowork_bin {{ gowork_bin }} raw gowork_bin {{ gowork_bin }}
...@@ -104,7 +103,7 @@ groonga-plugins-path = {{ groonga_plugin_dir }}:{{ groonga_mysql_normalizer_plug ...@@ -104,7 +103,7 @@ groonga-plugins-path = {{ groonga_plugin_dir }}:{{ groonga_mysql_normalizer_plug
[template-instance-mariadb.cfg] [template-instance-mariadb.cfg]
<= jinja2-template-base <= jinja2-template-base
template = {{ template_mariadb }} url = {{ template_mariadb }}
filename = instance-mariadb.cfg filename = instance-mariadb.cfg
extra-context = extra-context =
section parameter_dict template-mariadb-parameters section parameter_dict template-mariadb-parameters
...@@ -39,11 +39,10 @@ location = ${mariadb-10.4:location} ...@@ -39,11 +39,10 @@ location = ${mariadb-10.4:location}
part = python3 part = python3
[template-mysqld-wrapper] [template-mysqld-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/mysqld.in output = ${buildout:parts-directory}/${:_buildout_section_name_}/mysqld.in
mode = 644 inline =
template = #!/bin/sh -e
inline:{% raw %}#!/bin/sh -e
basedir='${mariadb:location}' basedir='${mariadb:location}'
datadir='{{datadir}}' datadir='{{datadir}}'
marker=$datadir/.slapos_initializing marker=$datadir/.slapos_initializing
...@@ -65,13 +64,11 @@ template = ...@@ -65,13 +64,11 @@ template =
{%- endfor %} {%- endfor %}
{%- endif %} {%- endif %}
exec "$basedir/bin/mysqld" --defaults-file='{{defaults_file}}' "$@" exec "$basedir/bin/mysqld" --defaults-file='{{defaults_file}}' "$@"
{% endraw %}
[instance.cfg] [instance.cfg]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 0644
context = context =
key bash_location bash:location key bash_location bash:location
key bin_directory buildout:bin-directory key bin_directory buildout:bin-directory
...@@ -87,11 +84,11 @@ context = ...@@ -87,11 +84,11 @@ context =
key dbjobs_in dbjobs-in:target key dbjobs_in dbjobs-in:target
key dash_location dash:location key dash_location dash:location
key jq_location jq:location key jq_location jq:location
key logrotate_cfg template-logrotate-base:rendered key logrotate_cfg template-logrotate-base:output
key gowork_bin gowork:bin key gowork_bin gowork:bin
key gzip_location gzip:location key gzip_location gzip:location
key haproxy_location haproxy:location key haproxy_location haproxy:location
key template_monitor monitor2-template:rendered key template_monitor monitor2-template:output
key mariadb_link_binary template-mariadb.cfg:link-binary key mariadb_link_binary template-mariadb.cfg:link-binary
key mariadb_location mariadb:location key mariadb_location mariadb:location
key mysqld_start_template mysqld-need-start.sh.in:target key mysqld_start_template mysqld-need-start.sh.in:target
...@@ -113,9 +110,9 @@ context = ...@@ -113,9 +110,9 @@ context =
key template_repman_manager_sh repman-manager-sh.in:target key template_repman_manager_sh repman-manager-sh.in:target
key template_mariadb template-mariadb.cfg:target key template_mariadb template-mariadb.cfg:target
key template_mariadb_initial_setup template-mariadb-initial-setup:target key template_mariadb_initial_setup template-mariadb-initial-setup:target
key template_monitor_cfg monitor2-template:rendered key template_monitor_cfg monitor2-template:output
key template_my_cnf template-my-cnf:target key template_my_cnf template-my-cnf:target
key template_mysqld_wrapper template-mysqld-wrapper:rendered key template_mysqld_wrapper template-mysqld-wrapper:output
key template_init_root_sql mariadb-init-root-sql:target key template_init_root_sql mariadb-init-root-sql:target
key template_init_root_wrapper init-root-wrapper-in:target key template_init_root_wrapper init-root-wrapper-in:target
key template_repman_cfg instance-repman.cfg:target key template_repman_cfg instance-repman.cfg:target
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[instance.cfg.in] [instance.cfg.in]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 0bd2594778cc5f29abfee7cd015c1e7d md5sum = a5a05e6949d78882bde4d53fb21cdd00
...@@ -77,9 +77,8 @@ caucase.updater( ...@@ -77,9 +77,8 @@ caucase.updater(
)}} )}}
[rest-server-certificate-csr-config] [rest-server-certificate-csr-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
mode = 644 inline =
template = inline:
[req] [req]
prompt = no prompt = no
req_extensions = req_ext req_extensions = req_ext
...@@ -92,7 +91,7 @@ template = inline: ...@@ -92,7 +91,7 @@ template = inline:
IP.1 = ${instance-parameter:ipv4-random} IP.1 = ${instance-parameter:ipv4-random}
IP.2 = ${instance-parameter:ipv6-random} IP.2 = ${instance-parameter:ipv6-random}
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:_buildout_section_name_}.txt output = ${buildout:parts-directory}/${:_buildout_section_name_}/${:_buildout_section_name_}.txt
[rest-server-certificate-prepare-csr] [rest-server-certificate-prepare-csr]
recipe = plone.recipe.command recipe = plone.recipe.command
...@@ -104,7 +103,7 @@ command = ...@@ -104,7 +103,7 @@ command =
-new \ -new \
-nodes \ -nodes \
-keyout /dev/null \ -keyout /dev/null \
-config '${rest-server-certificate-csr-config:rendered}' \ -config '${rest-server-certificate-csr-config:output}' \
-out '${:csr}' -out '${:csr}'
fi fi
stop-on-error = true stop-on-error = true
...@@ -136,7 +135,7 @@ user = backup ...@@ -136,7 +135,7 @@ user = backup
[rest-server-htpassword] [rest-server-htpassword]
recipe = plone.recipe.command recipe = plone.recipe.command
command = command =
if [ ! -f '${:htpassword}' ] ; then if [ ! -f '${:htpassword}' ] ; then
{{ htpasswd_bin }} \ {{ htpasswd_bin }} \
-b \ -b \
......
...@@ -32,9 +32,8 @@ revision = v0.10.0-0-g9313f19 ...@@ -32,9 +32,8 @@ revision = v0.10.0-0-g9313f19
[instance.cfg.in] [instance.cfg.in]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 0644
context = context =
section buildout buildout section buildout buildout
key gowork_bin gowork:bin key gowork_bin gowork:bin
...@@ -42,6 +41,6 @@ context = ...@@ -42,6 +41,6 @@ context =
raw htpasswd_bin ${apache:location}/bin/htpasswd raw htpasswd_bin ${apache:location}/bin/htpasswd
raw dash_bin ${dash:location}/bin/dash raw dash_bin ${dash:location}/bin/dash
raw curl_bin ${curl:location}/bin/curl raw curl_bin ${curl:location}/bin/curl
key template_monitor monitor2-template:rendered key template_monitor monitor2-template:output
import-list = import-list =
file caucase caucase-jinja2-library:target file caucase caucase-jinja2-library:target
...@@ -48,7 +48,6 @@ post-install = ...@@ -48,7 +48,6 @@ post-install =
[macro-template] [macro-template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 0644
[template] [template]
<= macro-template <= macro-template
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 0084214fae4ee1aad2c878aa393757af md5sum = 9b41238f67ea8e12f8ea9590fd552b33
[template-selenium] [template-selenium]
filename = instance-selenium.cfg.in filename = instance-selenium.cfg.in
md5sum = 35ba19f7cb4fe7fc9469611f2446c94e md5sum = 3e50d629307ca9f1381909102a52756d
...@@ -4,15 +4,15 @@ parts = ...@@ -4,15 +4,15 @@ parts =
promises promises
publish-connection-parameter publish-connection-parameter
extends = ${monitor-template:rendered} extends = ${monitor-template:output}
eggs-directory = ${buildout:eggs-directory} eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory} develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true offline = true
[fontconfig-conf] [fontconfig-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-fonts-conf:output} url = ${template-fonts-conf:output}
rendered = $${directory:etc}/fonts.conf output = $${directory:etc}/fonts.conf
context = context =
key cachedir directory:fontconfig-cache key cachedir directory:fontconfig-cache
key fonts :fonts key fonts :fonts
...@@ -93,7 +93,7 @@ environment = ...@@ -93,7 +93,7 @@ environment =
PATH=${buildout:bin-directory} PATH=${buildout:bin-directory}
XORG_LOCK_DIR=$${directory:tmp} XORG_LOCK_DIR=$${directory:tmp}
DISPLAY=$${xvfb-instance:display} DISPLAY=$${xvfb-instance:display}
FONTCONFIG_FILE=$${fontconfig-conf:rendered} FONTCONFIG_FILE=$${fontconfig-conf:output}
hostname = $${slap-configuration:ipv4-random} hostname = $${slap-configuration:ipv4-random}
...@@ -146,9 +146,9 @@ bytes = 12 ...@@ -146,9 +146,9 @@ bytes = 12
[selenium-server-frontend-config] [selenium-server-frontend-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:etc}/$${:_buildout_section_name_} output = $${directory:etc}/$${:_buildout_section_name_}
template = inline: inline =
https://[$${:ip}]:$${:port} { https://[$${:ip}]:$${:port} {
bind $${:ip} bind $${:ip}
tls self_signed # TODO tls self_signed # TODO
...@@ -175,7 +175,7 @@ path-hub = /wd/hub ...@@ -175,7 +175,7 @@ path-hub = /wd/hub
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_} wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line = command-line =
${caddy:output} -conf $${selenium-server-frontend-config:rendered} ${caddy:output} -conf $${selenium-server-frontend-config:output}
ip = $${selenium-server-frontend-config:ip} ip = $${selenium-server-frontend-config:ip}
hostname = $${selenium-server-frontend-config:hostname} hostname = $${selenium-server-frontend-config:hostname}
...@@ -229,10 +229,10 @@ command = echo "$${:fingerprint}" | ( grep ^Error || exit 0 && exit 1 ) ...@@ -229,10 +229,10 @@ command = echo "$${:fingerprint}" | ( grep ^Error || exit 0 && exit 1 )
fingerprint = $${ssh-key-fingerprint-shelloutput:fingerprint} fingerprint = $${ssh-key-fingerprint-shelloutput:fingerprint}
[sshd-config] [sshd-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:etc}/sshd.conf output = $${directory:etc}/sshd.conf
path_pid = $${directory:run}/sshd.pid path_pid = $${directory:run}/sshd.pid
template = inline: inline =
PidFile $${:path_pid} PidFile $${:path_pid}
Port $${sshd-address:port} Port $${sshd-address:port}
ListenAddress $${sshd-address:ip} ListenAddress $${sshd-address:ip}
...@@ -250,7 +250,7 @@ template = inline: ...@@ -250,7 +250,7 @@ template = inline:
[sshd-service] [sshd-service]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${openssh:location}/sbin/sshd -D -e -f $${sshd-config:rendered} command-line = ${openssh:location}/sbin/sshd -D -e -f $${sshd-config:output}
wrapper-path = $${directory:services}/$${:_buildout_section_name_} wrapper-path = $${directory:services}/$${:_buildout_section_name_}
username = $${userinfo:pw-name} username = $${userinfo:pw-name}
ip = $${sshd-address:ip} ip = $${sshd-address:ip}
...@@ -307,16 +307,14 @@ config-port = $${selenium-server-hub-instance:port} ...@@ -307,16 +307,14 @@ config-port = $${selenium-server-hub-instance:port}
promise = check_command_execute promise = check_command_execute
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-command = config-command =
$${selenium-server-check-nodes-registered:rendered} $${selenium-server-hub-instance:api-url} $${:expected-node-count} $${selenium-server-check-nodes-registered:output} $${selenium-server-hub-instance:api-url} $${:expected-node-count}
# We have 6 nodes with 3 slots each # We have 6 nodes with 3 slots each
expected-node-count = 18 expected-node-count = 18
[selenium-server-check-nodes-registered] [selenium-server-check-nodes-registered]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:bin}/$${:_buildout_section_name_} output = $${directory:bin}/$${:_buildout_section_name_}
mode = 0755 inline =
template =
inline:
#!${buildout:executable} #!${buildout:executable}
import json, urllib, sys import json, urllib, sys
api_url = sys.argv[1] api_url = sys.argv[1]
......
...@@ -8,8 +8,8 @@ offline = true ...@@ -8,8 +8,8 @@ offline = true
[dynamic-template-selenium] [dynamic-template-selenium]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-selenium:output} url = ${template-selenium:output}
rendered = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename} output = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename}
filename = instance-selenium.cfg filename = instance-selenium.cfg
context = context =
key partition_ipv6 slap-configuration:ipv6-random key partition_ipv6 slap-configuration:ipv6-random
...@@ -17,7 +17,7 @@ context = ...@@ -17,7 +17,7 @@ context =
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = $${:default} RootSoftwareInstance = $${:default}
default = dynamic-template-selenium:rendered default = dynamic-template-selenium:output
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration recipe = slapos.cookbook:slapconfiguration
......
...@@ -36,7 +36,6 @@ url = https://selenium-release.storage.googleapis.com/3.14/${:filename} ...@@ -36,7 +36,6 @@ url = https://selenium-release.storage.googleapis.com/3.14/${:filename}
[macro-template] [macro-template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 0644
[template] [template]
<= macro-template <= macro-template
......
...@@ -18,7 +18,7 @@ md5sum = ce9c231ec47eb8f528345add21cb7822 ...@@ -18,7 +18,7 @@ md5sum = ce9c231ec47eb8f528345add21cb7822
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = f565956476c31881b6e51ae1c27793ad md5sum = 95ac13b95bc9d5356fffe9c62dec38cc
[template-apache-backend-conf] [template-apache-backend-conf]
filename = apache-backend.conf.in filename = apache-backend.conf.in
......
...@@ -17,7 +17,6 @@ per partition. No more (undefined result), no less (IndexError). ...@@ -17,7 +17,6 @@ per partition. No more (undefined result), no less (IndexError).
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 644
{{ caucase.updater( {{ caucase.updater(
prefix='caucase-updater', prefix='caucase-updater',
...@@ -104,16 +103,16 @@ ip = {{ ipv4 }} ...@@ -104,16 +103,16 @@ ip = {{ ipv4 }}
[haproxy-cfg] [haproxy-cfg]
< = jinja2-template-base < = jinja2-template-base
template = {{ parameter_dict['template-haproxy-cfg'] }} url = {{ parameter_dict['template-haproxy-cfg'] }}
rendered = ${directory:etc}/haproxy.cfg output = ${directory:etc}/haproxy.cfg
context = section parameter_dict haproxy-cfg-parameter-dict context = section parameter_dict haproxy-cfg-parameter-dict
extensions = jinja2.ext.do extensions = jinja2.ext.do
[{{ section('haproxy') }}] [{{ section('haproxy') }}]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:services}/haproxy wrapper-path = ${directory:services}/haproxy
command-line = "{{ parameter_dict['haproxy'] }}/sbin/haproxy" -f "${haproxy-cfg:rendered}" command-line = "{{ parameter_dict['haproxy'] }}/sbin/haproxy" -f "${haproxy-cfg:output}"
hash-files = ${haproxy-cfg:rendered} hash-files = ${haproxy-cfg:output}
[apache-conf-ssl] [apache-conf-ssl]
cert = ${directory:apache-conf}/apache.crt cert = ${directory:apache-conf}/apache.crt
...@@ -126,7 +125,7 @@ crl = ${directory:apache-conf}/crl.pem ...@@ -126,7 +125,7 @@ crl = ${directory:apache-conf}/crl.pem
[simplefile] [simplefile]
< = jinja2-template-base < = jinja2-template-base
template = inline:{{ '{{ content }}' }} inline ={{ '{{ content }}' }}
{% macro simplefile(section_name, file_path, content, mode='') -%} {% macro simplefile(section_name, file_path, content, mode='') -%}
{% set content_section_name = section_name ~ '-content' -%} {% set content_section_name = section_name ~ '-content' -%}
...@@ -135,7 +134,7 @@ content = {{ dumps(content) }} ...@@ -135,7 +134,7 @@ content = {{ dumps(content) }}
[{{ section(section_name) }}] [{{ section(section_name) }}]
< = simplefile < = simplefile
rendered = {{ file_path }} output = {{ file_path }}
context = key content {{content_section_name}}:content context = key content {{content_section_name}}:content
mode = {{ mode }} mode = {{ mode }}
{%- endmacro %} {%- endmacro %}
...@@ -143,8 +142,8 @@ mode = {{ mode }} ...@@ -143,8 +142,8 @@ mode = {{ mode }}
[apache-ssl] [apache-ssl]
{% if ssl_parameter_dict.get('key') -%} {% if ssl_parameter_dict.get('key') -%}
key = ${apache-ssl-key:rendered} key = ${apache-ssl-key:output}
cert = ${apache-ssl-cert:rendered} cert = ${apache-ssl-cert:output}
{{ simplefile('apache-ssl-key', '${apache-conf-ssl:key}', ssl_parameter_dict['key']) }} {{ simplefile('apache-ssl-key', '${apache-conf-ssl:key}', ssl_parameter_dict['key']) }}
{{ simplefile('apache-ssl-cert', '${apache-conf-ssl:cert}', ssl_parameter_dict['cert']) }} {{ simplefile('apache-ssl-cert', '${apache-conf-ssl:cert}', ssl_parameter_dict['cert']) }}
{% else %} {% else %}
...@@ -175,19 +174,19 @@ crl = ${apache-conf-ssl:crl} ...@@ -175,19 +174,19 @@ crl = ${apache-conf-ssl:crl}
{% if shared_ca_path -%} {% if shared_ca_path -%}
shared-ca-cert = {{ shared_ca_path }}/cacert.pem shared-ca-cert = {{ shared_ca_path }}/cacert.pem
shared-crl = {{ shared_ca_path }}/crl shared-crl = {{ shared_ca_path }}/crl
{%- endif %} {%- endif %}
[apache-conf] [apache-conf]
< = jinja2-template-base < = jinja2-template-base
template = {{ parameter_dict['template-apache-conf'] }} url = {{ parameter_dict['template-apache-conf'] }}
rendered = ${directory:apache-conf}/apache.conf output = ${directory:apache-conf}/apache.conf
context = section parameter_dict apache-conf-parameter-dict context = section parameter_dict apache-conf-parameter-dict
[{{ section('apache') }}] [{{ section('apache') }}]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:services}/apache wrapper-path = ${directory:services}/apache
command-line = "{{ parameter_dict['apache'] }}/bin/httpd" -f "${apache-conf:rendered}" -DFOREGROUND command-line = "{{ parameter_dict['apache'] }}/bin/httpd" -f "${apache-conf:output}" -DFOREGROUND
wait-for-files = wait-for-files =
${apache-conf-ssl:cert} ${apache-conf-ssl:cert}
${apache-conf-ssl:key} ${apache-conf-ssl:key}
...@@ -262,8 +261,8 @@ apachedex = ${monitor-directory:private}/apachedex ...@@ -262,8 +261,8 @@ apachedex = ${monitor-directory:private}/apachedex
[{{ section('resiliency-exclude-file') }}] [{{ section('resiliency-exclude-file') }}]
# Generate rdiff exclude file in case of resiliency # Generate rdiff exclude file in case of resiliency
< = jinja2-template-base < = jinja2-template-base
template = {{ 'inline:{{ "${directory:log}/**\\n" }}' }} inline = {{ '{{ "${directory:log}/**\\n" }}' }}
rendered = ${directory:srv}/exporter.exclude output = ${directory:srv}/exporter.exclude
[{{ section('monitor-generate-apachedex-report') }}] [{{ section('monitor-generate-apachedex-report') }}]
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
...@@ -281,9 +280,9 @@ command-line = "{{ parameter_dict['run-apachedex-location'] }}" "{{ parameter_di ...@@ -281,9 +280,9 @@ command-line = "{{ parameter_dict['run-apachedex-location'] }}" "{{ parameter_di
command = generate-apachedex-report command = generate-apachedex-report
[monitor-apachedex-report-config] [monitor-apachedex-report-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${directory:etc}/${:_buildout_section_name_} output = ${directory:etc}/${:_buildout_section_name_}
template = inline: inline =
{% for line in slapparameter_dict['apachedex-configuration'] %} {% for line in slapparameter_dict['apachedex-configuration'] %}
{# apachedex config files use shlex.split, so we need to quote the arguments. #} {# apachedex config files use shlex.split, so we need to quote the arguments. #}
{# BBB: in python 3 we can use shlex.quote instead. #} {# BBB: in python 3 we can use shlex.quote instead. #}
...@@ -292,7 +291,7 @@ template = inline: ...@@ -292,7 +291,7 @@ template = inline:
[apachedex-parameters] [apachedex-parameters]
apache-log-list = ${apache-conf-parameter-dict:access-log} apache-log-list = ${apache-conf-parameter-dict:access-log}
configuration = ${monitor-apachedex-report-config:rendered} configuration = ${monitor-apachedex-report-config:output}
promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }} promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }}
[{{ section('monitor-promise-apachedex-result') }}] [{{ section('monitor-promise-apachedex-result') }}]
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = 2c8b202b0c366e27dd6e6f456fb18256 md5sum = 06379c0ed1fe0df409c7b8f61fc218eb
...@@ -28,9 +28,9 @@ test-working-dir = ${buildout:directory}/tmp ...@@ -28,9 +28,9 @@ test-working-dir = ${buildout:directory}/tmp
nxdtest-working-dir = ${:var}/nxdtest nxdtest-working-dir = ${:var}/nxdtest
[slapos-test-runner-nxdtest-environment.sh] [slapos-test-runner-nxdtest-environment.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${directory:etc}/${:_buildout_section_name_} output = ${directory:etc}/${:_buildout_section_name_}
template = inline: inline =
export PATH={{ buildout['bin-directory'] }}:{{ curl_location }}/bin:{{ faketime_location }}/bin:{{ openssl_location }}/bin:/usr/bin:/bin export PATH={{ buildout['bin-directory'] }}:{{ curl_location }}/bin:{{ faketime_location }}/bin:{{ openssl_location }}/bin:/usr/bin:/bin
export SLAPOS_TEST_IPV4=${slap-configuration:ipv4-random} export SLAPOS_TEST_IPV4=${slap-configuration:ipv4-random}
export SLAPOS_TEST_IPV6=${slap-configuration:ipv6-random} export SLAPOS_TEST_IPV6=${slap-configuration:ipv6-random}
...@@ -38,11 +38,11 @@ template = inline: ...@@ -38,11 +38,11 @@ template = inline:
[slapos-test-runner-dot-nxdtest] [slapos-test-runner-dot-nxdtest]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${:workdir}/.nxdtest output = ${:workdir}/.nxdtest
workdir = ${directory:nxdtest-working-dir} workdir = ${directory:nxdtest-working-dir}
tests = {{ tests | indent(2) }} tests = {{ tests | indent(2) }}
template = inline =
inline:{% raw %} {% raw %}
{%- set only_sr = slapparameter_dict.get('only-sr') %} {%- set only_sr = slapparameter_dict.get('only-sr') %}
{%- if only_sr and not isinstance(only_sr, list) %} {%- if only_sr and not isinstance(only_sr, list) %}
{%- set only_sr = [only_sr] %} {%- set only_sr = [only_sr] %}
...@@ -70,14 +70,14 @@ context = ...@@ -70,14 +70,14 @@ context =
raw interpreter {{ interpreter }} raw interpreter {{ interpreter }}
[runTestSuite] [runTestSuite]
env.sh = ${slapos-test-runner-nxdtest-environment.sh:rendered} env.sh = ${slapos-test-runner-nxdtest-environment.sh:output}
workdir = ${slapos-test-runner-dot-nxdtest:workdir} workdir = ${slapos-test-runner-dot-nxdtest:workdir}
[slapos-local-development-environment.sh] [slapos-local-development-environment.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${directory:etc}/${:_buildout_section_name_} output = ${directory:etc}/${:_buildout_section_name_}
template = inline: inline =
source ${slapos-test-runner-nxdtest-environment.sh:rendered} source ${slapos-test-runner-nxdtest-environment.sh:output}
{% set shared_part_list = [] %} {% set shared_part_list = [] %}
{% for shared_part in buildout['shared-part-list'].splitlines() -%} {% for shared_part in buildout['shared-part-list'].splitlines() -%}
{% do shared_part_list.append(shared_part) %} {% do shared_part_list.append(shared_part) %}
...@@ -92,4 +92,4 @@ template = inline: ...@@ -92,4 +92,4 @@ template = inline:
[publish] [publish]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
environment-script = ${slapos-local-development-environment.sh:rendered} environment-script = ${slapos-local-development-environment.sh:output}
...@@ -326,14 +326,13 @@ branch = master ...@@ -326,14 +326,13 @@ branch = master
[template] [template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
extensions = jinja2.ext.do extensions = jinja2.ext.do
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 640
context = context =
section buildout buildout section buildout buildout
import os os import os os
key nxdtest_instance nxdtest-instance.cfg:rendered key nxdtest_instance nxdtest-instance.cfg:output
key git_location git:location key git_location git:location
key slapos_location slapos-repository:location key slapos_location slapos-repository:location
key interpreter python-interpreter:interpreter key interpreter python-interpreter:interpreter
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = ba6c572678687081ce111d3805be3cee md5sum = 850dedff7af48a70208361cabf688724
[buildout] [buildout]
extends = ${nxdtest-instance.cfg:rendered} extends = ${nxdtest-instance.cfg:output}
parts += parts +=
publish publish
...@@ -33,14 +33,15 @@ repository = ${kedifa-repository:location} ...@@ -33,14 +33,15 @@ repository = ${kedifa-repository:location}
repository = ${caucase-repository:location} repository = ${caucase-repository:location}
[caucase-test-runner] [caucase-test-runner]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline:#!/bin/sh inline =
#!/bin/sh
export HOSTS_FILE="$(mktemp)" export HOSTS_FILE="$(mktemp)"
trap 'rm "$HOSTS_FILE"' EXIT trap 'rm "$HOSTS_FILE"' EXIT
printf '%s testhost\n%s testhost\n' "$SLAPOS_TEST_IPV4" "$SLAPOS_TEST_IPV6" > "$HOSTS_FILE" printf '%s testhost\n%s testhost\n' "$SLAPOS_TEST_IPV4" "$SLAPOS_TEST_IPV6" > "$HOSTS_FILE"
export CAUCASE_NETLOC=testhost:8000 LD_PRELOAD=${userhosts:location}/lib/libuserhosts.so:$LD_PRELOAD export CAUCASE_NETLOC=testhost:8000 LD_PRELOAD=${userhosts:location}/lib/libuserhosts.so:$LD_PRELOAD
exec python -m unittest discover -v exec python -m unittest discover -v
rendered = $${caucase:location}/host_setting.sh output = $${caucase:location}/host_setting.sh
[slapos.libnetworkcache] [slapos.libnetworkcache]
<= download-source <= download-source
...@@ -84,9 +85,9 @@ repository = ${rubygemsrecipe-repository:location} ...@@ -84,9 +85,9 @@ repository = ${rubygemsrecipe-repository:location}
[slapos-test-runner-nxdtest-environment.sh] [slapos-test-runner-nxdtest-environment.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${create-directory:etc}/$${:_buildout_section_name_} output = $${create-directory:etc}/$${:_buildout_section_name_}
template = inline: inline =
export PATH=${coreutils:location}/bin:${curl:location}/bin:${openssl:location}/bin:${jq:location}/bin:${sed:location}/bin:${grep:location}/bin:${git:location}/bin:${libxslt:location}/bin:${socat:location}/bin:${lmsensors:location}/bin:${rsync:location}/bin/:${buildout:bin-directory}:$PATH export PATH=${coreutils:location}/bin:${curl:location}/bin:${openssl:location}/bin:${jq:location}/bin:${sed:location}/bin:${grep:location}/bin:${git:location}/bin:${libxslt:location}/bin:${socat:location}/bin:${lmsensors:location}/bin:${rsync:location}/bin/:${buildout:bin-directory}:$PATH
export SLAPOS_TEST_IPV4=$${slap-configuration:ipv4-random} export SLAPOS_TEST_IPV4=$${slap-configuration:ipv4-random}
export SLAPOS_TEST_IPV6=$${slap-configuration:ipv6-random} export SLAPOS_TEST_IPV6=$${slap-configuration:ipv6-random}
...@@ -96,11 +97,10 @@ template = inline: ...@@ -96,11 +97,10 @@ template = inline:
[slapos-test-runner-dot-nxdtest] [slapos-test-runner-dot-nxdtest]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${:workdir}/.nxdtest output = $${:workdir}/.nxdtest
workdir = $${create-directory:nxdtest-working-dir} workdir = $${create-directory:nxdtest-working-dir}
inline =
template = inline:
TestCase( TestCase(
"kedifa", "kedifa",
['python', '-m', 'unittest', 'discover', '-v'], ['python', '-m', 'unittest', 'discover', '-v'],
...@@ -109,7 +109,7 @@ template = inline: ...@@ -109,7 +109,7 @@ template = inline:
) )
TestCase( TestCase(
"caucase", "caucase",
['$${caucase-test-runner:rendered}'], ['$${caucase-test-runner:output}'],
cwd="""$${caucase:location}""", cwd="""$${caucase:location}""",
summaryf=UnitTest.summary, summaryf=UnitTest.summary,
) )
...@@ -191,14 +191,14 @@ template = inline: ...@@ -191,14 +191,14 @@ template = inline:
) )
[runTestSuite] [runTestSuite]
env.sh = $${slapos-test-runner-nxdtest-environment.sh:rendered} env.sh = $${slapos-test-runner-nxdtest-environment.sh:output}
workdir = $${slapos-test-runner-dot-nxdtest:workdir} workdir = $${slapos-test-runner-dot-nxdtest:workdir}
[slapos-local-development-environment.sh] [slapos-local-development-environment.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${create-directory:etc}/$${:_buildout_section_name_} output = $${create-directory:etc}/$${:_buildout_section_name_}
template = inline: inline =
source $${slapos-test-runner-nxdtest-environment.sh:rendered} source $${slapos-test-runner-nxdtest-environment.sh:output}
echo "Environment loaded." echo "Environment loaded."
echo "To work on a test, execute:" echo "To work on a test, execute:"
echo " $${runTestSuite:wrapper-path} -k test_name" echo " $${runTestSuite:wrapper-path} -k test_name"
...@@ -207,4 +207,4 @@ template = inline: ...@@ -207,4 +207,4 @@ template = inline:
[publish] [publish]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
environment-script = $${slapos-local-development-environment.sh:rendered} environment-script = $${slapos-local-development-environment.sh:output}
...@@ -209,7 +209,6 @@ repository = https://lab.nexedi.com/nexedi/rubygemsrecipe.git ...@@ -209,7 +209,6 @@ repository = https://lab.nexedi.com/nexedi/rubygemsrecipe.git
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 640
[versions] [versions]
# When possible, clear version pins of tested eggs, to make sure buildout # When possible, clear version pins of tested eggs, to make sure buildout
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = ba3539d959143a3be76fcb54196a3aa8 md5sum = 473325442cba8ee32642d1e5e3fa94f4
[template-runner] [template-runner]
filename = instance-runner.cfg filename = instance-runner.cfg
md5sum = efa0d1647dee2689485264daf256c76d md5sum = 8d284c9257250afd83a1463662a56d08
[template-runner-import-script] [template-runner-import-script]
filename = template/runner-import.sh.jinja2 filename = template/runner-import.sh.jinja2
...@@ -26,11 +26,11 @@ md5sum = f2e2493bc5da90a53f86e5bcf64d2d57 ...@@ -26,11 +26,11 @@ md5sum = f2e2493bc5da90a53f86e5bcf64d2d57
[instance-runner-import] [instance-runner-import]
filename = instance-runner-import.cfg.in filename = instance-runner-import.cfg.in
md5sum = a4ebf6918a2c68c02898b2142357f490 md5sum = f4d71d97cf16ef379b41c4c22352727c
[instance-runner-export] [instance-runner-export]
filename = instance-runner-export.cfg.in filename = instance-runner-export.cfg.in
md5sum = b992bb3391de9d6d422bfa8011d8ffc4 md5sum = 5f57249108e61976d97465624cc5a2a1
[template-resilient] [template-resilient]
filename = instance-resilient.cfg.jinja2 filename = instance-resilient.cfg.jinja2
......
...@@ -86,9 +86,8 @@ private-path-list += ...@@ -86,9 +86,8 @@ private-path-list +=
[monitor-check-resilient-feed-file] [monitor-check-resilient-feed-file]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ monitor_check_resilient_feed_template_path }} url = {{ monitor_check_resilient_feed_template_path }}
rendered = ${monitor-directory:bin}/check-create-resilient-feed-files output = ${monitor-directory:bin}/check-create-resilient-feed-files
mode = 700
context = context =
key input_feed_directory directory:notifier-feeds key input_feed_directory directory:notifier-feeds
key monitor_feed_directory monitor-directory:public key monitor_feed_directory monitor-directory:public
......
...@@ -79,11 +79,10 @@ recipe = ...@@ -79,11 +79,10 @@ recipe =
[importer] [importer]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ importer_script_path }} url = {{ importer_script_path }}
rendered = ${directory:bin}/${slap-parameter:namebase}-importer output = ${directory:bin}/${slap-parameter:namebase}-importer
# backward compatibility for resilient stack # backward compatibility for resilient stack
wrapper = ${:rendered} wrapper = ${:output}
mode = 700
restore-exit-code-file = ${directory:srv}/${:restore-exit-code-file-basename} restore-exit-code-file = ${directory:srv}/${:restore-exit-code-file-basename}
restore-exit-code-file-basename = importer-exit-code-file restore-exit-code-file-basename = importer-exit-code-file
restore-error-message-file = ${directory:srv}/${:restore-error-message-file-basename} restore-error-message-file = ${directory:srv}/${:restore-error-message-file-basename}
...@@ -167,7 +166,6 @@ recipe = slapos.recipe.template ...@@ -167,7 +166,6 @@ recipe = slapos.recipe.template
url = {{ software_release_information_template }} url = {{ software_release_information_template }}
output = ${directory:cgi-bin}/resilient_software_release_information.py output = ${directory:cgi-bin}/resilient_software_release_information.py
resilient-log-url = ${monitor-publish-parameters:monitor-base-url}/log/${importer:resilient-log-basename} resilient-log-url = ${monitor-publish-parameters:monitor-base-url}/log/${importer:resilient-log-basename}
mode = 0600
[slap-parameter] [slap-parameter]
auto-deploy-instance = false auto-deploy-instance = false
......
...@@ -53,8 +53,8 @@ common-runner-parts = ...@@ -53,8 +53,8 @@ common-runner-parts =
parts = $${:common-runner-parts} parts = $${:common-runner-parts}
extends = extends =
${monitor2-template:rendered} ${monitor2-template:output}
${template-logrotate-base:rendered} ${template-logrotate-base:output}
[slap-network-information] [slap-network-information]
local-ipv4 = $${slap-configuration:ipv4-random} local-ipv4 = $${slap-configuration:ipv4-random}
...@@ -95,13 +95,13 @@ config-http-code = 401 ...@@ -95,13 +95,13 @@ config-http-code = 401
{% endif -%} {% endif -%}
[custom-frontend-url-ready-promise-bin] [custom-frontend-url-ready-promise-bin]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
url = https://$${request-custom-frontend:connection-domain} frontend-url = https://$${request-custom-frontend:connection-domain}
rendered = $${directory:bin}/custom_frontend_ready_promise output = $${directory:bin}/custom_frontend_ready_promise
template = inline: inline =
#!{{ dash_executable_location }} #!{{ dash_executable_location }}
URL="$${:url}" URL="$${:frontend-url}"
CODE=$({{ curl_executable_location }} -g -k -sL $URL -w %{http_code} --max-time 5 -o /dev/null) CODE=$({{ curl_executable_location }} -g -k -sL $URL -w %{http_code} --max-time 5 -o /dev/null)
if [ $? -eq 3 ]; then if [ $? -eq 3 ]; then
...@@ -113,10 +113,10 @@ template = inline: ...@@ -113,10 +113,10 @@ template = inline:
<= monitor-promise-base <= monitor-promise-base
promise = check_command_execute promise = check_command_execute
name = custom_frontend_ready_promise.py name = custom_frontend_ready_promise.py
config-command = $${custom-frontend-url-ready-promise-bin:rendered} config-command = $${custom-frontend-url-ready-promise-bin:output}
[publish-connection-information] [publish-connection-information]
custom-frontend-url = $${custom-frontend-url-ready-promise-bin:url} custom-frontend-url = $${custom-frontend-url-ready-promise-bin:frontend-url}
{% endif %} {% endif %}
# Create all needed directories # Create all needed directories
...@@ -244,7 +244,7 @@ arguments = --server_url=$${slap-connection:server-url} --key_file=$${slap-conne ...@@ -244,7 +244,7 @@ arguments = --server_url=$${slap-connection:server-url} --key_file=$${slap-conne
command-line = ${buildout:bin-directory}/slaprunnertest $${:arguments} command-line = ${buildout:bin-directory}/slaprunnertest $${:arguments}
wrapper-path = $${directory:bin}/runTestSuite wrapper-path = $${directory:bin}/runTestSuite
environment = PATH=$${shell-environment:path} environment = PATH=$${shell-environment:path}
RUNNER_CONFIG=$${slapos-cfg:rendered} RUNNER_CONFIG=$${slapos-cfg:output}
# Deploy openssh-server # Deploy openssh-server
[runner-sshd-port] [runner-sshd-port]
...@@ -255,9 +255,9 @@ ip = $${slap-network-information:global-ipv6} ...@@ -255,9 +255,9 @@ ip = $${slap-network-information:global-ipv6}
[runner-sshd-config] [runner-sshd-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:etc}/runner-sshd.conf output = $${directory:etc}/runner-sshd.conf
path_pid = $${directory:run}/runner-sshd.pid path_pid = $${directory:run}/runner-sshd.pid
template = inline: inline =
PidFile $${:path_pid} PidFile $${:path_pid}
Port $${runner-sshd-port:port} Port $${runner-sshd-port:port}
ListenAddress $${slap-network-information:global-ipv6} ListenAddress $${slap-network-information:global-ipv6}
...@@ -272,7 +272,7 @@ template = inline: ...@@ -272,7 +272,7 @@ template = inline:
[runner-sshd-service] [runner-sshd-service]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${openssh:location}/sbin/sshd -D -e -f $${runner-sshd-config:rendered} command-line = ${openssh:location}/sbin/sshd -D -e -f $${runner-sshd-config:output}
hash-existing-files = $${buildout:directory}/software_release/buildout.cfg hash-existing-files = $${buildout:directory}/software_release/buildout.cfg
wrapper-path = $${directory:services}/runner-sshd wrapper-path = $${directory:services}/runner-sshd
...@@ -362,8 +362,8 @@ work_dir = $${slaprunner:working-directory} ...@@ -362,8 +362,8 @@ work_dir = $${slaprunner:working-directory}
[nginx_conf] [nginx_conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template_nginx_conf:target} url = ${template_nginx_conf:target}
rendered = $${nginx-frontend:path_nginx_conf} output = $${nginx-frontend:path_nginx_conf}
context = context =
key shellinabox_socket shellinabox:socket key shellinabox_socket shellinabox:socket
key socket gunicorn:socket key socket gunicorn:socket
...@@ -372,9 +372,8 @@ context = ...@@ -372,9 +372,8 @@ context =
[nginx-launcher] [nginx-launcher]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template_launcher:target} url = ${template_launcher:target}
rendered = $${nginx-frontend:bin_launcher} output = $${nginx-frontend:bin_launcher}
mode = 700
context = context =
section param_nginx_frontend nginx-frontend section param_nginx_frontend nginx-frontend
...@@ -404,8 +403,8 @@ httpd_cors_file = $${slaprunner-httpd-cors:location} ...@@ -404,8 +403,8 @@ httpd_cors_file = $${slaprunner-httpd-cors:location}
[httpd-conf] [httpd-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template_httpd_conf:target} url = ${template_httpd_conf:target}
rendered = $${directory:etc}/httpd.conf output = $${directory:etc}/httpd.conf
context = context =
section parameters httpd-parameters section parameters httpd-parameters
...@@ -413,7 +412,7 @@ context = ...@@ -413,7 +412,7 @@ context =
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
apache-executable = ${apache:location}/bin/httpd apache-executable = ${apache:location}/bin/httpd
wrapper-path = $${directory:services}/slaprunner-httpd wrapper-path = $${directory:services}/slaprunner-httpd
command-line = $${:apache-executable} -f $${httpd-conf:rendered} -DFOREGROUND command-line = $${:apache-executable} -f $${httpd-conf:output} -DFOREGROUND
access-url = https://[$${httpd-parameters:global_ip}]:$${httpd-parameters:global_port} access-url = https://[$${httpd-parameters:global_ip}]:$${httpd-parameters:global_port}
wait-for-files = wait-for-files =
$${ca-nginx:cert-file} $${ca-nginx:cert-file}
...@@ -502,7 +501,7 @@ crl = $${directory:ca-dir}/crl/ ...@@ -502,7 +501,7 @@ crl = $${directory:ca-dir}/crl/
recipe = slapos.cookbook:certificate_authority.request recipe = slapos.cookbook:certificate_authority.request
key-file = $${cadirectory:certs}/nginx_frontend.key key-file = $${cadirectory:certs}/nginx_frontend.key
cert-file = $${cadirectory:certs}/nginx_frontend.crt cert-file = $${cadirectory:certs}/nginx_frontend.crt
executable = $${nginx-launcher:rendered} executable = $${nginx-launcher:output}
wrapper = $${directory:bin}/nginx-frontend wrapper = $${directory:bin}/nginx-frontend
# Put domain name # Put domain name
name = example.com name = example.com
...@@ -663,9 +662,8 @@ buildout-shared-folder = $${runnerdirectory:home}/shared ...@@ -663,9 +662,8 @@ buildout-shared-folder = $${runnerdirectory:home}/shared
[slapos-cfg] [slapos-cfg]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-slapos-cfg:target} url = ${template-slapos-cfg:target}
rendered = $${slaprunner:slapos.cfg} output = $${slaprunner:slapos.cfg}
mode = 700
context = context =
section slaprunner slaprunner section slaprunner slaprunner
import codecs codecs import codecs codecs
...@@ -673,17 +671,15 @@ context = ...@@ -673,17 +671,15 @@ context =
[slapos-test-cfg] [slapos-test-cfg]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-slapos-cfg:target} url = ${template-slapos-cfg:target}
rendered = $${test-runner:slapos.cfg} output = $${test-runner:slapos.cfg}
mode = 700
context = context =
section slaprunner test-runner section slaprunner test-runner
[slapformat-definition.cfg] [slapformat-definition.cfg]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-slapformat-definition.cfg:target} url = ${template-slapformat-definition.cfg:target}
rendered = $${slaprunner:slapformat-definition.cfg} output = $${slaprunner:slapformat-definition.cfg}
mode = 700
context = context =
section slaprunner slaprunner section slaprunner slaprunner
key partition_user user-info:pw-name key partition_user user-info:pw-name
...@@ -691,12 +687,11 @@ context = ...@@ -691,12 +687,11 @@ context =
raw buildout_shared_part_list_dump $${slaprunner:buildout-shared-part-list-dump} raw buildout_shared_part_list_dump $${slaprunner:buildout-shared-part-list-dump}
[shellinabox] [shellinabox]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
# We cannot use slapos.cookbook:wrapper here because this recipe escapes too much # We cannot use slapos.cookbook:wrapper here because this recipe escapes too much
socket = $${directory:run}/siab.sock socket = $${directory:run}/siab.sock
mode = 0700 output = $${directory:bin}/shellinaboxd
rendered = $${directory:bin}/shellinaboxd inline =
template = inline:
#!/bin/sh #!/bin/sh
exec ${shellinabox:location}/bin/shellinaboxd \ exec ${shellinabox:location}/bin/shellinaboxd \
--unixdomain-only=$${:socket}:$(id -u):$(id -g):0600 \ --unixdomain-only=$${:socket}:$(id -u):$(id -g):0600 \
...@@ -704,7 +699,7 @@ template = inline: ...@@ -704,7 +699,7 @@ template = inline:
[shellinabox-service] [shellinabox-service]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = $${shellinabox:rendered} command-line = $${shellinabox:output}
wrapper-path = $${directory:services}/shellinaboxd wrapper-path = $${directory:services}/shellinaboxd
hash-existing-files = $${buildout:directory}/software_release/buildout.cfg hash-existing-files = $${buildout:directory}/software_release/buildout.cfg
...@@ -727,9 +722,8 @@ command = $${prepare-software:wrapper-path} ...@@ -727,9 +722,8 @@ command = $${prepare-software:wrapper-path}
[instance-parameters] [instance-parameters]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do extensions = jinja2.ext.do
template = ${template-parameters:target} url = ${template-parameters:target}
rendered = $${directory:etc}/.parameter.xml.default output = $${directory:etc}/.parameter.xml.default
mode = 0644
context = context =
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
...@@ -737,7 +731,7 @@ context = ...@@ -737,7 +731,7 @@ context =
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = true stop-on-error = true
parameter-xml = $${directory:etc}/.parameter.xml parameter-xml = $${directory:etc}/.parameter.xml
command = if [ ! -f $${:parameter-xml} ]; then cp $${instance-parameters:rendered} $${:parameter-xml}; fi command = if [ ! -f $${:parameter-xml} ]; then cp $${instance-parameters:output} $${:parameter-xml}; fi
[instance-software-type] [instance-software-type]
recipe = plone.recipe.command recipe = plone.recipe.command
...@@ -759,8 +753,8 @@ stop-on-error = true ...@@ -759,8 +753,8 @@ stop-on-error = true
[bash-profile] [bash-profile]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-bash-profile:target} url = ${template-bash-profile:target}
rendered = $${buildout:directory}/.bash_profile output = $${buildout:directory}/.bash_profile
context = context =
raw path $${shell-environment:path} raw path $${shell-environment:path}
raw shell $${shell-environment:shell} raw shell $${shell-environment:shell}
...@@ -826,19 +820,18 @@ slapformat-definition.cfg = $${slaprunner:slapformat-definition.cfg} ...@@ -826,19 +820,18 @@ slapformat-definition.cfg = $${slaprunner:slapformat-definition.cfg}
[supervisord-conf] [supervisord-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-supervisord:target} url = ${template-supervisord:target}
rendered = $${directory:etc}/supervisord.conf output = $${directory:etc}/supervisord.conf
context = context =
import multiprocessing multiprocessing import multiprocessing multiprocessing
section supervisord supervisord section supervisord supervisord
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key listener_slapgrid listener-slapgrid-bin:rendered key listener_slapgrid listener-slapgrid-bin:output
[listener-slapgrid-bin] [listener-slapgrid-bin]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-listener-slapgrid:target} url = ${template-listener-slapgrid:target}
rendered = $${directory:bin}/listener_slapgrid.py output = $${directory:bin}/listener_slapgrid.py
mode = 0744
context = context =
section supervisord supervisord section supervisord supervisord
section slaprunner slaprunner section slaprunner slaprunner
...@@ -846,7 +839,7 @@ context = ...@@ -846,7 +839,7 @@ context =
[supervisord-wrapper] [supervisord-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/supervisord -c $${supervisord-conf:rendered} --nodaemon command-line = ${buildout:bin-directory}/supervisord -c $${supervisord-conf:output} --nodaemon
wrapper-path = $${directory:services}/supervisord wrapper-path = $${directory:services}/supervisord
hash-existing-files = $${buildout:directory}/software_release/buildout.cfg hash-existing-files = $${buildout:directory}/software_release/buildout.cfg
...@@ -904,18 +897,16 @@ private-path-list += ...@@ -904,18 +897,16 @@ private-path-list +=
$${logrotate-directory:logrotate-backup} $${logrotate-directory:logrotate-backup}
[monitor-check-webrunner-internal-instance] [monitor-check-webrunner-internal-instance]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = ${monitor-check-webrunner-internal-instance:target} url = ${monitor-check-webrunner-internal-instance:target}
rendered = $${monitor-directory:bin}/$${:filename} output = $${monitor-directory:bin}/$${:filename}
filename = monitor-check-webrunner-internal-instance filename = monitor-check-webrunner-internal-instance
mode = 0744
## Slapuser slapos command script ## Slapuser slapos command script
[template-slapuser-script] [template-slapuser-script]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-slapuser-script:target} url = ${template-slapuser-script:target}
rendered = $${buildout:bin-directory}/slapos output = $${buildout:bin-directory}/slapos
mode = 0744
context = context =
raw config_location $${slapos-cfg:rendered} raw config_location $${slapos-cfg:output}
raw slapos_python_file_location ${buildout:bin-directory}/slapos raw slapos_python_file_location ${buildout:bin-directory}/slapos
...@@ -11,21 +11,21 @@ extends = ...@@ -11,21 +11,21 @@ extends =
[switch_softwaretype] [switch_softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = $${:runner} default = $${:runner}
resilient = instance-resilient:rendered resilient = instance-resilient:output
runner = instance-base-runner:rendered runner = instance-base-runner:output
runner-import = template-runner-import:rendered runner-import = template-runner-import:output
runner-export = template-runner-export:rendered runner-export = template-runner-export:output
frozen = instance-frozen:rendered frozen = instance-frozen:output
pull-backup = template-pull-backup:rendered pull-backup = template-pull-backup:output
# BBB # BBB
RootSoftwareInstance = $${:default} RootSoftwareInstance = $${:default}
[instance-base-runner] [instance-base-runner]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-runner:output} url = ${template-runner:output}
rendered = $${buildout:directory}/template-runner.cfg output = $${buildout:directory}/template-runner.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = key buildout buildout:bin-directory context = key buildout buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
...@@ -34,32 +34,29 @@ context = key buildout buildout:bin-directory ...@@ -34,32 +34,29 @@ context = key buildout buildout:bin-directory
raw curl_executable_location ${curl:location}/bin/curl raw curl_executable_location ${curl:location}/bin/curl
raw dash_executable_location ${dash:location}/bin/dash raw dash_executable_location ${dash:location}/bin/dash
raw dcron_executable_location ${dcron:location}/sbin/crond raw dcron_executable_location ${dcron:location}/sbin/crond
mode = 0644
[instance-resilient] [instance-resilient]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-resilient:target} url = ${template-resilient:target}
rendered = $${buildout:directory}/instance-resilient.cfg output = $${buildout:directory}/instance-resilient.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = key buildout buildout:bin-directory context = key buildout buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
raw monitor_template ${monitor-template:rendered} raw monitor_template ${monitor-template:output}
template-parts-destination = ${template-parts:target} template-parts-destination = ${template-parts:target}
template-replicated-destination = ${template-replicated:target} template-replicated-destination = ${template-replicated:target}
import-list = file parts :template-parts-destination import-list = file parts :template-parts-destination
file replicated :template-replicated-destination file replicated :template-replicated-destination
mode = 0644
[template-runner-export] [template-runner-export]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${instance-runner-export:target} url = ${instance-runner-export:target}
rendered = $${buildout:directory}/instance-runner-export.cfg output = $${buildout:directory}/instance-runner-export.cfg
mode = 640
context = context =
key pbsready_export_template_path template-pbsready-export:rendered key pbsready_export_template_path template-pbsready-export:output
key template_runner_path instance-base-runner:rendered key template_runner_path instance-base-runner:output
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
raw software_release_bin ${buildout:bin-directory} raw software_release_bin ${buildout:bin-directory}
raw backup_wait_time ${exporter-default-configuration:backup_wait_time} raw backup_wait_time ${exporter-default-configuration:backup_wait_time}
...@@ -70,12 +67,11 @@ context = ...@@ -70,12 +67,11 @@ context =
[template-runner-import] [template-runner-import]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${instance-runner-import:target} url = ${instance-runner-import:target}
rendered = $${buildout:directory}/instance-runner-import.cfg output = $${buildout:directory}/instance-runner-import.cfg
mode = 640
context = context =
key pbsready_import_template_path template-pbsready-import:rendered key pbsready_import_template_path template-pbsready-import:output
key template_runner_path instance-base-runner:rendered key template_runner_path instance-base-runner:output
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
raw software_release_bin ${buildout:bin-directory} raw software_release_bin ${buildout:bin-directory}
raw importer_script_path ${template-runner-import-script:target} raw importer_script_path ${template-runner-import-script:target}
......
...@@ -15,19 +15,19 @@ ...@@ -15,19 +15,19 @@
[instance-theia] [instance-theia]
_update_hash_filename_ = instance-theia.cfg.jinja.in _update_hash_filename_ = instance-theia.cfg.jinja.in
md5sum = f8dde54b49aa62669c588913d21c6b15 md5sum = c9cd1d4c61733fb56078a99de9062800
[instance] [instance]
_update_hash_filename_ = instance.cfg.in _update_hash_filename_ = instance.cfg.in
md5sum = f2f01a47d98a980177dc1755e618bbb7 md5sum = af4d92a95dc25c2f64ddbd634996e46c
[instance-import] [instance-import]
_update_hash_filename_ = instance-import.cfg.jinja.in _update_hash_filename_ = instance-import.cfg.jinja.in
md5sum = 74b9b46769a25add50f9f63365de58ad md5sum = 6e5092422c97c21f02f7b7b3ff015367
[instance-export] [instance-export]
_update_hash_filename_ = instance-export.cfg.jinja.in _update_hash_filename_ = instance-export.cfg.jinja.in
md5sum = b3f1dd83033d6a45def0bd26e70d5a9c md5sum = 31a94c7a5ef18dbad807c0b57dfe6e0c
[instance-resilient] [instance-resilient]
_update_hash_filename_ = instance-resilient.cfg.jinja _update_hash_filename_ = instance-resilient.cfg.jinja
......
...@@ -24,12 +24,11 @@ namebase = {{ parameter_dict['namebase'] }} ...@@ -24,12 +24,11 @@ namebase = {{ parameter_dict['namebase'] }}
# to be pulled from the export instance. # to be pulled from the export instance.
# All it expects is that a script be available in exporter:wrapper. # All it expects is that a script be available in exporter:wrapper.
[exporter] [exporter]
wrapper = $${theia-export-script:rendered} wrapper = $${theia-export-script:output}
[theia-export-script] [theia-export-script]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/theia-export-script output = $${directory:bin}/theia-export-script
mode = 0700
exitcode-file = $${directory:srv}/export-exitcode-file exitcode-file = $${directory:srv}/export-exitcode-file
error-file = $${directory:srv}/export-errormessage-file error-file = $${directory:srv}/export-errormessage-file
context = context =
...@@ -46,8 +45,8 @@ context = ...@@ -46,8 +45,8 @@ context =
key exitfile :exitcode-file key exitfile :exitcode-file
key errorfile :error-file key errorfile :error-file
{%- raw %} {%- raw %}
template = inline =
inline:#!{{ bash }} #!{{ bash }}
{{ python }} {{ theia_export }} \ {{ python }} {{ theia_export }} \
--rsync {{ rsync }} \ --rsync {{ rsync }} \
--sqlite3 {{ sqlite3 }} \ --sqlite3 {{ sqlite3 }} \
...@@ -71,24 +70,24 @@ export-promises = ...@@ -71,24 +70,24 @@ export-promises =
<= monitor-promise-base <= monitor-promise-base
promise = check_command_execute promise = check_command_execute
name = resiliency-export-promise.py name = resiliency-export-promise.py
config-command = $${export-promise-script:rendered} config-command = $${export-promise-script:output}
[initial-export-exitcode-file] [initial-export-exitcode-file]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${theia-export-script:exitcode-file} output = $${theia-export-script:exitcode-file}
template = inline:0 inline =0
once = $${:rendered} once = $${:output}
[export-promise-script] [export-promise-script]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/export-promise-script output = $${directory:bin}/export-promise-script
exitcode-file = $${initial-export-exitcode-file:rendered} exitcode-file = $${initial-export-exitcode-file:output}
context = context =
key exitcodefile :exitcode-file key exitcodefile :exitcode-file
key errorfile theia-export-script:error-file key errorfile theia-export-script:error-file
{%- raw %} {%- raw %}
template = inline =
inline:#!/bin/sh #!/bin/sh
if [ -z $(find {{ repr(exitcodefile) }} -mtime -2) ] if [ -z $(find {{ repr(exitcodefile) }} -mtime -2) ]
then then
echo "ERROR export script last ran on " $(date -r {{ repr(exitcodefile) }}) echo "ERROR export script last ran on " $(date -r {{ repr(exitcodefile) }})
......
...@@ -74,12 +74,11 @@ install = ...@@ -74,12 +74,11 @@ install =
os.symlink("/bin/true", location) os.symlink("/bin/true", location)
[importer] [importer]
wrapper = $${theia-import-script:rendered} wrapper = $${theia-import-script:output}
[theia-import-script] [theia-import-script]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/theia-import-script output = $${directory:bin}/theia-import-script
mode = 0700
exitcode-file = $${directory:srv}/import-exitcode-file exitcode-file = $${directory:srv}/import-exitcode-file
error-file = $${directory:srv}/import-errormessage-file error-file = $${directory:srv}/import-errormessage-file
context = context =
...@@ -101,10 +100,10 @@ context = ...@@ -101,10 +100,10 @@ context =
key exitfile :exitcode-file key exitfile :exitcode-file
key errorfile :error-file key errorfile :error-file
{%- raw %} {%- raw %}
template = inline =
inline:#!{{ bash }} #!{{ bash }}
. $${common-environment:rendered} . $${common-environment:output}
. $${slapos-standalone-activate:rendered} . $${slapos-standalone-activate:output}
{{ python }} {{ theia_import }} \ {{ python }} {{ theia_import }} \
--rsync {{ rsync }} \ --rsync {{ rsync }} \
--sqlite3 {{ sqlite3 }} \ --sqlite3 {{ sqlite3 }} \
...@@ -133,24 +132,24 @@ import-promises = ...@@ -133,24 +132,24 @@ import-promises =
<= monitor-promise-base <= monitor-promise-base
promise = check_command_execute promise = check_command_execute
name = resiliency-import-promise.py name = resiliency-import-promise.py
config-command = $${import-promise-script:rendered} config-command = $${import-promise-script:output}
[initial-import-exitcode-file] [initial-import-exitcode-file]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${theia-import-script:exitcode-file} output = $${theia-import-script:exitcode-file}
template = inline:0 inline =0
once = $${:rendered} once = $${:output}
[import-promise-script] [import-promise-script]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/import-promise-script output = $${directory:bin}/import-promise-script
exitcode-file = $${initial-import-exitcode-file:rendered} exitcode-file = $${initial-import-exitcode-file:output}
context = context =
key exitcodefile :exitcode-file key exitcodefile :exitcode-file
key errorfile theia-import-script:error-file key errorfile theia-import-script:error-file
{%- raw %} {%- raw %}
template = inline =
inline:#!/bin/sh #!/bin/sh
if [ -z $(find {{ repr(exitcodefile) }} -mtime -2) ] if [ -z $(find {{ repr(exitcodefile) }} -mtime -2) ]
then then
echo "ERROR import script last ran on " $(date -r {{ repr(exitcodefile) }}) echo "ERROR import script last ran on " $(date -r {{ repr(exitcodefile) }})
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
[buildout] [buildout]
extends = extends =
${monitor-template:rendered} ${monitor-template:output}
theia-environment-parts = theia-environment-parts =
tasks.json tasks.json
...@@ -229,10 +229,9 @@ location = ...@@ -229,10 +229,9 @@ location =
$${:cert-file} $${:cert-file}
[frontend-instance-config] [frontend-instance-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:etc}/$${:_buildout_section_name_} output = $${directory:etc}/$${:_buildout_section_name_}
template = inline =
inline:
:$${:port} { :$${:port} {
bind $${:ip} bind $${:ip}
tls $${frontend-instance-certificate:cert-file} $${frontend-instance-certificate:key-file} tls $${frontend-instance-certificate:cert-file} $${frontend-instance-certificate:key-file}
...@@ -268,7 +267,7 @@ port = $${frontend-instance-port:port} ...@@ -268,7 +267,7 @@ port = $${frontend-instance-port:port}
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_} wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line = command-line =
${caddy:output} -conf $${frontend-instance-config:rendered} -pidfile $${:pidfile} ${caddy:output} -conf $${frontend-instance-config:output} -pidfile $${:pidfile}
ip = $${frontend-instance-config:ip} ip = $${frontend-instance-config:ip}
hostname = $${frontend-instance-config:hostname} hostname = $${frontend-instance-config:hostname}
...@@ -298,8 +297,8 @@ stop-on-error = true ...@@ -298,8 +297,8 @@ stop-on-error = true
[frontend-instance-slapos.css] [frontend-instance-slapos.css]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${slapos.css.in:output} url = ${slapos.css.in:output}
rendered = $${directory:frontend-static}/$${:folder-name}/slapos.css output = $${directory:frontend-static}/$${:folder-name}/slapos.css
folder-name = css folder-name = css
context = context =
key logo_image frontend-instance-logo:filename key logo_image frontend-instance-logo:filename
...@@ -312,7 +311,7 @@ command-line = ...@@ -312,7 +311,7 @@ command-line =
"kill -s USR1 $$(${coreutils:location}/bin/cat $${frontend-instance:pidfile}) \ "kill -s USR1 $$(${coreutils:location}/bin/cat $${frontend-instance:pidfile}) \
&& ${coreutils:location}/bin/sleep infinity" && ${coreutils:location}/bin/sleep infinity"
hash-files = hash-files =
$${frontend-instance-config:rendered} $${frontend-instance-config:output}
$${frontend-instance:wrapper-path} $${frontend-instance:wrapper-path}
wait-for-files = $${frontend-instance:pidfile} wait-for-files = $${frontend-instance:pidfile}
...@@ -345,11 +344,9 @@ filename = $${:_buildout_section_name_} ...@@ -345,11 +344,9 @@ filename = $${:_buildout_section_name_}
# ------------------ # ------------------
[common-environment] [common-environment]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:bin}/$${:_buildout_section_name_} output = $${directory:bin}/$${:_buildout_section_name_}
mode = 0700 inline =
template =
inline:
#!/bin/sh #!/bin/sh
export HOME=$${directory:home} export HOME=$${directory:home}
export PATH=${python-language-server:location}/bin:${java-jdk:location}/bin:${cli-utilities:PATH}:$HOME/.cargo/bin:$PATH export PATH=${python-language-server:location}/bin:${java-jdk:location}/bin:${cli-utilities:PATH}:$HOME/.cargo/bin:$PATH
...@@ -365,11 +362,10 @@ maximum = 3600 ...@@ -365,11 +362,10 @@ maximum = 3600
ip = {{ ipv4_random }} ip = {{ ipv4_random }}
[theia-service] [theia-service]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:bin}/$${:_buildout_section_name_} output = $${directory:bin}/$${:_buildout_section_name_}
mode = 0700 inline =
template = #!/bin/sh
inline:#!/bin/sh
{{ "{% raw %}" }} {{ "{% raw %}" }}
{% raw %} {% raw %}
export THEIA_WEBVIEW_EXTERNAL_ENDPOINT='{{hostname}}' export THEIA_WEBVIEW_EXTERNAL_ENDPOINT='{{hostname}}'
...@@ -378,15 +374,15 @@ template = ...@@ -378,15 +374,15 @@ template =
{{ "{% endraw %}" }} {{ "{% endraw %}" }}
export THEIA_OPEN_EDITOR_TOKEN=$(${openssl:location}/bin/openssl rand -hex 32) export THEIA_OPEN_EDITOR_TOKEN=$(${openssl:location}/bin/openssl rand -hex 32)
export THEIA_URL=$${:base-url} export THEIA_URL=$${:base-url}
export THEIA_SHELL=$${theia-shell:rendered} export THEIA_SHELL=$${theia-shell:output}
export TMP=$${directory:tmp} export TMP=$${directory:tmp}
export TEMP=$TMP export TEMP=$TMP
export LC_ALL=C.UTF-8 export LC_ALL=C.UTF-8
export TERMINFO=${ncurses:location}/lib/terminfo/ export TERMINFO=${ncurses:location}/lib/terminfo/
export EDITOR="${theia-open:rendered} --wait" export EDITOR="${theia-open:output} --wait"
export THEIA_DEFAULT_PLUGINS="local-dir:${theia-plugins:location}" export THEIA_DEFAULT_PLUGINS="local-dir:${theia-plugins:location}"
. $${common-environment:rendered} . $${common-environment:output}
exec ${theia-wrapper:rendered} "$@" exec ${theia-wrapper:output} "$@"
ip = $${theia-service-port:ip} ip = $${theia-service-port:ip}
port = $${theia-service-port:port} port = $${theia-service-port:port}
base-url = http://$${:ip}:$${:port}/ base-url = http://$${:ip}:$${:port}/
...@@ -394,10 +390,10 @@ base-url = http://$${:ip}:$${:port}/ ...@@ -394,10 +390,10 @@ base-url = http://$${:ip}:$${:port}/
[theia-instance] [theia-instance]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_} wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line = $${theia-service:rendered} --hostname=$${:hostname} --port=$${:port} $${directory:project} command-line = $${theia-service:output} --hostname=$${:hostname} --port=$${:port} $${directory:project}
hash-existing-files = hash-existing-files =
${yarn.lock:target} ${yarn.lock:target}
${theia-wrapper:rendered} ${theia-wrapper:output}
ip = {{ ipv4_random }} ip = {{ ipv4_random }}
hostname = $${:ip} hostname = $${:ip}
port = $${theia-service:port} port = $${theia-service:port}
...@@ -405,11 +401,8 @@ base-url = $${theia-service:base-url} ...@@ -405,11 +401,8 @@ base-url = $${theia-service:base-url}
[theia-shell] [theia-shell]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/$${:_buildout_section_name_} output = $${directory:bin}/$${:_buildout_section_name_}
mode = 0700 inline ={% raw %}#!{{ bash }}
template =
{% raw %}
inline:#!{{ bash }}
SHELL=$BASH SHELL=$BASH
# when running interactively, activate slapos configuration and reset GIT_EXEC_PATH to workaround https://github.com/eclipse-theia/theia/issues/7555 # when running interactively, activate slapos configuration and reset GIT_EXEC_PATH to workaround https://github.com/eclipse-theia/theia/issues/7555
if [ $# = 0 ]; then if [ $# = 0 ]; then
...@@ -421,14 +414,13 @@ template = ...@@ -421,14 +414,13 @@ template =
{% endraw %} {% endraw %}
context = context =
raw bash ${bash:location}/bin/bash raw bash ${bash:location}/bin/bash
key activate slapos-standalone-activate:rendered key activate slapos-standalone-activate:output
key bashrc theia-bashrc:rendered key bashrc theia-bashrc:output
[theia-bashrc] [theia-bashrc]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:etc}/$${:_buildout_section_name_} output = $${directory:etc}/$${:_buildout_section_name_}
template = inline =
inline:
# enable bash completion # enable bash completion
. ${bash-completion:location}/etc/profile.d/bash_completion.sh . ${bash-completion:location}/etc/profile.d/bash_completion.sh
# source user's .bashrc # source user's .bashrc
...@@ -456,23 +448,21 @@ command = ...@@ -456,23 +448,21 @@ command =
{%- set embedded_sr = os_module.path.normpath(embedded_sr) %} {%- set embedded_sr = os_module.path.normpath(embedded_sr) %}
{%- endif %} {%- endif %}
[request-embedded-instance-script] [request-embedded-instance-script]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:project}/request_embedded.sh output = $${directory:project}/request_embedded.sh
mode = 0700 inline =
template = #!/bin/sh
inline:#!/bin/sh
slapos supply {{ embedded_sr }} slaprunner slapos supply {{ embedded_sr }} slaprunner
slapos request "embedded_instance" {{ embedded_sr }} slapos request "embedded_instance" {{ embedded_sr }}
{%- if embedded_sr_type %} --type {{ embedded_sr_type }} {%- endif %} {%- if embedded_sr_type %} --type {{ embedded_sr_type }} {%- endif %}
{%- if embedded_instance_parameters %} --parameters-file $${embedded-instance-parameters:rendered} {%- if embedded_instance_parameters %} --parameters-file $${embedded-instance-parameters:output}
[embedded-instance-parameters] [embedded-instance-parameters]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:project}/$${:_buildout_section_name_}.json output = $${directory:project}/$${:_buildout_section_name_}.json
template = inline ={{ embedded_instance_parameters | indent(2) }}
inline:{{ embedded_instance_parameters | indent(2) }}
{%- endif %} {%- endif %}
{%- endif %} {%- endif %}
...@@ -499,20 +489,19 @@ computer-id = slaprunner ...@@ -499,20 +489,19 @@ computer-id = slaprunner
abstract-socket-path = $${directory:home}/standalone-{{ embedded_digest_hash[:16] }} abstract-socket-path = $${directory:home}/standalone-{{ embedded_digest_hash[:16] }}
[slapos-standalone-activate] [slapos-standalone-activate]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:bin}/$${:_buildout_section_name_} output = $${directory:bin}/$${:_buildout_section_name_}
template = inline =
inline:
export PATH=${buildout:bin-directory}:$PATH export PATH=${buildout:bin-directory}:$PATH
export SLAPOS_CONFIGURATION=$${slapos-standalone-config:slapos-configuration} export SLAPOS_CONFIGURATION=$${slapos-standalone-config:slapos-configuration}
export SLAPOS_CLIENT_CONFIGURATION=$SLAPOS_CONFIGURATION export SLAPOS_CLIENT_CONFIGURATION=$SLAPOS_CONFIGURATION
echo 'Standalone SlapOS for computer `$${slapos-standalone-config:computer-id}` activated' echo 'Standalone SlapOS for computer `$${slapos-standalone-config:computer-id}` activated'
[slapos-standalone-script] [slapos-standalone-script]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:bin}/$${:_buildout_section_name_} output = $${directory:bin}/$${:_buildout_section_name_}
template = inline =
inline:#!${python-for-standalone:executable} #!${python-for-standalone:executable}
import glob import glob
import json import json
import os import os
...@@ -583,13 +572,13 @@ template = ...@@ -583,13 +572,13 @@ template =
print("Exception in compatibility layer, printing and moving on") print("Exception in compatibility layer, printing and moving on")
traceback.print_exc() traceback.print_exc()
# Run request script # Run request script
print("Running SlapOS script $${request-embedded-instance-script:rendered}") print("Running SlapOS script $${request-embedded-instance-script:output}")
slapos_env = { slapos_env = {
'PATH': os.path.dirname(standalone._slapos_bin), 'PATH': os.path.dirname(standalone._slapos_bin),
'SLAPOS_CONFIGURATION': standalone._slapos_config, 'SLAPOS_CONFIGURATION': standalone._slapos_config,
'SLAPOS_CLIENT_CONFIGURATION': standalone._slapos_config 'SLAPOS_CLIENT_CONFIGURATION': standalone._slapos_config
} }
subprocess.call(("$${request-embedded-instance-script:rendered}",), env=slapos_env) subprocess.call(("$${request-embedded-instance-script:output}",), env=slapos_env)
{%- endif %} {%- endif %}
s = socket.socket(socket.AF_UNIX) s = socket.socket(socket.AF_UNIX)
s.bind("\0$${slapos-standalone-config:abstract-socket-path}") s.bind("\0$${slapos-standalone-config:abstract-socket-path}")
...@@ -603,24 +592,23 @@ template = ...@@ -603,24 +592,23 @@ template =
print("Exiting") print("Exiting")
[slapos-standalone] [slapos-standalone]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:bin}/$${:_buildout_section_name_} output = $${directory:bin}/$${:_buildout_section_name_}
mode = 0700 inline =
template = #!/bin/sh
inline:#!/bin/sh . $${common-environment:output}
. $${common-environment:rendered}
#XXX find out where the extra nodejs in theia's PATH comes from #XXX find out where the extra nodejs in theia's PATH comes from
export PATH=${nodejs:location}/bin/:$PATH export PATH=${nodejs:location}/bin/:$PATH
. $${slapos-standalone-activate:rendered} . $${slapos-standalone-activate:output}
exec $${slapos-standalone-script:rendered} exec $${slapos-standalone-script:output}
[slapos-standalone-instance] [slapos-standalone-instance]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_} wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line = $${slapos-standalone:rendered} command-line = $${slapos-standalone:output}
hash-files = hash-files =
$${slapos-standalone:rendered} $${slapos-standalone:output}
$${slapos-standalone-script:rendered} $${slapos-standalone-script:output}
hostname = $${slapos-standalone-config:ipv4} hostname = $${slapos-standalone-config:ipv4}
port = $${slapos-standalone-config:port} port = $${slapos-standalone-config:port}
...@@ -645,10 +633,9 @@ autorun = {{ parameter_dict['autorun'] }} ...@@ -645,10 +633,9 @@ autorun = {{ parameter_dict['autorun'] }}
# ----------------------------- # -----------------------------
[tasks.json] [tasks.json]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:dot-theia}/tasks.json output = $${directory:dot-theia}/tasks.json
template = inline =
inline:
{ {
// See https://go.microsoft.com/fwlink/?LinkId=733558 // See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format // for the documentation about the tasks.json format
...@@ -715,10 +702,9 @@ git-executable = ${git:location}/bin/git ...@@ -715,10 +702,9 @@ git-executable = ${git:location}/bin/git
[settings.json] [settings.json]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:dot-theia}$${:_buildout_section_name_} output = $${directory:dot-theia}$${:_buildout_section_name_}
once = $${:rendered} once = $${:output}
template = inline =
inline:
{ {
"files.watcherExclude": { "files.watcherExclude": {
"**/.eggs/**": true, "**/.eggs/**": true,
...@@ -738,11 +724,10 @@ target-directory = $${directory:project} ...@@ -738,11 +724,10 @@ target-directory = $${directory:project}
link-binary = $${directory:runner} link-binary = $${directory:runner}
[request-script-template] [request-script-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:project}/$${:_buildout_section_name_}.sh output = $${directory:project}/$${:_buildout_section_name_}.sh
mode = 0700 inline =
template = #!/bin/sh
inline:#!/bin/sh
# This template is generated automatically, copy it in order to supply and request. # This template is generated automatically, copy it in order to supply and request.
# Any manual change to this file may be lost. # Any manual change to this file may be lost.
software_name=html5as-base #replace the software name writen in ~/srv/project/slapos/software/ software_name=html5as-base #replace the software name writen in ~/srv/project/slapos/software/
......
...@@ -20,18 +20,17 @@ cert = $${slap-connection:cert-file} ...@@ -20,18 +20,17 @@ cert = $${slap-connection:cert-file}
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = $${:default} RootSoftwareInstance = $${:default}
default = $${:theia} default = $${:theia}
theia = theia:rendered theia = theia:output
export = export:rendered export = export:output
import = import:rendered import = import:output
resilient = resilient:rendered resilient = resilient:output
frozen = instance-frozen:rendered frozen = instance-frozen:output
pull-backup = template-pull-backup:rendered pull-backup = template-pull-backup:output
[theia] [theia]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${instance-theia:output} url = ${instance-theia:output}
rendered = $${buildout:directory}/instance-theia.cfg output = $${buildout:directory}/instance-theia.cfg
mode = 0644
context = context =
jsonkey default_parameter_dict :default-parameters jsonkey default_parameter_dict :default-parameters
key parameter_dict slap-configuration:configuration key parameter_dict slap-configuration:configuration
...@@ -61,39 +60,36 @@ frontend-sr = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/ap ...@@ -61,39 +60,36 @@ frontend-sr = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/ap
[import] [import]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${instance-import:output} url = ${instance-import:output}
rendered = $${buildout:directory}/instance-import.cfg output = $${buildout:directory}/instance-import.cfg
mode = 0644
context = context =
jsonkey default_parameter_dict theia:default-parameters jsonkey default_parameter_dict theia:default-parameters
key parameter_dict slap-configuration:configuration key parameter_dict slap-configuration:configuration
key theia_instance_cfg theia:rendered key theia_instance_cfg theia:output
key pbsready_import_cfg template-pbsready-import:rendered key pbsready_import_cfg template-pbsready-import:output
key root_title slap-configuration:root-instance-title key root_title slap-configuration:root-instance-title
[export] [export]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${instance-export:output} url = ${instance-export:output}
rendered = $${buildout:directory}/instance-export.cfg output = $${buildout:directory}/instance-export.cfg
mode = 0644
context = context =
jsonkey default_parameter_dict theia:default-parameters jsonkey default_parameter_dict theia:default-parameters
key parameter_dict slap-configuration:configuration key parameter_dict slap-configuration:configuration
key theia_instance_cfg theia:rendered key theia_instance_cfg theia:output
key pbsready_export_cfg template-pbsready-export:rendered key pbsready_export_cfg template-pbsready-export:output
[resilient] [resilient]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${instance-resilient:output} url = ${instance-resilient:output}
rendered = $${buildout:directory}/instance-resilient.cfg output = $${buildout:directory}/instance-resilient.cfg
mode = 0644
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
key buildout buildout:bin-directory key buildout buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
raw monitor_template ${monitor-template:rendered} raw monitor_template ${monitor-template:output}
template-parts-destination = ${template-parts:target} template-parts-destination = ${template-parts:target}
template-replicated-destination = ${template-replicated:target} template-replicated-destination = ${template-replicated:target}
import-list = file parts :template-parts-destination import-list = file parts :template-parts-destination
......
...@@ -18,30 +18,33 @@ run = $${:etc}/run ...@@ -18,30 +18,33 @@ run = $${:etc}/run
command = mkdir -p $${:run} $${:srv} command = mkdir -p $${:run} $${:srv}
[log-writer] [log-writer]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline:#!/bin/sh inline =
#!/bin/sh
echo "Hello : $(date)" >> $${directory:home}/log.log echo "Hello : $(date)" >> $${directory:home}/log.log
rendered = $${directory:run}/log-writer output = $${directory:run}/log-writer
[exporter.exclude] [exporter.exclude]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline:$${directory:home}/exclude inline =$${directory:home}/exclude
rendered = $${directory:srv}/exporter.exclude output = $${directory:srv}/exporter.exclude
[runner-import-restore] [runner-import-restore]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline:#!/bin/sh inline =
#!/bin/sh
echo "Hello : $(date)" >> $${directory:home}/runner-import-restore.log echo "Hello : $(date)" >> $${directory:home}/runner-import-restore.log
exit $TEST_RESTORE_STATUS exit $TEST_RESTORE_STATUS
rendered = $${directory:srv}/runner-import-restore output = $${directory:srv}/runner-import-restore
[backup-identity-script] [backup-identity-script]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline:#!/bin/sh inline =
#!/bin/sh
echo "Custom script" echo "Custom script"
for i in "$@" for i in "$@"
do do
echo $(sha256sum $i) echo $(sha256sum $i)
done done
exit $TEST_BACKUP_STATUS exit $TEST_BACKUP_STATUS
rendered = $${directory:srv}/.backup_identity_script output = $${directory:srv}/.backup_identity_script
...@@ -18,7 +18,6 @@ eggs = plone.recipe.command ...@@ -18,7 +18,6 @@ eggs = plone.recipe.command
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
mode = 0644
[versions] [versions]
setuptools = 44.0.0 setuptools = 44.0.0
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = cad8d9c7c17808f23eee936f149183a9 md5sum = e70978c8b5d7ad6a98b5a12185236733
[template-tsn-client] [template-tsn-client]
filename = instance-tsn-client.cfg filename = instance-tsn-client.cfg
md5sum = 829e50492ef9adb0037b82c814f76afd md5sum = fd7370bd109821b73360e8a303042ade
[template-tsn-server] [template-tsn-server]
filename = instance-tsn-server.cfg filename = instance-tsn-server.cfg
md5sum = 5ce17649f54faf2a9e2a05774d643041 md5sum = b048114a5fd5b533bd7706fc2cc6fd89
...@@ -15,8 +15,8 @@ scripts = $${:etc}/tsn ...@@ -15,8 +15,8 @@ scripts = $${:etc}/tsn
run = $${:etc}/run run = $${:etc}/run
[tsn-script-template] [tsn-script-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered= $${directory:scripts}/$${:_buildout_section_name_} output= $${directory:scripts}/$${:_buildout_section_name_}
mode = 755 mode = 755
{% for server_nb, server_guid in enumerate(server_guid_list) -%} {% for server_nb, server_guid in enumerate(server_guid_list) -%}
...@@ -45,7 +45,7 @@ config-interface = {{ server_interface_list[server_nb] }} ...@@ -45,7 +45,7 @@ config-interface = {{ server_interface_list[server_nb] }}
{% do script_list.append(phc2sys_launcher_section_title) -%} {% do script_list.append(phc2sys_launcher_section_title) -%}
[{{ phc2sys_launcher_section_title }}] [{{ phc2sys_launcher_section_title }}]
<= tsn-script-template <= tsn-script-template
template= inline: inline =
#!/bin/sh #!/bin/sh
${linuxptp:location}/sbin/pmc -u -b 0 -i {{ interface_list[server_nb] }} "SET GRANDMASTER_SETTINGS_NP clockClass 248 clockAccuracy 0xfe offsetScaledLogVariance 0xffff currentUtcOffset 37 leap61 0 leap59 0 currentUtcOffsetValid 1 ptpTimescale 1 timeTraceable 1 frequencyTraceable 0 timeSource 0xa0" ${linuxptp:location}/sbin/pmc -u -b 0 -i {{ interface_list[server_nb] }} "SET GRANDMASTER_SETTINGS_NP clockClass 248 clockAccuracy 0xfe offsetScaledLogVariance 0xffff currentUtcOffset 37 leap61 0 leap59 0 currentUtcOffsetValid 1 ptpTimescale 1 timeTraceable 1 frequencyTraceable 0 timeSource 0xa0"
exec {{ chrt }} -f 95 ${linuxptp:location}/sbin/phc2sys -s CLOCK_REALTIME -c {{ interface_list[server_nb] }} --step_threshold=1 -m -w exec {{ chrt }} -f 95 ${linuxptp:location}/sbin/phc2sys -s CLOCK_REALTIME -c {{ interface_list[server_nb] }} --step_threshold=1 -m -w
...@@ -56,7 +56,7 @@ template= inline: ...@@ -56,7 +56,7 @@ template= inline:
{% do script_list.append(ptp4l_launcher_section_title) -%} {% do script_list.append(ptp4l_launcher_section_title) -%}
[{{ ptp4l_launcher_section_title }}] [{{ ptp4l_launcher_section_title }}]
<= tsn-script-template <= tsn-script-template
template= inline: inline =
#!/bin/sh #!/bin/sh
exec {{ chrt }} -f 97 ${linuxptp:location}/sbin/ptp4l {{ '-H' if hardware_timestamps=='y' else '-S' }} -i {{ interface_list[server_nb] }} --step_threshold=1 -m exec {{ chrt }} -f 97 ${linuxptp:location}/sbin/ptp4l {{ '-H' if hardware_timestamps=='y' else '-S' }} -i {{ interface_list[server_nb] }} --step_threshold=1 -m
...@@ -64,7 +64,7 @@ template= inline: ...@@ -64,7 +64,7 @@ template= inline:
[tsn-script] [tsn-script]
<= tsn-script-template <= tsn-script-template
template= inline: inline =
#!/bin/sh #!/bin/sh
exec ${tsn-rt-measures:location}/bin/master -a1 -p97 -t4000 {{ interface_ip_string_list | join(' ') }} exec ${tsn-rt-measures:location}/bin/master -a1 -p97 -t4000 {{ interface_ip_string_list | join(' ') }}
...@@ -79,6 +79,6 @@ parts = ...@@ -79,6 +79,6 @@ parts =
[publish-connection-information] [publish-connection-information]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
{% for script in script_list -%} {% for script in script_list -%}
{{ script }} = {{ '$${' ~ script ~ ':rendered}' }} {{ script }} = {{ '$${' ~ script ~ ':output}' }}
{% endfor -%} {% endfor -%}
tsn-script = $${tsn-script:rendered} tsn-script = $${tsn-script:output}
...@@ -34,24 +34,24 @@ init = ...@@ -34,24 +34,24 @@ init =
setup_gpio(options["gpio-pulse-pin"]) setup_gpio(options["gpio-pulse-pin"])
[tsn-script-template] [tsn-script-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered= $${directory:scripts}/$${:_buildout_section_name_} output= $${directory:scripts}/$${:_buildout_section_name_}
mode = 755 mode = 755
[ptp4l-launcher-{{ interface }}] [ptp4l-launcher-{{ interface }}]
<= tsn-script-template <= tsn-script-template
template= inline: inline =
#!/bin/sh #!/bin/sh
exec {{ chrt }} -f 97 ${linuxptp:location}/sbin/ptp4l -s -S -i {{ interface }} --step_threshold=1 -m exec {{ chrt }} -f 97 ${linuxptp:location}/sbin/ptp4l -s -S -i {{ interface }} --step_threshold=1 -m
[tsn-script] [tsn-script]
<= tsn-script-template <= tsn-script-template
template= inline: inline =
#!/bin/sh #!/bin/sh
exec ${tsn-rt-measures:location}/bin/slave -f {{ interface }} -a1 -p98 -d {{ gpio_direction_pin }} -u {{ gpio_pulse_pin }} exec ${tsn-rt-measures:location}/bin/slave -f {{ interface }} -a1 -p98 -d {{ gpio_direction_pin }} -u {{ gpio_pulse_pin }}
[publish-connection-information] [publish-connection-information]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
ip = {{ ip }} ip = {{ ip }}
ptp4l-launcher-{{ interface }} = $${ptp4l-launcher-{{ interface }}:rendered} ptp4l-launcher-{{ interface }} = $${ptp4l-launcher-{{ interface }}:output}
tsn-script = $${tsn-script:rendered} tsn-script = $${tsn-script:output}
...@@ -8,13 +8,13 @@ offline = true ...@@ -8,13 +8,13 @@ offline = true
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = tsn-client-dynamic-template:rendered default = tsn-client-dynamic-template:output
tsn-server = tsn-server-dynamic-template:rendered tsn-server = tsn-server-dynamic-template:output
RootSoftwareInstance = $${:default} RootSoftwareInstance = $${:default}
[dynamic-template-base] [dynamic-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/$${:filename} output = $${buildout:directory}/$${:filename}
context = context =
raw chrt ${util-linux:location}/bin/chrt raw chrt ${util-linux:location}/bin/chrt
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
...@@ -23,12 +23,12 @@ context = ...@@ -23,12 +23,12 @@ context =
[tsn-client-dynamic-template] [tsn-client-dynamic-template]
<= dynamic-template-base <= dynamic-template-base
extensions = jinja2.ext.do extensions = jinja2.ext.do
template = ${template-tsn-client:output} url = ${template-tsn-client:output}
filename = instance-tsn-client.cfg filename = instance-tsn-client.cfg
[tsn-server-dynamic-template] [tsn-server-dynamic-template]
<= dynamic-template-base <= dynamic-template-base
template = ${template-tsn-server:output} url = ${template-tsn-server:output}
filename = instance-tsn-server.cfg filename = instance-tsn-server.cfg
[slap-configuration] [slap-configuration]
......
...@@ -21,7 +21,6 @@ eggs = ...@@ -21,7 +21,6 @@ eggs =
[template-base] [template-base]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 0644
[template] [template]
< = template-base < = template-base
......
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
[instance-cfg] [instance-cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 403fe1e79e20ab87589092ce7429e73b md5sum = f47adc5131a3096e916dbf9ef0061f50
[template-turnserver] [template-turnserver]
filename = instance-turnserver.cfg.jinja2.in filename = instance-turnserver.cfg.jinja2.in
md5sum = 932c4d82faa8e28b62bfbfc3dfe31c02 md5sum = b71bcc86f217cd737fc890667adb7c69
[template-insecure-turnserver] [template-insecure-turnserver]
filename = instance-insecure-turnserver.cfg.jinja2.in filename = instance-insecure-turnserver.cfg.jinja2.in
......
...@@ -17,7 +17,7 @@ ssl = ${:etc}/ssl ...@@ -17,7 +17,7 @@ ssl = ${:etc}/ssl
[file-base] [file-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = inline:{{ '{{ content }}' }} inline ={{ '{{ content }}' }}
{% macro simplefile(section_name, file_path, content, mode='') -%} {% macro simplefile(section_name, file_path, content, mode='') -%}
...@@ -26,7 +26,7 @@ template = inline:{{ '{{ content }}' }} ...@@ -26,7 +26,7 @@ template = inline:{{ '{{ content }}' }}
content = {{ dumps(content) }} content = {{ dumps(content) }}
[{{ section_name }}] [{{ section_name }}]
< = file-base < = file-base
rendered = {{ file_path }} output = {{ file_path }}
context = key content {{ content_section_name }}:content context = key content {{ content_section_name }}:content
mode = {{ mode }} mode = {{ mode }}
{% do part_list.append(section_name) -%} {% do part_list.append(section_name) -%}
......
...@@ -9,8 +9,8 @@ offline = true ...@@ -9,8 +9,8 @@ offline = true
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = $${:default} RootSoftwareInstance = $${:default}
default = dynamic-template-turnserver:rendered default = dynamic-template-turnserver:output
insecure = dynamic-template-insecure-turnserver:rendered insecure = dynamic-template-insecure-turnserver:output
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised recipe = slapos.cookbook:slapconfiguration.serialised
...@@ -22,9 +22,8 @@ cert = $${slap-connection:cert-file} ...@@ -22,9 +22,8 @@ cert = $${slap-connection:cert-file}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/$${:filename} output = $${buildout:directory}/$${:filename}
extensions = jinja2.ext.do extensions = jinja2.ext.do
mode = 0644
extra-context = extra-context =
context = context =
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
...@@ -34,8 +33,8 @@ context = ...@@ -34,8 +33,8 @@ context =
key global_ipv4_prefix network-information:global-ipv4-network key global_ipv4_prefix network-information:global-ipv4-network
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key computer_id slap-configuration:computer key computer_id slap-configuration:computer
raw template_monitor ${monitor2-template:rendered} raw template_monitor ${monitor2-template:output}
raw logrotate_cfg ${template-logrotate-base:rendered} raw logrotate_cfg ${template-logrotate-base:output}
$${:extra-context} $${:extra-context}
jsonkey default_parameter_dict :default-parameters jsonkey default_parameter_dict :default-parameters
default-parameters = default-parameters =
...@@ -56,14 +55,14 @@ turnserver-location = ${coturn:location} ...@@ -56,14 +55,14 @@ turnserver-location = ${coturn:location}
[dynamic-template-turnserver] [dynamic-template-turnserver]
<= jinja2-template-base <= jinja2-template-base
template = ${template-turnserver:location}/${template-turnserver:filename} url = ${template-turnserver:location}/${template-turnserver:filename}
filename = instance-turnserver.cfg filename = instance-turnserver.cfg
extra-context = extra-context =
section parameter_dict dynamic-template-turnserver-parameters section parameter_dict dynamic-template-turnserver-parameters
[dynamic-template-insecure-turnserver] [dynamic-template-insecure-turnserver]
<= jinja2-template-base <= jinja2-template-base
template = ${template-insecure-turnserver:location}/${template-insecure-turnserver:filename} url = ${template-insecure-turnserver:location}/${template-insecure-turnserver:filename}
filename = instance-insecure-turnserver.cfg filename = instance-insecure-turnserver.cfg
extra-context = extra-context =
section parameter_dict dynamic-template-turnserver-parameters section parameter_dict dynamic-template-turnserver-parameters
...@@ -25,7 +25,7 @@ extra = ...@@ -25,7 +25,7 @@ extra =
[feeder] [feeder]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_} wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line = ${feeder:bin-directory}/feeder $${fluentd-agent-conf:rendered} command-line = ${feeder:bin-directory}/feeder $${fluentd-agent-conf:output}
$${:_buildout_section_name_} .4 $${:_buildout_section_name_} .4
{%- for tag in tags %} {%- for tag in tags %}
[{{ section(tag) }}] [{{ section(tag) }}]
...@@ -36,15 +36,14 @@ extra = ...@@ -36,15 +36,14 @@ extra =
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_} wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line = ${fluentd:location}/bin/fluentd command-line = ${fluentd:location}/bin/fluentd
-v -c $${fluentd-agent-conf:rendered} -v -c $${fluentd-agent-conf:output}
environment = environment =
GEM_PATH=${fluentd:location}/lib/ruby/gems/1.8 GEM_PATH=${fluentd:location}/lib/ruby/gems/1.8
[fluentd-agent-conf] [fluentd-agent-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = $${directory:etc}/fluentd-agent.conf output = $${directory:etc}/fluentd-agent.conf
template = inline ={% raw -%}
inline:{% raw -%}
<match debug.**> <match debug.**>
@type stdout @type stdout
@id stdout_output @id stdout_output
......
...@@ -19,11 +19,10 @@ extends = test-common.cfg ...@@ -19,11 +19,10 @@ extends = test-common.cfg
parts += start_ingest start_process parts += start_ingest start_process
[start-script-common] [start-script-common]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${buildout:bin-directory}/${:_buildout_section_name_} output = ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755 inline =
template = #!${buildout:executable}
inline:#!${buildout:executable}
import argparse, base64, httplib, sys import argparse, base64, httplib, sys
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
_ = parser.add_argument _ = parser.add_argument
......
...@@ -16,4 +16,3 @@ recipe = slapos.recipe.template ...@@ -16,4 +16,3 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg
md5sum = 98a680fe8fddce5dcee455e65c228fde md5sum = 98a680fe8fddce5dcee455e65c228fde
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[caucase-jinja2-library] [caucase-jinja2-library]
filename = caucase.jinja2.library filename = caucase.jinja2.library
md5sum = 1e3607e514320441ddccdb6d1a21f705 md5sum = 962ee4f16cef2b4b44ce0f5a87f7549c
...@@ -75,19 +75,19 @@ content = {{ template_csr }} ...@@ -75,19 +75,19 @@ content = {{ template_csr }}
{% endif %} {% endif %}
[{{ prefix }}-provided-csr] [{{ prefix }}-provided-csr]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 644
{% if template_csr_pem %} {% if template_csr_pem %}
template = inline:{{ '{{ content }}' }} inline =
rendered = ${ {{- prefix }}-directory:data-dir}/provided.csr.pem {{ '{{ content }}' }}
output = ${ {{- prefix }}-directory:data-dir}/provided.csr.pem
context = key content {{ prefix }}-provided-csr-content:content context = key content {{ prefix }}-provided-csr-content:content
{% elif template_csr %} {% elif template_csr %}
template = {{ '${' + prefix }}-provided-csr-content:content} url = {{ '${' + prefix }}-provided-csr-content:content}
rendered = ${ {{- prefix }}-directory:data-dir}/provided.csr.pem output = ${ {{- prefix }}-directory:data-dir}/provided.csr.pem
{% endif %} {% endif %}
{{ rerequest( {{ rerequest(
prefix=prefix ~ '-csr', prefix=prefix ~ '-csr',
buildout_bin_directory=buildout_bin_directory, buildout_bin_directory=buildout_bin_directory,
template='${' ~ prefix ~ '-provided-csr:rendered}', template='${' ~ prefix ~ '-provided-csr:output}',
csr='${:csr}', csr='${:csr}',
key=key_path, key=key_path,
)}} )}}
......
...@@ -91,7 +91,7 @@ parts += ...@@ -91,7 +91,7 @@ parts +=
# override instance-jupyter-notebook not to render into default template.cfg # override instance-jupyter-notebook not to render into default template.cfg
[instance-jupyter-notebook] [instance-jupyter-notebook]
rendered = ${buildout:directory}/template-jupyter.cfg output = ${buildout:directory}/template-jupyter.cfg
[download-base] [download-base]
<= download-base-neo <= download-base-neo
...@@ -154,9 +154,8 @@ link-binary = ...@@ -154,9 +154,8 @@ link-binary =
[template] [template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 640
context = context =
key mariadb_link_binary template-mariadb:link-binary key mariadb_link_binary template-mariadb:link-binary
key zope_link_binary template-zope:link-binary key zope_link_binary template-zope:link-binary
...@@ -180,7 +179,7 @@ context = ...@@ -180,7 +179,7 @@ context =
key haproxy_location haproxy:location key haproxy_location haproxy:location
key socat_location socat:location key socat_location socat:location
key rsyslogd_location rsyslogd:location key rsyslogd_location rsyslogd:location
key instance_common_cfg instance-common:rendered key instance_common_cfg instance-common:output
key jsl_location jsl:location key jsl_location jsl:location
key jupyter_enable_default erp5-defaults:jupyter-enable-default key jupyter_enable_default erp5-defaults:jupyter-enable-default
key wcfs_enable_default erp5-defaults:wcfs-enable-default key wcfs_enable_default erp5-defaults:wcfs-enable-default
...@@ -211,12 +210,12 @@ context = ...@@ -211,12 +210,12 @@ context =
key template_erp5 template-erp5:target key template_erp5 template-erp5:target
key template_haproxy_cfg template-haproxy-cfg:target key template_haproxy_cfg template-haproxy-cfg:target
key template_rsyslogd_cfg template-rsyslogd-cfg:target key template_rsyslogd_cfg template-rsyslogd-cfg:target
key template_jupyter_cfg instance-jupyter-notebook:rendered key template_jupyter_cfg instance-jupyter-notebook:output
key template_kumofs template-kumofs:target key template_kumofs template-kumofs:target
key template_mariadb template-mariadb:target key template_mariadb template-mariadb:target
key template_mariadb_initial_setup template-mariadb-initial-setup:target key template_mariadb_initial_setup template-mariadb-initial-setup:target
key template_my_cnf template-my-cnf:target key template_my_cnf template-my-cnf:target
key template_mysqld_wrapper template-mysqld-wrapper:rendered key template_mysqld_wrapper template-mysqld-wrapper:output
key template_postfix template-postfix:target key template_postfix template-postfix:target
key template_postfix_aliases template-postfix-aliases:target key template_postfix_aliases template-postfix-aliases:target
key template_postfix_main_cf template-postfix-main-cf:target key template_postfix_main_cf template-postfix-main-cf:target
......
...@@ -26,11 +26,11 @@ md5sum = d10b8e35b02b5391cf46bf0c7dbb1196 ...@@ -26,11 +26,11 @@ md5sum = d10b8e35b02b5391cf46bf0c7dbb1196
[template-mariadb] [template-mariadb]
filename = instance-mariadb.cfg.in filename = instance-mariadb.cfg.in
md5sum = b664a2221077db5db498422b6c90f015 md5sum = cee995829fbd138a8c2c9209d72d01a0
[template-kumofs] [template-kumofs]
filename = instance-kumofs.cfg.in filename = instance-kumofs.cfg.in
md5sum = cfe4696a67bf4886a5d8252a5274a941 md5sum = 69954583b5f87aec5ff8449dabaaee56
[template-zope-conf] [template-zope-conf]
filename = zope.conf.in filename = zope.conf.in
...@@ -50,7 +50,7 @@ md5sum = f928b9dc99f7f970caadfe7dd6f95d34 ...@@ -50,7 +50,7 @@ md5sum = f928b9dc99f7f970caadfe7dd6f95d34
[template-postfix] [template-postfix]
filename = instance-postfix.cfg.in filename = instance-postfix.cfg.in
md5sum = 0f666e5e7e52afda433feb9f02452717 md5sum = 5c84bbd3e60d86d153c75994679184a8
[template-postfix-master-cf] [template-postfix-master-cf]
filename = postfix_master.cf.in filename = postfix_master.cf.in
...@@ -70,7 +70,7 @@ md5sum = 274365ebbade26558ca4836837e781aa ...@@ -70,7 +70,7 @@ md5sum = 274365ebbade26558ca4836837e781aa
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 165b0a50672138ee4a3fbe9239af11ba md5sum = 9a7f7888ba4183c9d900e862074f3baf
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
...@@ -78,7 +78,7 @@ md5sum = f5a1661449c9681b3de7d4af645124ba ...@@ -78,7 +78,7 @@ md5sum = f5a1661449c9681b3de7d4af645124ba
[template-zeo] [template-zeo]
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
md5sum = 3c59315a8f102a970dc54ded85df735a md5sum = c4908c340dbd74f2d434d7e5deebff59
[template-zodb-base] [template-zodb-base]
filename = instance-zodb-base.cfg.in filename = instance-zodb-base.cfg.in
...@@ -86,11 +86,11 @@ md5sum = 0ac4b74436f554cd677f19275d18d880 ...@@ -86,11 +86,11 @@ md5sum = 0ac4b74436f554cd677f19275d18d880
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = 06265195ca29805696873b6f8a57a5fd md5sum = b6a07f2fab6ff9f54a7d8e7ff9e2b846
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = 8b4d6c29e9c5d8fb2e50e6ac96906d97 md5sum = afd6140a8e8dcd3f95846b546acbeba7
[template-haproxy-cfg] [template-haproxy-cfg]
filename = haproxy.cfg.in filename = haproxy.cfg.in
......
...@@ -14,7 +14,6 @@ per partition. No more (undefined result), no less (IndexError). ...@@ -14,7 +14,6 @@ per partition. No more (undefined result), no less (IndexError).
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 644
{{ caucase.updater( {{ caucase.updater(
prefix='caucase-updater', prefix='caucase-updater',
...@@ -201,8 +200,8 @@ zope-virtualhost-monster-backend-dict = {{ dumps(zope_virtualhost_monster_backen ...@@ -201,8 +200,8 @@ zope-virtualhost-monster-backend-dict = {{ dumps(zope_virtualhost_monster_backen
[haproxy-cfg] [haproxy-cfg]
< = jinja2-template-base < = jinja2-template-base
template = {{ parameter_dict['template-haproxy-cfg'] }} url = {{ parameter_dict['template-haproxy-cfg'] }}
rendered = ${directory:etc}/haproxy.cfg output = ${directory:etc}/haproxy.cfg
context = context =
section parameter_dict haproxy-cfg-parameter-dict section parameter_dict haproxy-cfg-parameter-dict
import urllib_parse six.moves.urllib.parse import urllib_parse six.moves.urllib.parse
...@@ -220,8 +219,8 @@ input = ...@@ -220,8 +219,8 @@ input =
[{{ section('haproxy') }}] [{{ section('haproxy') }}]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:services-on-watch}/haproxy wrapper-path = ${directory:services-on-watch}/haproxy
command-line = "{{ parameter_dict['haproxy'] }}/sbin/haproxy" -f "${haproxy-cfg:rendered}" command-line = "{{ parameter_dict['haproxy'] }}/sbin/haproxy" -f "${haproxy-cfg:output}"
hash-files = ${haproxy-cfg:rendered} hash-files = ${haproxy-cfg:output}
[apache-conf-ssl] [apache-conf-ssl]
# XXX caucase is/was buggy and this certificate does not match key for instances # XXX caucase is/was buggy and this certificate does not match key for instances
...@@ -231,7 +230,7 @@ caucase-key = ${directory:apache-conf}/apache-caucase.pem ...@@ -231,7 +230,7 @@ caucase-key = ${directory:apache-conf}/apache-caucase.pem
[simplefile] [simplefile]
< = jinja2-template-base < = jinja2-template-base
template = inline:{{ '{{ content }}' }} inline ={{ '{{ content }}' }}
{% macro simplefile(section_name, file_path, content, mode='') -%} {% macro simplefile(section_name, file_path, content, mode='') -%}
{% set content_section_name = section_name ~ '-content' -%} {% set content_section_name = section_name ~ '-content' -%}
...@@ -240,7 +239,7 @@ content = {{ dumps(content) }} ...@@ -240,7 +239,7 @@ content = {{ dumps(content) }}
[{{ section(section_name) }}] [{{ section(section_name) }}]
< = simplefile < = simplefile
rendered = {{ file_path }} output = {{ file_path }}
context = key content {{content_section_name}}:content context = key content {{content_section_name}}:content
mode = {{ mode }} mode = {{ mode }}
{%- endmacro %} {%- endmacro %}
...@@ -259,16 +258,16 @@ spool-directory = ${directory:rsyslogd-spool} ...@@ -259,16 +258,16 @@ spool-directory = ${directory:rsyslogd-spool}
[rsyslogd-cfg] [rsyslogd-cfg]
<= jinja2-template-base <= jinja2-template-base
template = {{ parameter_dict['template-rsyslogd-cfg'] }} url = {{ parameter_dict['template-rsyslogd-cfg'] }}
rendered = ${directory:etc}/rsyslogd.conf output = ${directory:etc}/rsyslogd.conf
context = section parameter_dict rsyslogd-cfg-parameter-dict context = section parameter_dict rsyslogd-cfg-parameter-dict
[{{ section ('rsyslogd') }}] [{{ section ('rsyslogd') }}]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ parameter_dict['rsyslogd'] }}/sbin/rsyslogd -i ${rsyslogd-cfg-parameter-dict:pid-file} -n -f ${rsyslogd-cfg:rendered} command-line = {{ parameter_dict['rsyslogd'] }}/sbin/rsyslogd -i ${rsyslogd-cfg-parameter-dict:pid-file} -n -f ${rsyslogd-cfg:output}
wrapper-path = ${directory:services-on-watch}/rsyslogd wrapper-path = ${directory:services-on-watch}/rsyslogd
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
hash-files = ${rsyslogd-cfg:rendered} hash-files = ${rsyslogd-cfg:output}
[{{ section ('rsyslogd-listen-promise') }}] [{{ section ('rsyslogd-listen-promise') }}]
<= monitor-promise-base <= monitor-promise-base
...@@ -289,7 +288,7 @@ depends = ${caucase-updater-housekeeper-run:recipe} ...@@ -289,7 +288,7 @@ depends = ${caucase-updater-housekeeper-run:recipe}
[build-certificate-and-key] [build-certificate-and-key]
{% if ssl_parameter_dict.get('key') -%} {% if ssl_parameter_dict.get('key') -%}
certificate-and-key = ${tls-certificate-and-key-from-parameters:rendered} certificate-and-key = ${tls-certificate-and-key-from-parameters:output}
{{ simplefile( {{ simplefile(
'tls-certificate-and-key-from-parameters', 'tls-certificate-and-key-from-parameters',
'${directory:etc}/certificate-and-key-from-parameters.pem', '${directory:etc}/certificate-and-key-from-parameters.pem',
...@@ -347,8 +346,8 @@ client-cert-ca = ${:srv}/client-cert-ca ...@@ -347,8 +346,8 @@ client-cert-ca = ${:srv}/client-cert-ca
[{{ section('resiliency-exclude-file') }}] [{{ section('resiliency-exclude-file') }}]
# Generate rdiff exclude file in case of resiliency # Generate rdiff exclude file in case of resiliency
< = jinja2-template-base < = jinja2-template-base
template = {{ 'inline:{{ "${directory:log}/**\\n" }}' }} inline = {{ '{{ "${directory:log}/**\\n" }}' }}
rendered = ${directory:srv}/exporter.exclude output = ${directory:srv}/exporter.exclude
[{{ section('monitor-generate-apachedex-report') }}] [{{ section('monitor-generate-apachedex-report') }}]
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
...@@ -366,9 +365,9 @@ command-line = "{{ parameter_dict['run-apachedex-location'] }}" "{{ parameter_di ...@@ -366,9 +365,9 @@ command-line = "{{ parameter_dict['run-apachedex-location'] }}" "{{ parameter_di
command = generate-apachedex-report command = generate-apachedex-report
[monitor-apachedex-report-config] [monitor-apachedex-report-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = ${directory:etc}/${:_buildout_section_name_} output = ${directory:etc}/${:_buildout_section_name_}
template = inline: inline =
{% for line in slapparameter_dict['apachedex-configuration'] %} {% for line in slapparameter_dict['apachedex-configuration'] %}
{# apachedex config files use shlex.split, so we need to quote the arguments. #} {# apachedex config files use shlex.split, so we need to quote the arguments. #}
{# BBB: in python 3 we can use shlex.quote instead. #} {# BBB: in python 3 we can use shlex.quote instead. #}
...@@ -377,7 +376,7 @@ template = inline: ...@@ -377,7 +376,7 @@ template = inline:
[apachedex-parameters] [apachedex-parameters]
apache-log-list = ${rsyslogd-cfg-parameter-dict:access-log-file} apache-log-list = ${rsyslogd-cfg-parameter-dict:access-log-file}
configuration = ${monitor-apachedex-report-config:rendered} configuration = ${monitor-apachedex-report-config:output}
promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }} promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }}
[{{ section('monitor-promise-apachedex-result') }}] [{{ section('monitor-promise-apachedex-result') }}]
......
...@@ -78,10 +78,9 @@ kumofs-data = ${:srv}/kumofs ...@@ -78,10 +78,9 @@ kumofs-data = ${:srv}/kumofs
[resiliency-exclude-file] [resiliency-exclude-file]
# Generate rdiff exclude file in case of resiliency # Generate rdiff exclude file in case of resiliency
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
mode = 644 inline = {{ '{{ "**\\n" }}' }}
template = {{ 'inline:{{ "**\\n" }}' }} output = ${directory:srv}/exporter.exclude
rendered = ${directory:srv}/exporter.exclude
# Deploy zope promises scripts # Deploy zope promises scripts
[promise-template] [promise-template]
......
...@@ -50,17 +50,9 @@ recipe = slapos.cookbook:random.integer ...@@ -50,17 +50,9 @@ recipe = slapos.cookbook:random.integer
minimum = {{ dumps(1) }} minimum = {{ dumps(1) }}
maximum = {{ dumps(2**32 - 1) }} maximum = {{ dumps(2**32 - 1) }}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
mode = 644
[jinja2-template-executable]
< = jinja2-template-base
mode = 755
[simplefile] [simplefile]
< = jinja2-template-base recipe = slapos.recipe.template:jinja2
template = inline:{{ '{{ content }}' }} inline = {{ '{{ content }}' }}
{% macro simplefile(section_name, file_path, content, mode='') -%} {% macro simplefile(section_name, file_path, content, mode='') -%}
{% set content_section_name = section_name ~ '-content' -%} {% set content_section_name = section_name ~ '-content' -%}
...@@ -69,7 +61,7 @@ content = {{ dumps(content) }} ...@@ -69,7 +61,7 @@ content = {{ dumps(content) }}
[{{ section(section_name) }}] [{{ section(section_name) }}]
< = simplefile < = simplefile
rendered = {{ file_path }} output = {{ file_path }}
context = key content {{content_section_name}}:content context = key content {{content_section_name}}:content
mode = {{ mode }} mode = {{ mode }}
{%- endmacro %} {%- endmacro %}
...@@ -157,9 +149,9 @@ ssl-{{ key }} = {{ value }} ...@@ -157,9 +149,9 @@ ssl-{{ key }} = {{ value }}
{% endfor %} {% endfor %}
[my-cnf] [my-cnf]
< = jinja2-template-base recipe = slapos.recipe.template:jinja2
rendered = ${directory:etc}/mariadb.cnf output = ${directory:etc}/mariadb.cnf
template = {{ parameter_dict['template-my-cnf'] }} url = {{ parameter_dict['template-my-cnf'] }}
context = section parameter_dict my-cnf-parameters context = section parameter_dict my-cnf-parameters
[init-script-parameters] [init-script-parameters]
...@@ -167,10 +159,10 @@ database-list = {{ dumps(database_list + test_database_list) }} ...@@ -167,10 +159,10 @@ database-list = {{ dumps(database_list + test_database_list) }}
mroonga-mariadb-install-sql = {{ dumps(parameter_dict['mroonga-mariadb-install-sql']) }} mroonga-mariadb-install-sql = {{ dumps(parameter_dict['mroonga-mariadb-install-sql']) }}
[init-script] [init-script]
< = jinja2-template-executable recipe = slapos.recipe.template:jinja2
# XXX: is there a better location ? # XXX: is there a better location ?
rendered = ${directory:etc}/mariadb_initial_setup.sql output = ${directory:etc}/mariadb_initial_setup.sql
template = {{ parameter_dict['template-mariadb-initial-setup'] }} url = {{ parameter_dict['template-mariadb-initial-setup'] }}
context = section parameter_dict init-script-parameters context = section parameter_dict init-script-parameters
[{{ section('update-mysql') }}] [{{ section('update-mysql') }}]
...@@ -178,15 +170,15 @@ recipe = slapos.cookbook:generic.mysql.wrap_update_mysql ...@@ -178,15 +170,15 @@ recipe = slapos.cookbook:generic.mysql.wrap_update_mysql
output = ${directory:services}/mariadb_update output = ${directory:services}/mariadb_update
binary = ${binary-wrap-mysql_upgrade:wrapper-path} binary = ${binary-wrap-mysql_upgrade:wrapper-path}
mysql = ${binary-wrap-mysql:wrapper-path} mysql = ${binary-wrap-mysql:wrapper-path}
init-script = ${init-script:rendered} init-script = ${init-script:output}
mysql_tzinfo_to_sql = ${binary-wrap-mysql_tzinfo_to_sql:wrapper-path} mysql_tzinfo_to_sql = ${binary-wrap-mysql_tzinfo_to_sql:wrapper-path}
[{{ section('mysqld') }}] [{{ section('mysqld') }}]
< = jinja2-template-executable recipe = slapos.recipe.template:jinja2
rendered = ${directory:services}/mariadb output = ${directory:services}/mariadb
template = {{ parameter_dict['template-mysqld-wrapper'] }} url = {{ parameter_dict['template-mysqld-wrapper'] }}
context = context =
key defaults_file my-cnf:rendered key defaults_file my-cnf:output
key datadir my-cnf-parameters:data-directory key datadir my-cnf-parameters:data-directory
key environ :environ key environ :environ
environ = environ =
...@@ -218,7 +210,7 @@ link-binary = {{ dumps(parameter_dict['link-binary']) }} ...@@ -218,7 +210,7 @@ link-binary = {{ dumps(parameter_dict['link-binary']) }}
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
# Note: --defaults-file must be the first argument, otherwise wrapped binary # Note: --defaults-file must be the first argument, otherwise wrapped binary
# will reject it. # will reject it.
command-line = "{{ parameter_dict['mariadb-location'] }}/bin/${:command}" --defaults-file="${my-cnf:rendered}" command-line = "{{ parameter_dict['mariadb-location'] }}/bin/${:command}" --defaults-file="${my-cnf:output}"
wrapper-path = ${directory:bin}/${:command} wrapper-path = ${directory:bin}/${:command}
[binary-wrap-mysql] [binary-wrap-mysql]
...@@ -263,9 +255,9 @@ slowquery = ${monitor-directory:private}/slowquery_digest ...@@ -263,9 +255,9 @@ slowquery = ${monitor-directory:private}/slowquery_digest
[{{ section('resiliency-exclude-file') }}] [{{ section('resiliency-exclude-file') }}]
# Generate rdiff exclude file in case of resiliency # Generate rdiff exclude file in case of resiliency
< = jinja2-template-base recipe = slapos.recipe.template:jinja2
template = {{ 'inline:{{ "${my-cnf-parameters:data-directory}/**\\n${directory:mariadb-backup-incremental}/**\\n${directory:log}/**\\n${directory:tmp}/**\\n" }}' }} inline = {{ '{{ "${my-cnf-parameters:data-directory}/**\\n${directory:mariadb-backup-incremental}/**\\n${directory:log}/**\\n${directory:tmp}/**\\n" }}' }}
rendered = ${directory:srv}/exporter.exclude output = ${directory:srv}/exporter.exclude
[{{ section("resiliency-identity-signature-script")}}] [{{ section("resiliency-identity-signature-script")}}]
# Generate identity script used by webrunner to check data integrity # Generate identity script used by webrunner to check data integrity
...@@ -278,23 +270,23 @@ mode = 770 ...@@ -278,23 +270,23 @@ mode = 770
dash = {{ dumps(dash) }} dash = {{ dumps(dash) }}
[{{ section('start-clone-from-backup') }}] [{{ section('start-clone-from-backup') }}]
< = jinja2-template-executable recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['mariadb-start-clone-from-backup'] }} url = {{ parameter_dict['mariadb-start-clone-from-backup'] }}
rendered = ${directory:bin}/start-clone-from-backup output = ${directory:bin}/start-clone-from-backup
context = context =
key dash dash:dash key dash dash:dash
key client binary-wrap-mysql:wrapper-path key client binary-wrap-mysql:wrapper-path
key data_directory my-cnf-parameters:data-directory key data_directory my-cnf-parameters:data-directory
key pid_file my-cnf-parameters:pid-file key pid_file my-cnf-parameters:pid-file
key server mysqld:rendered key server mysqld:output
key update update-mysql:output key update update-mysql:output
key socket my-cnf-parameters:socket key socket my-cnf-parameters:socket
[{{ section('resiliency-after-import-script') }}] [{{ section('resiliency-after-import-script') }}]
# Generate after import script used by importer instance of webrunner # Generate after import script used by importer instance of webrunner
< = jinja2-template-executable recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['mariadb-resiliency-after-import-script'] }} url = {{ parameter_dict['mariadb-resiliency-after-import-script'] }}
rendered = ${directory:bin}/restore-from-backup output = ${directory:bin}/restore-from-backup
context = context =
key dash dash:dash key dash dash:dash
key mysql_executable binary-wrap-mysql:wrapper-path key mysql_executable binary-wrap-mysql:wrapper-path
...@@ -302,7 +294,7 @@ context = ...@@ -302,7 +294,7 @@ context =
key mariadb_backup_directory directory:mariadb-backup-full key mariadb_backup_directory directory:mariadb-backup-full
key pid_file my-cnf-parameters:pid-file key pid_file my-cnf-parameters:pid-file
key binlog_path my-cnf-parameters:binlog-path key binlog_path my-cnf-parameters:binlog-path
key server_executable mysqld:rendered key server_executable mysqld:output
[{{ section('monitor-generate-mariadb-slow-query-report') }}] [{{ section('monitor-generate-mariadb-slow-query-report') }}]
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
...@@ -311,14 +303,13 @@ name = generate-mariadb-slow-query-report ...@@ -311,14 +303,13 @@ name = generate-mariadb-slow-query-report
# The goal is to be executed before logrotate log rotation. # The goal is to be executed before logrotate log rotation.
# Here, logrotate-entry-base:frequency = daily, so we run at 23 o'clock every day. # Here, logrotate-entry-base:frequency = daily, so we run at 23 o'clock every day.
frequency = 0 23 * * * frequency = 0 23 * * *
command = ${monitor-generate-mariadb-slow-query-report-wrapper:rendered} command = ${monitor-generate-mariadb-slow-query-report-wrapper:output}
[monitor-generate-mariadb-slow-query-report-wrapper] [monitor-generate-mariadb-slow-query-report-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['mariadb-slow-query-report-script'] }} url = {{ parameter_dict['mariadb-slow-query-report-script'] }}
rendered = ${directory:bin}/${:filename} output = ${directory:bin}/${:filename}
filename = generate-mariadb-slow-query-report filename = generate-mariadb-slow-query-report
mode = 755
context = context =
raw slow_query_path ${directory:srv}/backup/logrotate/mariadb_slowquery.log raw slow_query_path ${directory:srv}/backup/logrotate/mariadb_slowquery.log
raw pt_query_exec ${binary-wrap-pt-digest:wrapper-path} raw pt_query_exec ${binary-wrap-pt-digest:wrapper-path}
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 644
[smtpd-password] [smtpd-password]
recipe = slapos.cookbook:generate.password recipe = slapos.cookbook:generate.password
...@@ -61,10 +60,9 @@ var-spool-postfix-trace = ${:var-spool-postfix}/trace ...@@ -61,10 +60,9 @@ var-spool-postfix-trace = ${:var-spool-postfix}/trace
# webrunner resiliency with erp5 inside. # webrunner resiliency with erp5 inside.
[{{ section("resiliency-exclude-file") }}] [{{ section("resiliency-exclude-file") }}]
# Generate rdiff exclude file # Generate rdiff exclude file
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
mode = 644 inline = {{ '{{ "**\\n" }}' }}
template = {{ 'inline:{{ "**\\n" }}' }} output = ${directory:srv}/exporter.exclude
rendered = ${directory:srv}/exporter.exclude
{% if divert -%} {% if divert -%}
{% set milter_port = tcpv4_port + 1 -%} {% set milter_port = tcpv4_port + 1 -%}
...@@ -100,21 +98,20 @@ recipe = slapos.cookbook:userinfo ...@@ -100,21 +98,20 @@ recipe = slapos.cookbook:userinfo
[smtp-sasl-passwd] [smtp-sasl-passwd]
< = jinja2-template-base < = jinja2-template-base
rendered = ${directory:etc-postfix}/sasl_passwd output = ${directory:etc-postfix}/sasl_passwd
{% if relay -%} {% if relay -%}
template = inline:{{ "{{ host }} {{ sasl_credential }}" }} inline ={{ "{{ host }} {{ sasl_credential }}" }}
{%- else -%} {%- else -%}
template = inline: inline =
{%- endif %} {%- endif %}
context = context =
key host configuration:relayhost key host configuration:relayhost
key sasl_credential configuration:relay-sasl-credential key sasl_credential configuration:relay-sasl-credential
mode = 600
[{{ section('cyrus-smtpd-conf') }}] [{{ section('cyrus-smtpd-conf') }}]
< = jinja2-template-base < = jinja2-template-base
rendered = ${directory:etc-cyrus}/smtpd.conf output = ${directory:etc-cyrus}/smtpd.conf
template = inline: inline =
pwcheck_method: auxprop pwcheck_method: auxprop
mech_list: PLAIN LOGIN mech_list: PLAIN LOGIN
sasldb_path: {{ '{{ sasldb }}' }} sasldb_path: {{ '{{ sasldb }}' }}
...@@ -146,8 +143,8 @@ update = ...@@ -146,8 +143,8 @@ update =
[{{ section('postfix-main-cf') }}] [{{ section('postfix-main-cf') }}]
< = jinja2-template-base < = jinja2-template-base
rendered = ${directory:etc-postfix}/main.cf output = ${directory:etc-postfix}/main.cf
template = {{ parameter_dict['template-postfix-main-cf'] }} url = {{ parameter_dict['template-postfix-main-cf'] }}
context = context =
key bin_directory directory:bin key bin_directory directory:bin
key usr_directory directory:usr key usr_directory directory:usr
...@@ -169,21 +166,21 @@ context = ...@@ -169,21 +166,21 @@ context =
[{{ section('postfix-master-cf') }}] [{{ section('postfix-master-cf') }}]
< = jinja2-template-base < = jinja2-template-base
rendered = ${directory:etc-postfix}/master.cf output = ${directory:etc-postfix}/master.cf
template = {{ parameter_dict['template-postfix-master-cf'] }} url = {{ parameter_dict['template-postfix-master-cf'] }}
context = key smtp configuration:smtp context = key smtp configuration:smtp
[aliases] [aliases]
< = jinja2-template-base < = jinja2-template-base
template = {{ parameter_dict['template-postfix-aliases'] }} url = {{ parameter_dict['template-postfix-aliases'] }}
rendered = ${directory:etc-postfix}/aliases output = ${directory:etc-postfix}/aliases
context = context =
key alias_dict configuration:alias-dict key alias_dict configuration:alias-dict
[typed-paths] [typed-paths]
# Postfix-friendly rendering of file paths, prefixed with database type. # Postfix-friendly rendering of file paths, prefixed with database type.
aliases = hash:${aliases:rendered} aliases = hash:${aliases:output}
smtp-sasl-passwd = hash:${smtp-sasl-passwd:rendered} smtp-sasl-passwd = hash:${smtp-sasl-passwd:output}
[{{ section('postalias-db') }}] [{{ section('postalias-db') }}]
recipe = plone.recipe.command recipe = plone.recipe.command
......
...@@ -109,10 +109,9 @@ command = ${tidstorage:repozo-wrapper} ...@@ -109,10 +109,9 @@ command = ${tidstorage:repozo-wrapper}
# webrunner resiliency with erp5 inside. # webrunner resiliency with erp5 inside.
[{{ section("resiliency-exclude-file") }}] [{{ section("resiliency-exclude-file") }}]
# Generate rdiff exclude file # Generate rdiff exclude file
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
mode = 644 inline = {{ '{{ "${directory:zodb}/**\\n${directory:log}/**\\n" }}' }}
template = {{ 'inline:{{ "${directory:zodb}/**\\n${directory:log}/**\\n" }}' }} output = ${directory:srv}/exporter.exclude
rendered = ${directory:srv}/exporter.exclude
[{{ section("resiliency-identity-signature-script")}}] [{{ section("resiliency-identity-signature-script")}}]
# Generate identity script used by webrunner to check data integrity # Generate identity script used by webrunner to check data integrity
......
...@@ -52,7 +52,6 @@ partition. No more (undefined result), no less (IndexError). ...@@ -52,7 +52,6 @@ partition. No more (undefined result), no less (IndexError).
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 644
[run-common] [run-common]
<= userhosts-wrapper-base <= userhosts-wrapper-base
...@@ -66,7 +65,7 @@ environment += ...@@ -66,7 +65,7 @@ environment +=
MATPLOTLIBRC={{ parameter_dict['matplotlibrc'] }} MATPLOTLIBRC={{ parameter_dict['matplotlibrc'] }}
INSTANCE_HOME=${:instance-home} INSTANCE_HOME=${:instance-home}
CAUCASE={{ slapparameter_dict['caucase-url'] }} CAUCASE={{ slapparameter_dict['caucase-url'] }}
FONTCONFIG_FILE=${fontconfig-conf:rendered} FONTCONFIG_FILE=${fontconfig-conf:output}
{% if slapparameter_dict.get('wendelin-core-zblk-fmt') %} {% if slapparameter_dict.get('wendelin-core-zblk-fmt') %}
WENDELIN_CORE_ZBLK_FMT={{ slapparameter_dict['wendelin-core-zblk-fmt'] }} WENDELIN_CORE_ZBLK_FMT={{ slapparameter_dict['wendelin-core-zblk-fmt'] }}
{% endif %} {% endif %}
...@@ -107,8 +106,8 @@ fontconfig-cache = ${buildout:directory}/.fontconfig ...@@ -107,8 +106,8 @@ fontconfig-cache = ${buildout:directory}/.fontconfig
[fontconfig-conf] [fontconfig-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-fonts-conf'] }} url = {{ parameter_dict['template-fonts-conf'] }}
rendered = ${directory:etc}/fonts.conf output = ${directory:etc}/fonts.conf
context = context =
key cachedir directory:fontconfig-cache key cachedir directory:fontconfig-cache
key fonts :fonts key fonts :fonts
...@@ -127,9 +126,8 @@ includes = ...@@ -127,9 +126,8 @@ includes =
[{{ section("resiliency-exclude-file") }}] [{{ section("resiliency-exclude-file") }}]
# Generate rdiff exclude file # Generate rdiff exclude file
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 644 inline = {{ '{{ "${directory:log}/**\\n${directory:tmp}/**\\n" }}' }}
template = {{ 'inline:{{ "${directory:log}/**\\n${directory:tmp}/**\\n" }}' }} output = ${directory:srv}/exporter.exclude
rendered = ${directory:srv}/exporter.exclude
[{{ section("resiliency-identity-signature-script")}}] [{{ section("resiliency-identity-signature-script")}}]
# Generate identity script used by webrunner to check data integrity # Generate identity script used by webrunner to check data integrity
...@@ -168,38 +166,38 @@ hostalias-dict = {{ dumps(slapparameter_dict['hostalias-dict']) }} ...@@ -168,38 +166,38 @@ hostalias-dict = {{ dumps(slapparameter_dict['hostalias-dict']) }}
[hostaliases] [hostaliases]
< = jinja2-template-base < = jinja2-template-base
template = inline: {{ ' inline = {{ '
{% for alias, aliased in host_dict.items() -%} {% for alias, aliased in host_dict.items() -%}
{{ alias }} {{ aliased }} {{ alias }} {{ aliased }}
{% endfor %} {% endfor %}
' }} ' }}
rendered = ${directory:etc}/hostaliases output = ${directory:etc}/hostaliases
context = key host_dict hosts-parameter:hostalias-dict context = key host_dict hosts-parameter:hostalias-dict
[hosts] [hosts]
< = jinja2-template-base < = jinja2-template-base
template = inline: {{ ' inline = {{ '
{% for alias, aliased in host_dict.items() -%} {% for alias, aliased in host_dict.items() -%}
{{ aliased }} {{ alias }} {{ aliased }} {{ alias }}
{% endfor %} {% endfor %}
' }} ' }}
rendered = ${directory:etc}/hosts output = ${directory:etc}/hosts
context = key host_dict hosts-parameter:host-dict context = key host_dict hosts-parameter:host-dict
[userhosts-bin] [userhosts-bin]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
mode = 755 inline =
template = inline:#!{{ parameter_dict['dash'] }}/bin/dash #!{{ parameter_dict['dash'] }}/bin/dash
export HOSTS_FILE=${hosts:rendered} export HOSTS_FILE=${hosts:output}
export LD_PRELOAD={{ parameter_dict['userhosts'] }}:$LD_PRELOAD export LD_PRELOAD={{ parameter_dict['userhosts'] }}:$LD_PRELOAD
exec "$@" exec "$@"
rendered = ${directory:bin}/userhosts output = ${directory:bin}/userhosts
[userhosts-wrapper-base] [userhosts-wrapper-base]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
environment = environment =
HOSTALIASES=${hostaliases:rendered} HOSTALIASES=${hostaliases:output}
command-line = '${userhosts-bin:rendered}' ${:wrapped-command-line} command-line = '${userhosts-bin:output}' ${:wrapped-command-line}
{# Hack to deploy SSL certs via instance parameters -#} {# Hack to deploy SSL certs via instance parameters -#}
{% for zodb in six.itervalues(zodb_dict) -%} {% for zodb in six.itervalues(zodb_dict) -%}
...@@ -211,8 +209,8 @@ command-line = '${userhosts-bin:rendered}' ${:wrapped-command-line} ...@@ -211,8 +209,8 @@ command-line = '${userhosts-bin:rendered}' ${:wrapped-command-line}
{% if k in storage_dict -%} {% if k in storage_dict -%}
[{{ section('neo-ssl-' + k[1:]) }}] [{{ section('neo-ssl-' + k[1:]) }}]
< = jinja2-template-base < = jinja2-template-base
rendered = ${directory:etc}/{{v}} output = ${directory:etc}/{{v}}
template = inline:{{'{{'}}pem}} inline ={{'{{'}}pem}}
context = key pem :pem context = key pem :pem
pem = {{dumps(storage_dict.pop(k))}} pem = {{dumps(storage_dict.pop(k))}}
...@@ -242,10 +240,9 @@ file-list = {{ parameter_dict['site-zcml'] }} ...@@ -242,10 +240,9 @@ file-list = {{ parameter_dict['site-zcml'] }}
[{{ section('zope-inituser') }}] [{{ section('zope-inituser') }}]
< = jinja2-template-base < = jinja2-template-base
rendered = ${directory:instance}/inituser output = ${directory:instance}/inituser
template = inline:{{ slapparameter_dict['inituser-login'] }}:{SHA}{{ base64.b64encode(hashlib.sha1(slapparameter_dict['inituser-password'].encode('utf-8')).digest()) }} inline ={{ slapparameter_dict['inituser-login'] }}:{SHA}{{ base64.b64encode(hashlib.sha1(slapparameter_dict['inituser-password'].encode('utf-8')).digest()) }}
mode = 600 once = ${:output}_done
once = ${:rendered}_done
[zope-conf-parameter-base] [zope-conf-parameter-base]
ip = {{ ipv4 }} ip = {{ ipv4 }}
...@@ -289,7 +286,7 @@ timerserver-interval = {{ dumps(timerserver_interval) }} ...@@ -289,7 +286,7 @@ timerserver-interval = {{ dumps(timerserver_interval) }}
[zope-conf-base] [zope-conf-base]
< = jinja2-template-base < = jinja2-template-base
template = {{ parameter_dict['zope-conf-template'] }} url = {{ parameter_dict['zope-conf-template'] }}
extensions = extensions =
jinja2.ext.do jinja2.ext.do
jinja2.ext.loopcontrols jinja2.ext.loopcontrols
...@@ -339,7 +336,7 @@ longrequest-logger-file = ...@@ -339,7 +336,7 @@ longrequest-logger-file =
[{{ conf_name }}] [{{ conf_name }}]
< = zope-conf-base < = zope-conf-base
rendered = ${directory:etc}/{{ name }}.conf output = ${directory:etc}/{{ name }}.conf
context = context =
section parameter_dict {{ conf_parameter_name }} section parameter_dict {{ conf_parameter_name }}
import os os import os os
...@@ -348,7 +345,7 @@ context = ...@@ -348,7 +345,7 @@ context =
[{{ section(name) }}] [{{ section(name) }}]
< = runzope-base < = runzope-base
wrapper-path = ${directory:service-on-watch}/{{ name }} wrapper-path = ${directory:service-on-watch}/{{ name }}
configuration-file = {{ '${' ~ conf_name ~ ':rendered}' }} configuration-file = {{ '${' ~ conf_name ~ ':output}' }}
{%- if wsgi %} {%- if wsgi %}
port = {{ port }} port = {{ port }}
{%- endif %} {%- endif %}
...@@ -438,9 +435,8 @@ bin-path = {{ bin_directory }}/{{ parameter_dict['egg-interpreter'] }} ...@@ -438,9 +435,8 @@ bin-path = {{ bin_directory }}/{{ parameter_dict['egg-interpreter'] }}
[{{ section('test-zelenium-runner') }}] [{{ section('test-zelenium-runner') }}]
<= jinja2-template-base <= jinja2-template-base
template = {{ parameter_dict['run-zelenium-template'] }} url = {{ parameter_dict['run-zelenium-template'] }}
rendered = ${directory:bin}/runTestSuite output = ${directory:bin}/runTestSuite
mode = 755
context = context =
import json_module json import json_module json
key configuration test-zelenium-runner-parameter:configuration key configuration test-zelenium-runner-parameter:configuration
...@@ -477,7 +473,7 @@ environment-extra = ...@@ -477,7 +473,7 @@ environment-extra =
REAL_INSTANCE_HOME=${:instance-home} REAL_INSTANCE_HOME=${:instance-home}
SQLBENCH_PATH={{ parameter_dict['sqlbench_path'] }} SQLBENCH_PATH={{ parameter_dict['sqlbench_path'] }}
TEST_CA_PATH=${directory:ca-dir} TEST_CA_PATH=${directory:ca-dir}
ERP5_TEST_RUNNER_CONFIGURATION=${test-runner-configuration:rendered} ERP5_TEST_RUNNER_CONFIGURATION=${test-runner-configuration:output}
{%- if wsgi %} {%- if wsgi %}
erp5_wsgi=1 erp5_wsgi=1
{%- endif %} {%- endif %}
...@@ -498,8 +494,8 @@ command-line = ...@@ -498,8 +494,8 @@ command-line =
[test-runner-configuration] [test-runner-configuration]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${directory:etc}/${:_buildout_section_name_}.json output = ${directory:etc}/${:_buildout_section_name_}.json
template = inline: inline =
{{ json.dumps(slapparameter_dict['test-runner-configuration']) }} {{ json.dumps(slapparameter_dict['test-runner-configuration']) }}
[{{ section('runUnitTest') }}] [{{ section('runUnitTest') }}]
......
...@@ -2,9 +2,6 @@ ...@@ -2,9 +2,6 @@
extends = extends =
{{ instance_common_cfg }} {{ instance_common_cfg }}
[jinja2-template-base]
mode = 644
[default-dynamic-template-parameters] [default-dynamic-template-parameters]
bin-directory = {{ bin_directory }} bin-directory = {{ bin_directory }}
buildout-bin-directory = {{ buildout_bin_directory }} buildout-bin-directory = {{ buildout_bin_directory }}
...@@ -21,7 +18,7 @@ template-postfix-master-cf = {{ template_postfix_master_cf }} ...@@ -21,7 +18,7 @@ template-postfix-master-cf = {{ template_postfix_master_cf }}
[dynamic-template-postfix] [dynamic-template-postfix]
< = jinja2-template-base < = jinja2-template-base
template = {{ template_postfix }} url = {{ template_postfix }}
filename = instance-postfix.cfg filename = instance-postfix.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
...@@ -41,7 +38,7 @@ template-zodb-base = {{ template_zodb_base }} ...@@ -41,7 +38,7 @@ template-zodb-base = {{ template_zodb_base }}
[dynamic-template-erp5] [dynamic-template-erp5]
<= jinja2-template-base <= jinja2-template-base
template = {{ template_erp5 }} url = {{ template_erp5 }}
filename = instance-erp5.cfg filename = instance-erp5.cfg
extra-context = extra-context =
key default_cloudooo_url dynamic-template-erp5-parameters:default-cloudooo-url key default_cloudooo_url dynamic-template-erp5-parameters:default-cloudooo-url
...@@ -74,7 +71,7 @@ template-apache-conf = {{ template_apache_conf }} ...@@ -74,7 +71,7 @@ template-apache-conf = {{ template_apache_conf }}
[dynamic-template-balancer] [dynamic-template-balancer]
<= jinja2-template-base <= jinja2-template-base
template = {{ template_balancer }} url = {{ template_balancer }}
filename = instance-balancer.cfg filename = instance-balancer.cfg
extra-context = extra-context =
section parameter_dict dynamic-template-balancer-parameters section parameter_dict dynamic-template-balancer-parameters
...@@ -89,7 +86,7 @@ import-list = ...@@ -89,7 +86,7 @@ import-list =
[dynamic-template-zeo] [dynamic-template-zeo]
<= jinja2-template-base <= jinja2-template-base
template = {{ template_zeo }} url = {{ template_zeo }}
filename = instance-zeo.cfg filename = instance-zeo.cfg
extra-context = extra-context =
key buildout_directory buildout:directory key buildout_directory buildout:directory
...@@ -120,7 +117,7 @@ egg-interpreter = {{egg_interpreter}} ...@@ -120,7 +117,7 @@ egg-interpreter = {{egg_interpreter}}
[dynamic-template-zope] [dynamic-template-zope]
<= jinja2-template-base <= jinja2-template-base
template = {{ template_zope }} url = {{ template_zope }}
filename = instance-zope.cfg filename = instance-zope.cfg
extra-context = extra-context =
key buildout_directory buildout:directory key buildout_directory buildout:directory
...@@ -144,7 +141,7 @@ logrotate-location = {{ logrotate_location }} ...@@ -144,7 +141,7 @@ logrotate-location = {{ logrotate_location }}
[dynamic-template-kumofs] [dynamic-template-kumofs]
<= jinja2-template-base <= jinja2-template-base
template = {{ template_kumofs }} url = {{ template_kumofs }}
filename = instance-kumofs.cfg filename = instance-kumofs.cfg
extra-context = extra-context =
section parameter_dict dynamic-template-kumofs-parameters section parameter_dict dynamic-template-kumofs-parameters
...@@ -174,7 +171,7 @@ groonga-plugins-path = {{ groonga_plugin_dir }}:{{ groonga_mysql_normalizer_plug ...@@ -174,7 +171,7 @@ groonga-plugins-path = {{ groonga_plugin_dir }}:{{ groonga_mysql_normalizer_plug
[dynamic-template-mariadb] [dynamic-template-mariadb]
<= jinja2-template-base <= jinja2-template-base
template = {{ template_mariadb }} url = {{ template_mariadb }}
filename = instance-mariadb.cfg filename = instance-mariadb.cfg
extra-context = extra-context =
section parameter_dict dynamic-template-mariadb-parameters section parameter_dict dynamic-template-mariadb-parameters
...@@ -196,11 +193,11 @@ mode = 644 ...@@ -196,11 +193,11 @@ mode = 644
# we need this value to be present in a section, # we need this value to be present in a section,
# for slapos.cookbook:switch-softwaretype to work # for slapos.cookbook:switch-softwaretype to work
[dynamic-template-jupyter] [dynamic-template-jupyter]
rendered = {{ template_jupyter_cfg }} output = {{ template_jupyter_cfg }}
[dynamic-template-wcfs] [dynamic-template-wcfs]
<= jinja2-template-base <= jinja2-template-base
template = {{ instance_wcfs_cfg_in }} url = {{ instance_wcfs_cfg_in }}
filename = instance_wcfs.cfg filename = instance_wcfs.cfg
extra-context = extra-context =
section parameter_dict dynamic-template-zope-parameters section parameter_dict dynamic-template-zope-parameters
...@@ -212,20 +209,20 @@ recipe = slapos.cookbook:switch-softwaretype ...@@ -212,20 +209,20 @@ recipe = slapos.cookbook:switch-softwaretype
override = {{ dumps(override_switch_softwaretype |default) }} override = {{ dumps(override_switch_softwaretype |default) }}
# Public software types # Public software types
default = dynamic-template-erp5:rendered default = dynamic-template-erp5:output
# BBB # BBB
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
# Internal software types # Internal software types
kumofs = dynamic-template-kumofs:rendered kumofs = dynamic-template-kumofs:output
caucase = dynamic-template-caucase:rendered caucase = dynamic-template-caucase:output
mariadb = dynamic-template-mariadb:rendered mariadb = dynamic-template-mariadb:output
balancer = dynamic-template-balancer:rendered balancer = dynamic-template-balancer:output
postfix = dynamic-template-postfix:rendered postfix = dynamic-template-postfix:output
zodb-zeo = dynamic-template-zeo:rendered zodb-zeo = dynamic-template-zeo:output
zodb-neo = neo:rendered zodb-neo = neo:output
zope = dynamic-template-zope:rendered zope = dynamic-template-zope:output
jupyter = dynamic-template-jupyter:rendered jupyter = dynamic-template-jupyter:output
wcfs = dynamic-template-wcfs:rendered wcfs = dynamic-template-wcfs:output
# Keep cloudooo backward compatibility # Keep cloudooo backward compatibility
cloudooo = dynamic-template-legacy:output cloudooo = dynamic-template-legacy:output
......
...@@ -56,9 +56,8 @@ part-list = ...@@ -56,9 +56,8 @@ part-list =
[instance] [instance]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
mode = 0644
context = context =
key application_location application:location key application_location application:location
key application_deployment_part_list custom-application-deployment:part-list key application_deployment_part_list custom-application-deployment:part-list
...@@ -73,10 +72,10 @@ context = ...@@ -73,10 +72,10 @@ context =
key dash_location dash:location key dash_location dash:location
key findutils_location findutils:location key findutils_location findutils:location
key logrotate_location logrotate:location key logrotate_location logrotate:location
key logrotate_cfg template-logrotate-base:rendered key logrotate_cfg template-logrotate-base:output
key gzip_location gzip:location key gzip_location gzip:location
key xz_utils_location xz-utils:location key xz_utils_location xz-utils:location
key template_monitor monitor2-template:rendered key template_monitor monitor2-template:output
key mariadb_link_binary template-mariadb:link-binary key mariadb_link_binary template-mariadb:link-binary
key mariadb_location mariadb:location key mariadb_location mariadb:location
key mariadb_resiliency_after_import_script mariadb-resiliency-after-import-script:target key mariadb_resiliency_after_import_script mariadb-resiliency-after-import-script:target
...@@ -93,7 +92,7 @@ context = ...@@ -93,7 +92,7 @@ context =
key template_lamp instance-lamp:target key template_lamp instance-lamp:target
key template_mariadb template-mariadb:target key template_mariadb template-mariadb:target
key template_mariadb_initial_setup template-mariadb-initial-setup:target key template_mariadb_initial_setup template-mariadb-initial-setup:target
key template_mysqld_wrapper template-mysqld-wrapper:rendered key template_mysqld_wrapper template-mysqld-wrapper:output
key template_my_cnf template-my-cnf:target key template_my_cnf template-my-cnf:target
key unixodbc_location unixodbc:location key unixodbc_location unixodbc:location
key openssl_location openssl:location key openssl_location openssl:location
...@@ -113,7 +112,7 @@ context = ...@@ -113,7 +112,7 @@ context =
[erp5] [erp5]
# lamp stack reuses erp5 stack to have mariadb, but we don't need to checkout erp5 here. # lamp stack reuses erp5 stack to have mariadb, but we don't need to checkout erp5 here.
recipe = recipe =
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
# not need these here). # not need these here).
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = e4e070f93adaf917f9427ae9f35573d9 md5sum = 29df0dc24386ecb97dc52c9fb59108c8
[instance-apache-php] [instance-apache-php]
filename = instance-apache-php.cfg.in filename = instance-apache-php.cfg.in
md5sum = e7a14c01e6314e2bffebd7d80cf1c488 md5sum = 0952ef9f6cb5e259ad5519d2975d2f37
[instance-lamp] [instance-lamp]
filename = instance-lamp.cfg.jinja2.in filename = instance-lamp.cfg.jinja2.in
......
...@@ -135,17 +135,16 @@ apache-config-dir = ${directory:apache.d} ...@@ -135,17 +135,16 @@ apache-config-dir = ${directory:apache.d}
[apache-php-conf] [apache-php-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-apache-conf'] }} url = {{ parameter_dict['template-apache-conf'] }}
rendered = ${directory:etc}/apache.conf output = ${directory:etc}/apache.conf
context = context =
section parameter_dict apache-php-configuration section parameter_dict apache-php-configuration
extensions = jinja2.ext.do extensions = jinja2.ext.do
mode = 0644
[apache-php-wrapper] [apache-php-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:bin}/apache-wrapper wrapper-path = ${directory:bin}/apache-wrapper
command-line = "{{ parameter_dict['apache-location'] }}/bin/httpd" -f "${apache-php-conf:rendered}" -DFOREGROUND command-line = "{{ parameter_dict['apache-location'] }}/bin/httpd" -f "${apache-php-conf:output}" -DFOREGROUND
wait-for-files = wait-for-files =
${ca-directory:certs}/httpd.crt ${ca-directory:certs}/httpd.crt
${ca-directory:certs}/httpd.key ${ca-directory:certs}/httpd.key
...@@ -171,13 +170,12 @@ php-upload-dir = ${directory:upload-tmp} ...@@ -171,13 +170,12 @@ php-upload-dir = ${directory:upload-tmp}
[php.ini-conf] [php.ini-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-php-ini'] }} url = {{ parameter_dict['template-php-ini'] }}
rendered = ${directory:php-ini-dir}/php.ini output = ${directory:php-ini-dir}/php.ini
context = context =
section parameter_dict php.ini-configuration section parameter_dict php.ini-configuration
section instance_dict instance-parameter section instance_dict instance-parameter
extensions = jinja2.ext.do extensions = jinja2.ext.do
mode = 0644
[instance-parameter] [instance-parameter]
db-user = ${mariadb-urlparse:username} db-user = ${mariadb-urlparse:username}
...@@ -188,7 +186,7 @@ db-port = ${mariadb-urlparse:port} ...@@ -188,7 +186,7 @@ db-port = ${mariadb-urlparse:port}
document-root = ${apache-php-configuration:document-root} document-root = ${apache-php-configuration:document-root}
backend-url = ${apache-php-configuration:url} backend-url = ${apache-php-configuration:url}
php-bin = {{ parameter_dict['apache-php-location'] }}/bin/php php-bin = {{ parameter_dict['apache-php-location'] }}/bin/php
php-ini = ${php.ini-conf:rendered} php-ini = ${php.ini-conf:output}
#---------------- #----------------
......
...@@ -9,10 +9,10 @@ offline = true ...@@ -9,10 +9,10 @@ offline = true
[switch_softwaretype] [switch_softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
default = dynamic-template-lamp:rendered default = dynamic-template-lamp:output
RootSoftwareInstance = ${:default} RootSoftwareInstance = ${:default}
mariadb = dynamic-template-mariadb:rendered mariadb = dynamic-template-mariadb:output
apache = dynamic-template-apache-php:rendered apache = dynamic-template-apache-php:output
[slap-configuration] [slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised recipe = slapos.cookbook:slapconfiguration.serialised
...@@ -24,9 +24,8 @@ cert = ${slap-connection:cert-file} ...@@ -24,9 +24,8 @@ cert = ${slap-connection:cert-file}
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename} output = ${buildout:directory}/${:filename}
extensions = jinja2.ext.do extensions = jinja2.ext.do
mode = 0644
extra-context = extra-context =
context = context =
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
...@@ -46,7 +45,7 @@ context = ...@@ -46,7 +45,7 @@ context =
[dynamic-template-lamp] [dynamic-template-lamp]
<= jinja2-template-base <= jinja2-template-base
template = {{ template_lamp }} url = {{ template_lamp }}
filename = template-lamp.cfg filename = template-lamp.cfg
extra-context = extra-context =
section parameter_dict dynamic-template-lamp-parameters section parameter_dict dynamic-template-lamp-parameters
...@@ -65,7 +64,7 @@ custom-application-template = {{ custom_application_template }} ...@@ -65,7 +64,7 @@ custom-application-template = {{ custom_application_template }}
[dynamic-template-apache-php] [dynamic-template-apache-php]
<= jinja2-template-base <= jinja2-template-base
template = {{ template_apache_php }} url = {{ template_apache_php }}
filename = template-apache-php.cfg filename = template-apache-php.cfg
extra-context = extra-context =
key custom_application_template application-parameters:custom-application-template key custom_application_template application-parameters:custom-application-template
...@@ -97,7 +96,7 @@ bin-directory = {{ bin_directory }} ...@@ -97,7 +96,7 @@ bin-directory = {{ bin_directory }}
[dynamic-template-mariadb] [dynamic-template-mariadb]
<= jinja2-template-base <= jinja2-template-base
template = {{ template_mariadb }} url = {{ template_mariadb }}
filename = instance-mariadb.cfg filename = instance-mariadb.cfg
extra-context = extra-context =
key ipv4_set slap-configuration:ipv4 key ipv4_set slap-configuration:ipv4
......
...@@ -19,8 +19,8 @@ url = ${:_profile_base_location_}/${:filename} ...@@ -19,8 +19,8 @@ url = ${:_profile_base_location_}/${:filename}
[template-logrotate-base] [template-logrotate-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance-logrotate-base.cfg output = ${buildout:directory}/instance-logrotate-base.cfg
context = context =
key dcron_location dcron:location key dcron_location dcron:location
key xz_location xz-utils:location key xz_location xz-utils:location
......
...@@ -22,4 +22,4 @@ md5sum = ce6ccdd52148770149e6e7525ab71e80 ...@@ -22,4 +22,4 @@ md5sum = ce6ccdd52148770149e6e7525ab71e80
[template-logrotate-base] [template-logrotate-base]
filename = instance-logrotate-base.cfg.in filename = instance-logrotate-base.cfg.in
md5sum = 8a774b677623c77c6ff0b88852fac643 md5sum = ed807da528595b7111c19e09056b01ce
...@@ -34,8 +34,8 @@ logrotate-entries = ${logrotate-directory:logrotate-entries} ...@@ -34,8 +34,8 @@ logrotate-entries = ${logrotate-directory:logrotate-entries}
[logrotate-conf] [logrotate-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ logrotate_conf_template }} url = {{ logrotate_conf_template }}
rendered = ${logrotate-directory:etc}/logrotate.conf output = ${logrotate-directory:etc}/logrotate.conf
context = context =
section parameter_dict logrotate-conf-parameter section parameter_dict logrotate-conf-parameter
...@@ -48,8 +48,8 @@ context = ...@@ -48,8 +48,8 @@ context =
# - "pre" with commands to execute before rotation # - "pre" with commands to execute before rotation
# - "backup" with directory where to store logs # - "backup" with directory where to store logs
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ logrotate_entry_template }} url = {{ logrotate_entry_template }}
rendered = ${logrotate-conf-parameter:logrotate-entries}/${:name} output = ${logrotate-conf-parameter:logrotate-entries}/${:name}
context = context =
key backup :backup key backup :backup
key log :log key log :log
...@@ -69,7 +69,7 @@ delaycompress = true ...@@ -69,7 +69,7 @@ delaycompress = true
[logrotate] [logrotate]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ logrotate_location }}/sbin/logrotate -s "${logrotate-directory:srv}/logrotate.status" "${logrotate-conf:rendered}" command-line = {{ logrotate_location }}/sbin/logrotate -s "${logrotate-directory:srv}/logrotate.status" "${logrotate-conf:output}"
wrapper-path = ${logrotate-directory:bin}/logrotate wrapper-path = ${logrotate-directory:bin}/logrotate
[cron-entry-logrotate] [cron-entry-logrotate]
......
...@@ -21,7 +21,7 @@ Extend monitor template and a monitor-base to parts: ...@@ -21,7 +21,7 @@ Extend monitor template and a monitor-base to parts:
[buildout] [buildout]
extends = extends =
${monitor-template:rendered} ${monitor-template:output}
parts = parts =
... ...
monitor-base monitor-base
...@@ -77,7 +77,7 @@ If you have sub-instances, you should collect the base monitor url from all inst ...@@ -77,7 +77,7 @@ If you have sub-instances, you should collect the base monitor url from all inst
Also, all monitors of the sub instances need to have same password as the password of the root instance monitor. Also, all monitors of the sub instances need to have same password as the password of the root instance monitor.
NB: You should use double $ (ex: $${monitor-template:rendered}) instead of one $ in your instance template file if it's not a jinja template. See: NB: You should use double $ (ex: $${monitor-template:output}) instead of one $ in your instance template file if it's not a jinja template. See:
- Jinja template file exemple, use one $: https://lab.nexedi.com/nexedi/slapos/blob/master/software/slaprunner/instance-resilient-test.cfg.jinja2 - Jinja template file exemple, use one $: https://lab.nexedi.com/nexedi/slapos/blob/master/software/slaprunner/instance-resilient-test.cfg.jinja2
- Non Jinja template file, use $$: https://lab.nexedi.com/nexedi/slapos/blob/master/software/slaprunner/instance.cfg - Non Jinja template file, use $$: https://lab.nexedi.com/nexedi/slapos/blob/master/software/slaprunner/instance.cfg
......
...@@ -53,19 +53,17 @@ filename = monitor.conf.in ...@@ -53,19 +53,17 @@ filename = monitor.conf.in
filename = httpd-cors.cfg.in filename = httpd-cors.cfg.in
# End templates files # End templates files
# XXX keep compatibility (with software/ipython_notebook/software.cfg )
[monitor-template] [monitor-template]
rendered = ${monitor2-template:rendered} output = ${monitor2-template:output}
output = ${monitor2-template:rendered}
[monitor2-template] [monitor2-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
filename = template-monitor.cfg filename = template-monitor.cfg
template = ${:_profile_base_location_}/instance-monitor.cfg.jinja2.in url = ${:_profile_base_location_}/instance-monitor.cfg.jinja2.in
rendered = ${buildout:directory}/template-monitor.cfg output = ${buildout:directory}/template-monitor.cfg
context = context =
key apache_location apache:location key apache_location apache:location
key template_logrotate_base template-logrotate-base:rendered key template_logrotate_base template-logrotate-base:output
key randomsleep randomsleep:output key randomsleep randomsleep:output
raw monitor_bin ${buildout:bin-directory}/monitor.bootstrap raw monitor_bin ${buildout:bin-directory}/monitor.bootstrap
raw monitor_collect ${buildout:bin-directory}/monitor.collect raw monitor_collect ${buildout:bin-directory}/monitor.collect
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[monitor2-template] [monitor2-template]
filename = instance-monitor.cfg.jinja2.in filename = instance-monitor.cfg.jinja2.in
md5sum = fb10eabe010d136764365c7df2993814 md5sum = 7e7b964f324d803d40112e88cc8d75d8
[monitor-httpd-conf] [monitor-httpd-conf]
_update_hash_filename_ = templates/monitor-httpd.conf.in _update_hash_filename_ = templates/monitor-httpd.conf.in
......
...@@ -124,8 +124,8 @@ software-type = ${slap-configuration:slap-software-type} ...@@ -124,8 +124,8 @@ software-type = ${slap-configuration:slap-software-type}
[monitor-conf] [monitor-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ monitor_conf_template }} url = {{ monitor_conf_template }}
rendered = ${directory:etc}/${:filename} output = ${directory:etc}/${:filename}
filename = monitor.conf filename = monitor.conf
context = section parameter_dict monitor-conf-parameters context = section parameter_dict monitor-conf-parameters
section promise_parameter_dict monitor-promise-conf section promise_parameter_dict monitor-promise-conf
...@@ -133,7 +133,7 @@ context = section parameter_dict monitor-conf-parameters ...@@ -133,7 +133,7 @@ context = section parameter_dict monitor-conf-parameters
[start-monitor] [start-monitor]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ monitor_bin }} -c ${monitor-conf:rendered} command-line = {{ monitor_bin }} -c ${monitor-conf:output}
name = bootstrap-monitor name = bootstrap-monitor
wrapper-path = ${directory:scripts}/${:name} wrapper-path = ${directory:scripts}/${:name}
...@@ -169,40 +169,37 @@ cert-file = ${ca-directory:certs}/monitor-httpd.crt ...@@ -169,40 +169,37 @@ cert-file = ${ca-directory:certs}/monitor-httpd.crt
key-file = ${ca-directory:certs}/monitor-httpd.key key-file = ${ca-directory:certs}/monitor-httpd.key
htpasswd-file = ${httpd-monitor-htpasswd:htpasswd-path} htpasswd-file = ${httpd-monitor-htpasswd:htpasswd-path}
url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port} url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port}
httpd-cors-config-file = ${monitor-httpd-cors:rendered} httpd-cors-config-file = ${monitor-httpd-cors:output}
httpd-include-file = httpd-include-file =
[monitor-httpd-conf] [monitor-httpd-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ monitor_httpd_template }} url = {{ monitor_httpd_template }}
rendered = ${monitor-directory:etc}/monitor-httpd.conf output = ${monitor-directory:etc}/monitor-httpd.conf
mode = 0744
context = context =
section directory monitor-directory section directory monitor-directory
section parameter_dict monitor-httpd-conf-parameter section parameter_dict monitor-httpd-conf-parameter
[monitor-httpd-cors] [monitor-httpd-cors]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ monitor_https_cors }} url = {{ monitor_https_cors }}
rendered = ${directory:etc}/httpd-cors.cfg output = ${directory:etc}/httpd-cors.cfg
mode = 0600
context = context =
key domain monitor-instance-parameter:cors-domains key domain monitor-instance-parameter:cors-domains
[monitor-httpd-wrapper] [monitor-httpd-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ apache_location }}/bin/httpd -f ${monitor-httpd-conf:rendered} -DFOREGROUND command-line = {{ apache_location }}/bin/httpd -f ${monitor-httpd-conf:output} -DFOREGROUND
wrapper-path = ${directory:bin}/monitor-httpd wrapper-path = ${directory:bin}/monitor-httpd
wait-for-files = wait-for-files =
${monitor-httpd-conf-parameter:key-file} ${monitor-httpd-conf-parameter:key-file}
${monitor-httpd-conf-parameter:cert-file} ${monitor-httpd-conf-parameter:cert-file}
${monitor-httpd-graceful-wrapper:rendered} ${monitor-httpd-graceful-wrapper:output}
[monitor-httpd-graceful-wrapper] [monitor-httpd-graceful-wrapper]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ template_wrapper }} url = {{ template_wrapper }}
rendered = ${directory:scripts}/monitor-httpd-graceful output = ${directory:scripts}/monitor-httpd-graceful
mode = 0700
context = context =
key content :command key content :command
raw dash_binary {{ dash_executable_location }} raw dash_binary {{ dash_executable_location }}
...@@ -224,7 +221,7 @@ mode = 700 ...@@ -224,7 +221,7 @@ mode = 700
[monitor-globalstate-wrapper] [monitor-globalstate-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${xnice-bin:output} {{ monitor_genstatus }} '${monitor-conf:rendered}' command-line = ${xnice-bin:output} {{ monitor_genstatus }} '${monitor-conf:output}'
wrapper-path = ${directory:bin}/monitor-globalstate wrapper-path = ${directory:bin}/monitor-globalstate
[monitor-configurator-wrapper] [monitor-configurator-wrapper]
...@@ -288,7 +285,6 @@ input = inline:${:log} { ...@@ -288,7 +285,6 @@ input = inline:${:log} {
notifempty notifempty
} }
output = ${logrotate-directory:logrotate-entries}/${:name} output = ${logrotate-directory:logrotate-entries}/${:name}
mode = 600
[logrotate-entry-monitor-promise-history] [logrotate-entry-monitor-promise-history]
<= logrotate-entry-base <= logrotate-entry-base
......
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
# #
# [instance.cfg] # [instance.cfg]
# <= jinja2-template # <= jinja2-template
# template = inline: # inline =
# [buildout] # [buildout]
# extends = ${nxdtest-instance.cfg:rendered} # extends = ${nxdtest-instance.cfg:output}
# #
# [runTestSuite] # [runTestSuite]
# env.sh = ... # env.sh = ...
...@@ -37,15 +37,15 @@ extends = ...@@ -37,15 +37,15 @@ extends =
[jinja2-template] [jinja2-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/${:_buildout_section_name_} output = ${buildout:directory}/${:_buildout_section_name_}
mode = 0644 mode = 0644
context = context =
section buildout buildout section buildout buildout
[nxdtest-instance.cfg] [nxdtest-instance.cfg]
<= jinja2-template <= jinja2-template
template = ${:_profile_base_location_}/nxdtest/${:filename} url = ${:_profile_base_location_}/nxdtest/${:filename}
# NOTE += does not work # NOTE += does not work
context = context =
section buildout buildout section buildout buildout
......
...@@ -162,14 +162,12 @@ recipe = slapos.recipe.template ...@@ -162,14 +162,12 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb-import.cfg.in url = ${:_profile_base_location_}/mariadb/instance-mariadb-import.cfg.in
output = ${buildout:directory}/instance-mariadb-import.cfg output = ${buildout:directory}/instance-mariadb-import.cfg
md5sum = ... md5sum = ...
mode = 0644
[instance-mariadb-export] [instance-mariadb-export]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb-export.cfg.in url = ${:_profile_base_location_}/mariadb/instance-mariadb-export.cfg.in
output = ${buildout:directory}/instance-mariadb-export.cfg output = ${buildout:directory}/instance-mariadb-export.cfg
md5sum = ... md5sum = ...
mode = 0644
......
...@@ -14,19 +14,19 @@ ...@@ -14,19 +14,19 @@
# not need these here). # not need these here).
[pbsready] [pbsready]
filename = pbsready.cfg.in filename = pbsready.cfg.in
md5sum = 1d3aba1ba770ad3fcc2ab6c0b9266409 md5sum = e24d0567cda7c72e39f6c8fcb0ede7ab
[pbsready-import] [pbsready-import]
filename = pbsready-import.cfg.in filename = pbsready-import.cfg.in
md5sum = a211e1a7e97ced47b8f011af806b351f md5sum = 0aa7feb615fc5ac1a132a6d92c80f954
[pbsready-export] [pbsready-export]
filename = pbsready-export.cfg.in filename = pbsready-export.cfg.in
md5sum = 8f15263c4a27ec315eb3a12dbf7a7b34 md5sum = 2ef471242ab1fe9d0998f49304bfa066
[template-pull-backup] [template-pull-backup]
filename = instance-pull-backup.cfg.in filename = instance-pull-backup.cfg.in
md5sum = d1af7f8a5d4f0846e4c016253fa31f3d md5sum = 44a3166048a81d0d76d69527b1934ef7
[template-replicated] [template-replicated]
filename = template-replicated.cfg.in filename = template-replicated.cfg.in
...@@ -38,7 +38,7 @@ md5sum = 071b1034ee8f5cc14f79b16fdeba2813 ...@@ -38,7 +38,7 @@ md5sum = 071b1034ee8f5cc14f79b16fdeba2813
[template-resilient-templates] [template-resilient-templates]
filename = template-resilient-templates.cfg.in filename = template-resilient-templates.cfg.in
md5sum = 604b9d160ab85ec80718a2c54df2c4b7 md5sum = 3c31d446c762f8333283dbee84bb4a9c
[instance-frozen] [instance-frozen]
filename = instance-frozen.cfg.in filename = instance-frozen.cfg.in
......
...@@ -17,8 +17,8 @@ parts = ...@@ -17,8 +17,8 @@ parts =
monitor-check-resilient-feed-file monitor-check-resilient-feed-file
extends = extends =
${monitor2-template:rendered} ${monitor2-template:output}
${template-logrotate-base:rendered} ${template-logrotate-base:output}
#---------------- #----------------
#-- #--
...@@ -81,10 +81,9 @@ ip = $${notifier:host} ...@@ -81,10 +81,9 @@ ip = $${notifier:host}
# notifier.notify.callback sets up a callback # notifier.notify.callback sets up a callback
[notifier] [notifier]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-wrapper:output} url = ${template-wrapper:output}
rendered = $${:wrapper} output = $${:wrapper}
wrapper = $${basedirectory:services}/notifier wrapper = $${basedirectory:services}/notifier
mode = 0700
command = ${buildout:bin-directory}/pubsubserver --callbacks $${directory:notifier-callbacks} --feeds $${directory:notifier-feeds} --equeue-socket $${equeue:socket} --logfile $${basedirectory:log}/notifier.log $${:host} $${:port} command = ${buildout:bin-directory}/pubsubserver --callbacks $${directory:notifier-callbacks} --feeds $${directory:notifier-feeds} --equeue-socket $${equeue:socket} --logfile $${basedirectory:log}/notifier.log $${:host} $${:port}
host = {{ ipv6 }} host = {{ ipv6 }}
port = $${notifier-port:port} port = $${notifier-port:port}
...@@ -223,9 +222,8 @@ config-command = $${pull-push-stalled-promise-bin:wrapper-path} ...@@ -223,9 +222,8 @@ config-command = $${pull-push-stalled-promise-bin:wrapper-path}
[notifier-feed-status-promise-bin] [notifier-feed-status-promise-bin]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${notifier-feed-promise-template:target} url = ${notifier-feed-promise-template:target}
rendered = $${rootdirectory:bin}/notifier-feed-check-malformed-or-failure.py output = $${rootdirectory:bin}/notifier-feed-check-malformed-or-failure.py
mode = 700
context = context =
key notifier_feed_directory directory:notifier-feeds key notifier_feed_directory directory:notifier-feeds
raw base_url http://[$${notifier:host}]:$${notifier:port}/get/ raw base_url http://[$${notifier:host}]:$${notifier:port}/get/
...@@ -235,7 +233,7 @@ context = ...@@ -235,7 +233,7 @@ context =
<= monitor-promise-base <= monitor-promise-base
promise = check_command_execute promise = check_command_execute
name = notifier-feed-check-malformed-or-failure.py name = notifier-feed-check-malformed-or-failure.py
config-command = $${notifier-feed-status-promise-bin:rendered} config-command = $${notifier-feed-status-promise-bin:output}
#---------------- #----------------
#-- #--
...@@ -264,15 +262,14 @@ username = {{ slapparameter_dict.get('monitor-username', 'admin') }} ...@@ -264,15 +262,14 @@ username = {{ slapparameter_dict.get('monitor-username', 'admin') }}
password = {{ slapparameter_dict.get('monitor-password', '$${monitor-htpasswd:passwd}') }} password = {{ slapparameter_dict.get('monitor-password', '$${monitor-htpasswd:passwd}') }}
[monitor-conf-parameters] [monitor-conf-parameters]
private-path-list += private-path-list +=
$${logrotate-directory:logrotate-backup} $${logrotate-directory:logrotate-backup}
$${basedirectory:log} $${basedirectory:log}
[monitor-check-resilient-feed-file] [monitor-check-resilient-feed-file]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-monitor-check-resilient-feed:target} url = ${template-monitor-check-resilient-feed:target}
rendered = $${monitor-directory:bin}/check-create-resilient-feed-files output = $${monitor-directory:bin}/check-create-resilient-feed-files
mode = 700
context = context =
key input_feed_directory directory:notifier-feeds key input_feed_directory directory:notifier-feeds
key monitor_feed_directory monitor-directory:public key monitor_feed_directory monitor-directory:public
......
...@@ -44,25 +44,24 @@ pidfile = ${resilient-directory:pid}/${:name}.pid ...@@ -44,25 +44,24 @@ pidfile = ${resilient-directory:pid}/${:name}.pid
max-run = 3 max-run = 3
[logrotate-entry-notifier] [logrotate-entry-notifier]
rendered = ${rootdirectory:etc}/logrotate_notifier.conf output = ${rootdirectory:etc}/logrotate_notifier.conf
[notifier-exporter-promise-bin] [notifier-exporter-promise-bin]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
mode = 700 inline =
template = inline:
#!{{ bash_executable_location }} #!{{ bash_executable_location }}
EXPORTER_FEED="${notifier-exporter:log-file}" EXPORTER_FEED="${notifier-exporter:log-file}"
FAILURE_PATTERN="FAILURE" FAILURE_PATTERN="FAILURE"
if [ -s "$EXPORTER_FEED" ]; then if [ -s "$EXPORTER_FEED" ]; then
tail -n 1 $EXPORTER_FEED | grep -vq FAILURE_PATTERN tail -n 1 $EXPORTER_FEED | grep -vq FAILURE_PATTERN
fi fi
rendered = ${rootdirectory:bin}/exporter-status output = ${rootdirectory:bin}/exporter-status
[notifier-exporter-promise] [notifier-exporter-promise]
<= monitor-promise-base <= monitor-promise-base
promise = check_command_execute promise = check_command_execute
name = exporter-status.py name = exporter-status.py
config-command = ${notifier-exporter-promise-bin:rendered} config-command = ${notifier-exporter-promise-bin:output}
[cron-entry-backup] [cron-entry-backup]
# Schedule the periodic database dump. # Schedule the periodic database dump.
...@@ -76,7 +75,7 @@ frequency = {{ resiliency_backup_periodicity }} ...@@ -76,7 +75,7 @@ frequency = {{ resiliency_backup_periodicity }}
{% else %} {% else %}
time = ${publish-early:resiliency-backup-periodicity} time = ${publish-early:resiliency-backup-periodicity}
{% endif %} {% endif %}
command = {{ logrotate_executable_location }} -s ${basedirectory:run}/logrotate.status ${logrotate-entry-notifier:rendered}; ${notifier-exporter:wrapper} --transaction-id `date +%s` command = {{ logrotate_executable_location }} -s ${basedirectory:run}/logrotate.status ${logrotate-entry-notifier:output}; ${notifier-exporter:wrapper} --transaction-id `date +%s`
[gen-resiliency-backup-periodicity] [gen-resiliency-backup-periodicity]
recipe = slapos.cookbook:random.time recipe = slapos.cookbook:random.time
......
...@@ -62,8 +62,8 @@ output = $${rootdirectory:bin}/post-notification-run ...@@ -62,8 +62,8 @@ output = $${rootdirectory:bin}/post-notification-run
mode = 0700 mode = 0700
[backup-checksum-integrity-promise-bin] [backup-checksum-integrity-promise-bin]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline: inline =
#!/${bash:location}/bin/bash #!/${bash:location}/bin/bash
backup_diff_file=$${post-notification-run:diff-file} backup_diff_file=$${post-notification-run:diff-file}
if [ -f "$backup_diff_file" ]; then if [ -f "$backup_diff_file" ]; then
...@@ -76,14 +76,13 @@ template = inline: ...@@ -76,14 +76,13 @@ template = inline:
# If file doesn't exist, promise shouldnt raise false positive # If file doesn't exist, promise shouldnt raise false positive
exit 0; exit 0;
fi fi
rendered = $${rootdirectory:bin}/backup-checksum-integrity output = $${rootdirectory:bin}/backup-checksum-integrity
mode = 700
[backup-checksum-integrity-promise] [backup-checksum-integrity-promise]
<= monitor-promise-base <= monitor-promise-base
promise = check_command_execute promise = check_command_execute
name = backup-checksum-integrity.py name = backup-checksum-integrity.py
config-command = $${backup-checksum-integrity-promise-bin:rendered} config-command = $${backup-checksum-integrity-promise-bin:output}
########### ###########
......
...@@ -20,7 +20,7 @@ parts += ...@@ -20,7 +20,7 @@ parts +=
extends = extends =
${monitor2-template:rendered} ${monitor2-template:output}
[slap-network-information] [slap-network-information]
local-ipv4 = $${slap-configuration:ipv4-random} local-ipv4 = $${slap-configuration:ipv4-random}
...@@ -123,10 +123,9 @@ equeue-binary = ${buildout:bin-directory}/equeue ...@@ -123,10 +123,9 @@ equeue-binary = ${buildout:bin-directory}/equeue
# notifier.notify.callback sets up a callback # notifier.notify.callback sets up a callback
[notifier] [notifier]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-wrapper:output} url = ${template-wrapper:output}
rendered = $${:wrapper} output = $${:wrapper}
wrapper = $${basedirectory:services}/notifier wrapper = $${basedirectory:services}/notifier
mode = 0700
feeds = $${directory:notifier-feeds} feeds = $${directory:notifier-feeds}
callbacks-directory = $${directory:notifier-callbacks} callbacks-directory = $${directory:notifier-callbacks}
command = ${buildout:bin-directory}/pubsubserver --callbacks $${:callbacks-directory} --feeds $${:feeds} --equeue-socket $${equeue:socket} --logfile $${basedirectory:log}/notifier.log $${:host} $${:port} command = ${buildout:bin-directory}/pubsubserver --callbacks $${:callbacks-directory} --feeds $${:feeds} --equeue-socket $${equeue:socket} --logfile $${basedirectory:log}/notifier.log $${:host} $${:port}
...@@ -174,10 +173,10 @@ config-command = $${notifier-stalled-promise-bin:wrapper-path} ...@@ -174,10 +173,10 @@ config-command = $${notifier-stalled-promise-bin:wrapper-path}
#-- OpenSSH. #-- OpenSSH.
[resilient-sshd-config] [resilient-sshd-config]
# XXX: Add timeout support # XXX: Add timeout support
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
rendered = $${directory:etc}/resilient-sshd.conf output = $${directory:etc}/resilient-sshd.conf
path_pid = $${directory:run}/resilient-sshd.pid path_pid = $${directory:run}/resilient-sshd.pid
template = inline: inline =
PidFile $${:path_pid} PidFile $${:path_pid}
Port $${sshd-port:port} Port $${sshd-port:port}
ListenAddress $${slap-network-information:global-ipv6} ListenAddress $${slap-network-information:global-ipv6}
...@@ -193,7 +192,7 @@ recipe = slapos.cookbook:wrapper ...@@ -193,7 +192,7 @@ recipe = slapos.cookbook:wrapper
host = $${slap-network-information:global-ipv6} host = $${slap-network-information:global-ipv6}
rsa-keyfile = $${directory:ssh}/server_key.rsa rsa-keyfile = $${directory:ssh}/server_key.rsa
home = $${directory:ssh} home = $${directory:ssh}
command-line = ${openssh:location}/sbin/sshd -D -e -f $${resilient-sshd-config:rendered} command-line = ${openssh:location}/sbin/sshd -D -e -f $${resilient-sshd-config:output}
wrapper-path = $${rootdirectory:bin}/raw_sshd wrapper-path = $${rootdirectory:bin}/raw_sshd
[sshd-pbs-authorized-key] [sshd-pbs-authorized-key]
...@@ -271,9 +270,8 @@ config-command = $${resilient-sshkeys-sshd-promise-bin:output} ...@@ -271,9 +270,8 @@ config-command = $${resilient-sshkeys-sshd-promise-bin:output}
[notifier-feed-status-promise-bin] [notifier-feed-status-promise-bin]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${notifier-feed-promise-template:target} url = ${notifier-feed-promise-template:target}
rendered = $${rootdirectory:bin}/notifier-feed-check-malformed-or-failure.py output = $${rootdirectory:bin}/notifier-feed-check-malformed-or-failure.py
mode = 700
context = context =
key notifier_feed_directory directory:notifier-feeds key notifier_feed_directory directory:notifier-feeds
raw base_url http://[$${notifier:host}]:$${notifier:port}/get/ raw base_url http://[$${notifier:host}]:$${notifier:port}/get/
...@@ -283,7 +281,7 @@ context = ...@@ -283,7 +281,7 @@ context =
<= monitor-promise-base <= monitor-promise-base
promise = check_command_execute promise = check_command_execute
name = notifier-feed-check-malformed-or-failure.py name = notifier-feed-check-malformed-or-failure.py
config-command = $${notifier-feed-status-promise-bin:rendered} config-command = $${notifier-feed-status-promise-bin:output}
#---------------- #----------------
#-- #--
#-- Connection informations to re-use. #-- Connection informations to re-use.
......
[template-pbsready] [template-pbsready]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${pbsready:output} url = ${pbsready:output}
rendered = $${buildout:directory}/pbsready.cfg output = $${buildout:directory}/pbsready.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
[template-pbsready-export] [template-pbsready-export]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${pbsready-export:target} url = ${pbsready-export:target}
rendered = $${buildout:directory}/pbsready-exporter.cfg output = $${buildout:directory}/pbsready-exporter.cfg
mode = 640
context = context =
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
raw pbsready_template_path $${template-pbsready:rendered} raw pbsready_template_path $${template-pbsready:output}
raw bash_executable_location ${bash:location}/bin/bash raw bash_executable_location ${bash:location}/bin/bash
raw logrotate_executable_location ${logrotate:location}/usr/sbin/logrotate raw logrotate_executable_location ${logrotate:location}/usr/sbin/logrotate
[template-pbsready-import] [template-pbsready-import]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${pbsready-import:output} url = ${pbsready-import:output}
rendered = $${buildout:directory}/pbsready-importer.cfg output = $${buildout:directory}/pbsready-importer.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
raw pbsready_template_path $${template-pbsready:rendered} raw pbsready_template_path $${template-pbsready:output}
[instance-frozen] [instance-frozen]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${instance-frozen:output} url = ${instance-frozen:output}
rendered = $${buildout:directory}/template-frozen.cfg output = $${buildout:directory}/template-frozen.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
[template-pull-backup] [template-pull-backup]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-pull-backup:output} url = ${template-pull-backup:output}
rendered = $${buildout:directory}/template-pull-backup.cfg output = $${buildout:directory}/template-pull-backup.cfg
extensions = jinja2.ext.do extensions = jinja2.ext.do
context = context =
key slave_instance_list slap-configuration:slave-instance-list key slave_instance_list slap-configuration:slave-instance-list
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[supervisord-library] [supervisord-library]
_update_hash_filename_ = supervisord.jinja2.in _update_hash_filename_ = supervisord.jinja2.in
md5sum = 163c9f60e4ad3842162cbb11d771b7b8 md5sum = 5d4ef34e10d19fd726a75c9ee9a82b10
[supervisord-conf] [supervisord-conf]
_update_hash_filename_ = supervisord.conf.in _update_hash_filename_ = supervisord.conf.in
......
...@@ -22,24 +22,24 @@ pid-file = ${controller-directory:run}/supervisord-{{ name }}.pid ...@@ -22,24 +22,24 @@ pid-file = ${controller-directory:run}/supervisord-{{ name }}.pid
[supervisord-controller-conf] [supervisord-controller-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = {{ supervisord_conf }} url = {{ supervisord_conf }}
context = context =
section parameter_dict controller-parameters section parameter_dict controller-parameters
rendered = ${controller-directory:etc}/supervisord-{{ name }}.conf output = ${controller-directory:etc}/supervisord-{{ name }}.conf
[supervisord-{{ name }}] [supervisord-{{ name }}]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ buildout_bin_directory }}/supervisord -c ${supervisord-controller-conf:rendered} --nodaemon command-line = {{ buildout_bin_directory }}/supervisord -c ${supervisord-controller-conf:output} --nodaemon
wrapper-path = ${directory:services}/supervisord-{{ name }} wrapper-path = ${directory:services}/supervisord-{{ name }}
{% if use_service_hash -%} {% if use_service_hash -%}
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
{% endif -%} {% endif -%}
depends = depends =
{{ '${' ~ name ~ '-bin:recipe}' }} {{ '${' ~ name ~ '-bin:recipe}' }}
[{{ name }}-bin] [{{ name }}-bin]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ buildout_bin_directory }}/supervisorctl -c ${supervisord-controller-conf:rendered} command-line = {{ buildout_bin_directory }}/supervisorctl -c ${supervisord-controller-conf:output}
wrapper-path = ${directory:bin}/{{ name }} wrapper-path = ${directory:bin}/{{ name }}
{%- endmacro %} {%- endmacro %}
...@@ -52,8 +52,8 @@ wrapper-path = ${directory:bin}/{{ name }} ...@@ -52,8 +52,8 @@ wrapper-path = ${directory:bin}/{{ name }}
[supervisord-{{ name }}] [supervisord-{{ name }}]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = inline:[program:{{ parameter_dict['name'] }}] inline =[program:{{ parameter_dict['name'] }}]
directory = ${buildout:directory} directory = ${buildout:directory}
command = {{ parameter_dict['command'] }} command = {{ parameter_dict['command'] }}
process_name = {{ parameter_dict['name'] }} process_name = {{ parameter_dict['name'] }}
...@@ -74,6 +74,6 @@ template = inline:[program:{{ parameter_dict['name'] }}] ...@@ -74,6 +74,6 @@ template = inline:[program:{{ parameter_dict['name'] }}]
stderr_logfile_backups = 1 stderr_logfile_backups = 1
environment = {{ parameter_dict['environment'] | join(',') }} environment = {{ parameter_dict['environment'] | join(',') }}
rendered = ${controller-directory:supervisord}/{{ name }}.conf output = ${controller-directory:supervisord}/{{ name }}.conf
{%- endmacro %} {%- endmacro %}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment