...
 
Commits (45)
Showing 104 changed files with 1069 additions and 665 deletions
......@@ -15,8 +15,8 @@ extends =
[groonga]
recipe = slapos.recipe.cmmi
shared = false
url = https://packages.groonga.org/source/groonga/groonga-9.0.9.tar.gz
md5sum = 877bc3e2840e2935f606fb3d2d359a2c
url = https://packages.groonga.org/source/groonga/groonga-9.0.7.tar.gz
md5sum = a2697e46b7460fc81b418666c5abdcb4
# temporary patch to respect more tokens in natural language mode.
patches =
${:_profile_base_location_}/groonga.patch#9ed02fbe8400402d3eab47eee149978b
......
......@@ -29,8 +29,8 @@ parts =
[mariadb]
recipe = slapos.recipe.cmmi
url = https://downloads.mariadb.org/f/mariadb-${:version}/source/mariadb-${:version}.tar.gz/from/http%3A//fr.mirror.babylon.network/mariadb/?serve
version = 10.3.19
md5sum = de8eb9a7d45d21e2d96e46cdc7c6e036
version = 10.3.18
md5sum = b3524c0825c3a1c255496daea38304a0
location = ${buildout:parts-directory}/${:_buildout_section_name_}
pre-configure =
set -e '\bSET(PLUGIN_AUTH_PAM YES)' cmake/build_configurations/mysql_release.cmake
......@@ -84,8 +84,8 @@ post-install =
# mroonga - a storage engine for MySQL. It provides fast fulltext search feature to all MySQL users.
# http://mroonga.github.com/
recipe = slapos.recipe.cmmi
url = https://packages.groonga.org/source/mroonga/mroonga-9.09.tar.gz
md5sum = 1b4ec3a8c6b4b459bd7a94f2bb8ad585
url = https://packages.groonga.org/source/mroonga/mroonga-9.05.tar.gz
md5sum = d81629fc6042a44ce56cc6990d563164
pre-configure = set -e
rm -rf fake_mariadb_source
mkdir -p fake_mariadb_source
......
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[instance]
filename = instance.cfg
md5sum = 4c7936accb3658871b635158198b7905
[instance-apache]
filename = instance-apachephp.cfg
md5sum = a1ddbb63ffa0041b27eaea6df85cbd00
[website1-template]
filename = templates/index.html.in
md5sum = c5695762361b801c284ee23a150cd1f1
[website2-template]
filename = templates/index.html.in
md5sum = c5695762361b801c284ee23a150cd1f1
[template-httpd-conf-hash]
filename = templates/apache.conf.in
md5sum = 6788381fadd8ca96f892d33df3163da0
......@@ -13,6 +13,7 @@ parts =
website2-template
extends =
buildout.hash.cfg
../../stack/slapos.cfg
../../component/apache/buildout.cfg
../../component/apache-php/buildout.cfg
......@@ -26,16 +27,14 @@ extends =
[instance]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
mode = 0644
md5sum = 4c7936accb3658871b635158198b7905
[instance-apache]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apachephp.cfg
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template-apachephp.cfg
md5sum = a1ddbb63ffa0041b27eaea6df85cbd00
mode = 0644
[instance-mariadb]
......@@ -61,24 +60,22 @@ paths =
[website1-template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/index.html.in
url = ${:_profile_base_location_}/${:filename}
output = ${website:path1}/index.html
md5sum = c5695762361b801c284ee23a150cd1f1
mode = 0644
[website2-template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/index.html.in
url = ${:_profile_base_location_}/${:filename}
output = ${website:path2}/index.html
md5sum = c5695762361b801c284ee23a150cd1f1
mode = 0644
[template-httpd-conf]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/${:filename}
url = ${:_profile_base_location_}/${template-httpd-conf-hash:filename}
mode = 0644
filename = apache.conf.in
md5sum = 6788381fadd8ca96f892d33df3163da0
md5sum = ${template-httpd-conf-hash:md5sum}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[versions]
......
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[template-nginx-service]
filename = template-nginx-service.sh.in
md5sum = 5c94d952305552dcbeaeaeb27dd28f3b
[template-nginx-configuration]
filename = template-nginx.cfg.in
md5sum = c54d36f55ba71c897505ed61213e104a
[template-dcron-service]
filename = template-dcron-service.sh.in
md5sum = 1372441dac23e4fa7d2dc773a74725ea
[template-backup-script]
filename = template-backup-script.sh.in
md5sum = 4c75f8462eaef2d8fcf24627e5f3575a
[template-crontab-line]
filename = template-crontab-line.in
md5sum = 5cbd64f04da0601ba4286516a6161f5e
[template-crontab]
filename = template-crontab.in
md5sum = 072be0fd04896880c931d44d8eabde37
[status2rss]
filename = status2rss.py
md5sum = 432d22bb0f67df5203bbc5d1134a952b
[template-update-rss-script]
filename = template-update-rss.sh.in
md5sum = 80b3746568bc8e308a1f337bdaa2441c
[template-pullrdiffbackup]
filename = instance-pullrdiffbackup.cfg.in
md5sum = 2ee4590039a8ec262db2971f26129c0f
[template]
filename = instance.cfg.in
md5sum = 42021b325159dff29e4bd4e33b8ff2f3
......@@ -31,7 +31,6 @@ statistic = $${:srv}/$${variables:statistic_dirbasename}
backupscript = $${:etc}/backup
www = $${:srv}/www
home = $${:etc}/home
promises = $${:etc}/promise
ssl = $${:etc}/ssl
ssh = $${:home}/.ssh
plugin = $${:etc}/plugin
......@@ -194,10 +193,11 @@ virtual-depends =
$${nginx-configuration:ip}
[nginx-listen-promise]
recipe = slapos.cookbook:check_port_listening
hostname = $${nginx-configuration:ip}
port = $${nginx-configuration:port}
path = $${directory:promises}/nginx_listen
<= monitor-promise-base
module = check_port_listening
name = nginx-listen.py
config-hostname = $${nginx-configuration:ip}
config-port = $${nginx-configuration:port}
[nginx-configuration]
recipe = slapos.recipe.template
......
[buildout]
extends =
buildout.hash.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
......@@ -46,58 +47,50 @@ eggs =
##########################################################
[template-nginx-service]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-nginx-service.sh.in
md5sum = 5c94d952305552dcbeaeaeb27dd28f3b
output = ${buildout:directory}/template-nginx-service.sh.in
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-nginx-configuration]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-nginx.cfg.in
md5sum = c54d36f55ba71c897505ed61213e104a
output = ${buildout:directory}/template-nginx.cfg.in
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-dcron-service]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-dcron-service.sh.in
md5sum = 1372441dac23e4fa7d2dc773a74725ea
output = ${buildout:directory}/template-dcron-service.sh.in
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-backup-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-backup-script.sh.in
md5sum = 4c75f8462eaef2d8fcf24627e5f3575a
output = ${buildout:directory}/template-backup-script.sh.in
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-crontab-line]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-crontab-line.in
md5sum = 5cbd64f04da0601ba4286516a6161f5e
output = ${buildout:directory}/template-crontab-line.in
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-crontab]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-crontab.in
md5sum = 072be0fd04896880c931d44d8eabde37
output = ${buildout:directory}/template-crontab.in
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[status2rss]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/status2rss.py
md5sum = 432d22bb0f67df5203bbc5d1134a952b
output = ${buildout:directory}/status2rss.py
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-update-rss-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-update-rss.sh.in
md5sum = 80b3746568bc8e308a1f337bdaa2441c
output = ${buildout:directory}/template-update-rss.sh.in
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
##########################################################
......@@ -105,15 +98,13 @@ mode = 0644
##########################################################
[template-pullrdiffbackup]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-pullrdiffbackup.cfg.in
md5sum = 537ab12f3885660e59d280ee40e379ac
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template-pullrdiffbackup.cfg
mode = 0644
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
md5sum = 42021b325159dff29e4bd4e33b8ff2f3
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
mode = 0644
......
......@@ -22,15 +22,15 @@ md5sum = c801b7f9f11f0965677c22e6bbe9281b
[template-apache-frontend]
filename = instance-apache-frontend.cfg.in
md5sum = 7f2f7b40e3639c50cf7dd929f4425f20
md5sum = c6d78b2856d9d0ec63728e668e3395d8
[template-caddy-replicate]
filename = instance-apache-replicate.cfg.in
md5sum = bd73ad5ef84fe6bf0f479ee45da3139d
md5sum = a34ab1970f91731c32ed7f2471632c86
[template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in
md5sum = 5913a176c025cdadee6782f8ad285dc4
md5sum = 46e0ccb54c2406b8a44cdada73c061a6
[template-slave-configuration]
filename = templates/custom-virtualhost.conf.in
......@@ -118,4 +118,4 @@ md5sum = 38792c2dceae38ab411592ec36fff6a8
[template-kedifa]
filename = instance-kedifa.cfg.in
md5sum = bb1eb172e65d8ffe5b161eae191947e1
md5sum = d5efd74d80a1df3d5386758c9f13e190
......@@ -59,7 +59,6 @@ log = ${:var}/log
run = ${:var}/run
service = ${:etc}/service
etc-run = ${:etc}/run
plugin = ${:etc}/plugin
ca-dir = ${:srv}/ssl
# BBB: SlapOS Master non-zero knowledge BEGIN
......@@ -139,6 +138,7 @@ context =
import json_module json
raw common_profile {{ parameter_dict['common_profile'] }}
raw logrotate_base_instance {{ parameter_dict['logrotate_base_instance'] }}
raw monitor_template {{ parameter_dict['monitor_template'] }}
key slap_software_type :slap_software_type
key slapparameter_dict :slapparameter_dict
section directory directory
......@@ -257,7 +257,6 @@ extra-context =
section frontend_configuration frontend-configuration
section caddy_configuration caddy-configuration
key monitor_base_url monitor-instance-parameter:monitor-base-url
key plugin_directory directory:plugin
key report_directory directory:bin
key bin_directory :bin_directory
key enable_http2_by_default configuration:enable-http2-by-default
......@@ -510,17 +509,8 @@ filename = ip_allow.config
context =
key content trafficserver-variable:ip-allow-config
[promise-plugin-base]
recipe = slapos.cookbook:promise.plugin
eggs =
slapos.toolbox
content =
from slapos.promise.plugin.${:module} import RunPromise
output = ${directory:plugin}/${:name}
[trafficserver-promise-listen-port]
<= promise-plugin-base
<= monitor-promise-base
module = check_port_listening
name = trafficserver-port-listening.py
config-hostname = ${trafficserver-variable:local-ip}
......@@ -533,7 +523,7 @@ wrapper-path = ${directory:bin}/traffic_ctl
environment = TS_ROOT=${buildout:directory}
[trafficserver-promise-cache-availability]
<= promise-plugin-base
<= monitor-promise-base
module = trafficserver_cache_availability
name = trafficserver-cache-availability.py
config-wrapper-path = ${trafficserver-ctl:wrapper-path}
......@@ -633,48 +623,48 @@ context =
key content :content
[promise-frontend-caddy-configuration]
<= promise-plugin-base
<= monitor-promise-base
module = validate_frontend_configuration
name = frontend-caddy-configuration-promise.py
config-verification-script = ${promise-helper-last-configuration-state:rendered}
[promise-caddy-frontend-v4-https]
<= promise-plugin-base
<= monitor-promise-base
module = check_port_listening
name = caddy_frontend_ipv4_https.py
config-hostname = {{ instance_parameter['ipv4-random'] }}
config-port = ${configuration:port}
[promise-caddy-frontend-v4-http]
<= promise-plugin-base
<= monitor-promise-base
module = check_port_listening
name = caddy_frontend_ipv4_http.py
config-hostname = {{ instance_parameter['ipv4-random'] }}
config-port = ${configuration:plain_http_port}
[promise-caddy-frontend-v6-https]
<= promise-plugin-base
<= monitor-promise-base
module = check_port_listening
name = caddy_frontend_ipv6_https.py
config-hostname = {{ instance_parameter['ipv6-random'] }}
config-port = ${configuration:port}
[promise-caddy-frontend-v6-http]
<= promise-plugin-base
<= monitor-promise-base
module = check_port_listening
name = caddy_frontend_ipv6_http.py
config-hostname = {{ instance_parameter['ipv6-random'] }}
config-port = ${configuration:plain_http_port}
[promise-caddy-frontend-cached]
<= promise-plugin-base
<= monitor-promise-base
module = check_port_listening
name = caddy_cached.py
config-hostname = {{ instance_parameter['ipv4-random'] }}
config-port = ${caddy-configuration:cache-through-port}
[promise-caddy-frontend-ssl-cached]
<= promise-plugin-base
<= monitor-promise-base
module = check_port_listening
name = caddy_ssl_cached.py
config-hostname = {{ instance_parameter['ipv4-random'] }}
......@@ -735,7 +725,7 @@ context =
raw content show:cache-stats
[monitor-verify-re6st-connectivity]
<= promise-plugin-base
<= monitor-promise-base
module = check_url_available
name = re6st-connectivity.py
config-url = ${configuration:re6st-verification-url}
......
......@@ -512,7 +512,6 @@ context =
key content :content
[directory]
plugin = ${:etc}/plugin
service = ${:etc}/service
promise-output = ${:srv}/promise-output
......@@ -573,23 +572,15 @@ template = inline:
rendered = ${directory:etc}/Caddyfile-rejected-slave
[promise-plugin-base]
recipe = slapos.cookbook:promise.plugin
eggs =
slapos.toolbox
content =
from slapos.promise.plugin.${:module} import RunPromise
output = ${directory:plugin}/${:name}
[promise-rejected-slave-publish-ip-port]
<= promise-plugin-base
<= monitor-promise-base
module = check_port_listening
name = rejected-slave-publish-ip-port-listening.py
config-hostname = ${rejected-slave-publish-configuration:ip}
config-port = ${rejected-slave-publish-configuration:port}
[rejected-slave-promise]
<= promise-plugin-base
<= monitor-promise-base
module = check_port_listening
module = check_file_state
name = rejected-slave.py
......
......@@ -36,7 +36,6 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
service_auto_approve_count=0,
user_auto_approve_count=1,
key_len=2048,
promise='${directory:promise}/caucased',
)}}
# Create all needed directories
......@@ -54,8 +53,6 @@ log = ${:var}/log
run = ${:var}/run
service = ${:etc}/service
etc-run = ${:etc}/run
promise = ${:etc}/promise
plugin = ${:etc}/plugin
# KeDiFa directories
kedifa = ${:srv}/kedifa
......@@ -157,7 +154,7 @@ template = inline:
rendered = ${directory:caddy-csr_id}/Caddyfile
[promise-expose-csr_id-ip-port]
<= promise-plugin-base
<= monitor-promise-base
module = check_port_listening
name = expose-csr_id-ip-port-listening.py
config-hostname = ${expose-csr_id-configuration:ip}
......@@ -196,14 +193,6 @@ context =
section directory directory
${:extra-context}
[promise-plugin-base]
recipe = slapos.cookbook:promise.plugin
eggs =
slapos.toolbox
content =
from slapos.promise.plugin.${:module} import RunPromise
output = ${directory:plugin}/${:name}
[kedifa-config]
ip = {{ instance_parameter['ipv6-random'] }}
port = {{ instance_parameter['configuration.kedifa_port'] }}
......@@ -222,7 +211,7 @@ command-line = kill -SIGHUP `cat ${kedifa-config:pidfile}`
wrapper-path = ${directory:etc-run}/kedifa-reloader
[promise-kedifa-http-reply]
<= promise-plugin-base
<= monitor-promise-base
module = check_url_available
name = kedifa-http-reply.py
# Kedifa replies 400 on /, so use it to be sure that Kedifa replied
......
......@@ -42,14 +42,6 @@ create = true
{% set slave_kedifa_information = {} %}
{% endif %}
[promise-plugin-base]
recipe = slapos.cookbook:promise.plugin
eggs =
slapos.toolbox
content =
from slapos.promise.plugin.${:module} import RunPromise
output = {{ plugin_directory }}/${:name}
# empty section if no cached slaves are available
[slave-log-cache-direct-directory-dict]
......@@ -288,7 +280,7 @@ filename = {{ '%s.conf' % slave_reference }}
{% set monitor_ipv6_section_title = 'check-%s-ipv6-packet-list-test' % slave_instance.get('slave_reference') %}
{% do part_list.append(monitor_ipv6_section_title) %}
[{{ monitor_ipv6_section_title }}]
<= promise-plugin-base
<= monitor-promise-base
module = check_icmp_packet_lost
name = {{ monitor_ipv6_section_title }}.py
config-address = {{ dumps(monitor_ipv6_test) }}
......@@ -301,7 +293,7 @@ config-frequency = 720
{% set monitor_ipv4_section_title = 'check-%s-ipv4-packet-list-test' % slave_instance.get('slave_reference') %}
{% do part_list.append(monitor_ipv4_section_title) %}
[{{ monitor_ipv4_section_title }}]
<= promise-plugin-base
<= monitor-promise-base
module = check_icmp_packet_lost
name = {{ monitor_ipv4_section_title }}.py
config-address = {{ dumps(monitor_ipv4_test) }}
......@@ -321,7 +313,7 @@ config-frequency = 720
{% do part_list.append(re6st_optimal_test_section_title) %}
[{{ re6st_optimal_test_section_title }}]
<= promise-plugin-base
<= monitor-promise-base
module = check_re6st_optimal_status
name = {{ re6st_optimal_test_section_title }}.py
config-ipv4 = {{ dumps(re6st_ipv4) }}
......@@ -493,6 +485,7 @@ rendered = {{frontend_configuration.get('log-access-configuration')}}
extends =
{{ common_profile }}
{{ logrotate_base_instance }}
{{ monitor_template }}
parts +=
kedifa-updater
......@@ -561,7 +554,7 @@ template = inline:
rendered = {{ directory_caddy_csr_id }}/Caddyfile
[promise-expose-csr_id-ip-port]
<= promise-plugin-base
<= monitor-promise-base
module = check_port_listening
name = expose-csr_id-ip-port-listening.py
config-hostname = ${expose-csr_id-configuration:ip}
......
......@@ -15,7 +15,7 @@
# not need these here).
[instance-caucased]
filename = instance-caucased.cfg.jinja2
md5sum = 442e17a66b6f8d39f87903e147e3edaf
md5sum = 2277c891a71534e00487468f5048d196
[instance]
filename = instance.cfg.jinja2
......
......@@ -4,7 +4,6 @@
[directory]
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
promise = ${:etc}/promise
service-on-watch = ${:etc}/service
srv = ${buildout:directory}/srv
......@@ -17,7 +16,6 @@ srv = ${buildout:directory}/srv
service_auto_approve_count=slapparameter_dict.get('service-auto-approve-amount', 0),
user_auto_approve_count=slapparameter_dict.get('user-auto-approve-amount', 1),
key_len=slapparameter_dict.get('key-length', 2048),
promise='${directory:promise}/caucased',
) }}
[publish]
......
......@@ -18,4 +18,4 @@ md5sum = 6e4431cf4b0a0d034402604b1e2844c0
[template-cloudooo-instance]
filename = instance-cloudooo.cfg.in
md5sum = 31ed5c856ce2dff0305d7029caefc3f6
md5sum = 4f901cedaab9f0992ce8cdd7adc3482a
......@@ -114,10 +114,11 @@ crl = ${apache-ssl-client:crl}
[apache-promise]
# Check any apache port in ipv4, expect other ports and ipv6 to behave consistently
recipe = slapos.cookbook:check_port_listening
path = ${directory:promise}/apache
hostname = {{ ipv4 }}
port = {{ apache_dict.values()[0][0] }}
<= monitor-promise-base
module = check_port_listening
name = apache-port-listening.py
config-hostname = {{ ipv4 }}
config-port = {{ apache_dict.values()[0][0] }}
[apache-conf-ssl]
cert = ${directory:apache-conf}/apache.crt
......@@ -262,7 +263,6 @@ font = ${:srv}/font
log = ${:var}/log
newcerts = ${:ca-dir}/newcerts
private = ${:ca-dir}/private
promise = ${directory:etc}/promise
requests = ${:ca-dir}/requests
run = ${:var}/run
services = ${:etc}/run
......
......@@ -18,4 +18,4 @@ md5sum = 307663d73ef3ef94b02567ecd322252e
[template-default]
filename = instance-default.cfg
md5sum = 4abfdf82f90a39a36de338f36b5eeb3e
md5sum = 27f87a153f1287bc102af3a900435133
......@@ -183,7 +183,6 @@ recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/service
run = $${rootdirectory:var}/run
promises = $${rootdirectory:etc}/promise
[directory]
recipe = slapos.cookbook:mkdirectory
......@@ -217,17 +216,14 @@ return = domain secure_access
[promises]
recipe =
instance-promises =
$${shellinabox-frontend-listen-promise:path}
[check-port-listening-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directory:promises}/$${:_buildout_section_name_}
$${shellinabox-frontend-listen-promise:name}
[shellinabox-frontend-listen-promise]
<= check-port-listening-promise
hostname= $${shellinabox-frontend:hostname}
port = $${shellinabox-frontend:port}
<= monitor-promise-base
module = check_port_listening
name = shellinabox-frontend-listen.py
config-hostname = $${shellinabox-frontend:hostname}
config-port = $${shellinabox-frontend:port}
[slap-parameter]
node-quantity = 1
......
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[instance.cfg]
filename = instance.cfg.in
md5sum = ddadc1eda2b474d6f2349409c05476eb
[watcher]
_update_hash_filename_ = watcher.in
md5sum = 90690e1351637f20ff2df57a6c3e85b4
[gitlab-export]
_update_hash_filename_ = gitlab-export.in
md5sum = a7b32680e80f34276f0a32a5e22dad50
[database.yml.in]
_update_hash_filename_ = template/database.yml.in
md5sum = 61d1d04b9347b3168a1ad7676e4681ef
[gitconfig.in]
_update_hash_filename_ = template/gitconfig.in
md5sum = 7782f5c5d75663c2586e28d029c51e49
[gitlab-parameters.cfg]
_update_hash_filename_ = gitlab-parameters.cfg
md5sum = 8f4537cb8a0c9a8e0058c30cb687681c
[gitlab-shell-config.yml.in]
_update_hash_filename_ = template/gitlab-shell-config.yml.in
md5sum = 58c09b1e609f903e483a76fe9e57366c
[gitlab-unicorn-startup.in]
_update_hash_filename_ = gitlab-unicorn-startup.in
md5sum = a9cb347f60aad3465932fd36cd4fe25d
[gitlab.yml.in]
_update_hash_filename_ = template/gitlab.yml.in
md5sum = 0ddf4093dcf4427e5a160707e6017950
[instance-gitlab.cfg.in]
_update_hash_filename_ = instance-gitlab.cfg.in
md5sum = bd8bccad43e7cf294af2fc9b60fb3b46
[instance-gitlab-export.cfg.in]
_update_hash_filename_ = instance-gitlab-export.cfg.in
md5sum = 319d7dbe3ad9b260c1e292cfc0d13b11
[instance-gitlab-test.cfg.in]
_update_hash_filename_ = instance-gitlab-test.cfg.in
md5sum = a4ad76856db98e508af7e773d9ff78f9
[macrolib.cfg.in]
_update_hash_filename_ = macrolib.cfg.in
md5sum = a56a44e96f65f5ed20211bb6a54279f4
[nginx-gitlab-http.conf.in]
_update_hash_filename_ = template/nginx-gitlab-http.conf.in
md5sum = abcc5eda03e10b26c74619f299a7f6a8
[nginx.conf.in]
_update_hash_filename_ = template/nginx.conf.in
md5sum = 1374f38ab6f295b850d45ea0019ec05d
[rack_attack.rb.in]
_update_hash_filename_ = template/rack_attack.rb.in
md5sum = 7d0e6dc6b826f6df6b20d8574a29e2f8
[resque.yml.in]
_update_hash_filename_ = template/resque.yml.in
md5sum = 7c89a730889e3224548d9abe51a2d719
[smtp_settings.rb.in]
_update_hash_filename_ = template/smtp_settings.rb.in
md5sum = 4e1ced687a86e4cfff2dde91237e3942
[template-gitlab-resiliency-restore.sh.in]
_update_hash_filename_ = template/template-gitlab-resiliency-restore.sh.in
md5sum = 590fcadf26085fdd17487175bc0a469d
[unicorn.rb.in]
_update_hash_filename_ = template/unicorn.rb.in
md5sum = 83921db1835d9e81cbbe808631cc40a9
# GitLab software-release
[buildout]
extends =
buildout.hash.cfg
../../stack/slapos.cfg
../../component/ruby/buildout.cfg
../../component/golang/buildout.cfg
......@@ -244,14 +245,13 @@ eggs =
[instance.cfg]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
md5sum = ddadc1eda2b474d6f2349409c05476eb
# macro: download a shell script and put it rendered into <software>/bin/
[binsh]
recipe = slapos.recipe.template:jinja2
template= ${:_profile_base_location_}/${:_buildout_section_name_}.in
template= ${:_profile_base_location_}/${:_update_hash_filename_}
rendered= ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755
context =
......@@ -259,97 +259,71 @@ context =
[watcher]
<= binsh
md5sum = 90690e1351637f20ff2df57a6c3e85b4
[gitlab-export]
<= binsh
md5sum = a7b32680e80f34276f0a32a5e22dad50
# macro: download a file named as section name
# macro: download a file named in buildout.hash.cfg via _update_hash_filename_
#
# [filename]
# <= download-file
# md5sum = ...
[download-file]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/${:_update_hash_filename_}
destination = ${buildout:directory}/${:_buildout_section_name_}
# like download-file, but download from template/<filename>
[download-template]
<= download-file
url = ${:_profile_base_location_}/template/${:_buildout_section_name_}
[database.yml.in]
<= download-template
md5sum = 61d1d04b9347b3168a1ad7676e4681ef
<= download-file
[gitconfig.in]
<= download-template
md5sum = 7782f5c5d75663c2586e28d029c51e49
<= download-file
[gitlab-parameters.cfg]
<= download-file
md5sum = 8f4537cb8a0c9a8e0058c30cb687681c
[gitlab-shell-config.yml.in]
<= download-template
md5sum = 58c09b1e609f903e483a76fe9e57366c
<= download-file
[gitlab-unicorn-startup.in]
<= download-file
md5sum = a9cb347f60aad3465932fd36cd4fe25d
[gitlab.yml.in]
<= download-template
md5sum = 0ddf4093dcf4427e5a160707e6017950
<= download-file
[instance-gitlab.cfg.in]
<= download-file
md5sum = bd8bccad43e7cf294af2fc9b60fb3b46
[instance-gitlab-export.cfg.in]
<= download-file
md5sum = 319d7dbe3ad9b260c1e292cfc0d13b11
[instance-gitlab-test.cfg.in]
<= download-file
md5sum = a4ad76856db98e508af7e773d9ff78f9
[macrolib.cfg.in]
<= download-file
md5sum = a56a44e96f65f5ed20211bb6a54279f4
[nginx-gitlab-http.conf.in]
<= download-template
md5sum = abcc5eda03e10b26c74619f299a7f6a8
<= download-file
[nginx.conf.in]
<= download-template
md5sum = 1374f38ab6f295b850d45ea0019ec05d
<= download-file
[rack_attack.rb.in]
<= download-template
md5sum = 7d0e6dc6b826f6df6b20d8574a29e2f8
<= download-file
[resque.yml.in]
<= download-template
md5sum = 7c89a730889e3224548d9abe51a2d719
<= download-file
[smtp_settings.rb.in]
<= download-template
md5sum = 4e1ced687a86e4cfff2dde91237e3942
<= download-file
[template-gitlab-resiliency-restore.sh.in]
<= download-template
md5sum = 590fcadf26085fdd17487175bc0a469d
<= download-file
[unicorn.rb.in]
<= download-template
md5sum = 83921db1835d9e81cbbe808631cc40a9
<= download-file
[gitlab-demo-backup.git]
recipe = hexagonit.recipe.download
......
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[instance-profile]
filename = instance.cfg.in
md5sum = cc8902e44c1d50804b570775633b8c2a
......@@ -15,6 +15,7 @@ eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
offline = true
extends = {{ template_monitor }}
[instance-parameter]
# Fetch arbitrary parameters defined by the user in SlapOS Master for his instance.
......@@ -51,9 +52,6 @@ var = ${:home}/var
script = ${:etc}/run/
# Executables put here will be started and monitored (for daemons)
service = ${:etc}/service
# Executables put here will be launched after buildout has completed to see
# if instance is running
promise = ${:etc}/promise/
# Path of the log directory used by our service (see [helloweb])
log = ${:var}/log
......@@ -88,8 +86,9 @@ wrapper-path = ${directory:service}/helloweb-${:kind}
# promise, that checks that helloweb service is alive
[helloweb-promise]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promise}/helloweb-${:kind}
<= monitor-promise-base
module = check_port_listening
name = helloweb-${:kind}.py
{# macro to instantiate service of `kind` to listen on `port` #}
{% set service_list = [] %}
......@@ -103,8 +102,8 @@ port = {{ port }}
[helloweb-{{ kind }}-promise]
<= helloweb-promise
kind = {{ kind }}
hostname= ${helloweb-{{ kind }}:ipv6}
port = {{ port }}
config-hostname= ${helloweb-{{ kind }}:ipv6}
config-port = {{ port }}
{% endmacro %}
# services instantiation
......
[buildout]
extends =
# buildout.hash.cfg is used for automated hash calculation of managed
# instance files by calling update-hash
buildout.hash.cfg
# "slapos" stack describes basic things needed for 99.9% of SlapOS Software
# Releases
../../stack/slapos.cfg
../../stack/monitor/buildout.cfg
# Extend here component profiles, like openssl, apache, mariadb, curl...
# Or/and extend a stack (lamp, tomcat) that does most of the work for you
# In this example we extend from helloweb component.
......@@ -25,19 +29,27 @@ parts =
helloweb-go
# Macro for jinja templates. The filename is set in buildout.hash.cfg
# in the section using this template
[jinja-template]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}
mode = 0644
# Download instance.cfg.in (buildout profile used to deployment of instance),
# replace all ${foo:bar} parameters by real values, and change $${foo:bar} to
# ${foo:bar}
# The recipe, template and mode are fetched from jijna-template
[instance-profile]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in
# The <= is buildout verb to use defined template
<= jinja-template
rendered = ${buildout:directory}/instance.cfg
# MD5 checksum can be skipped for development (easier to develop), but must be filled for production
md5sum = 6567f8dedb5cdd93542dc29e96edb547
mode = 0644
extensions = jinja2.ext.do
context =
section buildout buildout
raw template_monitor ${monitor2-template:rendered}
# md5sum is fetched from buildout.hash.cfg and can be recalculated automatically by
# calling update-hash
# Pin versions of eggs used that are not already pinned by stack/slapos.cfg
[versions]
......
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[template-tomcat-configuration]
filename = server.xml.in
md5sum = fd2562b9ac0c52a2e9cc02e3ef3cef78
[template-tomcat-service]
filename = template-tomcat-service.sh.in
md5sum = 09803fb71404edbccb32c44a0040dae4
[template-validator]
filename = instance-validator.cfg.in
md5sum = fb72f293a2c4b26bb58257907256f2f9
[template]
filename = instance.cfg.in
md5sum = 2b4d33e9ef1082dd4d6a53f55b391772
......@@ -11,7 +11,6 @@ run = $${:var}/run
log = $${:var}/log
# scripts = $${:etc}/run
services = $${:etc}/service
promises = $${:etc}/promise
# tomcat directories
catalina_base = $${:var}/vnu
catalina_logs = $${:catalina_base}/logs
......@@ -55,10 +54,11 @@ port = 8899
scheme = https
[tomcat-listen-promise]
recipe = slapos.cookbook:check_port_listening
hostname = $${tomcat-configuration:ip}
port = $${tomcat-configuration:port}
path = $${basedirectory:promises}/tomcat_listen
<= monitor-promise-base
module = check_port_listening
name = tomcat-listen.py
config-hostname = $${tomcat-configuration:ip}
config-port = $${tomcat-configuration:port}
#################################
# Slapos publish
......@@ -83,4 +83,4 @@ parts =
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
\ No newline at end of file
offline = true
[buildout]
extends =
buildout.hash.cfg
../../component/dash/buildout.cfg
../../component/grep/buildout.cfg
../../component/findutils/buildout.cfg
......@@ -19,16 +20,14 @@ parts =
##########################################################
[template-tomcat-configuration]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/server.xml.in
md5sum = fd2562b9ac0c52a2e9cc02e3ef3cef78
output = ${buildout:directory}/server.xml.in
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
[template-tomcat-service]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-tomcat-service.sh.in
md5sum = 09803fb71404edbccb32c44a0040dae4
output = ${buildout:directory}/template-tomcat-service.sh.in
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/${:filename}
mode = 0644
##########################################################
......@@ -36,15 +35,13 @@ mode = 0644
##########################################################
[template-validator]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-validator.cfg.in
md5sum = 0275d7a8a021f84a1303e5c8933c07c3
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template-validator.cfg
mode = 0644
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
md5sum = 2b4d33e9ef1082dd4d6a53f55b391772
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
mode = 0644
......
......@@ -15,7 +15,7 @@
[instance]
filename = instance.cfg.in
md5sum = 2a79bb6c4f593d7c4c7f4e0de97d9803
md5sum = 1d6bb3263f642a115982ddf245cb1cf0
[template-nginx-service]
filename = template-nginx-service.sh.in
......
......@@ -22,7 +22,6 @@ log = $${:var}/log
varnginx = $${:var}/nginx
scripts = $${:etc}/run
services = $${:etc}/service
promise = $${:etc}/promise/
www = $${:srv}/www
home = $${:etc}/home
ssl = $${:etc}/ssl
......
......@@ -15,7 +15,7 @@
[instance-jupyter-notebook]
filename = instance.cfg.in
md5sum = 78625cff193d7fdadd57670d30bc9a0d
md5sum = ba4e4c582b81deeb7339a13c82bbf34b
[jupyter-notebook-config]
filename = jupyter_notebook_config.py.jinja
......
......@@ -90,7 +90,6 @@ etc = ${:home}/etc
var = ${:home}/var
script = ${:etc}/run/
service = ${:etc}/service
promise = ${:etc}/promise/
log = ${:var}/log
notebook_dir = ${:var}/notebooks
# Add folders to explicitly define jupyter directory
......
......@@ -19,19 +19,19 @@ md5sum = 2cbfd6b08c65369c1d45cf3ba2ff335a
[template-kvm]
filename = instance-kvm.cfg.jinja2
md5sum = bcd3705e510da52e7ddf1e1527839642
md5sum = c4919f64073f99b179b3cfe348d26b6f
[template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in
md5sum = 352f18067714501c8ccee55f8930d245
md5sum = 2e743132ba4e001f784791311df9ba6a
[template-kvm-resilient]
filename = instance-kvm-resilient.cfg.jinja2
md5sum = 6677ac6074f6be671fe8e8b8a6a4afe8
md5sum = 7e5f2b51dce835b5337a86a0cd20b2bf
[template-kvm-import]
filename = instance-kvm-import.cfg.jinja2.in
md5sum = dc3f3ad9ebd8b3b5c3ded57b91cee9c7
md5sum = a996ca557832deb2ac347edbec47a403
[template-kvm-import-script]
filename = template/kvm-import.sh.jinja2
......@@ -47,7 +47,7 @@ md5sum = b617d64de73de1eed518185f310bbc82
[template-nbd]
filename = instance-nbd.cfg.in
md5sum = f634a5249b773658b7a7bc9fa9bb0368
md5sum = a05b581d65768ac55faf3b06d4aec447
[template-ansible-promise]
filename = template/ansible-promise.in
......@@ -79,4 +79,4 @@ md5sum = 599dbbbd438fe7801e3f8642ae9e9a78
[template-httpd]
filename = instance-kvm-http.cfg.in
md5sum = 26a181a48046ce88570adb32334747ef
md5sum = e8332b69804bd22daff1816ef8a2600b
......@@ -229,7 +229,6 @@ log = ${:var}/log
scripts = ${:etc}/run
services = ${:etc}/service
webroot = ${:srv}/document
promises = ${:etc}/promise
ssl = ${:etc}/ssl
[directory-doc]
......
......@@ -14,7 +14,6 @@ public = ${:srv}/public/
log = ${:var}/log
services = ${:etc}/service
scripts = ${:etc}/run
promises = ${:etc}/promise
run = ${:var}/run
document = ${:srv}/document
ssl = ${:etc}/ssl
......@@ -65,7 +64,9 @@ update-command =
stop-on-error = true
[httpd-promise]
<= monitor-promise-base
module = check_port_listening
recipe = slapos.cookbook:check_port_listening
path = ${directory:promises}/apache-httpd
hostname = ${apache-conf:ip}
port = ${apache-conf:port}
\ No newline at end of file
name = apache_httpd.py
config-hostname = ${apache-conf:ip}
config-port = ${apache-conf:port}
......@@ -41,7 +41,6 @@ var = ${buildout:directory}/var
log = ${:var}/log
scripts = ${:etc}/run
services = ${:etc}/service
promises = ${:etc}/promise
novnc-conf = ${:etc}/novnc
run = ${:var}/run
ca-dir = ${:srv}/ssl
......@@ -63,8 +62,7 @@ context =
backup-disk-path = ${directory:backup}/virtual.qcow2
[kvm-disk-image-corruption-promise]
# Check that disk image is not corrupted
[kvm-disk-image-corruption-bin]
recipe = collective.recipe.template
input = inline:#!/bin/sh
QEMU_IMAGE="${directory:srv}/virtual.qcow2"
......@@ -78,5 +76,13 @@ input = inline:#!/bin/sh
else
exit 1
fi
output = ${directory:promises}/kvm-disk-image-corruption
mode = 700
\ No newline at end of file
output = ${directory:bin}/kvm-disk-image-corruption
mode = 700
[kvm-disk-image-corruption-promise]
# Check that disk image is not corrupted
<= monitor-promise-base
module = check_command_execute
recipe = slapos.cookbook:check_port_listening
name = kvm_disk_image_corruption.py
config-command = ${kvm-disk-image-corruption-bin:output}
......@@ -57,14 +57,13 @@ cors-domains = {{ monitor_parameter.get('monitor-cors-domains', '') }}
[directory]
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
promises = ${:etc}/promise
# Bubble down the parameters of the requested instance to the user
[request-kvm]
# Note: += doesn't work.
return =
# Resilient related parameters
url ssh-public-key ssh-url notification-id ip {{ monitor_return | join(' ') }}
url ssh-public-key resilient-ssh-url notification-id ip {{ monitor_return | join(' ') }}
# KVM related parameters
# XXX: return ALL parameters (like nat rules), through jinja
backend-url url ip
......@@ -83,21 +82,26 @@ monitor-base-url = ${monitor-publish-parameters:monitor-base-url}
monitor-setup-url = {{ monitor_interface_url }}/#page=settings_configurator&url=${monitor-publish-parameters:monitor-url}&username=${monitor-publish-parameters:monitor-user}&password=${publish-early:monitor-password}
{% endif -%}
[kvm-frontend-url-promise]
# Check that url parameter is complete
[kvm-frontend-url-bin]
recipe = collective.recipe.template
input = inline:#!/bin/sh
URL="${request-kvm:connection-url}"
if [[ ! "$URL" == https://* ]]; then
exit 1
fi
output = ${resilient-directory:promise}/kvm-frontend-url
output = ${directory:bin}/kvm-frontend-url
mode = 700
[kvm-frontend-url-promise]
# Check that url parameter is complete
<= monitor-promise-base
module = check_command_execute
name = kvm_frontend_url.py
config-command = ${kvm-frontend-url-bin:output}
[kvm-backend-url-promise]
# Check that backend url is reachable
recipe = slapos.cookbook:check_url_available
path = ${directory:promises}/frontend_promise
url = ${publish-connection-information:url}
dash_path = /bin/sh
curl_path = {{ curl_executable_location }}
<= monitor-promise-base
module = check_url_available
name = frontend_promise.py
config-url = ${publish-connection-information:url}
......@@ -40,7 +40,6 @@ var = ${buildout:directory}/var
log = ${:var}/log
scripts = ${:etc}/run
services = ${:etc}/service
promises = ${:etc}/promise
novnc-conf = ${:etc}/novnc
run = ${:var}/run
prerm = ${:etc}/prerm
......@@ -216,13 +215,13 @@ command-line = ${kvm-controller:rendered}
[kvm-vnc-promise]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promises}/vnc_promise
hostname = ${kvm-parameter-dict:vnc-ip}
port = ${kvm-parameter-dict:vnc-port}
<= monitor-promise-base
module = check_port_listening
name = vnc_promise.py
config-hostname = ${kvm-parameter-dict:vnc-ip}
config-port = ${kvm-parameter-dict:vnc-port}
[kvm-disk-image-corruption-promise]
# Check that disk image is not corrupted
[kvm-disk-image-corruption-bin]
recipe = collective.recipe.template
input = inline:#!/bin/sh
# Return code 0 is "OK"
......@@ -239,9 +238,16 @@ input = inline:#!/bin/sh
else
exit 1
fi
output = ${directory:promises}/kvm-disk-image-corruption
output = ${directory:bin}/kvm-disk-image-corruption
mode = 700
[kvm-disk-image-corruption-promise]
# Check that disk image is not corrupted
<= monitor-promise-base
module = check_command_execute
name = kvm_disk_image_corruption.py
config-command = ${kvm-disk-image-corruption-bin:output}
{% if wipe_disk == 'true' -%}
{% do part_list.append('wipe-disk-wrapper') -%}
{% set wipe_file_list = '${kvm-parameter-dict:disk-path}' -%}
......@@ -255,16 +261,22 @@ command-line =
{{ wipe_disk_wrapper }} -n {{ slapparameter_dict.get('wipe-disk-iterations', 1) }} -suz --check-pid-file ${kvm-parameter-dict:pid-file-path} --file {{ wipe_file_list }}
{% endif -%}
[kvm-started-promise]
[kvm-started-bin]
recipe = slapos.recipe.template:jinja2
template = {{ qemu_start_promise_tpl }}
rendered = ${directory:promises}/qemu-virtual-machine-is-ready
rendered = ${directory:bin}/qemu-virtual-machine-is-ready
mode = 700
context =
raw dash {{ dash_executable_location }}
raw qemu_ready_path ${kvm-controller-parameter-dict:kvm-status-path}
raw qemu_service_log_file ${buildout:directory}/.${slap-connection:partition-id}_kvm.log
[kvm-started-promise]
<= monitor-promise-base
module = check_command_execute
name = qemu_virtual_machine_is_ready.py
config-command = ${kvm-started-bin:rendered}
[novnc-instance]
recipe = slapos.cookbook:novnc
path = ${ca-novnc:executable}
......@@ -325,10 +337,11 @@ executable = ${directory:bin}/novnc
wrapper = ${directory:bin}/websockify
[novnc-promise]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promises}/novnc_promise
hostname = ${novnc-instance:ip}
port = ${novnc-instance:port}
<= monitor-promise-base
module = check_port_listening
name = novnc_promise.py
config-hostname = ${novnc-instance:ip}
config-port = ${novnc-instance:port}
#----------------
......@@ -380,11 +393,10 @@ name = ${slap-parameter:frontend-instance-name}
sla-instance_guid = ${slap-parameter:frontend-instance-guid}
[frontend-promise]
recipe = slapos.cookbook:check_url_available
path = ${directory:promises}/frontend_promise
url = ${publish-connection-information:url}
dash_path = {{ dash_executable_location }}
curl_path = {{ curl_executable_location }}
<= monitor-promise-base
module = check_url_available
name = frontend_promise.py
config-url = ${publish-connection-information:url}
{% if additional_frontend %}
[request-slave-frontend-additional]
......@@ -419,10 +431,11 @@ wrapper-path = ${directory:services}/http-server
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
[httpd-promise]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promises}/httpd
hostname = ${httpd:host}
port = ${httpd:port}
<= monitor-promise-base
module = check_port_listening
name = httpd.py
config-hostname = ${httpd:host}
config-port = ${httpd:port}
{% endif %}
[monitor-instance-parameter]
......@@ -679,15 +692,21 @@ command-line = ${tunnel-cluster-url:runner-path}
wrapper-path = ${directory:services}/6tunnel-cluster
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
[ansible-vm-promise]
[ansible-vm-bin]
recipe = slapos.recipe.template:jinja2
template = {{ ansible_promise_tpl }}
rendered = ${directory:promises}/ansible_{{ name }}
rendered = ${directory:bin}/ansible_{{ name }}
extensions = jinja2.ext.do
context =
raw logs ${directory:public}/ansible
raw name {{ name }}
[ansible-vm-promise]
<= monitor-promise-base
module = check_execute_comand
name = ansible_{{ name }}.py
config-command = ${ansible-vm-bin:rendered}
[download-bootstrap-script]
recipe = plone.recipe.command
file-location = ${directory:public}/vm-bootstrap
......
......@@ -23,7 +23,6 @@ log = $${buildout:directory}/log
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run
watched-services = $${rootdirectory:etc}/service
promises = $${rootdirectory:etc}/promise
[nbd-instance]
recipe = slapos.cookbook:nbdserver
......@@ -36,10 +35,11 @@ shell-path = ${dash:location}/bin/dash
path = $${basedirectory:services}/nbdserver
[nbd-promise]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/nbd_promise
hostname = $${nbd-instance:ip}
port = $${nbd-instance:port}
<= monitor-promise-base
module = check_port_listening
name = nbd_promise.py
config-hostname = $${nbd-instance:ip}
config-port = $${nbd-instance:port}
[gen-passwd]
recipe = slapos.cookbook:generate.password
......@@ -58,10 +58,11 @@ path = $${basedirectory:watched-services}/onetimeupload
key = $${gen-passwd:passwd}
[onetimeupload-promise]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/onetimeupload_promise
hostname = $${onetimeupload-instance:ip}
port = $${onetimeupload-instance:port}
<= monitor-promise-base
module = check_port_listening
name = onetimeupload_promise.py
config-hostname = $${onetimeupload-instance:ip}
config-port = $${onetimeupload-instance:port}
[publish-connection-information]
recipe = slapos.cookbook:publish
......
......@@ -184,10 +184,8 @@ on-update = true
[template-httpd]
recipe = slapos.recipe.template:jinja2
filename = template-httpd.cfg
template = ${:_profile_base_location_}/instance-kvm-http.cfg.in
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/instance-kvm-http.cfg
md5sum = 26a181a48046ce88570adb32334747ef
context =
key apache_location apache:location
raw openssl_executable_location ${openssl:location}/bin/openssl
......
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[template]
filename = instance.cfg
md5sum = 1b7d2d097f208f6641bf98a17df079c8
[template-monitor]
_update_hash_filename_ = instance-monitor.cfg.jinja2
md5sum = 494845aba309ba3bfca25f4518caf1e6
[template-monitor-distributor]
_update_hash_filename_ = instance-monitor-distributor.cfg.jinja2
md5sum = 61c0bfdfc0a2b51ba15fe4a49baf6091
[json-test-template]
_update_hash_filename_ = json-test-template.json.in.jinja2
md5sum = 2eb5596544d9c341acf653d4f7ce2680
......@@ -80,12 +80,10 @@ command-line =
wrapper-path = ${monitor-directory:bin}/monitor-collect-csv-dump
[monitor-check-memory-usage]
recipe = slapos.cookbook:wrapper
command-line = {{ buildout_bin}}/check-computer-memory
-db ${monitor-instance-parameter:collector-db}
--threshold ${slap-parameter:memory-percent-threshold}
--unit percent
wrapper-path = ${directory:promises}/check-computer-memory-usage
<= monitor-promise-base
module = check_command_execute
name = check_computer_memory_usage.py
config-command = {{ buildout_bin}}/check-computer-memory -db ${monitor-instance-parameter:collector-db} --threshold ${slap-parameter:memory-percent-threshold} --unit percent
[monitor-check-cpu-usage]
recipe = slapos.cookbook:promise.plugin
......
[buildout]
extends =
buildout.hash.cfg
../../component/pycurl/buildout.cfg
../../component/python-cryptography/buildout.cfg
../../component/wget/buildout.cfg
......@@ -19,30 +20,26 @@ parts =
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
md5sum = 1b7d2d097f208f6641bf98a17df079c8
mode = 0644
[template-monitor]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-monitor.cfg.jinja2
url = ${:_profile_base_location_}/${:_update_hash_filename_}
destination = ${buildout:directory}/template-base-monitor.cfg
md5sum = dffe797be3a66d6838ffc70ee8f5f3ff
mode = 0644
[template-monitor-distributor]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-monitor-distributor.cfg.jinja2
url = ${:_profile_base_location_}/${:_update_hash_filename_}
destination = ${buildout:directory}/template-monitor-base-distributor.cfg
md5sum = 61c0bfdfc0a2b51ba15fe4a49baf6091
mode = 0644
[json-test-template]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/json-test-template.json.in.jinja2
url = ${:_profile_base_location_}/${:_update_hash_filename_}
destination = ${buildout:directory}/json-test-template.json.in.jinja2
md5sum = 2eb5596544d9c341acf653d4f7ce2680
mode = 0644
[network-bench-cfg]
......
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[template-instance]
filename = instance.cfg
md5sum = f20ef9e421c8933cba48fc6604be1675
......@@ -54,7 +54,6 @@ cert = ${slap_connection:cert_file}
recipe = slapos.cookbook:mkdirectory
log = ${buildout:directory}/var/log
run = ${buildout:directory}/etc/run
promise = ${buildout:directory}/etc/promise
wrapper_dir = ${buildout:directory}/wrapper_bin
cros_location = ${buildout:directory}/parts/chromiumos
......@@ -64,12 +63,18 @@ wrapper_cros_sdk=${directory:wrapper_dir}/wrapper_cros_sdk
bash=/bin/bash
sudo=/usr/bin/sudo
[promise-sudo-on-host]
# assert sudo is installed, as it is required to enter the chroot 'cros_sdk'
[promise-sudo-on-host-binary]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:promise}/${:_buildout_section_name_}
wrapper-path = ${directory:bin}/${:_buildout_section_name_}
command-line = sudo -V
[promise-sudo-on-host]
# assert sudo is installed, as it is required to enter the chroot 'cros_sdk'
<= monitor-promise-base
module = check_command_execute
name = promise-sudo-on-host.py
config-command = ${promise-sudo-on-host-binary:wrapper-path}
[template-sudo-wrapper]
recipe = slapos.recipe.template:jinja2
template = {{ software_dir }}/scripts/wrapper_sudo.in
......
[buildout]
extends =
buildout.hash.cfg
# basic needs
../../stack/slapos.cfg
../../component/automake/buildout.cfg
......@@ -23,10 +24,9 @@ slapos.recipe.template = 4.3
[template-instance]
# jinja2 render instance.cfg file in the buildout directory
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg
rendered = ${buildout:directory}/instance.cfg
template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/${:filename}
mode = 0644
md5sum = 7e9deae78923ab7805c0d10d0d6fe336
context =
key software_dir :_profile_base_location_
key instance_dir buildout:directory
......
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[instance-common]
filename = instance-common.cfg.in
md5sum = 0a3a54fcc7be0bbd63cbd64f006ceebc
[root-common]
filename = root-common.cfg.in
md5sum = ccc6e33412259415ec6c3452d37b77cc
[instance-neo-admin]
filename = instance-neo-admin.cfg.in
md5sum = 87670ddc6b5d2007dac1b6d2ba86d168
[instance-neo-master]
filename = instance-neo-master.cfg.in
md5sum = 9f27195d770b2f57461c60a82c851ab9
[instance-neo]
filename = instance-neo.cfg.in
md5sum = d18e049d580720e733502b774b0d6790
[template-neo-my-cnf]
filename = my.cnf.in
md5sum = 9f6f8f2b5f4cb0d97d50ffc1d3837e2f
[template-neo]
filename = instance.cfg.in
md5sum = 83dc9faca482b2ddbd3d5fa968af7c33
[cluster]
filename = cluster.cfg.in
md5sum = 5afd326de385563b5aeac81039f23341
[runTestSuite.in]
_update_hash_filename_ = runTestSuite.in
md5sum = b656e805c5dbc7f9c73716398b3e032e
......@@ -6,6 +6,7 @@
[buildout]
extends =
buildout.hash.cfg
../../stack/slapos.cfg
../../stack/logrotate/buildout.cfg
../../stack/monitor/buildout.cfg
......@@ -85,16 +86,15 @@ scripts =
[download-base-neo]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_buildout_section_name_}.cfg.in
url = ${:_profile_base_location_}/${:filename}
# XXX: following mode should be the default
mode = 644
# XXX: must be rendered, not just dled
[instance-common]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:_buildout_section_name_}.cfg.in
template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/${:_buildout_section_name_}.cfg
md5sum = 0a3a54fcc7be0bbd63cbd64f006ceebc
context =
key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
......@@ -112,24 +112,18 @@ adapter-context =
[root-common]
<= download-base-neo
md5sum = ccc6e33412259415ec6c3452d37b77cc
[instance-neo-admin]
<= download-base-neo
md5sum = 87670ddc6b5d2007dac1b6d2ba86d168
[instance-neo-master]
<= download-base-neo
md5sum = 9f27195d770b2f57461c60a82c851ab9
[instance-neo]
<= download-base-neo
md5sum = d18e049d580720e733502b774b0d6790
[template-neo-my-cnf]
<= download-base-neo
url = ${:_profile_base_location_}/my.cnf.in
md5sum = 9f6f8f2b5f4cb0d97d50ffc1d3837e2f
[template-mysqld-wrapper]
reci