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 !1151
parent 08a696d4
Pipeline #21163 failed with stage
in 0 seconds
......@@ -60,17 +60,16 @@ eggs +=
# env.sh for ZODB's python to be on $PATH.
[ZODB-env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template = inline:
recipe = slapos.recipe.template
output = ${buildout:directory}/${:_buildout_section_name_}
inline =
export PS1="(ZODB-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH
# .nxdtest to run ZODB tests
[.nxdtest]
<= jinja2-template
template =
inline:
inline =
# determine where ZODB & friends were installed
from subprocess import check_output
where = check_output(['python', '-c', """if 1:
......@@ -99,12 +98,12 @@ template =
# instance to run nxdtest.
[instance.cfg]
<= jinja2-template
template = inline:
inline =
[buildout]
extends = ${nxdtest-instance.cfg:rendered}
extends = ${nxdtest-instance.cfg:output}
[runTestSuite]
env.sh = ${ZODB-env.sh:rendered}
env.sh = ${ZODB-env.sh:output}
workdir = ${buildout:directory}
......
......@@ -18,8 +18,8 @@ md5sum = e5f4b1d997e50ffe4998c68c8ec45403
recipe = slapos.recipe.template:jinja2
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = bazel_tools_cpp_CROSSTOOL
template = ${:_profile_base_location_}/${:filename}.in
rendered = ${:location}/${:filename}
url = ${:_profile_base_location_}/${:filename}.in
output = ${:location}/${:filename}
context =
key gcc_location gcc:prefix
key binutils_location binutils:location
......@@ -28,8 +28,8 @@ context =
recipe = slapos.recipe.template:jinja2
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = bazel_src_main_cpp_BUILD
template = ${:_profile_base_location_}/${:filename}.in
rendered = ${:location}/${:filename}
url = ${:_profile_base_location_}/${:filename}.in
output = ${:location}/${:filename}
# 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.
linkopts = -DSLAPOS_DUMMY=
......@@ -50,10 +50,10 @@ url = https://github.com/bazelbuild/bazel/releases/download/0.6.1/bazel-0.6.1-di
md5sum = 8c5c827e33d3ff74c263c1299810b485
patch-binary = ${patch:location}/bin/patch
patch-file-path = ${:_profile_base_location_}/bazel-0.6.1.patch
bazel-crosstool-modified-file-path = ${template-bazel-crosstool:rendered}
bazel-src-main-cpp-build-path = ${template-bazel-src-main-cpp-build:rendered}
bazel-src-main-tools-build-path = ${template-bazel-src-main-tools-build:rendered}
bazel-src-tools-singlejar-build-path = ${template-bazel-src-tools-singlejar-build:rendered}
bazel-crosstool-modified-file-path = ${template-bazel-crosstool:output}
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:output}
bazel-src-tools-singlejar-build-path = ${template-bazel-src-tools-singlejar-build:output}
unzip-bin = ${unzip:location}/bin
zip-bin = ${zip:location}/bin
java_home = ${zulu:location}
......
......@@ -28,9 +28,9 @@ git-executable = ${git:location}/bin/git
[cythonplus_env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template =
inline:{% set path, python = os.path.split(python) -%}
output = ${buildout:directory}/${:_buildout_section_name_}
inline =
{% set path, python = os.path.split(python) -%}
{% if 'part' in gcc -%}
{% set path = path + ':' + gcc.prefix + '/bin' -%}
{% endif -%}
......
......@@ -31,7 +31,7 @@ part = firefox
recipe = slapos.recipe.build
location = ${buildout:bin-directory}/${:part}
fonts-conf = ${firefox-default-fonts-conf:rendered}
fonts-conf = ${firefox-default-fonts-conf:output}
init =
self.buildout[options['part']]
install =
......@@ -72,8 +72,8 @@ part = firefox-52
[firefox-default-fonts-conf]
recipe = slapos.recipe.template:jinja2
template = ${template-fonts-conf:output}
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/fonts.conf
url = ${template-fonts-conf:output}
output = ${buildout:parts-directory}/${:_buildout_section_name_}/fonts.conf
context =
key cachedir :cache-dir
key fonts :fonts
......
......@@ -119,10 +119,10 @@ environment-extra =
#
# ${go:exe} is standalone executable that runs go in activated gowork environment.
[go]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template
exe = ${buildout:bin-directory}/go
rendered= ${:exe}
template= inline:
output= ${:exe}
inline =
#!/bin/sh -e
. ${gowork:env.sh}
exec go "$@"
......
......@@ -132,11 +132,11 @@ promises =
# as future-proof against new versions of Chromium.
[headless-chromium-wrapper]
recipe = slapos.recipe.template:jinja2
template =
inline:#!/bin/sh
inline =
#!/bin/sh
export LD_LIBRARY_PATH="{{ nss_location }}/lib:$LD_LIBRARY_PATH"
exec {{ chromium_binary }} "$@"
rendered = ${buildout:bin-directory}/headless-chromium
output = ${buildout:bin-directory}/headless-chromium
context =
key nss_location nss:location
key chromium_binary headless-chromium:binary
......@@ -34,10 +34,10 @@ install =
[helloweb-go]
# 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.
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
template =
inline:#!/bin/sh -e
recipe = slapos.recipe.template
output = ${buildout:bin-directory}/${:_buildout_section_name_}
inline =
#!/bin/sh -e
. ${gowork:env.sh}
exec helloweb "$@"
......@@ -97,9 +97,9 @@ make-targets= ${bundler:bundle} install
[helloweb-ruby]
# NOTE slapos.cookbook:wrapper also works, but currently _only_ in instance
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
template =
inline:#!/bin/sh -e
recipe = slapos.recipe.template
output = ${buildout:bin-directory}/${:_buildout_section_name_}
inline =
#!/bin/sh -e
export BUNDLE_GEMFILE=${helloweb-ruby-bundle:path}/Gemfile
exec ${bundler:bundle} exec sh -c 'helloweb.rb "$@"' ${:_buildout_section_name_} "$@"
......@@ -40,8 +40,8 @@ url = ${:_profile_base_location_}/${:filename}
[instance-jupyter-notebook]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
context =
key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
......
......@@ -15,7 +15,7 @@
[instance-jupyter-notebook]
filename = instance.cfg.in
md5sum = 357f28614a13cdbf00a29a83cbfd2642
md5sum = 9f412363ce2c2ac99e3328f7d87d456d
[jupyter-notebook-config]
filename = jupyter_notebook_config.py.jinja
......
......@@ -73,8 +73,8 @@ environment =
[jupyter-notebook-config]
recipe = slapos.recipe.template:jinja2
template = {{ jupyter_config_location }}/{{ jupyter_config_filename }}
rendered = ${directory:jupyter_config_dir}/jupyter_notebook_config.py
url = {{ jupyter_config_location }}/{{ jupyter_config_filename }}
output = ${directory:jupyter_config_dir}/jupyter_notebook_config.py
context =
raw config_cfg ${buildout:directory}/knowledge0.cfg
......@@ -130,8 +130,8 @@ target-directory = ${directory:erp5_kernel_dir}
[kernel-json]
recipe = slapos.recipe.template:jinja2
template = {{ kernel_json_location }}/{{ kernel_json_filename }}
rendered = ${directory:erp5_kernel_dir}/kernel.json
url = {{ kernel_json_location }}/{{ kernel_json_filename }}
output = ${directory:erp5_kernel_dir}/kernel.json
# Use python2.7 executable bin file for kernel config
context =
raw python_executable {{ python_executable }}
......
......@@ -12,8 +12,8 @@ parts =
[matplotlibrc]
recipe = slapos.recipe.template:jinja2
location = ${buildout:parts-directory}/${:_buildout_section_name_}
template = ${:_profile_base_location_}/${:filename}
rendered = ${matplotlibrc:location}/matplotlibrc
url = ${:_profile_base_location_}/${:filename}
output = ${matplotlibrc:location}/matplotlibrc
backend = agg
context =
key backend matplotlibrc:backend
......
......@@ -21,20 +21,20 @@ eggs +=
# env.sh for interpreter to be on $PATH.
[nxdtest-env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template = inline:
recipe = slapos.recipe.template
output = ${buildout:directory}/${:_buildout_section_name_}
inline =
export PS1="(nxdtest-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH
# instance to run nxdtest.
[instance.cfg]
<= jinja2-template
template = inline:
inline =
[buildout]
extends = ${nxdtest-instance.cfg:rendered}
extends = ${nxdtest-instance.cfg:output}
[runTestSuite]
env.sh = ${nxdtest-env.sh:rendered}
env.sh = ${nxdtest-env.sh:output}
workdir = ${nxdtest-repository:location}
......@@ -73,7 +73,7 @@ perl-PATH = ${:location}/bin/
# dependencies
perl-bin = ${:perl-PATH}/perl
perl-PERL5LIB =
perl-PERL5LIB =
# Implementation
recipe = slapos.recipe.cmmi
......@@ -117,12 +117,12 @@ perl_location = ${perl:location}
# - inc : colon (:) separated site perl of modules to include in @INC
# Outputs:
# - perl-bin : an executable perl
recipe = slapos.recipe.template:jinja2
template = inline:
recipe = slapos.recipe.template
inline =
#!/bin/sh
{% set inc = "${:inc}".split(':') %} {# XXX we could remove duplicates from inc #}
exec ${perl:location}/bin/perl \
{% for item in inc -%}{% if item %} -I "{{ item }}" \
{% endif %}{% endfor %} "$@"
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
perl-bin = ${:rendered}
output = ${buildout:bin-directory}/${:_buildout_section_name_}
perl-bin = ${:output}
......@@ -88,12 +88,10 @@ init =
# .X.pyprog is python program to start and run entry
# it uses .X.pyexe as underlying python interpreter
[.%(name)s.pyprog]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template
exe = %(exe)s
rendered= $${:exe}
mode = 755
template=
inline:
output= $${:exe}
inline =
#!$${.%(name)s.pyexe:exe}
import sys
%(__pyinit)s
......
......@@ -28,21 +28,21 @@ eggs = ${pygolang:egg}
# env.sh for pygolang's python/gpython to be on $PATH.
[pygolang-env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template = inline:
recipe = slapos.recipe.template
output = ${buildout:directory}/${:_buildout_section_name_}
inline =
export PS1="(pygolang-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH
# instance to run nxdtest.
[instance.cfg]
<= jinja2-template
template = inline:
inline =
[buildout]
extends = ${nxdtest-instance.cfg:rendered}
extends = ${nxdtest-instance.cfg:output}
[runTestSuite]
env.sh = ${pygolang-env.sh:rendered}
env.sh = ${pygolang-env.sh:output}
workdir = ${pygolang-repository:location}
......
......@@ -47,19 +47,17 @@ post-install =
keytar.node
[theia-wrapper]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
template =
inline:
recipe = slapos.recipe.template
output = ${buildout:bin-directory}/${:_buildout_section_name_}
inline =
#!/bin/sh
cd ${theia:location}
exec ${yarn:location}/bin/yarn theia start "$@"
[theia-open]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/${:_buildout_section_name_}
template =
inline:
recipe = slapos.recipe.template
output = ${buildout:bin-directory}/${:_buildout_section_name_}
inline =
#!/bin/sh
exec ${nodejs:location}/bin/node ${theia:location}/node_modules/.bin/theia-open "$@"
......
......@@ -39,9 +39,9 @@ eggs =
# env.sh for that python + go to be on $PATH
[wendelin.core-env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template = inline:
recipe = slapos.recipe.template
output = ${buildout:directory}/${:_buildout_section_name_}
inline =
. ${gowork:env.sh}
export PS1="(wendelin.core-env) $PS1"
export PATH=${buildout:bin-directory}:${gdb:location}/bin:$PATH
......@@ -49,12 +49,12 @@ template = inline:
# instance to run nxdtest.
[instance.cfg]
<= jinja2-template
template = inline:
inline =
[buildout]
extends = ${nxdtest-instance.cfg:rendered}
extends = ${nxdtest-instance.cfg:output}
[runTestSuite]
env.sh = ${wendelin.core-env.sh:rendered}
env.sh = ${wendelin.core-env.sh:output}
workdir = ${wendelin.core-repository:location}
......
......@@ -23,21 +23,21 @@ eggs = ${zodbtools:egg}[test]
# env.sh for zodbtools's python to be on $PATH.
[zodbtools-env.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:_buildout_section_name_}
template = inline:
recipe = slapos.recipe.template
output = ${buildout:directory}/${:_buildout_section_name_}
inline =
export PS1="(zodbtools-env) $PS1"
export PATH=${buildout:bin-directory}:$PATH
# instance to run nxdtest.
[instance.cfg]
<= jinja2-template
template = inline:
inline =
[buildout]
extends = ${nxdtest-instance.cfg:rendered}
extends = ${nxdtest-instance.cfg:output}
[runTestSuite]
env.sh = ${zodbtools-env.sh:rendered}
env.sh = ${zodbtools-env.sh:output}
workdir = ${zodbtools-repository:location}
......
......@@ -24,7 +24,7 @@ Here is an example of a section to add in your software.cfg :
openoffice-port = 1235
ooo-binary-path = ${directory:libreoffice-bin}/program
environment =
FONTCONFIG_FILE = $${fontconfig-conf:rendered}
FONTCONFIG_FILE = $${fontconfig-conf:output}
PATH = ${binary-link:target-directory}
ooo-uno-path = ${directory:libreoffice-bin}/basis-link/program
......
......@@ -46,8 +46,8 @@ md5sum = ae4a0043414336a521b524d9c95f1c68
[template-pullrdiffbackup]
filename = instance-pullrdiffbackup.cfg.in
md5sum = 45a4faa217ea5b83ecf271791e1632dd
md5sum = 931038cfa23216af1628b960a2e10de6
[template]
filename = instance.cfg.in
md5sum = 3df515def97f1e8a9f181514ae6ef03f
md5sum = 974e21f30669e1b83e1e0cd8def0adc3
......@@ -42,7 +42,6 @@ plugin = $${:etc}/plugin
recipe = slapos.recipe.template
url = ${template-dcron-service:output}
output = $${directory:services}/crond
mode = 0700
logfile = $${directory:log}/crond.log
#################################
......@@ -122,7 +121,6 @@ config-statistic_name = {{ '$${' ~ slave_reference }}-backup-script:statistic_na
recipe = slapos.recipe.template
url = ${template-backup-script:output}
output = $${directory:backupscript}/$${:_buildout_section_name_}
mode = 0700
datadirectory = {{ '$${' ~ slave_reference }}-backup-directory:directory}
sshkey = {{ '$${' ~ slave_reference }}-backup-private_key:key}
connection = {{ connection }}
......@@ -140,7 +138,6 @@ statistic_log = $${directory:statistic}/$${:statistic_name}
recipe = slapos.recipe.template
url = ${template-crontab-line:output}
output = $${directory:cron-lines}/$${:_buildout_section_name_}
mode = 0600
script = {{ '$${' ~ slave_reference }}-backup-script:output}
frequency = {{ frequency }}
{% do crontab_line_list.append("$${%s-backup-crontab-line:output}" % slave_reference) -%}
......@@ -155,14 +152,12 @@ frequency = {{ frequency }}
recipe = slapos.recipe.template
url = ${template-update-rss-script:output}
output = $${directory:etc}/$${:_buildout_section_name_}
mode = 0700
global_rss = $${slap-connection:computer-id}-$${slap-connection:partition-id}.rss
[update-rss-crontab-line]
recipe = slapos.recipe.template
url = ${template-crontab-line:output}
output = $${directory:cron-lines}/$${:_buildout_section_name_}
mode = 0600
script = $${update-rss-script:output}
frequency = */5 * * * *
{% do crontab_line_list.append("$${update-rss-crontab-line:output}") -%}
......@@ -186,8 +181,7 @@ command = ${coreutils-output:cat} ${template-crontab:output} {{ crontab_line_lis
recipe = slapos.recipe.template
url = ${template-nginx-service:output}
output = $${directory:services}/nginx
mode = 0700
virtual-depends =
virtual-depends =
$${nginx-configuration:ip}
[nginx-listen-promise]
......@@ -201,7 +195,6 @@ config-port = $${nginx-configuration:port}
recipe = slapos.recipe.template
url = ${template-nginx-configuration:output}
output = $${directory:etc}/nginx.cfg
mode = 0600
access_log = $${directory:log}/nginx-access.log
error_log = $${directory:log}/nginx-error.log
ip = {{ partition_ipv6 }}
......@@ -224,7 +217,7 @@ private-path-list +=
# Add parts generated by template
[buildout]
extends =
${monitor-template:rendered}
${monitor-template:output}
parts =
......
......@@ -8,8 +8,8 @@ offline = true
[dynamic-template-pullrdiffbackup]
recipe = slapos.recipe.template:jinja2
template = ${template-pullrdiffbackup:output}
rendered = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename}
url = ${template-pullrdiffbackup:output}
output = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename}
filename = instance-pullrdiffbackup.cfg
extensions = jinja2.ext.do
context =
......@@ -20,7 +20,7 @@ context =
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = $${:pullrdiffbackup}
pullrdiffbackup = dynamic-template-pullrdiffbackup:rendered
pullrdiffbackup = dynamic-template-pullrdiffbackup:output
[slap-configuration]
# Fetches parameters defined in SlapOS Master for this instance.
......
......@@ -41,49 +41,41 @@ eggs =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-nginx-configuration]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-dcron-service]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-backup-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-crontab-line]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-crontab]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[status2rss]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-update-rss-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
##########################################################
# Buildout instance.cfg templates
......@@ -92,13 +84,11 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template-pullrdiffbackup.cfg
mode = 0644
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
mode = 0644
[versions]
gunicorn = 19.1.1
......@@ -19,7 +19,7 @@ md5sum = c4079d70ab3268234651bf6c36234b2f
[template-instance-beremiz]
filename = instance-beremiz.cfg.jinja2.in
md5sum = ac05663b9006b7c4c9810a18e1ea4220
md5sum = 51071494633f4ffba700baf935dc6955
[template-instance-beremiz-test]
filename = instance-beremiz-test.cfg.jinja2.in
......
......@@ -95,7 +95,6 @@ inline =
{{ x11vnc_bin }} -storepasswd ${random-password:passwd} ${:passfile};
fi
output = ${directory:bin}/x11vnc_passwd
mode = 700
[generate-vnc-password]
recipe = plone.recipe.command
......
......@@ -116,14 +116,14 @@ context =
key buildout_directory buildout:directory
key template_fluxbox_menu template-fluxbox-menu.in:target
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_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 font_dejavu dejavu-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 flex_location flex:location
key fluxbox_location fluxbox:location
......@@ -134,7 +134,7 @@ context =
key matiec_location matiec:location
key mesa_location mesa: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 opencv_location opencv:location
key openssl_location openssl:location
......
......@@ -50,12 +50,12 @@ eggs = click
[instance-profile]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance.cfg
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do
context =
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
# calling update-hash
......
......@@ -11,8 +11,8 @@ download-cache = ${:directory}/download-cache
[template]
recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
template = inline:
output = ${buildout:directory}/template.cfg
inline =
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......@@ -29,9 +29,8 @@ template = inline:
bin = $${buildout:directory}/bin
[runTestSuite]
recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/$${:_buildout_section_name_}
template = ${:_profile_base_location_}/$${:_buildout_section_name_}.in
mode = 0755
output = $${directory:bin}/$${:_buildout_section_name_}
url = ${:_profile_base_location_}/$${:_buildout_section_name_}.in
context =
{##} section buildout buildout
{##} section parameter_dict runTestSuite-parameters
......
......@@ -20,11 +20,10 @@ scripts = ${:interpreter}
interpreter = ${:_buildout_section_name_}
[template]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
template =
inline:
output = ${buildout:directory}/template.cfg
inline =
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
......@@ -51,9 +50,8 @@ template =
[runTestSuite]
recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/$${:_buildout_section_name_}
template = ${:_profile_base_location_}/$${:_buildout_section_name_}.in
mode = 0755
output = $${directory:bin}/$${:_buildout_section_name_}
url = ${:_profile_base_location_}/$${:_buildout_section_name_}.in
context =
key slapparameter_dict slap-configuration:configuration
key slapos_buildout slapos.buildout-repository:location
......
......@@ -14,7 +14,7 @@
# not need these here).
[template]
filename = instance.cfg.in
md5sum = fb3a20e7f555a9ce7fe1ec547d0fcdfc
md5sum = 051ae51b86f9aba169a6777fa2239901
[profile-common]
filename = instance-common.cfg.in
......@@ -22,15 +22,15 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-caddy-frontend]
filename = instance-apache-frontend.cfg.in
md5sum = 04e550480d3057ca65d87c6fadbaed6e
md5sum = 02ce5d44d49982fda598e3086cfbca99
[profile-caddy-replicate]
filename = instance-apache-replicate.cfg.in
md5sum = 63b418626ef0f8ac54d6359fb6637371
md5sum = bc2a8550c9b603bdfacd3a30a0189218
[profile-slave-list]
_update_hash_filename_ = templates/apache-custom-slave-list.cfg.in
md5sum = e3ba0da5d137dcbd56c2604d200ac3b9
md5sum = 964a7f673f441f3a3e90c88ab03e3351
[profile-replicate-publish-slave-information]
_update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in
......@@ -102,7 +102,7 @@ md5sum = b41b8de115ad815d0b0db306ad650365
[profile-kedifa]
filename = instance-kedifa.cfg.in
md5sum = 88f3a8cc30d3cf30f4bd2797f5c16221
md5sum = b5426129668f39ace55f14012c4a2fd2
[template-backend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in
......
......@@ -33,7 +33,7 @@
{% set caucase_url = 'http://' ~ caucase_netloc %}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename}
output = ${buildout:directory}/${:filename}
extra-context =
context =
import json_module json
......@@ -403,11 +403,11 @@ config-url =
#-- Publish slave information
[publish-slave-information]
recipe = slapos.cookbook:switch-softwaretype
default = dynamic-publish-slave-information:rendered
default = dynamic-publish-slave-information:output
RootSoftwareInstance = ${:default}
replicate = dynamic-publish-slave-information:rendered
custom-personal = dynamic-publish-slave-information:rendered
custom-group = dynamic-publish-slave-information:rendered
replicate = dynamic-publish-slave-information:output
custom-personal = dynamic-publish-slave-information:output
custom-group = dynamic-publish-slave-information:output
[request-kedifa]
<= slap-connection
......@@ -470,7 +470,7 @@ active-slave-instance-list = {{ json_module.dumps(active_slave_instance_list, so
[dynamic-publish-slave-information]
< = 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
extensions = jinja2.ext.do
extra-context =
......@@ -538,20 +538,17 @@ stop-on-error = True
recipe = slapos.recipe.template:jinja2
context =
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 \
{# raw block to use context #}
{% raw %}
--ca-url {{ caucase_url }} \
{% endraw %}
--ca-url {{ '{{ caucase_url }}' }} \
--ca-crt ${aikc-config:ca-certificate} \
--user-ca-crt ${aikc-config:user-ca-certificate} \
--user-crl ${aikc-config:user-crl} \
--crl ${aikc-config:crl} \
"$@"
rendered = ${directory:bin}/aikc-caucase-wrapper
mode = 0700
output = ${directory:bin}/aikc-caucase-wrapper
{% do part_list.append('aikc-create-user') %}
[aikc-create-user]
......@@ -562,11 +559,11 @@ update-command = ${:command}
csr_id = ${directory:aikc}/csr_id
command =
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
csr_id=`cut -d ' ' -f 1 ${:csr_id}`
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}
fi
......@@ -662,21 +659,18 @@ stop-on-error = True
recipe = slapos.recipe.template:jinja2
context =
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 \
{# raw block to use context #}
{% raw %}
--ca-url {{ caucase_url }} \
{% endraw %}
--ca-url {{ '{{ caucase_url }}' }} \
--ca-crt ${aibcc-config:ca-certificate} \
--user-ca-crt ${aibcc-config:user-ca-certificate} \
--user-crl ${aibcc-config:user-crl} \
--crl ${aibcc-config:crl} \
"$@"
rendered = ${directory:bin}/aibcc-caucase-wrapper
mode = 0700
output = ${directory:bin}/aibcc-caucase-wrapper
{% do part_list.append('aibcc-create-user') %}
[aibcc-create-user]
......@@ -689,11 +683,11 @@ update-command = ${:command}
csr_id = ${directory:aibcc}/csr_id
command =
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
csr_id=`cut -d ' ' -f 1 ${:csr_id}`
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}
fi
......@@ -754,8 +748,8 @@ update-command = ${:command}
recipe = slapos.recipe.template:jinja2
filename = rejected-slave.json
directory = ${directory:promise-output}
rendered = ${:directory}/${:filename}
template = {{ software_parameter_dict['template_empty'] }}
output = ${:directory}/${:filename}
url = {{ software_parameter_dict['template_empty'] }}
{% if critical_rejected_slave_dict %}
{# 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)) }}
......@@ -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}
recipe = slapos.cookbook:wrapper
command-line = {{ software_parameter_dict['nginx'] }}
-c ${rejected-slave-template:rendered}
-c ${rejected-slave-template:output}
wrapper-path = ${directory:service}/rejected-slave-publish
hash-existing-files =
${buildout:directory}/software_release/buildout.cfg
hash-files =
${rejected-slave-template:rendered}
${rejected-slave-template:output}
${rejected-slave-certificate:certificate}
[rejected-slave-certificate]
......@@ -822,7 +816,7 @@ command = {{ software_parameter_dict['htpasswd'] }} -cb ${:file} ${rejected-slav
recipe = slapos.recipe.template:jinja2
var = ${directory:rejected-var}
pid = ${directory:var}/nginx-rejected.pid
template = inline:
inline =
daemon off;
pid ${:pid};
error_log stderr;
......@@ -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]
<= monitor-promise-base
......@@ -870,7 +864,7 @@ config-port = ${rejected-slave-publish-configuration:port}
promise = check_socket_listening
promise = check_file_state
name = rejected-slave.py
config-filename = ${rejected-slave-json:rendered}
config-filename = ${rejected-slave-json:output}
config-state = empty
config-url = ${rejected-slave-publish:url}
......
......@@ -108,7 +108,7 @@ stop-on-error = True
ca_path='${kedifa-config:ca-certificate}',
crl_path='${kedifa-config:crl}',
key_path='${kedifa-csr:key}',
on_renew='${kedifa-reloader:rendered}',
on_renew='${kedifa-reloader:output}',
template_csr='${kedifa-csr:template-csr}'
)}}
......@@ -149,8 +149,8 @@ nginx_mime = {{ software_parameter_dict['nginx_mime'] }}
[expose-csr-template]
recipe = slapos.recipe.template:jinja2
rendered = ${directory:expose-csr-etc}/nginx.conf
template = {{ software_parameter_dict['template_expose_csr_nginx_conf'] }}
output = ${directory:expose-csr-etc}/nginx.conf
url = {{ software_parameter_dict['template_expose_csr_nginx_conf'] }}
context =
section configuration expose-csr-configuration
......@@ -164,7 +164,7 @@ config-port = ${expose-csr-configuration:port}
[expose-csr]
recipe = slapos.cookbook:wrapper
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}
wrapper-path = ${directory:service}/expose-csr
......@@ -177,7 +177,7 @@ commands =
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename}
output = ${buildout:directory}/${:filename}
extra-context =
slapparameter_dict = {{ dumps(slapparameter_dict) }}
slap_software_type = {{ dumps(instance_parameter_dict['slap-software-type']) }}
......@@ -203,11 +203,10 @@ logfile = ${directory:log}/kedifa.log
[kedifa-reloader]
<= jinja2-template-base
template = {{ software_parameter_dict['template_wrapper'] }}
rendered = ${directory:etc-run}/kedifa-reloader
url = {{ software_parameter_dict['template_wrapper'] }}
output = ${directory:etc-run}/kedifa-reloader
command =
kill -HUP `cat ${kedifa-config:pidfile}`
mode = 0700
extra-context =
key content :command
......
......@@ -10,7 +10,7 @@ recipe = caddyprofiledeps
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename}
output = ${buildout:directory}/${:filename}
extensions = jinja2.ext.do
extra-context =
context =
......@@ -25,13 +25,13 @@ import-list =
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
default = dynamic-profile-caddy-replicate:rendered
default = dynamic-profile-caddy-replicate:output
RootSoftwareInstance = ${:default}
custom-personal = dynamic-profile-caddy-replicate:rendered
single-default = dynamic-profile-caddy-frontend:rendered
single-custom-personal = dynamic-profile-caddy-frontend:rendered
replicate = dynamic-profile-caddy-replicate:rendered
kedifa = dynamic-profile-kedifa:rendered
custom-personal = dynamic-profile-caddy-replicate:output
single-default = dynamic-profile-caddy-frontend:output
single-custom-personal = dynamic-profile-caddy-frontend:output
replicate = dynamic-profile-caddy-replicate:output
kedifa = dynamic-profile-kedifa:output
[software-parameter-section]
{% for key,value in software_parameter_dict.iteritems() %}
......@@ -40,7 +40,7 @@ kedifa = dynamic-profile-kedifa:rendered
[dynamic-profile-caddy-frontend]
< = jinja2-template-base
template = {{ software_parameter_dict['profile_caddy_frontend'] }}
url = {{ software_parameter_dict['profile_caddy_frontend'] }}
filename = instance-caddy-frontend.cfg
extra-context =
import furl_module furl
......@@ -49,7 +49,7 @@ extra-context =
[dynamic-profile-caddy-replicate]
< = jinja2-template-base
depends = ${caddyprofiledeps:recipe}
template = {{ software_parameter_dict['profile_caddy_replicate'] }}
url = {{ software_parameter_dict['profile_caddy_replicate'] }}
filename = instance-caddy-replicate.cfg
extra-context =
import subprocess_module subprocess
......@@ -61,7 +61,7 @@ extra-context =
[dynamic-profile-kedifa]
< = jinja2-template-base
template = {{ software_parameter_dict['profile_kedifa'] }}
url = {{ software_parameter_dict['profile_kedifa'] }}
filename = instance-kedifa.cfg
extra-context =
raw software_type kedifa
......
......@@ -61,8 +61,8 @@ eggs =
[profile-common]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-common.cfg.in
rendered = ${buildout:directory}/instance-common.cfg
url = ${:_profile_base_location_}/instance-common.cfg.in
output = ${buildout:directory}/instance-common.cfg
context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
......@@ -74,11 +74,11 @@ caucase_jinja2_library = ${caucase-jinja2-library:target}
# profiles
profile_caddy_frontend = ${profile-caddy-frontend:target}
profile_caddy_replicate = ${profile-caddy-replicate:target}
profile_common = ${profile-common:rendered}
profile_common = ${profile-common:output}
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_monitor2 = ${monitor2-template:rendered}
profile_monitor2 = ${monitor2-template:output}
profile_replicate_publish_slave_information = ${profile-replicate-publish-slave-information:target}
profile_slave_list = ${profile-slave-list:target}
......@@ -129,8 +129,8 @@ caucase_csr_sign_check = ${:bin_directory}/caucase-csr-sign-check
[template]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/template.cfg
context =
section software_parameter_dict software-parameter-section
......
......@@ -290,8 +290,8 @@ command = {{ software_parameter_dict['htpasswd'] }} -cb ${:file} {{ slave_refere
{#- Store certificates on fs #}
[{{ cert_title }}]
< = jinja2-template-base
template = {{ empty_template }}
rendered = {{ cert_file }}
url = {{ empty_template }}
output = {{ cert_file }}
extra-context =
key content {{ cert_title + '-config:value' }}
{#- BBB: SlapOS Master non-zero knowledge BEGIN #}
......@@ -312,8 +312,8 @@ value = {{ dumps(slave_instance.get(cert_name)) }}
[{{cert_title}}]
< = jinja2-template-base
template = {{ empty_template }}
rendered = {{ cert_file }}
url = {{ empty_template }}
output = {{ cert_file }}
cert-content = {{ dumps(slave_instance.get('ssl_crt') + '\n' + slave_instance.get('ssl_ca_crt', '') + '\n' + slave_instance.get('ssl_key')) }}
extra-context =
key content :cert-content
......@@ -340,9 +340,9 @@ node-id = {{ node_id }}
[{{ slave_section_title }}]
< = 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 =
section slave_parameter {{ slave_configuration_section_name }}
......@@ -430,8 +430,8 @@ pid = {{ caddy_configuration['slave-introspection-pid-file'] }}
[slave-introspection-config]
<= jinja2-template-base
template = {{ software_parameter_dict['template_slave_introspection_httpd_nginx'] }}
rendered = {{ frontend_configuration['slave-introspection-configuration'] }}
url = {{ software_parameter_dict['template_slave_introspection_httpd_nginx'] }}
output = {{ frontend_configuration['slave-introspection-configuration'] }}
extra-context =
section slave_log_directory slave-log-directory-dict
section slave_htpasswd slave-htpasswd
......@@ -440,7 +440,7 @@ extra-context =
[slave-introspection]
recipe = slapos.cookbook:wrapper
command-line = {{ software_parameter_dict['nginx'] }}
-c ${slave-introspection-config:rendered}
-c ${slave-introspection-config:output}
wrapper-path = {{ directory['service'] }}/slave-instrospection-nginx
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
......@@ -491,18 +491,18 @@ update-command = ${:command}
[kedifa-updater-mapping]
recipe = slapos.recipe.template:jinja2
file = {{ kedifa_configuration['kedifa-updater-mapping-file'] }}
template = inline:
inline =
{%- for mapping in kedifa_updater_mapping %}
{{ mapping[0] }} {{ mapping[1] }} {{ mapping[2] }}
{%- endfor %}
rendered = ${:file}
output = ${:file}
##<Backend haproxy>
[backend-haproxy-configuration]
< = jinja2-template-base
template = {{ template_backend_haproxy_configuration }}
rendered = ${backend-haproxy-config:file}
url = {{ template_backend_haproxy_configuration }}
output = ${backend-haproxy-config:file}
backend_slave_list = {{ dumps(sorted(backend_slave_list)) }}
extra-context =
key backend_slave_list :backend_slave_list
......@@ -589,8 +589,8 @@ nginx_mime = {{ software_parameter_dict['nginx_mime'] }}
[expose-csr-template]
recipe = slapos.recipe.template:jinja2
rendered = {{ directory['expose-csr-etc'] }}/nginx.conf
template = {{ template_expose_csr_nginx_conf }}
output = {{ directory['expose-csr-etc'] }}/nginx.conf
url = {{ template_expose_csr_nginx_conf }}
context =
section configuration expose-csr-configuration
......@@ -604,7 +604,7 @@ config-port = ${expose-csr-configuration:port}
[expose-csr]
recipe = slapos.cookbook:wrapper
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}
wrapper-path = {{ directory['service'] }}/expose-csr
......
......@@ -19,4 +19,4 @@ md5sum = 2e7c1d8c553b398dd68c875a9fa38cdb
[instance]
filename = instance.cfg.jinja2
md5sum = 687ed460bebc18768ff7b7315e9b6de5
md5sum = b4a50217c68233eb0e2922fd7606a6be
......@@ -18,8 +18,8 @@ instance-caucased = {{ dumps(instance_caucased) }}
[caucased]
recipe = slapos.recipe.template:jinja2
template = ${context:instance-caucased}
rendered = ${buildout:parts-directory}/instance-caucased.cfg
url = ${context:instance-caucased}
output = ${buildout:parts-directory}/instance-caucased.cfg
monitor = {{ template_monitor }}
context =
key ipv6_set slap-configuration:ipv6
......@@ -31,6 +31,6 @@ import-list =
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
default = caucased:rendered
default = caucased:output
# XXX: When will this name finally go away ?
RootSoftwareInstance = ${:default}
......@@ -14,12 +14,12 @@ url = ${:_profile_base_location_}/${:filename}
[instance]
recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
context =
key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key caucase_jinja2_library caucase-jinja2-library:target
key instance_caucased instance-caucased:target
key template_monitor monitor2-template:rendered
key template_monitor monitor2-template:output
......@@ -14,8 +14,8 @@
# not need these here).
[template-cloudooo]
filename = instance.cfg.in
md5sum = e986de01a57161b32425f1cd3ccac924
md5sum = d1e4d7306c39f2ebc64d0407860d4301
[template-cloudooo-instance]
filename = instance-cloudooo.cfg.in
md5sum = 3e6830c21c206b3ae1140375e5e63b46
md5sum = 90299c1dbdc5f983613794a8e9a7bc9d
......@@ -43,9 +43,6 @@
{% set section_list = [] -%}
{% set cloudooo_section_list = [] -%}
{% 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='') -%}
{% set content_section_name = section_name ~ '-content' -%}
......@@ -53,10 +50,9 @@ template = inline:{{ '{{ content }}' }}
content = {{ dumps(content) }}
[{{ section_name }}]
< = simplefile
rendered = {{ file_path }}
context = key content {{ content_section_name }}:content
mode = {{ mode }}
recipe = slapos.recipe.template
output = {{ file_path }}
inline = {{ '${' + content_section_name + ':content}' }}
{%- endmacro %}
......@@ -80,12 +76,12 @@ parts =
[apache]
recipe = slapos.cookbook:wrapper
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]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-apache-conf'] }}
rendered = ${directory:apache-conf}/apache.conf
url = {{ parameter_dict['template-apache-conf'] }}
output = ${directory:apache-conf}/apache.conf
context = section parameter_dict apache-conf-parameter-dict
[apache-conf-parameter-dict]
......@@ -139,8 +135,8 @@ recipe = slapos.cookbook:publish.serialised
[fontconfig-conf]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-fonts-conf'] }}
rendered = ${directory:etc}/fonts.conf
url = {{ parameter_dict['template-fonts-conf'] }}
output = ${directory:etc}/fonts.conf
context =
key cachedir directory:fontconfig-cache
key fonts :fonts
......@@ -160,7 +156,7 @@ recipe = slapos.cookbook:generic.cloudooo
ip = {{ ipv4 }}
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
FONTCONFIG_FILE = ${fontconfig-conf:rendered}
FONTCONFIG_FILE = ${fontconfig-conf:output}
PATH = ${binary-link:target-directory}
LANG = C.UTF-8
mimetype_entry_addition =
......
......@@ -16,7 +16,7 @@ cert = ${slap-connection:cert-file}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
output = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
extra-context =
context =
key ipv6_set slap-configuration:ipv6
......@@ -33,7 +33,7 @@ instance-parameter-dict = {{ dumps(cloudooo_parameter_dict) }}
[cloudooo-dynamic-template]
< = jinja2-template-base
template = {{ template_cloudooo_instance }}
url = {{ template_cloudooo_instance }}
filename = instance-cloudooo.cfg
extensions = jinja2.ext.do
extra-context =
......@@ -43,5 +43,5 @@ extra-context =
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
default = cloudooo-dynamic-template:rendered
default = cloudooo-dynamic-template:output
RootSoftwareInstance = ${:default}
......@@ -27,9 +27,8 @@ cert = ${slap-connection:cert-file}
< = template-cloudooo-base
recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename}
mode = 640
output = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
[template-cloudooo-base]
context =
......@@ -91,8 +90,8 @@ xfixes = ${xfixes:location}
xserver = ${xserver:location}
zlib = ${zlib:location}
template-apache-conf = ${template-apache-backend-conf:target}
template-logrotate-base = ${template-logrotate-base:rendered}
template-monitor = ${monitor2-template:rendered}
template-logrotate-base = ${template-logrotate-base:output}
template-monitor = ${monitor2-template:output}
[template-cloudooo-instance]
recipe = slapos.recipe.build:download
......
[instance.cfg]
filename = instance.cfg.in
md5sum = a24384487467a07e827edab17a0b7206
md5sum = 156dcfedd4b5fcbeefb3ac05a062edba
[runTestSuite.in]
_update_hash_filename_ = runTestSuite.in
......
......@@ -10,7 +10,7 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
[publish-env-path]
recipe = slapos.cookbook:publish
readme = Source the script to set up the environment.
script = ${cythonplus_env.sh:rendered}
script = ${cythonplus_env.sh:output}
repository = ${cythonplus-repository:repository}
[slap-configuration]
......@@ -34,12 +34,11 @@ shared = true
[runTestSuite]
recipe = slapos.recipe.template:jinja2
rendered = $${directory:bin}/$${:_buildout_section_name_}
template = ${runTestSuite.in:target}
mode = 0755
output = $${directory:bin}/$${:_buildout_section_name_}
url = ${runTestSuite.in:target}
context =
key tmpdir directory:tmp
key slapparameter_dict slap-configuration:configuration
key cythonplus_repository cythonplus-repository:location
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]
filename = instance.cfg
md5sum = ddd17fab15afa5a27cdc0761fbc8f34c
md5sum = a4e19280bc672cc98e0fef241c8439ba
......@@ -11,7 +11,7 @@ parts =
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
extends = ${monitor-template:rendered}
extends = ${monitor-template:output}
# parameters
[instance-parameter]
......
......@@ -14,8 +14,8 @@
# not need these here).
[template]
filename = instance.cfg
md5sum = 6dcbe21f99aa6675e8e3b74bc9cbb0e6
md5sum = 5bd72da73a8b84f70f568686924d7d6c
[template-default]
filename = instance-default.cfg.jinja.in
md5sum = 536a28ff250c691ca374f75aa5f0aa76
md5sum = 0c9ea9fa7417885889a536ec2cf2093f
......@@ -7,7 +7,7 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
extends = ${monitor2-template:rendered}
extends = ${monitor2-template:output}
parts =
testnode-service
......@@ -97,21 +97,20 @@ hash-files =
shell = ${bash:location}/bin/bash
[shellinabox]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template
# We cannot use slapos.cookbook:wrapper here because this recipe escapes too much
socket = $${directory:run}/siab.sock
mode = 0700
rendered = $${basedirectory:services}/shellinaboxd
template = inline:
output = $${basedirectory:services}/shellinaboxd
inline =
#!/bin/sh
exec ${shellinabox:location}/bin/shellinaboxd \
--unixdomain-only=$${:socket}:$(id -u):$(id -g):0600 \
--service "/:$(id -u):$(id -g):HOME:$${shell-environment:shell} -l"
[shellinabox-frontend-config]
recipe = slapos.recipe.template:jinja2
rendered = $${directory:etc}/$${:_buildout_section_name_}
template = inline:
recipe = slapos.recipe.template
output = $${directory:etc}/$${:_buildout_section_name_}
inline =
https://$${:hostname}:$${:port} {
bind $${:ipv6}
tls self_signed
......@@ -131,15 +130,15 @@ username = testnode
passwd = $${pwgen:passwd}
cert-file = $${directory:shellinabox}/public.crt
key-file = $${directory:shellinabox}/private.key
url = https://$${:username}:$${:passwd}@$${:hostname}:$${:port}
backend-url = https://$${:username}:$${:passwd}@$${:hostname}:$${:port}
[shellinabox-frontend]
recipe = slapos.cookbook:wrapper
wrapper-path = $${rootdirectory:bin}/$${:_buildout_section_name_}
command-line =
${caddy:output} -conf $${shellinabox-frontend-config:rendered} -pidfile $${:pidfile}
url = $${shellinabox-frontend-config:url}
${caddy:output} -conf $${shellinabox-frontend-config:output} -pidfile $${:pidfile}
url = $${shellinabox-frontend-config:backend-url}
hostname = $${shellinabox-frontend-config:ipv6}
port = $${shellinabox-frontend-config:port}
pidfile = $${basedirectory:run}/$${:_buildout_section_name_}.pid
......@@ -152,7 +151,7 @@ command-line =
"kill -s USR1 $$(${coreutils:location}/bin/cat $${shellinabox-frontend:pidfile}) \
&& ${coreutils:location}/bin/sleep infinity"
hash-files =
$${shellinabox-frontend-config:rendered}
$${shellinabox-frontend-config:output}
$${shellinabox-frontend:wrapper-path}
[certificate-authority]
......
......@@ -17,12 +17,12 @@ cert = $${slap-connection:cert-file}
[switch_softwaretype]
recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = $${:default}
default = instance-default:rendered
default = instance-default:output
[instance-default]
recipe = slapos.recipe.template:jinja2
template = ${template-default:output}
rendered = $${buildout:directory}/instance-default.cfg
url = ${template-default:output}
output = $${buildout:directory}/instance-default.cfg
context =
import json json
jsonkey default_parameter_dict :default-parameters
......
......@@ -36,13 +36,11 @@ eggs =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
mode = 0644
[template-default]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template-default.cfg.jinja
mode = 0644
[versions]
dnspython = 1.15.0
......
......@@ -15,4 +15,4 @@
[template-erp5testnode]
filename = instance.cfg.in
md5sum = bbfe2f0e83df4d6cd2120c0ef3c483cd
md5sum = 681f4159e4ac2542d0fbc7a894e43d79
......@@ -18,4 +18,4 @@ md5sum = 8357771b70efd0740561b1cb46f6955e
[template-deploy-test]
filename = instance.cfg.in
md5sum = c5db797980951b764b69aaa4b60a0380
md5sum = 9013ba5a4a2c80c7d96d0a6bfe0be0be
......@@ -25,24 +25,23 @@ command =
[runTestSuite]
recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/bin/$${:_buildout_section_name_}
template = inline:
output = $${buildout:directory}/bin/$${:_buildout_section_name_}
inline =
#!/bin/sh
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} "$@"
mode = 0755
context =
key slapparameter_dict slap-configuration:configuration
key partition_ipv4 slap-configuration:ipv4
[switch_softwaretype]
default = $${:deploy-test}
deploy-test = dynamic-template-deploy-test:rendered
deploy-test = dynamic-template-deploy-test:output
[dynamic-template-deploy-test]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-deploy-test.cfg.jinja2
rendered = $${buildout:directory}/template-deploy-test.cfg
url = ${:_profile_base_location_}/instance-deploy-test.cfg.jinja2
output = $${buildout:directory}/template-deploy-test.cfg
context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
......@@ -52,4 +51,3 @@ context =
raw in_vm_test_script_md5 ${deploy-script-controller-script:md5sum}
raw waittime ${deploy-script-controller-script:waittime}
raw tries ${deploy-script-controller-script:tries}
mode = 0644
......@@ -69,4 +69,3 @@ location = ${:_profile_base_location_}/${:filename}
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
mode = 0644
......@@ -18,8 +18,8 @@ var = $${:home}/var
log = $${:var}/log
[log-writer]
recipe = slapos.recipe.template:jinja2
template = inline:#!/bin/sh
recipe = slapos.recipe.template
inline =
#!/bin/sh
echo "Hello : $(date)" >> $${directory:log}/log.log
rendered = $${directory:script}/log-writer
mode = 700
output = $${directory:script}/log-writer
......@@ -12,4 +12,3 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
md5sum = 9fccb9600a085691ab0f9a20cd615c01
mode = 0644
......@@ -6,12 +6,12 @@ default = $${:test}
RootSoftwareInstance = $${:test}
# 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]
recipe = slapos.recipe.template:jinja2
template = ${template-resilient-test:target}
rendered = $${buildout:directory}/template-resilient-test.cfg
url = ${template-resilient-test:target}
output = $${buildout:directory}/template-resilient-test.cfg
bin-directory = ${buildout:bin-directory}
context =
key develop_eggs_directory buildout:develop-eggs-directory
......
......@@ -14,7 +14,7 @@
# not need these here).
[instance-profile]
filename = instance.cfg
md5sum = c265bf7ec199190ba9f77960cac5da38
md5sum = 41f5acc071609a0c4b5ada295ede6bac
[template-fluentd]
filename = instance-fluentd.cfg
......
......@@ -8,7 +8,7 @@ offline = true
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
default = dynamic-template-fluentd:rendered
default = dynamic-template-fluentd:output
RootSoftwareInstance = $${:default}
[directory]
......@@ -29,11 +29,11 @@ cert = $${slap_connection:cert_file}
[dynamic-template-fluentd]
recipe = slapos.recipe.template:jinja2
template = ${template-fluentd:output}
rendered = $${buildout:directory}/instance-fluentd.cfg
url = ${template-fluentd:output}
output = $${buildout:directory}/instance-fluentd.cfg
extensions = jinja2.ext.do
context =
key fluentd_agent_conf fluentd-agent-conf:rendered
key fluentd_agent_conf fluentd-agent-conf:output
key port_list fluentd-conf:port-list
section directory directory
......@@ -46,9 +46,6 @@ init =
options['port-list'] = re.findall(r'<source>.*port (\d+).*<\/source>', options['text'], re.DOTALL)
[fluentd-agent-conf]
recipe = slapos.recipe.template:jinja2
template = inline:{{ conf }}
rendered = $${directory:etc}/fluentd-agent.conf
mode = 0644
context =
key conf fluentd-conf:text
recipe = slapos.recipe.template
inline = $${fluentd-conf:text}
output = $${directory:etc}/fluentd-agent.conf
......@@ -15,7 +15,6 @@ part = python3
[template-base]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
mode = 0644
[instance-profile]
< = template-base
......
......@@ -15,4 +15,4 @@
[instance-cfg]
filename = instance.cfg.in
md5sum = c24f3241af0123c9570a60ccc0fb8fdc
md5sum = 38c79a4952a7cb63698135f1d1ed6c8c
......@@ -51,34 +51,35 @@ storage-path = $${directory:data}/.passwd
username = admin
[stat-password]
recipe = slapos.recipe.template:jinja2
template = inline:
recipe = slapos.recipe.template
inline =
$${admin-password:username}:$${admin-password:passwd}
rendered = $${directory:data}/passwd
output = $${directory:data}/passwd
[ice-servers.json]
recipe = slapos.recipe.template:jinja2
template = inline:
recipe = slapos.recipe.template
inline =
$${slap-configuration:configuration.ice-servers.json}
rendered = $${directory:data}/ice-servers.json
output = $${directory:data}/ice-servers.json
[groups-json]
recipe = slapos.recipe.template:jinja2
template = inline:{
recipe = slapos.recipe.template
inline =
{
"public":true,
"op": [{"username":"$${admin-password:username}","password":"$${admin-password:passwd}"}],
"other": [],
"presenter": [{"username": "", "password": "nexedi"}]
}
rendered = $${directory:groups}/public.json
output = $${directory:groups}/public.json
[galene-wrapper]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template
port = 8443
ip = $${slap-configuration:ipv6-random}
template =
inline:#!/bin/sh
inline =
#!/bin/sh
ulimit -n $(ulimit -Hn)
exec ${gowork:bin}/galene \
-static ${galene:location}/static \
......@@ -87,7 +88,7 @@ template =
-data $${directory:data} \
-http [$${:ip}]:$${:port} \
-turn ""
rendered = $${directory:services}/galene
output = $${directory:services}/galene
depends =
$${ice-servers.json:recipe}
$${groups-json:recipe}
......
......@@ -14,7 +14,7 @@
# not need these here).
[instance.cfg]
filename = instance.cfg.in
md5sum = 47e8092404feaf3f28ee6469523689ac
md5sum = 8e8edd7dadb9c331fdba826312e7e8d2
[watcher]
_update_hash_filename_ = watcher.in
......@@ -42,7 +42,7 @@ md5sum = 52d18b521b8cd16352fc88b1e1d79d53
[gitlab-unicorn-startup.in]
_update_hash_filename_ = gitlab-unicorn-startup.in
md5sum = aff91edaf9786c213db8ea703ab3571e
md5sum = b0c3d465a8aaad9d2274934dcf208645
[gitlab.yml.in]
_update_hash_filename_ = template/gitlab.yml.in
......@@ -54,11 +54,11 @@ md5sum = 0f1ec4077dab586cc003ae13f689eda2
[instance-gitlab.cfg.in]
_update_hash_filename_ = instance-gitlab.cfg.in
md5sum = f099d01baefe41c8f0944c2437b30881
md5sum = c115c88d5798dcb5e16b9d50432f2551
[instance-gitlab-export.cfg.in]
_update_hash_filename_ = instance-gitlab-export.cfg.in
md5sum = 2af7dcf63f74e5edc53a3ff11fa4989b
md5sum = da2e3d6f67c92233d370dae55fb3b35f
[instance-gitlab-test.cfg.in]
_update_hash_filename_ = instance-gitlab-test.cfg.in
......
......@@ -73,5 +73,5 @@ $RAKE cache:clear || die "cache:clear failed"
# 3. finally exec to unicorn
exec {{ gitlab_unicorn }} \
-E production \
-c {{ unicorn_rb.rendered }} \
-c {{ unicorn_rb.output }} \
{{ gitlab_work.location }}/config.ru
......@@ -60,8 +60,8 @@ output = ${directory:srv}/exporter.exclude
# this section should be added only on runner import instance
recipe = slapos.recipe.template:jinja2
mode = 0700
template= {{ gitlab_restore_sh_in }}
rendered= ${directory:srv}/runner-import-restore
url = {{ gitlab_restore_sh_in }}
output= ${directory:srv}/runner-import-restore
context =
raw bash_bin {{ bash_bin }}
raw go_work_bin {{ gopath_bin }}
......
......@@ -198,29 +198,29 @@ context-extra =
[gitlab-etc-template]
<= etc-template
rendered= ${gitlab:etc}/${:_buildout_section_name_}
output= ${gitlab:etc}/${:_buildout_section_name_}
[nginx-etc-template]
<= etc-template
rendered= ${nginx:etc}/${:_buildout_section_name_}
output= ${nginx:etc}/${:_buildout_section_name_}
[database.yml]
<= gitlab-etc-template
template= {{ database_yml_in }}
url = {{ database_yml_in }}
context-extra =
section pgsql service-postgresql
[gitconfig]
<= etc-template
template= {{ gitconfig_in }}
url = {{ gitconfig_in }}
# 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]
<= etc-template
template= {{ gitlab_shell_config_yml_in }}
rendered= ${gitlab-shell:etc}/config.yml
url = {{ gitlab_shell_config_yml_in }}
output= ${gitlab-shell:etc}/config.yml
context-extra =
import urllib urllib
section gitlab gitlab
......@@ -232,7 +232,7 @@ context-extra =
[gitlab.yml]
<= gitlab-etc-template
template= {{ gitlab_yml_in }}
url = {{ gitlab_yml_in }}
context-extra =
import urllib urllib
section gitlab gitlab
......@@ -242,16 +242,16 @@ context-extra =
[nginx.conf]
<= nginx-etc-template
template= {{ nginx_conf_in }}
url = {{ nginx_conf_in }}
context-extra =
section directory directory
section gitlab_workhorse gitlab-workhorse
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-etc-template
template= {{ nginx_gitlab_http_conf_in }}
url = {{ nginx_gitlab_http_conf_in }}
context-extra =
section nginx nginx
section gitlab_work gitlab-work
......@@ -259,8 +259,8 @@ context-extra =
[gitaly-config.toml]
<= etc-template
template= {{ gitaly_config_toml_in }}
rendered= ${directory:etc}/${:_buildout_section_name_}
url = {{ gitaly_config_toml_in }}
output= ${directory:etc}/${:_buildout_section_name_}
context-extra =
import urllib urllib
section gitlab gitlab
......@@ -269,23 +269,23 @@ context-extra =
[rack_attack.rb]
<= gitlab-etc-template
template = {{ rack_attack_rb_in }}
url = {{ rack_attack_rb_in }}
[resque.yml]
<= gitlab-etc-template
template= {{ resque_yml_in }}
url = {{ resque_yml_in }}
context-extra =
section redis service-redis
[smtp_settings.rb]
<= gitlab-etc-template
template= {{ smtp_settings_rb_in }}
url = {{ smtp_settings_rb_in }}
# contains smtp password
mode = 0600
[unicorn.rb]
<= gitlab-etc-template
template = {{ unicorn_rb_in }}
url = {{ unicorn_rb_in }}
context-extra =
section unicorn unicorn
section directory directory
......@@ -320,8 +320,8 @@ prog = {{ prog }}
[gitlab-unicorn-startup]
recipe = slapos.recipe.template:jinja2
mode = 0755
template= {{ gitlab_unicorn_startup_in }}
rendered= ${directory:bin}/${:_buildout_section_name_}
url = {{ gitlab_unicorn_startup_in }}
output= ${directory:bin}/${:_buildout_section_name_}
context =
raw bash_bin {{ bash_bin }}
raw gitlab_rake ${gitlab-rake:wrapper-path}
......@@ -397,15 +397,15 @@ tune-command =
ln -sf ${gitlab-workhorse:secret} .gitlab_workhorse_secret
# config/
cd config &&
ln -sf ${unicorn.rb:rendered} unicorn.rb &&
ln -sf ${gitlab.yml:rendered} gitlab.yml &&
ln -sf ${database.yml:rendered} database.yml &&
ln -sf ${resque.yml:rendered} resque.yml &&
ln -sf ${unicorn.rb:output} unicorn.rb &&
ln -sf ${gitlab.yml:output} gitlab.yml &&
ln -sf ${database.yml:output} database.yml &&
ln -sf ${resque.yml:output} resque.yml &&
ln -sf ${secrets:secrets}/gitlab_secrets.yml secrets.yml &&
# config/initializers/
cd initializers &&
ln -sf ${rack_attack.rb:rendered} rack_attack.rb &&
ln -sf ${smtp_settings.rb:rendered} smtp_settings.rb &&
ln -sf ${rack_attack.rb:output} rack_attack.rb &&
ln -sf ${smtp_settings.rb:output} smtp_settings.rb &&
# public/
cd ../../public &&
rm -rf uploads assets &&
......@@ -420,7 +420,7 @@ tune-command =
software = {{ gitlab_shell_repository_location }}
tune-command =
ln -sf ${gitlab-shell-config.yml:rendered} config.yml &&
ln -sf ${gitlab-shell-config.yml:output} config.yml &&
true
......@@ -597,7 +597,7 @@ wrapper-path = ${directory:service}/unicorn
# 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
# why we do it here. See gitlab-unicorn-startup for details.
command-line = ${gitlab-unicorn-startup:rendered}
command-line = ${gitlab-unicorn-startup:output}
depend =
${promise-unicorn:recipe}
......@@ -757,7 +757,7 @@ symlink = ${nginx:log} = ${nginx:srv}/logs
[service-nginx]
recipe = slapos.cookbook:wrapper
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 =
${nginx-symlinks:recipe}
${promise-nginx:recipe}
......@@ -796,7 +796,7 @@ cron-entries = ${cron:cron-entries}
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:service}/gitaly
#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 =
PATH={{ bundler_1_17_3_dir }}:{{ ruby_location }}/bin:/bin:/usr/bin
......
......@@ -13,9 +13,9 @@ offline = true
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
gitlab = instance-gitlab.cfg:rendered
gitlab-export = instance-gitlab-export.cfg:rendered
gitlab-test = instance-gitlab-test.cfg:rendered
gitlab = instance-gitlab.cfg:output
gitlab-export = instance-gitlab-export.cfg:output
gitlab-test = instance-gitlab-test.cfg:output
RootSoftwareInstance = $${:gitlab}
# TODO -import, -pull-backup
......@@ -56,7 +56,7 @@ configuration.icp_license =
[instance-cfg]
recipe = slapos.recipe.template:jinja2
mode = 0644
rendered= $${buildout:directory}/$${:_buildout_section_name_}
output= $${buildout:directory}/$${:_buildout_section_name_}
context =
import os os
import pwd pwd
......@@ -79,7 +79,7 @@ context =
raw git ${git:location}/bin/git
raw git_location ${git: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 gopath_bin ${gowork:bin}
raw gunzip_bin ${gzip:location}/bin/gunzip
......@@ -95,14 +95,14 @@ context =
raw redis_binprefix ${redis28:location}/bin
raw ruby_location ${bundler-4gitlab:ruby-location}
raw tar_location ${tar:location}
raw watcher ${watcher:rendered}
raw watcher ${watcher:output}
raw xnice_repository_location ${xnice-repository:location}
raw yarn_location ${yarn:location}
# config files
raw database_yml_in ${database.yml.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_unicorn_startup_in ${gitlab-unicorn-startup.in:target}
raw gitlab_yml_in ${gitlab.yml.in:target}
......@@ -121,18 +121,18 @@ context-extra =
[instance-gitlab.cfg]
<= instance-cfg
template= ${instance-gitlab.cfg.in:target}
url = ${instance-gitlab.cfg.in:target}
[instance-gitlab-export.cfg]
<= instance-cfg
template= ${instance-gitlab-export.cfg.in:target}
url = ${instance-gitlab-export.cfg.in:target}
context-extra =
raw instance_gitlab_cfg $${instance-gitlab.cfg:rendered}
raw instance_gitlab_cfg $${instance-gitlab.cfg:output}
[instance-gitlab-test.cfg]
<= instance-cfg
template= ${instance-gitlab-test.cfg.in:target}
url = ${instance-gitlab-test.cfg.in:target}
context-extra =
raw instance_gitlab_cfg $${instance-gitlab.cfg:rendered}
raw instance_gitlab_export_cfg $${instance-gitlab-export.cfg:rendered}
raw instance_gitlab_cfg $${instance-gitlab.cfg:output}
raw instance_gitlab_export_cfg $${instance-gitlab-export.cfg:output}
raw gitlab_demo_backup_path ${gitlab-demo-backup.git:location}
......@@ -319,8 +319,8 @@ output = ${buildout:directory}/instance.cfg
# macro: download a shell script and put it rendered into <software>/bin/
[binsh]
recipe = slapos.recipe.template:jinja2
template= ${:_profile_base_location_}/${:_update_hash_filename_}
rendered= ${buildout:bin-directory}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/${:_update_hash_filename_}
output= ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755
context =
section bash bash
......
......@@ -15,7 +15,7 @@
[instance-profile]
filename = instance.cfg.in
md5sum = 3ccdd2299e759488545b62368c7a0b91
md5sum = 6fb42f5663864789ff7b375a9a86888e
[influxdb-config-file]
filename = influxdb-config-file.cfg.in
......
......@@ -67,9 +67,8 @@ common-name = ${:_buildout_section_name_}
[config-file]
recipe = slapos.recipe.template:jinja2
template = {{ buildout['parts-directory'] }}/${:_buildout_section_name_}/${:_buildout_section_name_}.cfg.in
rendered = ${directory:etc}/${:_buildout_section_name_}.cfg
mode = 0644
url = {{ buildout['parts-directory'] }}/${:_buildout_section_name_}/${:_buildout_section_name_}.cfg.in
output = ${directory:etc}/${:_buildout_section_name_}.cfg
extensions = jinja2.ext.do
[check-port-listening-promise]
......@@ -100,7 +99,7 @@ database = telegraf
recipe = slapos.cookbook:wrapper
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
[influxdb-config-file]
......@@ -158,7 +157,7 @@ ssl-cert-file = ${grafana-certificate:cert-file}
recipe = slapos.cookbook:wrapper
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
[grafana-certificate]
......@@ -178,11 +177,11 @@ context =
section apache_frontend apache-frontend
key slapparameter_dict slap-configuration:configuration
depends =
${grafana-provisioning-config-file:rendered}
${grafana-provisioning-config-file:output}
[grafana-provisioning-config-file]
<= config-file
rendered = ${grafana:provisioning-datasources-dir}/datasource.yaml
output = ${grafana:provisioning-datasources-dir}/datasource.yaml
context =
section influxdb influxdb
section loki loki
......@@ -199,7 +198,7 @@ recipe = slapos.cookbook:wrapper
extra-config-dir = ${directory:telegraf-extra-config-dir}
# telegraf needs influxdb to be already listening before starting
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
[telegraf-config-file]
......@@ -212,7 +211,7 @@ context =
[loki]
recipe = slapos.cookbook:wrapper
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
storage-boltdb-dir = ${directory:loki-storage-boltdb-dir}
......@@ -235,7 +234,7 @@ url = ${loki:url}/ready
[promtail]
recipe = slapos.cookbook:wrapper
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
dir = ${directory:promtail-dir}
......
......@@ -117,9 +117,8 @@ url = ${:_profile_base_location_}/${:filename}
[instance-profile]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance.cfg
mode = 0644
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do
context =
section buildout buildout
......
[template-cfg]
filename = instance.cfg.in
md5sum = 5dfeeb5eca125dcaa5f9e537f941dd41
md5sum = 4d73fe3c5d286163974bdb79c838e030
[instance-headless-chromium]
_update_hash_filename_ = instance-headless-chromium.cfg.in
md5sum = 7392d20e48dbc599eb8e9d02e8095bbf
md5sum = d72e5f6e159081f1c204ceb7ec0c0caf
[template-nginx-conf]
_update_hash_filename_ = templates/nginx.conf.in
......
......@@ -54,31 +54,30 @@ nginx-mime-types = ${directory:etc}/mime-types
# Create a launcher script in /etc/service for the headless shell
# executable.
[chromium-launcher]
recipe = slapos.recipe.template:jinja2
template =
inline:#!/bin/sh
recipe = slapos.recipe.template
inline =
#!/bin/sh
export FONTCONFIG_FILE=${font-config:rendered}
export FONTCONFIG_FILE=${font-config:output}
exec {{ parameter_list['chromium-wrapper'] }} \
--remote-debugging-address=${headless-chromium:ipv4} \
--remote-debugging-port=${headless-chromium:remote-debugging-port} \
${headless-chromium:url}
rendered = ${directory:service}/chromium
output = ${directory:service}/chromium
# Configure and launch the proxy server.
[nginx-config]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template-nginx-config'] }}
rendered = ${headless-chromium:nginx-config-target}
mode = 700
url = {{ parameter_list['template-nginx-config'] }}
output = ${headless-chromium:nginx-config-target}
context =
section param_headless_chromium headless-chromium
[nginx-mime-types]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template-mime-types'] }}
rendered = ${headless-chromium:nginx-mime-types}
recipe = slapos.recipe.template
url = {{ parameter_list['template-mime-types'] }}
output = ${headless-chromium:nginx-mime-types}
[nginx-launcher]
recipe = slapos.cookbook:wrapper
......@@ -128,8 +127,8 @@ environment =
# Generate a fonts.conf file.
[font-config]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template-fonts-conf'] }}
rendered = ${directory:etc}/fonts.conf
url = {{ parameter_list['template-fonts-conf'] }}
output = ${directory:etc}/fonts.conf
context =
key cachedir :cache-dir
key fonts :fonts
......
......@@ -20,8 +20,8 @@ template-mime-types = {{ template_mime_types_target }}
[instance-headless-chromium]
recipe = slapos.recipe.template:jinja2
template = {{ template_instance_headless_chromium_target }}
rendered = ${buildout:directory}/${:filename}
url = {{ template_instance_headless_chromium_target }}
output = ${buildout:directory}/${:filename}
filename = instance-headless-chromium.cfg
context =
section buildout buildout
......@@ -41,7 +41,7 @@ default-parameters =
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = ${:default}
default = instance-headless-chromium:rendered
default = instance-headless-chromium:output
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
......
......@@ -18,22 +18,21 @@ part = python3
[template-cfg]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename}
mode = 0644
output = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
context =
section buildout buildout
key openssl_location openssl:location
key nginx_location nginx:location
key liberation_fonts_location liberation-fonts: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 template_nginx_config_target template-nginx-conf:target
key template_mime_types_target template-mime-types:target
key template_fonts_conf_target template-fonts-conf:output
key template_instance_headless_chromium_target instance-headless-chromium:target
key template_monitor monitor2-template:rendered
key template_monitor monitor2-template:output
[download-base]
recipe = slapos.recipe.build:download
......
......@@ -14,7 +14,7 @@ cert = ${slap-connection:cert-file}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
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
extra-context =
context =
......@@ -24,7 +24,7 @@ context =
[root]
<= jinja2-template-base
template = {{ instance_root }}
url = {{ instance_root }}
extra-context =
import urlparse urlparse
key ipv6 slap-configuration:ipv6-random
......@@ -32,14 +32,14 @@ extra-context =
[server]
<= jinja2-template-base
template = {{ instance_server }}
url = {{ instance_server }}
extra-context =
key instance_guid slap-configuration:instance-guid
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
override = {{ dumps(override_switch_softwaretype |default) }}
default = root:rendered
default = root:output
# BBB
RootSoftwareInstance = ${:default}
server = server:rendered
server = server:output
......@@ -16,10 +16,10 @@ environment +=
[template]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
url = ${:_profile_base_location_}/instance.cfg.in
md5sum = d7506e861ef87977eaa554b8928d2c99
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
output = ${buildout:directory}/template.cfg
context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
......
......@@ -39,8 +39,7 @@ golang = ${golang1.17:location}
# in the section using this template
[jinja-template]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}
mode = 0644
url = ${:_profile_base_location_}/${:filename}
# Download instance.cfg.in (buildout profile used to deployment of instance),
# replace all ${foo:bar} parameters by real values, and change $${foo:bar} to
......@@ -49,10 +48,10 @@ mode = 0644
[instance-profile]
# The <= is buildout verb to use defined template
<= jinja-template
rendered = ${buildout:directory}/instance.cfg
output = ${buildout:directory}/instance.cfg
extensions = jinja2.ext.do
context =
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
# calling update-hash
......@@ -15,8 +15,8 @@ template_launcher = {{ template_launcher_target }}
[instance-html5as]
recipe = slapos.recipe.template:jinja2
template = {{ template_instance_html5as_target }}
rendered = ${buildout:directory}/${:filename}
url = {{ template_instance_html5as_target }}
output = ${buildout:directory}/${:filename}
filename = instance-html5as.cfg
context =
section buildout buildout
......@@ -27,7 +27,7 @@ context =
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = ${:default}
default = instance-html5as:rendered
default = instance-html5as:output
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
......
......@@ -99,25 +99,24 @@ path_nginx = {{ parameter_list['nginx_location'] }}/sbin/nginx
# Render nginx conf
[nginx_conf]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_nginx_conf'] }}
rendered = ${html5as:path_nginx_conf}
context =
url = {{ parameter_list['template_nginx_conf'] }}
output = ${html5as:path_nginx_conf}
context =
section param_html5as html5as
section param_tempdir tempdirectory
# Render necessary mime types file for nginx
[mime_types]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_mime_types'] }}
rendered = ${html5as:path_mime_types}
recipe = slapos.recipe.template
url = {{ parameter_list['template_mime_types'] }}
output = ${html5as:path_mime_types}
# Render the script launching nginx
[launcher]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_launcher'] }}
rendered = ${html5as:bin_launcher}
mode = 700
context =
url = {{ parameter_list['template_launcher'] }}
output = ${html5as:bin_launcher}
context =
section param_html5as html5as
# Simple command to put content in the docroot
......
......@@ -24,10 +24,10 @@ parts =
# The recipe, template and mode are fetched from jijna-template
[template-cfg]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
filename = instance.cfg.in
md5sum = 310aab063704794065ee3bc8f81fdc70
md5sum = 861e7ce5d65252067d31c7325c97917d
context =
section buildout buildout
key nginx_location nginx:location
......@@ -42,7 +42,7 @@ context =
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_}
_update_hash_filename_ = instance_html5as.cfg.in
md5sum = 9b7ed68551cac5967915979383238669
md5sum = 2c2bcd723694bc88df13c139c96e8bad
[template_nginx_conf]
recipe = slapos.recipe.build:download
......
......@@ -17,11 +17,11 @@
[template-cfg]
filename = instance.cfg.in
md5sum = 9e486efe4ab1aba8cb72b04f6c6da8ad
md5sum = ef264514b64a4b2c77c9965c587c6d34
[instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in
md5sum = f86b2f37c0acd21ca1f41d90c5477d75
md5sum = a48e0026e2b949cc334efcb21478a6ed
[template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in
......
......@@ -18,8 +18,8 @@ template_monitor = {{ template_monitor }}
[instance-html5as]
recipe = slapos.recipe.template:jinja2
template = {{ template_instance_html5as_target }}
rendered = ${buildout:directory}/${:filename}
url = {{ template_instance_html5as_target }}
output = ${buildout:directory}/${:filename}
filename = instance-html5as.cfg
context =
section buildout buildout
......@@ -40,8 +40,8 @@ default-parameters =
[instance-replicate]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
template = {{ template_instance_replicate }}
rendered = ${buildout:directory}/${:filename}
url = {{ template_instance_replicate }}
output = ${buildout:directory}/${:filename}
filename = instance-replicate-html5as.cfg
context =
section buildout buildout
......@@ -57,8 +57,8 @@ default-parameters =
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = ${:default}
default = instance-html5as:rendered
replicate = instance-replicate:rendered
default = instance-html5as:output
replicate = instance-replicate:output
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
......
......@@ -107,25 +107,24 @@ path_nginx = {{ parameter_list['nginx_location'] }}/sbin/nginx
# Render nginx conf
[nginx_conf]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_nginx_conf'] }}
rendered = ${html5as:path_nginx_conf}
context =
url = {{ parameter_list['template_nginx_conf'] }}
output = ${html5as:path_nginx_conf}
context =
section param_html5as html5as
section param_tempdir tempdirectory
# Render necessary mime types file for nginx
[mime_types]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_mime_types'] }}
rendered = ${html5as:path_mime_types}
recipe = slapos.recipe.template
url = {{ parameter_list['template_mime_types'] }}
output = ${html5as:path_mime_types}
# Render the script launching nginx
[launcher]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_launcher'] }}
rendered = ${html5as:bin_launcher}
mode = 700
context =
url = {{ parameter_list['template_launcher'] }}
output = ${html5as:bin_launcher}
context =
section param_html5as html5as
# Command to put content in the docroot
......@@ -137,7 +136,7 @@ location = ${directory:srv}/html5as
# 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
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
# it's content will be served by the instance.
# If the parameter is not provided it fallback to the default template
......@@ -167,8 +166,8 @@ install =
[default_index_html]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_index_html'] }}
rendered = ${directory:srv}/index.html
url = {{ parameter_list['template_index_html'] }}
output = ${directory:srv}/index.html
title = {{ parameter_dict['title'] }}
context =
key title :title
......@@ -176,9 +175,8 @@ context =
### Nginx Graceful
[nginx-graceful]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_graceful'] }}
rendered = ${basedirectory:script}/nginx-graceful
mode = 0700
url = {{ parameter_list['template_graceful'] }}
output = ${basedirectory:script}/nginx-graceful
context =
section param_html5as html5as
......
......@@ -27,8 +27,8 @@ parts =
# The recipe, template and mode are fetched from jijna-template
[template-cfg]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
context =
section buildout buildout
key nginx_location nginx:location
......@@ -41,7 +41,7 @@ context =
key template_graceful_target template_graceful:target
key template_instance_replicate template_instance_replicate:target
# 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
# templates. Sections inheriting from this one won't need to redefine
......
......@@ -22,8 +22,8 @@ md5sum = 87781e6bcb523bb8434888d5f984f36c
[template-validator]
filename = instance-validator.cfg.in
md5sum = dc8b8d03b0af9cd32398d1fe86267bb7
md5sum = 3733c484371115831721341f9b65dc0f
[template]
filename = instance.cfg.in
md5sum = c5b18ea5d353f96c41294541186f2528
md5sum = c86d4c6b5cc67139810399b1032c3410
......@@ -40,15 +40,13 @@ pass = insecure
recipe = slapos.recipe.template
url = ${template-tomcat-service:output}
output = $${basedirectory:services}/tomcat
mode = 0700
virtual-depends =
virtual-depends =
$${tomcat-configuration:ip}
[tomcat-configuration]
recipe = slapos.recipe.template
url = ${template-tomcat-configuration:output}
output = $${basedirectory:catalina_conf}/server.xml
mode = 0600
ip = {{ partition_ipv6 }}
port = 8899
scheme = https
......@@ -74,7 +72,7 @@ monitor-httpd-port = 8333
# Add parts generated by template
[buildout]
extends =
${monitor-template:rendered}
${monitor-template:output}
parts =
publish-url
tomcat-service
......
......@@ -8,8 +8,8 @@ offline = true
[dynamic-template-validator]
recipe = slapos.recipe.template:jinja2
template = ${template-validator:output}
rendered = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename}
url = ${template-validator:output}
output = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename}
filename = instance-validator.cfg
context =
# partition_ipv6 is the random ipv6 allocated to the local partition
......@@ -19,7 +19,7 @@ context =
recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = $${:validator}
default = $${:validator}
validator = dynamic-template-validator:rendered
validator = dynamic-template-validator:output
[slap-configuration]
# Fetches parameters defined in SlapOS Master for this instance.
......
......@@ -22,13 +22,11 @@ parts =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-tomcat-service]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
##########################################################
# Buildout instance.cfg templates
......@@ -37,13 +35,11 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template-validator.cfg
mode = 0644
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
mode = 0644
[versions]
# 1.3.4nxd2 is invalid version string, thus pached version string is not '1.3.4nxd2+SlapOSPatched001'
......
......@@ -15,7 +15,7 @@
[template-cfg]
filename = instance.cfg.in
md5sum = 6f5acc546a7e9ad502d5fe586a3c3072
md5sum = 34f7ab6fe20f685d7d03f2e36f3be207
[template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in
......
......@@ -105,23 +105,22 @@ path-nginx = {{ parameter_list['nginx_location'] }}/sbin/nginx
docroot = ${basedirectory:data}/${slap-configuration:configuration.site}/public
[hugo-server]
recipe = slapos.recipe.template:jinja2
rendered = ${directory:bin}/hugo-server
mode = 0700
template =
inline:#!/bin/sh
recipe = slapos.recipe.template
output = ${directory:bin}/hugo-server
inline =
#!/bin/sh
. ${hugo:go-environment}
cd ${basedirectory:data}/${slap-configuration:configuration.site}
if [ -d "public" ]; then rm -Rf public; fi
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]
recipe = slapos.cookbook:wrapper
wrapper-path = ${basedirectory:service}/hugo-server
command-line = ${hugo-server:rendered}
command-line = ${hugo-server:output}
hash-files =
${hugo-server:rendered}
${hugo-server:output}
[hugo-port-listening-promise]
<= monitor-promise-base
......@@ -152,17 +151,17 @@ config-url = ${:url}
[nginx-conf]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_nginx_conf'] }}
rendered = ${hugo:path-nginx-conf}
url = {{ parameter_list['template_nginx_conf'] }}
output = ${hugo:path-nginx-conf}
context =
section param_hugo hugo
section param_tempdir tempdirectory
section param_nginxcert nginx-certificate
[mime-types]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_mime_types'] }}
rendered = ${hugo:path-mime-types}
recipe = slapos.recipe.template
url = {{ parameter_list['template_mime_types'] }}
output = ${hugo:path-mime-types}
[nginx-launcher]
recipe = slapos.cookbook:wrapper
......@@ -188,27 +187,25 @@ stop-on-error = true
[default-index-html]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_list['template_index_html'] }}
rendered = ${basedirectory:default-public}/index.html
url = {{ parameter_list['template_index_html'] }}
output = ${basedirectory:default-public}/index.html
context =
key go_environment hugo:go-environment
key data basedirectory:data
[default-config-toml]
recipe = slapos.recipe.template:jinja2
rendered = ${basedirectory:default-site}/config.toml
template =
inline:
recipe = slapos.recipe.template
output = ${basedirectory:default-site}/config.toml
inline =
baseURL = "${hugo-frontend:connection-secure_access}"
languageCode = "en-us"
title = "My New Hugo Site"
[nginx-graceful]
recipe = slapos.recipe.template:jinja2
rendered = ${basedirectory:script}/nginx-graceful
mode = 0700
template =
inline:#!/bin/sh
recipe = slapos.recipe.template
output = ${basedirectory:script}/nginx-graceful
inline =
#!/bin/sh
exec kill -s SIGHUP $(cat ${hugo:path-pid})
[nginx-port-listening-promise]
......
......@@ -23,12 +23,12 @@ openssl_location = ${openssl:location}
template_nginx_conf = ${template_nginx_conf:target}
template_mime_types = ${template_mime_types:target}
template_index_html = ${template_index_html:target}
template_monitor = ${monitor-template:rendered}
template_monitor = ${monitor-template:output}
[template-cfg]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
url = ${:_profile_base_location_}/${:filename}
context =
section buildout buildout
section parameter_list profile-common
......
......@@ -15,11 +15,11 @@
[instance]
filename = instance.cfg.in
md5sum = 6c17361a49cfc47564063b867aab6e8c
md5sum = 7333d1dfd4e8e4c375f7f1748292f554
[template-jscrawler]
filename = instance-jscrawler.cfg.jinja2.in
md5sum = 33bfddbc23fa794ab97770ef7776b390
md5sum = ae9269ab5b1cce77016f822024d2d996
[template-jscrawler-builder]
filename = template-jscrawler.builder.sh.in
......
......@@ -67,15 +67,14 @@ config-port = ${httpd-wrapper:port}
[jscrawler-wrapper]
recipe = slapos.cookbook:wrapper
command-line =
{{ parameter_dict['nodejs-location'] }} {{ parameter_dict['jscrawler-location'] }}
{{ parameter_dict['nodejs-location'] }} {{ parameter_dict['jscrawler-location'] }}
wrapper-path = ${directory:bin}/jscrawler
[jscrawler-build-wrapper]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-jscrawler'] }}
rendered = ${directory:bin}/jscrawler-build
url = {{ parameter_dict['template-jscrawler'] }}
output = ${directory:bin}/jscrawler-build
extensions = jinja2.ext.do
mode = 0700
list = {{ slapparameter_dict.get('urls', "").split("\n") | join('\n ') }}
period = {{ slapparameter_dict.get('crawl-periodicity', 0) }}
context =
......@@ -92,7 +91,7 @@ context =
recipe = slapos.cookbook:cron.d
name = jscrawler-build
frequency = * * * * *
command = ${jscrawler-build-wrapper:rendered}
command = ${jscrawler-build-wrapper:output}
[publish-connection-information]
......
......@@ -9,7 +9,7 @@ offline = true
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
default = dynamic-template-jscrawler:rendered
default = dynamic-template-jscrawler:output
RootSoftwareInstance = ${:default}
[slap-configuration]
......@@ -22,9 +22,8 @@ cert = ${slap-connection:cert-file}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/${:filename}
output = ${buildout:directory}/${:filename}
extensions = jinja2.ext.do
mode = 0644
extra-context =
context =
key develop_eggs_directory buildout:develop-eggs-directory
......@@ -49,7 +48,7 @@ template-jscrawler = {{ template_jscrawler_builder }}
[dynamic-template-jscrawler]
<= jinja2-template-base
template = {{ template_jscrawler }}
url = {{ template_jscrawler }}
filename = instance-jscrawler.cfg
extra-context =
section parameter_dict dynamic-template-jscrawler-parameters
......@@ -39,16 +39,16 @@ url = ${:_profile_base_location_}/${:filename}
[instance]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/instance.cfg
template = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
url = ${:_profile_base_location_}/${:filename}
context =
key bash_location bash:location
key bin_directory buildout:bin-directory
key buildout_egg_directory buildout:eggs-directory
key buildout_develop_directory buildout:develop-eggs-directory
key buildout_directory buildout:directory
key template_monitor_cfg monitor2-template:rendered
key logrotate_cfg template-logrotate-base:rendered
key template_monitor_cfg monitor2-template:output
key logrotate_cfg template-logrotate-base:output
key jscrawler_location jscrawler:location
key nodejs_location nodejs:location
key openssl_location openssl:location
......
......@@ -15,7 +15,7 @@
[instance]
filename = instance.cfg.in
md5sum = 342fcf3fc18e33fa4f940518dab6af5c
md5sum = 84380fe6c268301a1e1f501e53943f58
[template-nginx-service]
filename = template-nginx-service.sh.in
......@@ -27,4 +27,4 @@ md5sum = 98faa5ad8cfb23a11d97a459078a1d05
[template-runTestSuite]
filename = runTestSuite.in
md5sum = 9d82f8afa0de8ec2b9c4f32e058fb2bc
md5sum = 70d10e7005b98620ddbbf30030b08198
......@@ -32,8 +32,8 @@ fontconfig-cache = $${buildout:directory}/.fontconfig
[fontconfig-conf]
recipe = slapos.recipe.template:jinja2
template = ${template-fonts-conf:output}
rendered = $${directory:etc}/fonts.conf
url = ${template-fonts-conf:output}
output = $${directory:etc}/fonts.conf
context =
key cachedir directory:fontconfig-cache
key fonts :fonts
......@@ -52,12 +52,11 @@ recipe = slapos.recipe.template
url = ${template-runTestSuite:output}
output = $${directory:bin}/runTestSuite
buildout-directory = $${buildout:directory}
mode = 0700
[runTestSuite-config-file]
recipe = slapos.recipe.template:jinja2
rendered = $${directory:etc}/$${:_buildout_section_name_}.json
template = inline:
recipe = slapos.recipe.template
output = $${directory:etc}/$${:_buildout_section_name_}.json
inline =
$${instance-parameter:configuration._}
#################################
......@@ -91,7 +90,6 @@ command-line = bash -c "[ -S $${xvfb-instance:lock-dir}/.X11-unix/X$${xvfb-insta
recipe = slapos.recipe.template
url = ${template-nginx-service:output}
output = $${directory:services}/nginx
mode = 0700
virtual-depends =
$${nginx-configuration:ip}
......@@ -99,7 +97,6 @@ virtual-depends =
recipe = slapos.recipe.template
url = ${template-nginx-configuration:output}
output = $${directory:etc}/nginx.cfg
mode = 0600
access_log = $${directory:log}/nginx-access.log
error_log = $${directory:log}/nginx-error.log
ip = $${instance-parameter:ipv6-random}
......
......@@ -20,14 +20,14 @@ import json
os.environ['XORG_LOCK_DIR'] = '$${xvfb-instance:lock-dir}'
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}/'
ETC_DIRECTORY = '$${directory:etc}'
def main():
parsed_parameters = json.load(
open('$${runTestSuite-config-file:rendered}', 'rb'))
open('$${runTestSuite-config-file:output}', 'rb'))
test_runner = parsed_parameters.get('test-runner', {})
parser = argparse.ArgumentParser(description='Run a test suite.')
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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