Commit ddc8115d authored by Kirill Smelkov's avatar Kirill Smelkov

Merge branch 'master' into master+ZODB4-wc2

* master: (24 commits)
  version up: slapos.cookbook 1.0.213
  Release slapos.cookbook (1.0.213)
  recipe/promise_plugin: Improve options
  kvm: Update Debian versions
  caddy-frontend: Fix master partition find in the test
  slaprunner and seleniumserver: Use ecdsa SSH keys in tests
  software/slapos-sr-testing: improve README
  stack/lamp: remove stunnel as it's not used
  slapos.cookbook: remove stunnel recipe
  slapos.cookbook: remove generic-varnish recipe
  component/powerdns: version up 4.5.1
  componenet/lua: version up 5.4.3
  component/python-2.7: do not build nis module
  software/theia: backport a CSS fix, to be removed next time we update
  software/theia: version up theia 1.18.0
  component/git: version up 2.33.0
  version up: Debian 10/11 netinst
  fixup! nodejs: remove unused versions
  component/fluentd: Version up to 1.8.1
  software/fluentd: v↑ fluent-plugin-wendelin to 0.5
  ...
parents 899a10d6 7119cf68
...@@ -11,20 +11,21 @@ url = https://rubygems.org/rubygems/rubygems-2.4.8.zip ...@@ -11,20 +11,21 @@ url = https://rubygems.org/rubygems/rubygems-2.4.8.zip
ruby-executable = ${ruby:location}/bin/ruby ruby-executable = ${ruby:location}/bin/ruby
gems = gems =
msgpack==1.3.3 msgpack==1.3.3
cool.io==1.4.6 concurrent-ruby==1.1.9
cool.io==1.7.1
dig_rb==1.0.1
http_parser.rb==0.6.0 http_parser.rb==0.6.0
sigdump==0.2.4 sigdump==0.2.4
serverengine==2.2.3 serverengine==2.2.4
strptime==0.1.9 strptime==0.2.5
thread_safe==0.3.6 thread_safe==0.3.6
tzinfo==1.2.9 tzinfo==2.0.4
tzinfo-data==1.2021.1 tzinfo-data==1.2021.1
yajl-ruby==1.4.1 yajl-ruby==1.4.1
fluentd==0.14.14 fluentd==1.8.1
httpclient==2.8.3 httpclient==2.8.3
json==2.5.1 td-client==1.0.8
td-client==0.8.85 fluent-plugin-td==1.1.0
fluent-plugin-td==0.10.29
gem-options = gem-options =
--with-icu-lib=${icu:location}/lib/ --with-icu-lib=${icu:location}/lib/
--with-icu-dir=${icu:location}/ --with-icu-dir=${icu:location}/
......
...@@ -18,8 +18,8 @@ parts = ...@@ -18,8 +18,8 @@ parts =
[git] [git]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://www.kernel.org/pub/software/scm/git/git-2.25.1.tar.xz url = https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.33.0.tar.xz
md5sum = 92bf65673b4fc08b64108d807f36f4d9 md5sum = 0990ff97af1511be0d9f0d3223dd4359
configure-options = configure-options =
--with-curl=${curl:location} --with-curl=${curl:location}
--with-openssl=${openssl:location} --with-openssl=${openssl:location}
......
...@@ -8,12 +8,23 @@ parts = ...@@ -8,12 +8,23 @@ parts =
[lua] [lua]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = http://www.lua.org/ftp/lua-5.3.1.tar.gz url = http://www.lua.org/ftp/lua-5.4.3.tar.gz
md5sum = 797adacada8d85761c079390ff1d9961 md5sum = ef63ed2ecfb713646a7fcc583cf5f352
configure-command = true configure-command = true
make-options = make-options =
"$(uname -sr 2>/dev/null|grep -Eq '^Linux' && echo linux || echo posix)" "$(uname -sr 2>/dev/null|grep -Eq '^Linux' && echo linux || echo posix)"
MYCFLAGS="-I${readline:location}/include" MYCFLAGS="-I${readline:location}/include -fPIC"
MYLDFLAGS="-L${readline:location}/lib -Wl,-rpath=${readline:location}/lib" MYLDFLAGS="-L${readline:location}/lib -Wl,-rpath=${readline:location}/lib"
make-targets = INSTALL_TOP=@@LOCATION@@
install INSTALL_TOP=@@LOCATION@@ post-install =
mkdir -p %(location)s/lib/pkgconfig
{
make pc INSTALL_TOP=%(location)s
echo '%(pc)s'
} > %(location)s/lib/pkgconfig/lua.pc
pc =
Name: Lua
Description: Lua language engine
Version: $${version}
Libs: -L$${libdir} -llua
Cflags: -I$${includedir}
...@@ -27,6 +27,12 @@ version = v12.18.3 ...@@ -27,6 +27,12 @@ version = v12.18.3
md5sum = 28bf6a4d98b238403fa58a0805f4a979 md5sum = 28bf6a4d98b238403fa58a0805f4a979
PATH = ${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s PATH = ${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s
[nodejs-8.9.4]
<= nodejs-base
version = v8.9.4
md5sum = 4ddc1daff327d7e6f63da57fdfc24f55
PATH = ${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s
[nodejs-8.6.0] [nodejs-8.6.0]
<= nodejs-base <= nodejs-base
version = v8.6.0 version = v8.6.0
......
...@@ -4,6 +4,7 @@ extends = ...@@ -4,6 +4,7 @@ extends =
../automake/buildout.cfg ../automake/buildout.cfg
../boost-lib/buildout.cfg ../boost-lib/buildout.cfg
../libtool/buildout.cfg ../libtool/buildout.cfg
../lua/buildout.cfg
../make/buildout.cfg ../make/buildout.cfg
../openssl/buildout.cfg ../openssl/buildout.cfg
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
...@@ -19,17 +20,16 @@ parts = ...@@ -19,17 +20,16 @@ parts =
[powerdns] [powerdns]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = http://downloads.powerdns.com/releases/pdns-4.2.1.tar.bz2 url = https://downloads.powerdns.com/releases/pdns-4.5.1.tar.bz2
md5sum = b5f3998a3bc438b905c72c0473408839 md5sum = 5f0ba98ca59bc3d84cfd09097c8b9953
configure-options = configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_} --prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--with-boost=${boost-lib:location} --with-boost=${boost-lib:location}
--with-libcrypto=${openssl:location} --with-libcrypto=${openssl:location}
--with-modules="geoip" --with-modules="geoip"
--with-dynmodules="" --with-dynmodules=""
--without-lua
--disable-lua-records --disable-lua-records
pkg_config_depends = ${yaml-cpp:location}/lib/pkgconfig pkg_config_depends = ${yaml-cpp:location}/lib/pkgconfig:${lua:location}/lib/pkgconfig
environment = environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:${libmaxminddb:location}/bin:${libtool:location}/bin:${make:location}/bin:${pkgconfig:location}/bin:%(PATH)s PATH=${autoconf:location}/bin:${automake:location}/bin:${libmaxminddb:location}/bin:${libtool:location}/bin:${make:location}/bin:${pkgconfig:location}/bin:%(PATH)s
LDFLAGS=-L${boost-lib:location}/lib -Wl,-rpath=${boost-lib:location}/lib -L${libmaxminddb:location}/lib -Wl,-rpath=${libmaxminddb:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${yaml-cpp:location}/lib -Wl,-rpath=${yaml-cpp:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib LDFLAGS=-L${boost-lib:location}/lib -Wl,-rpath=${boost-lib:location}/lib -L${libmaxminddb:location}/lib -Wl,-rpath=${libmaxminddb:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${yaml-cpp:location}/lib -Wl,-rpath=${yaml-cpp:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
...@@ -39,5 +39,3 @@ environment = ...@@ -39,5 +39,3 @@ environment =
YAML_LIBS = -lyaml-cpp YAML_LIBS = -lyaml-cpp
make-options = make-options =
LIBTOOL=libtool LIBTOOL=libtool
make-target =
install
...@@ -40,7 +40,7 @@ patch-options = -p1 ...@@ -40,7 +40,7 @@ patch-options = -p1
patches = patches =
${:_profile_base_location_}/fix_compiler_module_issue_20613.patch#94443a77f903e9de880a029967fa6aa7 ${:_profile_base_location_}/fix_compiler_module_issue_20613.patch#94443a77f903e9de880a029967fa6aa7
${:_profile_base_location_}/pytracemalloc_pep445.patch#9f3145817afa2b7fad801fde8447e396 ${:_profile_base_location_}/pytracemalloc_pep445.patch#9f3145817afa2b7fad801fde8447e396
${:_profile_base_location_}/disabled_module_list.patch#71ad30d32bcdbc50c19cf48675b1246e ${:_profile_base_location_}/disabled_module_list.patch#e038a8016475574c810cbaaf0e42f4ac
${:_profile_base_location_}/asyncore_poll_insteadof_select.patch#ab6991c0ee6e25aeb8951e71f280a2f1 ${:_profile_base_location_}/asyncore_poll_insteadof_select.patch#ab6991c0ee6e25aeb8951e71f280a2f1
url = url =
http://www.python.org/ftp/python/${:package_version}/Python-${:package_version}${:package_version_suffix}.tar.xz http://www.python.org/ftp/python/${:package_version}/Python-${:package_version}${:package_version_suffix}.tar.xz
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# This global variable is used to hold the list of modules to be disabled. # This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = [] -disabled_module_list = []
+disabled_module_list = ['_bsddb', '_tkinter', 'bsddb185'] +disabled_module_list = ['_bsddb', '_tkinter', 'bsddb185', 'nis']
def add_dir_to_list(dirlist, dir): def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if """Add the directory 'dir' to the list 'dirlist' (at the front) if
...@@ -89,13 +89,13 @@ md5sum = 6097fdb9cbab47c96471274b9044e983 ...@@ -89,13 +89,13 @@ md5sum = 6097fdb9cbab47c96471274b9044e983
[debian-amd64-buster-netinst.iso] [debian-amd64-buster-netinst.iso]
<= debian-amd64-netinst-base <= debian-amd64-netinst-base
version = 10.10.0 version = 10.11.0
md5sum = c7d0e562e589e853b5d00563b4311720 md5sum = 9d7b9cc850464d60ac174787c53e8f3f
[debian-amd64-bullseye-netinst.iso] [debian-amd64-bullseye-netinst.iso]
<= debian-amd64-netinst-base <= debian-amd64-netinst-base
version = 11.0.0 version = 11.1.0
md5sum = 499953266841cae41612310e65659456 md5sum = b710c178eb434d79ce40ce703d30a5f0
alternate-url = https://cdimage.debian.org/cdimage/release/current/${:arch}/iso-cd/${:filename} alternate-url = https://cdimage.debian.org/cdimage/release/current/${:arch}/iso-cd/${:filename}
[debian-amd64-netinst.iso] [debian-amd64-netinst.iso]
......
...@@ -28,7 +28,7 @@ from setuptools import setup, find_packages ...@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob import glob
import os import os
version = '1.0.212' version = '1.0.213'
name = 'slapos.cookbook' name = 'slapos.cookbook'
long_description = open("README.rst").read() long_description = open("README.rst").read()
...@@ -110,7 +110,6 @@ setup(name=name, ...@@ -110,7 +110,6 @@ setup(name=name,
'generic.kumofs = slapos.recipe.generic_kumofs:Recipe', 'generic.kumofs = slapos.recipe.generic_kumofs:Recipe',
'generic.memcached = slapos.recipe.generic_memcached:Recipe', 'generic.memcached = slapos.recipe.generic_memcached:Recipe',
'generic.mysql.wrap_update_mysql = slapos.recipe.generic_mysql:WrapUpdateMySQL', 'generic.mysql.wrap_update_mysql = slapos.recipe.generic_mysql:WrapUpdateMySQL',
'generic.varnish = slapos.recipe.generic_varnish:Recipe',
'gitinit = slapos.recipe.gitinit:Recipe', 'gitinit = slapos.recipe.gitinit:Recipe',
'haproxy = slapos.recipe.haproxy:Recipe', 'haproxy = slapos.recipe.haproxy:Recipe',
'ipv4toipv6 = slapos.recipe.6tunnel:FourToSix', 'ipv4toipv6 = slapos.recipe.6tunnel:FourToSix',
...@@ -166,7 +165,6 @@ setup(name=name, ...@@ -166,7 +165,6 @@ setup(name=name,
'squid = slapos.recipe.squid:Recipe', 'squid = slapos.recipe.squid:Recipe',
'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe', 'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe',
'sshkeys_authority.request = slapos.recipe.sshkeys_authority:Request', 'sshkeys_authority.request = slapos.recipe.sshkeys_authority:Request',
'stunnel = slapos.recipe.stunnel:Recipe',
'switch-softwaretype = slapos.recipe.switch_softwaretype:Recipe', 'switch-softwaretype = slapos.recipe.switch_softwaretype:Recipe',
'symbolic.link = slapos.recipe.symbolic_link:Recipe', 'symbolic.link = slapos.recipe.symbolic_link:Recipe',
'tidstorage = slapos.recipe.tidstorage:Recipe', 'tidstorage = slapos.recipe.tidstorage:Recipe',
......
generic_varnish
===============
This recipe creates a varnish instance dedicated for ERP5 with a web checker[1]
set up.
How to Use generic_varnish ?
============================
On slap console, you can instantiate varnish like this::
instance = request(
software_type='varnish',
partition_parameter_kw={
'backend-url':'https://[your_backend_address]:your_backend_port',
'web-checker-frontend-url':'http://www.example.com',
'web-checker-mail-address':'web-checker-result@example.com',
'web-checker-smtp-host':'mail.example.com',
}
)
backend-url is the backend url that varnish will cache.
web-checker-frontend-url is the entry-point-url that web checker will check
the HTTP headers of all the pages in the web site.
web-checker-mail-address is the email address where web checker will send
the HTTP Cache cheking result.
web-checker-smtp-host is the smtp server to be used to send the web checker
result.
[Note]
When web-checker-* parameters are not given, web_checker will be disabled.
References
==========
[1] web_checker (it is a part of erp5.util)
http://pypi.python.org/pypi/erp5.util
web_checker: Web site HTTP Cache header checking tool
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import re
from slapos.recipe.librecipe import GenericSlapRecipe
class Recipe(GenericSlapRecipe):
"""
Instantiate varnish daemon
TODO:
- use varnish3.x and replace .vcl for it
"""
def _install(self):
ip = self.options['ip']
backend_url = self.options.get('backend-url',
# BBB: Peeking in partition parameters directly. Eew.
self.parameter_dict.get('backend-url',
self.parameter_dict.get('tidstorage-url') # BBB
)
)
backend_server, backend_port = self._getBackendServer(backend_url)
path_list = []
if backend_url.startswith('https://'):
config = dict(
stunnel_binary=self.options['stunnel-binary'],
stunnel_server=ip,
stunnel_port=int(self.options['stunnel-port']),
stunnel_pid_file=self.options['stunnel-pid-file'],
stunnel_conf_file=self.options['stunnel-conf-file'],
shell_path=self.options['shell-path'],
backend_server=backend_server.replace('[', '').replace(']', ''),
backend_port=backend_port,
)
path_list.append(self.createExecutable(self.options['stunnel-wrapper'],
self.substituteTemplate(self.getTemplateFilename('stunnel.in'),
config)))
path_list.append(self.createFile(self.options['stunnel-conf-file'],
self.substituteTemplate(self.getTemplateFilename('stunnel.conf.in'),
config)))
backend_server = ip
backend_port = int(self.options['stunnel-port'])
varnishd_manager_port = int(self.options['manager-port'])
varnishd_server_port = int(self.options['server-port'])
config = dict(
varnishd_binary=self.options['varnishd-binary'],
varnish_ip=ip,
varnishlog_binary=self.options['varnishlog-binary'],
varnishd_manager_port=varnishd_manager_port,
varnishd_server_port=varnishd_server_port,
varnishd_pid_file=self.options['pid-file'],
varnish_instance_name=self.options['varnish-instance-name'],
varnish_data=self.options['varnish-data'],
gcc_location=self.options['gcc-location'],
shell_path=self.options['shell-path'],
vcl_file=self.options['vcl-file'],
backend_port=backend_port,
backend_server=backend_server,
)
path_list.append(self.createExecutable(self.options['varnishd-wrapper'],
self.substituteTemplate(self.getTemplateFilename('varnishd.in'),
config)))
path_list.append(self.createExecutable(self.options['varnishlog-wrapper'],
self.substituteTemplate(self.getTemplateFilename('varnishlog.in'),
config)))
path_list.append(self.createFile(self.options['vcl-file'],
self.substituteTemplate(self.getTemplateFilename('default.vcl.in'),
config)))
return path_list
def _getBackendServer(self, url):
r = re.compile('\/\/(\[.+\]|[\d.]+):(\d*)')
result = r.search(url)
ip = result.groups()[0]
port = result.groups()[1]
return (ip, port)
#This is a basic VCL configuration file for varnish. See the vcl(7)
#man page for details on VCL syntax and semantics.
#
#Default backend definition. Set this to point to your content
#server.
#
backend default {
.host = "%(backend_server)s";
.port = "%(backend_port)s";
.probe = {
.timeout = 30s;
.interval = 5s;
.window = 4;
.threshold = 3;
.request =
"OPTIONS /erp5/getId HTTP/1.1"
"Host: %(backend_server)s:%(backend_port)s"
"Accept-Encoding: identity"
"Connection: close"
"User-Agent: Varnish";
}
}
# Called at the beginning of a request, after the complete request has been received and parsed
sub vcl_recv {
# Pass any requests that Varnish does not understand straight to the backend.
if (req.request != "GET" &&
req.request != "HEAD" &&
req.request != "PUT" &&
req.request != "POST" &&
req.request != "TRACE" &&
req.request != "OPTIONS" &&
req.request != "PURGE" &&
req.request != "DELETE") {
/* Non-RFC2616 or CONNECT which is weird. */
return (pipe);
}
# Pass anything other than GET and HEAD directly.
if (req.request != "GET" && req.request != "HEAD") {
return (pass);
}
if (req.http.Authorization) {
/* Not cacheable by default */
return (pass);
}
# No need to have cookies for static resources
if (req.url ~ "\.(css|gif|ico|jpg|js|png)$") {
unset req.http.Cookie;
}
# Remove bogus cookies
if (req.http.Cookie) {
set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__utm.=[^;]+;? *", "\1");
set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__ac_name=\x22\x22;? *", "\1");
set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__ac=\x22Og.3D.3D\x22;? *", "\1");
}
if (req.http.Cookie == "") {
unset req.http.Cookie;
}
if (req.http.Cookie && req.http.Cookie ~ "(^|; ) *__ac=") {
return (pass);
}
# We do not care about Accept-Encoding, because we don't use varnish as the front most HTTP server.
unset req.http.Accept-Encoding;
if (req.backend.healthy) {
set req.grace = 1h;
} else {
set req.grace = 1w;
}
return (lookup);
}
# Run after a pass in vcl_recv OR after a lookup that returned a hitpass
sub vcl_pass {
# unset If-Modified-Since to avoid reusing anonymous's browser cache
# after login.
unset req.http.If-Modified-Since;
return (pass);
}
# Creates the varnish cache key by the url
sub vcl_hash {
# We use url only for hash.
hash_data(req.url);
return (hash);
}
# Called after a cache lookup if the requested document was found in the cache
sub vcl_hit {
return (deliver);
}
# Called after a cache lookup if the requested document was not found in the cache
sub vcl_miss {
return (fetch);
}
# Called after a document has been successfully retrieved from the backend
sub vcl_fetch {
# Unset Expires that is always overridden by Cache-Control.
unset beresp.http.Expires;
# Unset Pragma that is obsolete.
unset beresp.http.Pragma;
# We only cache 200 (OK) and 304 (Not Modified) responses.
if (beresp.status != 200 && beresp.status != 304) {
set beresp.ttl = 0s;
}
# If max-age is 0 or not set, we want no browser cache.
if (beresp.ttl <= 0s) {
set beresp.http.Cache-Control = "no-store";
# Mark as hit_for_pass for the next 2 minutes.
set beresp.ttl = 120s;
return (hit_for_pass);
}
# We don't care haproxy's cookie.
if (beresp.http.Set-Cookie && beresp.http.Set-Cookie !~ "^SERVERID=[^;]+; path=/$") {
return (hit_for_pass);
} else {
unset beresp.http.Set-Cookie;
}
# We set long enough grace for cachable objects.
set beresp.grace = 1w;
return (deliver);
}
# Called before a cached object is delivered to the client
sub vcl_deliver {
if (obj.hits > 0) {
set resp.http.X-Cache = obj.hits;
} else {
set resp.http.X-Cache = "MISS";
}
return (deliver);
}
foreground = yes
pid = %(stunnel_pid_file)s
debug = 4
[remote]
accept = %(stunnel_server)s:%(stunnel_port)s
client = yes
connect = %(backend_server)s:%(backend_port)s
sni = %(stunnel_server)s
#!%(shell_path)s
DAEMON_OPTS="%(stunnel_conf_file)s"
exec %(stunnel_binary)s ${DAEMON_OPTS} 2>&1
#!%(shell_path)s
DAEMON_OPTS="-F \
-a %(varnish_ip)s:%(varnishd_server_port)s \
-T %(varnish_ip)s:%(varnishd_manager_port)s \
-t 0 \
-p nuke_limit=500 \
-n %(varnish_instance_name)s \
-f %(vcl_file)s \
-s file,%(varnish_data)s/varnish_storage.bin,1G"
PIDFILE=%(varnishd_pid_file)s
# exporting PATH here so that we will pass the PATH variable to the subprocess
export PATH="%(gcc_location)s:$PATH"
exec %(varnishd_binary)s -P ${PIDFILE} ${DAEMON_OPTS} 2>&1
#!%(shell_path)s
DAEMON_OPTS="-a -n %(varnish_instance_name)s"
exec %(varnishlog_binary)s ${DAEMON_OPTS} "$@"
#!%(shell_path)s
DAEMON_OPTS="-F \
-a %(varnish_ip)s:%(varnishd_server_port)s \
-T %(varnish_ip)s:%(varnishd_manager_port)s \
-n %(varnish_instance_name)s \
-f %(vcl_file)s \
-s file,%(varnish_data)s/varnish_storage.bin,1G"
PIDFILE=%(varnishd_pid_file)s
# exporting PATH here so that it will pass the PATH variable to the subprocess
export PATH
# If unset, or set to "0" or "no", exit
if [ -z "${VARNISHLOG_ENABLED}" ] || \
[ "${VARNISHLOG_ENABLED}" = "0" ] || \
[ "${VARNISHLOG_ENABLED}" = "no" ]; then
exit 0;
fi
exec %(varnishlog_binary)s ${DAEMON_OPTS} 2>&1
...@@ -24,15 +24,17 @@ ...@@ -24,15 +24,17 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# #
############################################################################## ##############################################################################
import ast
import re import re
import logging, os import logging, os
import zc.buildout.easy_install import zc.buildout.easy_install
from pprint import pformat from pprint import pformat
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
from zc.buildout import UserError
script_template = '''# This script is auto generated by slapgrid, do not edit! script_template = '''# This script is auto generated by slapgrid, do not edit!
import sys import sys
sys.path[0:0] = %(path)s sys.path[0:0] = %(paths)s
extra_config_dict = %(config)s extra_config_dict = %(config)s
...@@ -54,6 +56,24 @@ for module in list(sys.modules): ...@@ -54,6 +56,24 @@ for module in list(sys.modules):
%(content)s %(content)s
''' '''
execfile_template = """\
def _(path):
global _
del _
with open(path) as f:
return compile(f.read(), path, 'exec')
exec(_(%r))"""
def isPythonName(name):
try:
x, = ast.parse(name).body
if type(x) is ast.Expr:
x = x.value
return type(x) is ast.Name and x.id == name
except Exception:
pass
class Recipe(GenericBaseRecipe): class Recipe(GenericBaseRecipe):
_WORKING_SET_CACHE_NAME = "slapos.cookbook_pplugin_ws_cache" _WORKING_SET_CACHE_NAME = "slapos.cookbook_pplugin_ws_cache"
...@@ -64,6 +84,35 @@ class Recipe(GenericBaseRecipe): ...@@ -64,6 +84,35 @@ class Recipe(GenericBaseRecipe):
options['develop-eggs-directory'] = buildout_section['develop-eggs-directory'] options['develop-eggs-directory'] = buildout_section['develop-eggs-directory']
super(Recipe, self).__init__(buildout, name, options) super(Recipe, self).__init__(buildout, name, options)
filepath = options.get('file')
module = options.get('module')
klass = options.get('class')
if klass == 'RunPromise':
klass = None
elif klass and not isPythonName(klass):
raise UserError("%r is not valid class name" % klass)
if bool(module) == bool(filepath):
raise UserError("Either 'module' or 'file' is required but not both")
if module:
if not all(map(isPythonName, module.split('.'))):
raise UserError("%r is not a valid module name" % module)
if klass:
content = 'from %s import %s as RunPromise' % (module, klass)
else:
content = 'from %s import RunPromise' % module
else:
content = execfile_template % filepath
if klass:
content += '\n\nRunPromise = ' + klass
self.content = content
self.config_dict = {key[7:]: options[key]
for key in options
if key.startswith('config-')}
def _get_cache_storage(self): def _get_cache_storage(self):
"""Return a mapping where to store generated working sets. """Return a mapping where to store generated working sets.
from https://github.com/buildout/buildout/blob/master/zc.recipe.egg_/src/zc/recipe/egg/egg.py#L170 from https://github.com/buildout/buildout/blob/master/zc.recipe.egg_/src/zc/recipe/egg/egg.py#L170
...@@ -111,26 +160,10 @@ class Recipe(GenericBaseRecipe): ...@@ -111,26 +160,10 @@ class Recipe(GenericBaseRecipe):
else: else:
working_set = set() working_set = set()
regex = r"^[\w_\-\.\s]+$"
import_path = self.options.get('import', '').strip()
if import_path:
if not re.search(regex, import_path):
raise ValueError("Import path %r is not a valid" % import_path)
content_string = "from %s import RunPromise" % import_path
else:
# old parameter for compatibility
content_string = self.options['content'].strip()
if not re.search(regex, content_string):
raise ValueError("Promise content %r is not valid" % content_string)
config_dict = {key[7:]: self.options[key]
for key in self.options
if key.startswith('config-')}
return self.createFile(self.options['output'], script_template % { return self.createFile(self.options['output'], script_template % {
'path': pformat([dist.location for dist in working_set], indent=2), 'paths': pformat(tuple(dist.location for dist in working_set), indent=2),
'content': content_string, 'config': pformat(self.config_dict, indent=2),
'config': pformat(config_dict, indent=2), 'content': self.content,
}, int(self.options.get('mode', '0644'), 8)), }, int(self.options.get('mode', '0644'), 8)),
update = install update = install
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import signal
import errno
from slapos.recipe.librecipe import GenericBaseRecipe
def kill(pid_file, sig=signal.SIGUSR1):
if os.path.exists(pid_file):
with open(pid_file) as f:
pid = int(f.read().strip())
try:
os.kill(pid, sig)
except OSError as e:
if e.errno != errno.ESRCH: # No such process
raise e
os.unlink(pid_file)
class Recipe(GenericBaseRecipe):
def install(self):
path_list = []
self.isClient = self.optionIsTrue('client', default=False)
if self.isClient:
self.logger.info("Client mode")
else:
self.logger.info("Server mode")
conf = {}
for type_ in ['remote', 'local']:
for data in ['host', 'port']:
confkey, opt = ['%s%s%s' % (type_, i, data) for i in ['_', '-']]
conf[confkey] = self.options[opt]
pid_file = self.options['pid-file']
conf.update(pid_file=pid_file)
log_file = self.options['log-file']
conf.update(log=log_file)
if self.isClient:
template = self.getTemplateFilename('client.conf.in')
else:
template = self.getTemplateFilename('server.conf.in')
key = self.options['key-file']
cert = self.options['cert-file']
conf.update(key=key, cert=cert)
conf_file = self.createFile(
self.options['config-file'],
self.substituteTemplate(template, conf))
path_list.append(conf_file)
wrapper = self.createWrapper(
self.options['wrapper'],
(self.options['stunnel-binary'], conf_file),
)
path_list.append(wrapper)
# Reload configuration
kill(pid_file, signal.SIGHUP)
if 'post-rotate-script' in self.options:
path_list.append(self.createPythonScript(
self.options['post-rotate-script'],
__name__ + '.kill', (pid_file,)))
return path_list
foreground = yes
output = %(log)s
pid = %(pid_file)s
syslog = no
[service]
client = yes
accept = %(local_host)s:%(local_port)s
connect = %(remote_host)s:%(remote_port)s
foreground = yes
output = %(log)s
pid = %(pid_file)s
syslog = no
key = %(key)s
cert = %(cert)s
[service]
accept = %(remote_host)s:%(remote_port)s
connect = %(local_host)s:%(local_port)s
...@@ -46,7 +46,7 @@ md5sum = ae4a0043414336a521b524d9c95f1c68 ...@@ -46,7 +46,7 @@ md5sum = ae4a0043414336a521b524d9c95f1c68
[template-pullrdiffbackup] [template-pullrdiffbackup]
filename = instance-pullrdiffbackup.cfg.in filename = instance-pullrdiffbackup.cfg.in
md5sum = f2e6f30a0e8228cbfb93eaaae10fe884 md5sum = 45a4faa217ea5b83ecf271791e1632dd
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
......
...@@ -107,8 +107,7 @@ recipe = slapos.cookbook:promise.plugin ...@@ -107,8 +107,7 @@ recipe = slapos.cookbook:promise.plugin
eggs = eggs =
slapos.toolbox slapos.toolbox
output = $${directory:plugin}/{{ slave_reference }}_check_backup.py output = $${directory:plugin}/{{ slave_reference }}_check_backup.py
content = module = slapos.promise.plugin.backupserver_check_backup
from slapos.promise.plugin.backupserver_check_backup import RunPromise
config-status_dirbasename = $${variables:status_dirbasename} config-status_dirbasename = $${variables:status_dirbasename}
config-status_name = {{ '$${' ~ slave_reference }}-backup-script:status_name} config-status_name = {{ '$${' ~ slave_reference }}-backup-script:status_name}
config-status_fullpath = {{ '$${' ~ slave_reference }}-backup-script:status_log} config-status_fullpath = {{ '$${' ~ slave_reference }}-backup-script:status_log}
...@@ -117,7 +116,6 @@ config-cron_frequency = {{ frequency }} ...@@ -117,7 +116,6 @@ config-cron_frequency = {{ frequency }}
config-monitor_url = $${monitor-publish:monitor-base-url} config-monitor_url = $${monitor-publish:monitor-base-url}
config-statistic_dirbasename = $${variables:statistic_dirbasename} config-statistic_dirbasename = $${variables:statistic_dirbasename}
config-statistic_name = {{ '$${' ~ slave_reference }}-backup-script:statistic_name} config-statistic_name = {{ '$${' ~ slave_reference }}-backup-script:statistic_name}
mode = 600
{% do part_list.append("%s-promise-check-backup" % slave_reference) -%} {% do part_list.append("%s-promise-check-backup" % slave_reference) -%}
[{{ slave_reference }}-backup-script] [{{ slave_reference }}-backup-script]
...@@ -194,7 +192,7 @@ virtual-depends = ...@@ -194,7 +192,7 @@ virtual-depends =
[nginx-listen-promise] [nginx-listen-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = nginx_listen.py name = nginx_listen.py
config-host = $${nginx-configuration:ip} config-host = $${nginx-configuration:ip}
config-port = $${nginx-configuration:port} config-port = $${nginx-configuration:port}
......
...@@ -22,15 +22,15 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68 ...@@ -22,15 +22,15 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-caddy-frontend] [profile-caddy-frontend]
filename = instance-apache-frontend.cfg.in filename = instance-apache-frontend.cfg.in
md5sum = 385674eb3e79bdd773ef6cec1d1281e8 md5sum = 0950e09ad1f03f0789308f5f7a7eb1b8
[profile-caddy-replicate] [profile-caddy-replicate]
filename = instance-apache-replicate.cfg.in filename = instance-apache-replicate.cfg.in
md5sum = 99741e618b1c249bd17c9e02778d74ee md5sum = 7c2e52b76c42bed95702763c344e41dd
[profile-slave-list] [profile-slave-list]
_update_hash_filename_ = templates/apache-custom-slave-list.cfg.in _update_hash_filename_ = templates/apache-custom-slave-list.cfg.in
md5sum = 9bb51f663f69d66b5b3708bf892dd3e6 md5sum = 313671d343ceccfca5af1baa642132c5
[profile-replicate-publish-slave-information] [profile-replicate-publish-slave-information]
_update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in _update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in
...@@ -102,7 +102,7 @@ md5sum = 38792c2dceae38ab411592ec36fff6a8 ...@@ -102,7 +102,7 @@ md5sum = 38792c2dceae38ab411592ec36fff6a8
[profile-kedifa] [profile-kedifa]
filename = instance-kedifa.cfg.in filename = instance-kedifa.cfg.in
md5sum = eab5ae579471ca86b40bd2da3b53fefa md5sum = dfb4dabd1e4094de1276d171f998ef47
[template-backend-haproxy-rsyslogd-conf] [template-backend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in _update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in
......
...@@ -539,7 +539,7 @@ context = ...@@ -539,7 +539,7 @@ context =
[trafficserver-promise-listen-port] [trafficserver-promise-listen-port]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = trafficserver-port-listening.py name = trafficserver-port-listening.py
config-host = ${trafficserver-variable:local-ip} config-host = ${trafficserver-variable:local-ip}
config-port = ${trafficserver-variable:input-port} config-port = ${trafficserver-variable:input-port}
...@@ -552,7 +552,7 @@ environment = TS_ROOT=${buildout:directory} ...@@ -552,7 +552,7 @@ environment = TS_ROOT=${buildout:directory}
[trafficserver-promise-cache-availability] [trafficserver-promise-cache-availability]
<= monitor-promise-base <= monitor-promise-base
module = trafficserver_cache_availability promise = trafficserver_cache_availability
name = trafficserver-cache-availability.py name = trafficserver-cache-availability.py
config-wrapper-path = ${trafficserver-ctl:wrapper-path} config-wrapper-path = ${trafficserver-ctl:wrapper-path}
...@@ -653,48 +653,48 @@ context = ...@@ -653,48 +653,48 @@ context =
[promise-frontend-caddy-configuration] [promise-frontend-caddy-configuration]
<= monitor-promise-base <= monitor-promise-base
module = validate_frontend_configuration promise = validate_frontend_configuration
name = frontend-caddy-configuration-promise.py name = frontend-caddy-configuration-promise.py
config-verification-script = ${promise-helper-last-configuration-state:rendered} config-verification-script = ${promise-helper-last-configuration-state:rendered}
[promise-caddy-frontend-v4-https] [promise-caddy-frontend-v4-https]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = caddy_frontend_ipv4_https.py name = caddy_frontend_ipv4_https.py
config-host = {{ instance_parameter_dict['ipv4-random'] }} config-host = {{ instance_parameter_dict['ipv4-random'] }}
config-port = ${configuration:port} config-port = ${configuration:port}
[promise-caddy-frontend-v4-http] [promise-caddy-frontend-v4-http]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = caddy_frontend_ipv4_http.py name = caddy_frontend_ipv4_http.py
config-host = {{ instance_parameter_dict['ipv4-random'] }} config-host = {{ instance_parameter_dict['ipv4-random'] }}
config-port = ${configuration:plain_http_port} config-port = ${configuration:plain_http_port}
[promise-caddy-frontend-v6-https] [promise-caddy-frontend-v6-https]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = caddy_frontend_ipv6_https.py name = caddy_frontend_ipv6_https.py
config-host = {{ instance_parameter_dict['ipv6-random'] }} config-host = {{ instance_parameter_dict['ipv6-random'] }}
config-port = ${configuration:port} config-port = ${configuration:port}
[promise-caddy-frontend-v6-http] [promise-caddy-frontend-v6-http]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = caddy_frontend_ipv6_http.py name = caddy_frontend_ipv6_http.py
config-host = {{ instance_parameter_dict['ipv6-random'] }} config-host = {{ instance_parameter_dict['ipv6-random'] }}
config-port = ${configuration:plain_http_port} config-port = ${configuration:plain_http_port}
[promise-backend-haproxy-http] [promise-backend-haproxy-http]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = backend_haproxy_http.py name = backend_haproxy_http.py
config-host = {{ instance_parameter_dict['ipv4-random'] }} config-host = {{ instance_parameter_dict['ipv4-random'] }}
config-port = ${backend-haproxy-configuration:http-port} config-port = ${backend-haproxy-configuration:http-port}
[promise-backend-haproxy-https] [promise-backend-haproxy-https]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = backend_haproxy_https.py name = backend_haproxy_https.py
config-host = {{ instance_parameter_dict['ipv4-random'] }} config-host = {{ instance_parameter_dict['ipv4-random'] }}
config-port = ${backend-haproxy-configuration:https-port} config-port = ${backend-haproxy-configuration:https-port}
...@@ -798,7 +798,7 @@ extra-context = ...@@ -798,7 +798,7 @@ extra-context =
[promise-backend-haproxy-configuration] [promise-backend-haproxy-configuration]
<= monitor-promise-base <= monitor-promise-base
module = validate_frontend_configuration promise = validate_frontend_configuration
name = backend-haproxy-configuration.py name = backend-haproxy-configuration.py
config-verification-script = ${promise-backend-haproxy-configuration-helper:rendered} config-verification-script = ${promise-backend-haproxy-configuration-helper:rendered}
...@@ -888,7 +888,7 @@ context = ...@@ -888,7 +888,7 @@ context =
[monitor-verify-re6st-connectivity] [monitor-verify-re6st-connectivity]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = re6st-connectivity.py name = re6st-connectivity.py
config-url = ${configuration:re6st-verification-url} config-url = ${configuration:re6st-verification-url}
...@@ -924,7 +924,7 @@ return = domain secure_access ...@@ -924,7 +924,7 @@ return = domain secure_access
[backend-haproxy-statistic-frontend-promise] [backend-haproxy-statistic-frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = backend-haproxy-statistic-frontend.py name = backend-haproxy-statistic-frontend.py
config-http-code = 401 config-http-code = 401
config-url = config-url =
...@@ -976,7 +976,7 @@ extra-context = ...@@ -976,7 +976,7 @@ extra-context =
[promise-slave-introspection-configuration] [promise-slave-introspection-configuration]
<= monitor-promise-base <= monitor-promise-base
module = validate_frontend_configuration promise = validate_frontend_configuration
name = slave-introspection-configuration.py name = slave-introspection-configuration.py
config-verification-script = ${promise-slave-introspection-configuration-helper:rendered} config-verification-script = ${promise-slave-introspection-configuration-helper:rendered}
...@@ -993,7 +993,7 @@ context = ...@@ -993,7 +993,7 @@ context =
[promise-slave-introspection-https] [promise-slave-introspection-https]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = slave_introspection_https.py name = slave_introspection_https.py
config-host = {{ instance_parameter_dict['ipv6-random'] }} config-host = {{ instance_parameter_dict['ipv6-random'] }}
config-port = ${frontend-configuration:slave-introspection-https-port} config-port = ${frontend-configuration:slave-introspection-https-port}
...@@ -1008,7 +1008,7 @@ delaycompress = ...@@ -1008,7 +1008,7 @@ delaycompress =
[promise-logrotate-setup] [promise-logrotate-setup]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = ${:_buildout_section_name_}.py name = ${:_buildout_section_name_}.py
config-command = config-command =
${logrotate:wrapper-path} -d ${logrotate:wrapper-path} -d
......
...@@ -382,7 +382,7 @@ kedifa-csr_id-certificate = ${request-kedifa:connection-csr_id-certificate} ...@@ -382,7 +382,7 @@ kedifa-csr_id-certificate = ${request-kedifa:connection-csr_id-certificate}
{% set section_part = '${request-' + frontend %} {% set section_part = '${request-' + frontend %}
[{{ part_name }}] [{{ part_name }}]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = check-backend-haproxy-statistic-url-{{ frontend }}.py name = check-backend-haproxy-statistic-url-{{ frontend }}.py
config-url = config-url =
{{ section_part }}:connection-backend-haproxy-statistic-url} {{ section_part }}:connection-backend-haproxy-statistic-url}
...@@ -865,15 +865,15 @@ rendered = ${directory:etc}/nginx-rejected-slave.conf ...@@ -865,15 +865,15 @@ rendered = ${directory:etc}/nginx-rejected-slave.conf
[promise-rejected-slave-publish-ip-port] [promise-rejected-slave-publish-ip-port]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = rejected-slave-publish-ip-port-listening.py name = rejected-slave-publish-ip-port-listening.py
config-host = ${rejected-slave-publish-configuration:ip} config-host = ${rejected-slave-publish-configuration:ip}
config-port = ${rejected-slave-publish-configuration:port} config-port = ${rejected-slave-publish-configuration:port}
[rejected-slave-promise] [rejected-slave-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
module = check_file_state promise = check_file_state
name = rejected-slave.py name = rejected-slave.py
config-filename = ${rejected-slave-json:rendered} config-filename = ${rejected-slave-json:rendered}
config-state = empty config-state = empty
......
...@@ -193,7 +193,7 @@ template = inline: ...@@ -193,7 +193,7 @@ template = inline:
[promise-expose-csr_id-ip-port] [promise-expose-csr_id-ip-port]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = expose-csr_id-ip-port-listening.py name = expose-csr_id-ip-port-listening.py
config-host = ${expose-csr_id-configuration:ip} config-host = ${expose-csr_id-configuration:ip}
config-port = ${expose-csr_id-configuration:port} config-port = ${expose-csr_id-configuration:port}
...@@ -250,7 +250,7 @@ extra-context = ...@@ -250,7 +250,7 @@ extra-context =
[promise-kedifa-http-reply] [promise-kedifa-http-reply]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = kedifa-http-reply.py name = kedifa-http-reply.py
# Kedifa replies 400 on /, so use it to be sure that Kedifa replied # Kedifa replies 400 on /, so use it to be sure that Kedifa replied
config-http-code = 400 config-http-code = 400
...@@ -331,7 +331,7 @@ monitor-base-url = ${monitor-instance-parameter:monitor-base-url} ...@@ -331,7 +331,7 @@ monitor-base-url = ${monitor-instance-parameter:monitor-base-url}
[promise-logrotate-setup] [promise-logrotate-setup]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = ${:_buildout_section_name_}.py name = ${:_buildout_section_name_}.py
config-command = config-command =
${logrotate:wrapper-path} -d ${logrotate:wrapper-path} -d
......
...@@ -353,7 +353,7 @@ filename = {{ '%s.conf' % slave_reference }} ...@@ -353,7 +353,7 @@ filename = {{ '%s.conf' % slave_reference }}
{%- do part_list.append(monitor_ipv6_section_title) %} {%- do part_list.append(monitor_ipv6_section_title) %}
[{{ monitor_ipv6_section_title }}] [{{ monitor_ipv6_section_title }}]
<= monitor-promise-base <= monitor-promise-base
module = check_icmp_packet_lost promise = check_icmp_packet_lost
name = {{ monitor_ipv6_section_title }}.py name = {{ monitor_ipv6_section_title }}.py
config-address = {{ dumps(monitor_ipv6_test) }} config-address = {{ dumps(monitor_ipv6_test) }}
# promise frequency in minutes (2 times/day) # promise frequency in minutes (2 times/day)
...@@ -365,7 +365,7 @@ config-frequency = 720 ...@@ -365,7 +365,7 @@ config-frequency = 720
{%- do part_list.append(monitor_ipv4_section_title) %} {%- do part_list.append(monitor_ipv4_section_title) %}
[{{ monitor_ipv4_section_title }}] [{{ monitor_ipv4_section_title }}]
<= monitor-promise-base <= monitor-promise-base
module = check_icmp_packet_lost promise = check_icmp_packet_lost
name = {{ monitor_ipv4_section_title }}.py name = {{ monitor_ipv4_section_title }}.py
config-address = {{ dumps(monitor_ipv4_test) }} config-address = {{ dumps(monitor_ipv4_test) }}
config-ipv4 = true config-ipv4 = true
...@@ -632,7 +632,7 @@ template = inline: ...@@ -632,7 +632,7 @@ template = inline:
[promise-expose-csr_id-ip-port] [promise-expose-csr_id-ip-port]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = expose-csr_id-ip-port-listening.py name = expose-csr_id-ip-port-listening.py
config-host = ${expose-csr_id-configuration:ip} config-host = ${expose-csr_id-configuration:ip}
config-port = ${expose-csr_id-configuration:port} config-port = ${expose-csr_id-configuration:port}
...@@ -655,7 +655,7 @@ commands = ...@@ -655,7 +655,7 @@ commands =
[promise-logrotate-setup] [promise-logrotate-setup]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = ${:_buildout_section_name_}.py name = ${:_buildout_section_name_}.py
config-command = config-command =
${logrotate:wrapper-path} -d ${logrotate:wrapper-path} -d
\ No newline at end of file
...@@ -971,12 +971,11 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase): ...@@ -971,12 +971,11 @@ class HttpFrontendTestCase(SlapOSInstanceTestCase):
return parsed_parameter_dict return parsed_parameter_dict
def getMasterPartitionPath(self): def getMasterPartitionPath(self):
# partition w/o etc/trafficserver, but with buildout.cfg # partition with etc/nginx-rejected-slave.conf
return [ return [
q for q in glob.glob(os.path.join(self.instance_path, '*',)) q for q in glob.glob(os.path.join(self.instance_path, '*',))
if not os.path.exists( if os.path.exists(
os.path.join(q, 'etc', 'trafficserver')) and os.path.exists( os.path.join(q, 'etc', 'nginx-rejected-slave.conf'))][0]
os.path.join(q, 'buildout.cfg'))][0]
def parseConnectionParameterDict(self): def parseConnectionParameterDict(self):
return self.parseParameterDict( return self.parseParameterDict(
......
...@@ -18,4 +18,4 @@ md5sum = e986de01a57161b32425f1cd3ccac924 ...@@ -18,4 +18,4 @@ md5sum = e986de01a57161b32425f1cd3ccac924
[template-cloudooo-instance] [template-cloudooo-instance]
filename = instance-cloudooo.cfg.in filename = instance-cloudooo.cfg.in
md5sum = 6e4bdb1df02aed5c96ccf7b9c3c71b89 md5sum = 3e6830c21c206b3ae1140375e5e63b46
...@@ -105,7 +105,7 @@ ssl-session-cache = ${directory:log}/apache-ssl-session-cache ...@@ -105,7 +105,7 @@ ssl-session-cache = ${directory:log}/apache-ssl-session-cache
[apache-promise] [apache-promise]
# Check any apache port in ipv4, expect other ports and ipv6 to behave consistently # Check any apache port in ipv4, expect other ports and ipv6 to behave consistently
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = apache.py name = apache.py
config-url = https://{{ ipv4 }}:{{ apache_dict.values()[0][0] }} config-url = https://{{ ipv4 }}:{{ apache_dict.values()[0][0] }}
# XXX cloudooo replies "400 Bad Request" for GET on / but what we want to check # XXX cloudooo replies "400 Bad Request" for GET on / but what we want to check
......
[instance] [instance]
filename = instance.cfg filename = instance.cfg
md5sum = 646e50cfa93681e8bd85767621c7a39d md5sum = ddd17fab15afa5a27cdc0761fbc8f34c
...@@ -41,7 +41,7 @@ wrapper-path = $${directory:service}/dream_platform ...@@ -41,7 +41,7 @@ wrapper-path = $${directory:service}/dream_platform
[dream-platform-url-available] [dream-platform-url-available]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-url= $${dream_platform_parameter:url} config-url= $${dream_platform_parameter:url}
......
...@@ -29,10 +29,16 @@ script = dream_testrunner ...@@ -29,10 +29,16 @@ script = dream_testrunner
initialization = initialization =
${manpy:initialization} ${manpy:initialization}
[nodejs]
<= nodejs-8.9.4
[npm_install] [npm_install]
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = true stop-on-error = true
command = cd ${dream-repository.git:location} && PATH=${git:location}/bin/:${nodejs:location}/bin/:$PATH ${nodejs:location}/bin/npm install . command =
cd ${dream-repository.git:location}
PATH=${git:location}/bin:${nodejs:location}/bin:$PATH
npm install .
update_command = ${:command} update_command = ${:command}
[versions] [versions]
......
...@@ -18,4 +18,4 @@ md5sum = 6dcbe21f99aa6675e8e3b74bc9cbb0e6 ...@@ -18,4 +18,4 @@ md5sum = 6dcbe21f99aa6675e8e3b74bc9cbb0e6
[template-default] [template-default]
filename = instance-default.cfg.jinja.in filename = instance-default.cfg.jinja.in
md5sum = ffb6b74b55e7ca01666254353ae1cebe md5sum = 536a28ff250c691ca374f75aa5f0aa76
...@@ -261,7 +261,7 @@ instance-promises = ...@@ -261,7 +261,7 @@ instance-promises =
[shellinabox-frontend-listen-promise] [shellinabox-frontend-listen-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-host = $${shellinabox-frontend:hostname} config-host = $${shellinabox-frontend:hostname}
config-port = $${shellinabox-frontend:port} config-port = $${shellinabox-frontend:port}
...@@ -278,6 +278,6 @@ config-port = $${shellinabox-frontend:port} ...@@ -278,6 +278,6 @@ config-port = $${shellinabox-frontend:port}
[testnode-log-frontend-promise] [testnode-log-frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-url = $${testnode-log-frontend:connection-secure_access} config-url = $${testnode-log-frontend:connection-secure_access}
# 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
md5sum = c265bf7ec199190ba9f77960cac5da38
[template-fluentd]
filename = instance-fluentd.cfg
md5sum = 35f9d95f6a75e28bfeafc3568ca16f05
[service-fluentd]
recipe = slapos.cookbook:wrapper
wrapper-path = {{ directory['service'] }}/fluentd-service
command-line = ${fluentd:location}/bin/fluentd -v -c {{ fluentd_agent_conf }}
environment =
GEM_PATH=${fluentd:location}/lib/ruby/gems/
{% set part_list = [] -%}
{% for port in port_list -%}
{% set promise_section_title = 'fluentd-port-' ~ port ~ '-listening' -%}
{% do part_list.append(promise_section_title) -%}
[{{ promise_section_title }}]
<= monitor-promise-base
promise = check_socket_listening
name = {{ promise_section_title }}.py
config-host = $${slap-configuration:ipv6-random}
config-port = {{ port }}
{% endfor %}
[buildout]
parts =
service-fluentd
{%- for part in part_list %}
{{ part }}
{%- endfor %}
extends = ${monitor-template:output}
[buildout]
parts =
switch-softwaretype
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
default = dynamic-template-fluentd:rendered
RootSoftwareInstance = $${:default}
[directory]
recipe = slapos.cookbook:mkdirectory
home = $${buildout:directory}
etc = $${:home}/etc
var = $${:home}/var
service = $${:etc}/service
bin = $${:home}/bin
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap_connection:computer_id}
partition = $${slap_connection:partition_id}
url = $${slap_connection:server_url}
key = $${slap_connection:key_file}
cert = $${slap_connection:cert_file}
[dynamic-template-fluentd]
recipe = slapos.recipe.template:jinja2
template = ${template-fluentd:output}
rendered = $${buildout:directory}/instance-fluentd.cfg
extensions = jinja2.ext.do
context =
key fluentd_agent_conf fluentd-agent-conf:rendered
key port_list fluentd-conf:port-list
section directory directory
[fluentd-conf]
recipe = slapos.recipe.build
slapparameter-dict = $${slap-configuration:configuration}
init =
import re
options['text'] = options['slapparameter-dict'].get('conf_text') or ''
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
[buildout]
parts =
service-fluentd
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
offline = true
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap_connection:computer_id}
partition = ${slap_connection:partition_id}
url = ${slap_connection:server_url}
key = ${slap_connection:key_file}
cert = ${slap_connection:cert_file}
[directory]
recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
script = ${:etc}/run/
service = ${:etc}/service
promise = ${:etc}/promise/
log = ${:var}/log
bin = ${:home}/bin
[service-fluentd]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:service}/fluentd-service
command-line = {{ fluentd_location }}/bin/fluentd
-v
-c ${fluentd-agent-conf:rendered}
environment =
GEM_PATH={{ fluentd_location }}/lib/ruby/gems/1.8/
[fluentd-agent-conf]
recipe = slapos.recipe.template:jinja2
template = inline:{% raw -%}
{{ slapparameter_dict.get('conf_text', '') }}
{%- endraw %}
rendered = ${directory:etc}/fluentd-agent.conf
mode = 0644
context =
key slapparameter_dict instance-parameter:configuration
[buildout] [buildout]
extends = extends =
buildout.hash.cfg
../../component/fluentd/buildout.cfg ../../component/fluentd/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
../../stack/monitor/buildout.cfg
parts = parts =
instance-profile instance-profile
...@@ -10,17 +12,20 @@ parts = ...@@ -10,17 +12,20 @@ parts =
[python] [python]
part = python3 part = python3
[instance-profile] [template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template
template = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance.cfg
mode = 0644 mode = 0644
extensions = jinja2.ext.do
context = [instance-profile]
section buildout buildout < = template-base
key fluentd_location fluentd:location output = ${buildout:directory}/template.cfg
[template-fluentd]
< = template-base
output = ${buildout:directory}/template-fluentd.cfg
[fluentd] [fluentd]
gems += gems +=
fluent-plugin-wendelin==0.4 fluent-plugin-wendelin==0.5
fluent-plugin-bin==0.2 fluent-plugin-bin==0.3
...@@ -41,6 +41,7 @@ setup(name=name, ...@@ -41,6 +41,7 @@ setup(name=name,
url="https://lab.nexedi.com/nexedi/slapos", url="https://lab.nexedi.com/nexedi/slapos",
packages=find_packages(), packages=find_packages(),
install_requires=[ install_requires=[
'msgpack',
'slapos.core', 'slapos.core',
'slapos.libnetworkcache', 'slapos.libnetworkcache',
'erp5.util', 'erp5.util',
......
...@@ -25,10 +25,25 @@ ...@@ -25,10 +25,25 @@
# #
############################################################################## ##############################################################################
import msgpack
import os import os
import random
import shutil
import socket
import struct
import subprocess
import tempfile
import time
import six import six
from six.moves.SimpleHTTPServer import SimpleHTTPRequestHandler
from six.moves.socketserver import StreamRequestHandler, TCPServer
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
from slapos.testing.utils import findFreeTCPPort
FLUENTD_PORT = 24224
FLUSH_INTERVAL = 1
setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass( setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass(
...@@ -50,3 +65,218 @@ class FluentdTestCase(SlapOSInstanceTestCase): ...@@ -50,3 +65,218 @@ class FluentdTestCase(SlapOSInstanceTestCase):
for expected_process_name in expected_process_name_list: for expected_process_name in expected_process_name_list:
self.assertIn(expected_process_name, process_names) self.assertIn(expected_process_name, process_names)
class OneRequestServer(TCPServer):
address_family = socket.AF_INET6
timeout = 1
def get_first_data(self, flush_interval=1):
start = time.time()
while(not self.RequestHandlerClass.received_data
and time.time() - start < 10*flush_interval):
self.handle_request()
return self.RequestHandlerClass.received_data
class WendelinTutorialTestCase(FluentdTestCase):
@classmethod
def get_configuration(cls):
return ''
@classmethod
def getInstanceParameterDict(cls):
return {'conf_text': cls._conf,}
@classmethod
def measureDict(cls):
return {k: v.encode() for k, v in
zip((b'pressure', b'humidity', b'temperature'), cls._measurementList)}
@classmethod
def setUpClass(cls):
fluentd_dir = os.path.join(cls.computer_partition_root_path,
'software_release', 'parts', 'fluentd')
cls._fluentd_bin = os.path.join(fluentd_dir, 'bin', 'fluentd')
cls._gem_path = os.path.join(fluentd_dir, 'lib', 'ruby', 'gems')
cls._tmp_dir = tempfile.mkdtemp()
cls._measurementList = cls.sensor_value_list()
cls._conf = cls.get_configuration()
super(FluentdTestCase, cls).setUpClass()
@classmethod
def sensor_value_list(cls):
return [str(value) for value in (round(random.uniform(870, 1084), 2),
round(random.uniform(0, 100), 2),
round(random.uniform(-20, 50), 3))]
def serve(self, port, request_handler_class):
server_address = (self._ipv6_address, port)
server = OneRequestServer(server_address, request_handler_class)
data = server.get_first_data(FLUSH_INTERVAL)
server.server_close()
return data
@classmethod
def tearDownClass(cls):
shutil.rmtree(cls._tmp_dir)
super(FluentdTestCase, cls).tearDownClass()
def read_fluentd_conf(self, configuration):
conf_path = os.path.join(self._tmp_dir, 'fluentd.conf')
with open(conf_path, "w") as conf_file:
conf_file.write(configuration)
return subprocess.check_output(
[self._fluentd_bin, '-c', conf_path, '--dry-run'],
env={'GEM_PATH': self._gem_path},
universal_newlines=True,
)
def _test_configuration(self, expected_str):
self.assertRegexpMatches(
self.read_fluentd_conf(self._conf),
expected_str,
)
class FluentdHTTPRequestHandler(StreamRequestHandler):
received_data = b''
def handle(self):
data = self.rfile.readline().strip()
# ignore heartbeats (https://docs.fluentd.org/output/forward#heartbeat_type)
if len(data) > 0:
FluentdHTTPRequestHandler.received_data = data
# see https://wendelin.nexedi.com/wendelin-Learning.Track/wendelin-Tutorial.Setup.Fluentd.on.Sensor
class SensorConfTestCase(WendelinTutorialTestCase):
@classmethod
def get_configuration(cls):
script_path = os.path.join(cls._tmp_dir, "custom_read_bme280.py")
with open(script_path, "w") as script:
script.write(cls.sensor_script(cls._measurementList))
return cls.sensor_conf(script_path)
@classmethod
def sensor_conf(cls, script_path):
return '''\
<source>
@type exec
tag tag.name
command python %s
run_interval %ss
<parse>
keys pressure, humidity, temperature
</parse>
</source>
<match tag.name>
@type forward
<server>
name myserver1
host %s
</server>
<buffer>
flush_mode immediate
</buffer>
</match>''' % (script_path, FLUSH_INTERVAL, cls._ipv6_address)
@classmethod
def sensor_script(cls, measurementList):
return '''\
#!/usr/bin/python
# -*- coding: utf-8 -*-
print("%s")''' % "\t".join(measurementList)
def test_configuration(self):
self._test_configuration(
r'adding forwarding server \'myserver1\' host="%s" port=%s weight=60'
% (self._ipv6_address, FLUENTD_PORT)
)
def test_send_data(self):
tag, data, header = msgpack.unpackb(
self.serve(FLUENTD_PORT, FluentdHTTPRequestHandler),
raw=True,
)
self.assertEqual(b'tag.name', tag)
self.assertEqual(self.measureDict(), msgpack.unpackb(data)[-1])
self.assertEqual({b'compressed': b'text', b'size': 1}, header)
class WendelinHTTPRequestHandler(SimpleHTTPRequestHandler):
received_data = b''
def do_POST(self):
WendelinHTTPRequestHandler.received_data = self.rfile.read(
int(self.headers['Content-Length']))
self.send_response(200)
self.end_headers()
# see https://wendelin.nexedi.com/wendelin-Learning.Track/wendelin-Tutorial.Setup.Fluentd.on.IOTGateway
class GatewayConfTestCase(WendelinTutorialTestCase):
@classmethod
def gateway_conf(cls, fluentd_port, wendelin_port):
return '''\
<source>
@type forward
port %s
bind %s
</source>
<match tag.name>
@type wendelin
streamtool_uri http://[%s]:%s/erp5/portal_ingestion_policies/default
user foo
password bar
<buffer>
flush_mode interval
@type file
path fluentd-buffer-file/
flush_interval %ss
</buffer>
</match>''' % (fluentd_port, cls._ipv6_address, cls._ipv6_address,
wendelin_port, FLUSH_INTERVAL)
@classmethod
def get_configuration(cls):
fluentd_port = findFreeTCPPort(cls._ipv6_address)
cls._fluentd_port = fluentd_port
wendelin_port = findFreeTCPPort(cls._ipv6_address)
cls._wendelin_port = wendelin_port
return cls.gateway_conf(fluentd_port, wendelin_port)
def test_configuration_file(self):
self._test_configuration('starting fluentd')
def test_wendelin_data_forwarding(self):
sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
sock.connect((self._ipv6_address, self._fluentd_port))
data = [
msgpack.ExtType(0, struct.pack('!Q', int(time.time()) << 32)),
self.measureDict(),
]
sock.sendall(
msgpack.packb([
b'tag.name',
msgpack.packb(data),
{b'size': 1, b'compressed': b'text'},
], use_bin_type=False),
)
sock.close()
self.assertEqual(
data,
msgpack.unpackb(
self.serve(self._wendelin_port, WendelinHTTPRequestHandler)),
)
\ No newline at end of file
...@@ -54,7 +54,7 @@ md5sum = 0f1ec4077dab586cc003ae13f689eda2 ...@@ -54,7 +54,7 @@ md5sum = 0f1ec4077dab586cc003ae13f689eda2
[instance-gitlab.cfg.in] [instance-gitlab.cfg.in]
_update_hash_filename_ = instance-gitlab.cfg.in _update_hash_filename_ = instance-gitlab.cfg.in
md5sum = 6b34d4b96ae0067977fa509046d71231 md5sum = f099d01baefe41c8f0944c2437b30881
[instance-gitlab-export.cfg.in] [instance-gitlab-export.cfg.in]
_update_hash_filename_ = instance-gitlab-export.cfg.in _update_hash_filename_ = instance-gitlab-export.cfg.in
......
...@@ -430,7 +430,7 @@ tune-command = ...@@ -430,7 +430,7 @@ tune-command =
# [promise-<something>] to check <something> by url # [promise-<something>] to check <something> by url
[promise-byurl] [promise-byurl]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = ${:_buildout_section_name_}.py name = ${:_buildout_section_name_}.py
config-http-code = 200 config-http-code = 200
...@@ -472,7 +472,7 @@ depend = ...@@ -472,7 +472,7 @@ depend =
[promise-postgresql] [promise-postgresql]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = promise-postgresql.py name = promise-postgresql.py
config-command = config-command =
{{ postgresql_location }}/bin/psql \ {{ postgresql_location }}/bin/psql \
...@@ -515,7 +515,7 @@ depend = ...@@ -515,7 +515,7 @@ depend =
[promise-redis] [promise-redis]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = promise-redis.py name = promise-redis.py
config-command = ${service-redis:promise_wrapper} config-command = ${service-redis:promise_wrapper}
...@@ -769,7 +769,7 @@ depend = ...@@ -769,7 +769,7 @@ depend =
# XXX this depends on gitlab-workhorse being up # XXX this depends on gitlab-workhorse being up
# (nginx is configured to proxy all requests to gitlab-workhorse) # (nginx is configured to proxy all requests to gitlab-workhorse)
config-url = ${backend-info:url}/users/sign_in config-url = ${backend-info:url}/users/sign_in
module = check_url_available promise = check_url_available
[logrotate-entry-nginx] [logrotate-entry-nginx]
<= logrotate-entry-base <= logrotate-entry-base
......
...@@ -4,7 +4,7 @@ md5sum = 5dfeeb5eca125dcaa5f9e537f941dd41 ...@@ -4,7 +4,7 @@ md5sum = 5dfeeb5eca125dcaa5f9e537f941dd41
[instance-headless-chromium] [instance-headless-chromium]
_update_hash_filename_ = instance-headless-chromium.cfg.in _update_hash_filename_ = instance-headless-chromium.cfg.in
md5sum = fad685238b26ca20537c12ce7432e7e7 md5sum = 7392d20e48dbc599eb8e9d02e8095bbf
[template-nginx-conf] [template-nginx-conf]
_update_hash_filename_ = templates/nginx.conf.in _update_hash_filename_ = templates/nginx.conf.in
......
...@@ -174,7 +174,7 @@ monitor-httpd-port = {{ parameter_dict['monitor-httpd-port'] }} ...@@ -174,7 +174,7 @@ monitor-httpd-port = {{ parameter_dict['monitor-httpd-port'] }}
# queried with the correct credentials. # queried with the correct credentials.
[frontend-ok-promise] [frontend-ok-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = headless-chromium-frontend-ok.py name = headless-chromium-frontend-ok.py
url = ${remote-debugging-frontend:connection-secure_access} url = ${remote-debugging-frontend:connection-secure_access}
config-url = ${:url} config-url = ${:url}
...@@ -185,7 +185,7 @@ config-password = ${frontend-instance-password:passwd} ...@@ -185,7 +185,7 @@ config-password = ${frontend-instance-password:passwd}
# when queried with no credentials. # when queried with no credentials.
[frontend-secure-promise] [frontend-secure-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = headless-chromium-frontend-secure.py name = headless-chromium-frontend-secure.py
url = ${remote-debugging-frontend:connection-secure_access} url = ${remote-debugging-frontend:connection-secure_access}
config-url = ${:url} config-url = ${:url}
......
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
# not need these here). # not need these here).
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = c771dee1ef9aedad7c6ebf9418afe08e md5sum = 483b76d8e6bf72d72a38a3f7bf66fe08
...@@ -87,7 +87,7 @@ wrapper-path = ${directory:service}/helloweb-${:kind} ...@@ -87,7 +87,7 @@ wrapper-path = ${directory:service}/helloweb-${:kind}
# promise, that checks that helloweb service is alive # promise, that checks that helloweb service is alive
[helloweb-promise] [helloweb-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = helloweb-${:kind}.py name = helloweb-${:kind}.py
{# macro to instantiate service of `kind` to listen on `port` #} {# macro to instantiate service of `kind` to listen on `port` #}
......
...@@ -21,7 +21,7 @@ md5sum = 9e486efe4ab1aba8cb72b04f6c6da8ad ...@@ -21,7 +21,7 @@ md5sum = 9e486efe4ab1aba8cb72b04f6c6da8ad
[instance_html5as] [instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in _update_hash_filename_ = instance_html5as.cfg.in
md5sum = 283440057c659bde2ae7fcc2c4c5b781 md5sum = f86b2f37c0acd21ca1f41d90c5477d75
[template_nginx_conf] [template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in _update_hash_filename_ = templates/nginx_conf.in
......
...@@ -185,7 +185,7 @@ context = ...@@ -185,7 +185,7 @@ context =
# Port Listening checking promise # Port Listening checking promise
[port-listening-promise] [port-listening-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = nginx-port-listening.py name = nginx-port-listening.py
config-host = ${html5as:ip} config-host = ${html5as:ip}
config-port = ${html5as:port} config-port = ${html5as:port}
...@@ -235,7 +235,7 @@ return = domain secure_access ...@@ -235,7 +235,7 @@ return = domain secure_access
# Add a promise to make sure the cdn is properly configured # Add a promise to make sure the cdn is properly configured
[html5as-frontend-promise] [html5as-frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = html5as-http-frontend.py name = html5as-http-frontend.py
url = ${html5as-frontend:connection-secure_access} url = ${html5as-frontend:connection-secure_access}
config-url = ${:url} config-url = ${:url}
...@@ -22,7 +22,7 @@ md5sum = 87781e6bcb523bb8434888d5f984f36c ...@@ -22,7 +22,7 @@ md5sum = 87781e6bcb523bb8434888d5f984f36c
[template-validator] [template-validator]
filename = instance-validator.cfg.in filename = instance-validator.cfg.in
md5sum = 9d12472bb2e337d3cc18f2cc6f235425 md5sum = dc8b8d03b0af9cd32398d1fe86267bb7
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
......
...@@ -55,7 +55,7 @@ scheme = https ...@@ -55,7 +55,7 @@ scheme = https
[tomcat-listen-promise] [tomcat-listen-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = tomcat_listen.py name = tomcat_listen.py
config-host = $${tomcat-configuration:ip} config-host = $${tomcat-configuration:ip}
config-port = $${tomcat-configuration:port} config-port = $${tomcat-configuration:port}
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[template-cfg] [template-cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 9653104b2217dc26b23f9c1b997124ca md5sum = 2e4bed8c7b78c410b28f8becf81da596
[template_nginx_conf] [template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in _update_hash_filename_ = templates/nginx_conf.in
......
...@@ -124,7 +124,7 @@ hash-files = ...@@ -124,7 +124,7 @@ hash-files =
[hugo-port-listening-promise] [hugo-port-listening-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = hugo-port-listening.py name = hugo-port-listening.py
config-host = ${hugo:ip} config-host = ${hugo:ip}
config-port = ${hugo:hugo-port} config-port = ${hugo:hugo-port}
...@@ -144,7 +144,7 @@ return = domain secure_access ...@@ -144,7 +144,7 @@ return = domain secure_access
[hugo-frontend-promise] [hugo-frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = hugo-http-frontend.py name = hugo-http-frontend.py
url = ${hugo-frontend:connection-secure_access} url = ${hugo-frontend:connection-secure_access}
config-url = ${:url} config-url = ${:url}
...@@ -212,7 +212,7 @@ template = ...@@ -212,7 +212,7 @@ template =
[nginx-port-listening-promise] [nginx-port-listening-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = nginx-port-listening.py name = nginx-port-listening.py
config-host = ${hugo:ip} config-host = ${hugo:ip}
config-port = ${hugo:nginx-port} config-port = ${hugo:nginx-port}
...@@ -238,7 +238,7 @@ return = domain secure_access ...@@ -238,7 +238,7 @@ return = domain secure_access
[nginx-frontend-promise] [nginx-frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = nginx-http-frontend.py name = nginx-http-frontend.py
url = ${nginx-frontend:connection-secure_access} url = ${nginx-frontend:connection-secure_access}
config-url = ${:url} config-url = ${:url}
......
...@@ -19,7 +19,7 @@ md5sum = 6c17361a49cfc47564063b867aab6e8c ...@@ -19,7 +19,7 @@ md5sum = 6c17361a49cfc47564063b867aab6e8c
[template-jscrawler] [template-jscrawler]
filename = instance-jscrawler.cfg.jinja2.in filename = instance-jscrawler.cfg.jinja2.in
md5sum = f61e0507717447e47c76a2b2712f17f4 md5sum = 33bfddbc23fa794ab97770ef7776b390
[template-jscrawler-builder] [template-jscrawler-builder]
filename = template-jscrawler.builder.sh.in filename = template-jscrawler.builder.sh.in
......
...@@ -47,7 +47,7 @@ return = secure_access domain ...@@ -47,7 +47,7 @@ return = secure_access domain
[jscrawler-frontend-promise] [jscrawler-frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = jscrawler_frontend.py name = jscrawler_frontend.py
config-url = ${request-jscrawler-frontend:connection-secure_access} config-url = ${request-jscrawler-frontend:connection-secure_access}
...@@ -59,7 +59,7 @@ log = ${httpd-wrapper:log-file} ...@@ -59,7 +59,7 @@ log = ${httpd-wrapper:log-file}
[httpd-listen-promise] [httpd-listen-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = httpd-listen.py name = httpd-listen.py
config-host = ${httpd-wrapper:host} config-host = ${httpd-wrapper:host}
config-port = ${httpd-wrapper:port} config-port = ${httpd-wrapper:port}
......
...@@ -30,7 +30,7 @@ parts = ...@@ -30,7 +30,7 @@ parts =
instance instance
[nodejs] [nodejs]
<= nodejs-8.6.0 <= nodejs-14.16.0
[eggs] [eggs]
recipe = zc.recipe.egg recipe = zc.recipe.egg
......
...@@ -19,7 +19,7 @@ md5sum = de37ec3d4adb0be4c67bcc7397f27c91 ...@@ -19,7 +19,7 @@ md5sum = de37ec3d4adb0be4c67bcc7397f27c91
[instance-jupyter] [instance-jupyter]
filename = instance-jupyter.cfg.in filename = instance-jupyter.cfg.in
md5sum = cbc90e517ae3680ab8bef04c6f503af5 md5sum = 95e3da48abdd257fb9d5dbdf14ea87b9
[jupyter-notebook-config] [jupyter-notebook-config]
filename = jupyter_notebook_config.py.jinja filename = jupyter_notebook_config.py.jinja
......
...@@ -146,7 +146,7 @@ sla-instance_guid = ${slap-parameter:frontend-instance-guid} ...@@ -146,7 +146,7 @@ sla-instance_guid = ${slap-parameter:frontend-instance-guid}
[frontend-promise] [frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = frontend_promise.py name = frontend_promise.py
config-url = ${publish-connection-parameter:url} config-url = ${publish-connection-parameter:url}
...@@ -160,7 +160,7 @@ sla-instance_guid = ${slap-parameter:frontend-additional-instance-guid} ...@@ -160,7 +160,7 @@ sla-instance_guid = ${slap-parameter:frontend-additional-instance-guid}
[frontend-additional-promise] [frontend-additional-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = frontend_additional_promise.py name = frontend_additional_promise.py
config-url = ${publish-connection-parameter:url-additional} config-url = ${publish-connection-parameter:url-additional}
{% endif %} {% endif %}
......
...@@ -19,7 +19,7 @@ md5sum = b129c9b2a614563d3f7c3f9e906d59f2 ...@@ -19,7 +19,7 @@ md5sum = b129c9b2a614563d3f7c3f9e906d59f2
[template-kvm] [template-kvm]
filename = instance-kvm.cfg.jinja2 filename = instance-kvm.cfg.jinja2
md5sum = d0f96be4e80b96e6ac33f6d474767b13 md5sum = 78c3b69a2b18106cd6e289732116881d
[template-kvm-cluster] [template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in filename = instance-kvm-cluster.cfg.jinja2.in
...@@ -27,11 +27,11 @@ md5sum = 59b92e1300aad4e9b116c532caf7d042 ...@@ -27,11 +27,11 @@ md5sum = 59b92e1300aad4e9b116c532caf7d042
[template-kvm-resilient] [template-kvm-resilient]
filename = instance-kvm-resilient.cfg.jinja2 filename = instance-kvm-resilient.cfg.jinja2
md5sum = 7de5756f59ef7d823cd8ed33e6d15230 md5sum = a0fd4911401cbbda74323e8d1c7b18ad
[template-kvm-import] [template-kvm-import]
filename = instance-kvm-import.cfg.jinja2.in filename = instance-kvm-import.cfg.jinja2.in
md5sum = 7b15fdc6f19b1f44ff5a56586102ffe2 md5sum = 0415353c961ece593dd5d6457dab5200
[template-kvm-import-script] [template-kvm-import-script]
filename = template/kvm-import.sh.jinja2 filename = template/kvm-import.sh.jinja2
...@@ -47,7 +47,7 @@ md5sum = b617d64de73de1eed518185f310bbc82 ...@@ -47,7 +47,7 @@ md5sum = b617d64de73de1eed518185f310bbc82
[template-nbd] [template-nbd]
filename = instance-nbd.cfg.jinja2 filename = instance-nbd.cfg.jinja2
md5sum = 259e06f289f68297e0609e4ab1af8e86 md5sum = 4bcb07c1a9223e2d956651aa25d23654
[template-ansible-promise] [template-ansible-promise]
filename = template/ansible-promise.in filename = template/ansible-promise.in
...@@ -75,7 +75,7 @@ md5sum = fb330a796fadb6cd5c85217f80a42af3 ...@@ -75,7 +75,7 @@ md5sum = fb330a796fadb6cd5c85217f80a42af3
[template-httpd] [template-httpd]
filename = instance-kvm-http.cfg.in filename = instance-kvm-http.cfg.in
md5sum = f4bcde62e008c2da9c65617ba7f73f08 md5sum = d57764bb7135037b4d21543b2f56ce1d
[image-download-controller] [image-download-controller]
_update_hash_filename_ = template/image-download-controller.py _update_hash_filename_ = template/image-download-controller.py
......
...@@ -474,9 +474,15 @@ ...@@ -474,9 +474,15 @@
"oneOf": [ "oneOf": [
{ {
"const": [ "const": [
"https://shacache.nxdcdn.com/0a6aee1d9aafc1ed095105c052f9fdd65ed00ea9274188c9cd0072c8e6838ab40e246d45a1e6956d74ef1b04a1fc042151762f25412e9ff0cbf49418eef7992e#a3ebc76aec372808ad80000108a2593a" "https://shacache.nxdcdn.com/02257c3ec27e45d9f022c181a69b59da67e5c72871cdb4f9a69db323a1fad58093f2e69702d29aa98f5f65e920e0b970d816475a5a936e1f3bf33832257b7e92#b710c178eb434d79ce40ce703d30a5f0"
], ],
"title": "Debian Buster 10.5 netinst x86_64" "title": "Debian Bullseye 11.1 netinst x86_64"
},
{
"const": [
"https://shacache.nxdcdn.com/d82b0510fd919c2a851ee93ea0f7ad6779bfa597297a5c7463b63746799f001321ec4c9b8ba6cfe20248dd2da28100ad3b78e74489a8c0c573238f226a509a9d#9d7b9cc850464d60ac174787c53e8f3f"
],
"title": "Debian Buster 10.11 netinst x86_64"
}, },
{ {
"const": [ "const": [
......
...@@ -65,7 +65,7 @@ stop-on-error = true ...@@ -65,7 +65,7 @@ stop-on-error = true
[httpd-promise] [httpd-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = apache-httpd.py name = apache-httpd.py
config-host = ${apache-conf:ip} config-host = ${apache-conf:ip}
config-port = ${apache-conf:port} config-port = ${apache-conf:port}
...@@ -91,6 +91,6 @@ mode = 700 ...@@ -91,6 +91,6 @@ mode = 700
[kvm-disk-image-corruption-promise] [kvm-disk-image-corruption-promise]
# Check that disk image is not corrupted # Check that disk image is not corrupted
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = kvm-disk-image-corruption.py name = kvm-disk-image-corruption.py
config-command = ${kvm-disk-image-corruption-bin:output} config-command = ${kvm-disk-image-corruption-bin:output}
...@@ -102,13 +102,13 @@ mode = 700 ...@@ -102,13 +102,13 @@ mode = 700
[kvm-frontend-url-promise] [kvm-frontend-url-promise]
# Check that url parameter is complete # Check that url parameter is complete
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = kvm-frontend-url.py name = kvm-frontend-url.py
config-command = ${kvm-frontend-url-bin:output} config-command = ${kvm-frontend-url-bin:output}
[kvm-backend-url-promise] [kvm-backend-url-promise]
# Check that backend url is reachable # Check that backend url is reachable
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = frontend_promise.py name = frontend_promise.py
config-url = ${publish-connection-information:url} config-url = ${publish-connection-information:url}
...@@ -91,7 +91,7 @@ bytes = 8 ...@@ -91,7 +91,7 @@ bytes = 8
## boot-image-url-select support BEGIN ## boot-image-url-select support BEGIN
[empty-file-state-base-select-promise] [empty-file-state-base-select-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_file_state promise = check_file_state
name = ${:_buildout_section_name_}.py name = ${:_buildout_section_name_}.py
config-state = empty config-state = empty
# It's very hard to put the username and password correctly, after schema:// # It's very hard to put the username and password correctly, after schema://
...@@ -190,7 +190,7 @@ config-filename = ${boot-image-url-select-download-wrapper:error-state-file} ...@@ -190,7 +190,7 @@ config-filename = ${boot-image-url-select-download-wrapper:error-state-file}
## boot-image-url-list support BEGIN ## boot-image-url-list support BEGIN
[empty-file-state-base-list-promise] [empty-file-state-base-list-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_file_state promise = check_file_state
name = ${:_buildout_section_name_}.py name = ${:_buildout_section_name_}.py
config-state = empty config-state = empty
# It's very hard to put the username and password correctly, after schema:// # It's very hard to put the username and password correctly, after schema://
...@@ -289,7 +289,7 @@ config-filename = ${boot-image-url-list-download-wrapper:error-state-file} ...@@ -289,7 +289,7 @@ config-filename = ${boot-image-url-list-download-wrapper:error-state-file}
## virtual-hard-drive-url support BEGIN ## virtual-hard-drive-url support BEGIN
[empty-file-state-base-virtual-promise] [empty-file-state-base-virtual-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_file_state promise = check_file_state
name = ${:_buildout_section_name_}.py name = ${:_buildout_section_name_}.py
config-state = empty config-state = empty
# It's very hard to put the username and password correctly, after schema:// # It's very hard to put the username and password correctly, after schema://
...@@ -586,7 +586,7 @@ command-line = ${kvm-controller:rendered} ...@@ -586,7 +586,7 @@ command-line = ${kvm-controller:rendered}
[kvm-vnc-promise] [kvm-vnc-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = vnc_promise.py name = vnc_promise.py
config-host = ${kvm-parameter-dict:vnc-ip} config-host = ${kvm-parameter-dict:vnc-ip}
config-port = ${kvm-parameter-dict:vnc-port} config-port = ${kvm-parameter-dict:vnc-port}
...@@ -614,7 +614,7 @@ mode = 700 ...@@ -614,7 +614,7 @@ mode = 700
[kvm-disk-image-corruption-promise] [kvm-disk-image-corruption-promise]
# Check that disk image is not corrupted # Check that disk image is not corrupted
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = kvm-disk-image-corruption.py name = kvm-disk-image-corruption.py
config-command = ${kvm-disk-image-corruption-bin:output} config-command = ${kvm-disk-image-corruption-bin:output}
...@@ -643,7 +643,7 @@ context = ...@@ -643,7 +643,7 @@ context =
[kvm-started-promise] [kvm-started-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = qemu-virtual-machine-is-ready.py name = qemu-virtual-machine-is-ready.py
config-command = ${kvm-started-bin:rendered} config-command = ${kvm-started-bin:rendered}
...@@ -708,7 +708,7 @@ wrapper = ${directory:bin}/websockify ...@@ -708,7 +708,7 @@ wrapper = ${directory:bin}/websockify
[novnc-promise] [novnc-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = novnc_promise.py name = novnc_promise.py
config-host = ${novnc-instance:ip} config-host = ${novnc-instance:ip}
config-port = ${novnc-instance:port} config-port = ${novnc-instance:port}
...@@ -764,7 +764,7 @@ sla-instance_guid = ${slap-parameter:frontend-instance-guid} ...@@ -764,7 +764,7 @@ sla-instance_guid = ${slap-parameter:frontend-instance-guid}
[frontend-promise] [frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = frontend_promise.py name = frontend_promise.py
config-url = ${publish-connection-information:url} config-url = ${publish-connection-information:url}
...@@ -778,7 +778,7 @@ sla-instance_guid = ${slap-parameter:frontend-additional-instance-guid} ...@@ -778,7 +778,7 @@ sla-instance_guid = ${slap-parameter:frontend-additional-instance-guid}
[frontend-additional-promise] [frontend-additional-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = frontend_additional_promise.py name = frontend_additional_promise.py
config-url = ${publish-connection-information:url-additional} config-url = ${publish-connection-information:url-additional}
{% endif %} {% endif %}
...@@ -801,7 +801,7 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg ...@@ -801,7 +801,7 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
[httpd-promise] [httpd-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = httpd.py name = httpd.py
config-host = ${httpd:host} config-host = ${httpd:host}
config-port = ${httpd:port} config-port = ${httpd:port}
...@@ -1029,7 +1029,7 @@ context = ...@@ -1029,7 +1029,7 @@ context =
[ansible-vm-promise] [ansible-vm-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = ansible_{{ name }}.py name = ansible_{{ name }}.py
config-command = ${ansible-vm-bin:rendered} config-command = ${ansible-vm-bin:rendered}
......
...@@ -43,7 +43,7 @@ rendered = ${rootdirectory:bin}/check-nbd-running.sh ...@@ -43,7 +43,7 @@ rendered = ${rootdirectory:bin}/check-nbd-running.sh
[nbd-promise] [nbd-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = nbd_promise.py name = nbd_promise.py
config-command = ${nbd-checker-bin:rendered} config-command = ${nbd-checker-bin:rendered}
...@@ -65,7 +65,7 @@ key = ${gen-passwd:passwd} ...@@ -65,7 +65,7 @@ key = ${gen-passwd:passwd}
[onetimeupload-promise] [onetimeupload-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = onetimeupload_promise.py name = onetimeupload_promise.py
config-host = ${onetimeupload-instance:ip} config-host = ${onetimeupload-instance:ip}
config-port = ${onetimeupload-instance:port} config-port = ${onetimeupload-instance:port}
......
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 8e48fa7c66a59b3d5faf0216922a574f md5sum = 143f46b125389f39905226ec9482ce2a
...@@ -45,7 +45,7 @@ promises = ...@@ -45,7 +45,7 @@ promises =
[metabase-promise] [metabase-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-url= $${metabase-instance:url}/api/session/properties config-url= $${metabase-instance:url}/api/session/properties
...@@ -91,7 +91,7 @@ command-line = ...@@ -91,7 +91,7 @@ command-line =
[postgresql-promise] [postgresql-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = promise-postgresql.py name = promise-postgresql.py
config-command = $${postgresql-psql:wrapper-path} -c '\q' config-command = $${postgresql-psql:wrapper-path} -c '\q'
......
...@@ -18,7 +18,7 @@ md5sum = b6c2df0d4a62473d6dae26b10c0a4adc ...@@ -18,7 +18,7 @@ md5sum = b6c2df0d4a62473d6dae26b10c0a4adc
[template-monitor] [template-monitor]
_update_hash_filename_ = instance-monitor.cfg.jinja2 _update_hash_filename_ = instance-monitor.cfg.jinja2
md5sum = 165a15672fc85981f68b9af2d6253254 md5sum = f23c007d6d6aed137cfd54aaa7ba52ab
[json-test-template] [json-test-template]
_update_hash_filename_ = json-test-template.json.in.jinja2 _update_hash_filename_ = json-test-template.json.in.jinja2
...@@ -26,7 +26,7 @@ md5sum = 2eb5596544d9c341acf653d4f7ce2680 ...@@ -26,7 +26,7 @@ md5sum = 2eb5596544d9c341acf653d4f7ce2680
[template-monitor-edgetest-basic] [template-monitor-edgetest-basic]
_update_hash_filename_ = instance-monitor-edgetest-basic.cfg.jinja2 _update_hash_filename_ = instance-monitor-edgetest-basic.cfg.jinja2
md5sum = 61309a48f7b0135cba21b09247a2d8fd md5sum = 05c00ac393b50cfdef5d3bc5af93fe98
[template-monitor-edgetest] [template-monitor-edgetest]
_update_hash_filename_ = instance-monitor-edgetest.cfg.jinja2 _update_hash_filename_ = instance-monitor-edgetest.cfg.jinja2
...@@ -34,7 +34,7 @@ md5sum = 3c8ab4e78f66c974eb95afc595a13514 ...@@ -34,7 +34,7 @@ md5sum = 3c8ab4e78f66c974eb95afc595a13514
[template-monitor-edgebot] [template-monitor-edgebot]
_update_hash_filename_ = instance-monitor-edgebot.cfg.jinja2 _update_hash_filename_ = instance-monitor-edgebot.cfg.jinja2
md5sum = 2ac74559d6108ca0dbabb872f1071e44 md5sum = 436bb5251c8f1cd1e64bd5d3987d699c
[network-bench-cfg] [network-bench-cfg]
filename = network_bench.cfg.in filename = network_bench.cfg.in
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
{%- set safe_name = part_id.replace('_', '').replace('.', '-').replace(' ', '-') %} {%- set safe_name = part_id.replace('_', '').replace('.', '-').replace(' ', '-') %}
[{{part_id}}] [{{part_id}}]
<= monitor-promise-base <= monitor-promise-base
module = check_surykatka_json promise = check_surykatka_json
name = {{ safe_name }}.py name = {{ safe_name }}.py
config-report = http_query config-report = http_query
config-url = {{ slave['url'] }} config-url = {{ slave['url'] }}
...@@ -51,7 +51,7 @@ config-json-file = ${surykatka-config-{{ class }}:json} ...@@ -51,7 +51,7 @@ config-json-file = ${surykatka-config-{{ class }}:json}
[surykatka-bot-promise-{{ class }}] [surykatka-bot-promise-{{ class }}]
<= monitor-promise-base <= monitor-promise-base
module = check_surykatka_json promise = check_surykatka_json
name = surykatka-bot-promise-{{ class }}.py name = surykatka-bot-promise-{{ class }}.py
config-report = bot_status config-report = bot_status
config-json-file = ${surykatka-config-{{ class }}:json} config-json-file = ${surykatka-config-{{ class }}:json}
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
{%- do PART_LIST.append(part_name) %} {%- do PART_LIST.append(part_name) %}
[{{part_name}}] [{{part_name}}]
<= monitor-promise-base <= monitor-promise-base
module = check_surykatka_json promise = check_surykatka_json
name = {{ promise_name }}.py name = {{ promise_name }}.py
config-report = http_query config-report = http_query
config-url = {{ url }} config-url = {{ url }}
...@@ -75,7 +75,7 @@ config-json-file = ${surykatka-config-{{ class }}:json} ...@@ -75,7 +75,7 @@ config-json-file = ${surykatka-config-{{ class }}:json}
{%- do PART_LIST.append('surykatka-bot-%i-promise' % (class,)) %} {%- do PART_LIST.append('surykatka-bot-%i-promise' % (class,)) %}
[surykatka-bot-{{ class }}-promise] [surykatka-bot-{{ class }}-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_surykatka_json promise = check_surykatka_json
name = surykatka-bot-{{ class }}.py name = surykatka-bot-{{ class }}.py
config-report = bot_status config-report = bot_status
config-json-file = ${surykatka-config-{{ class }}:json} config-json-file = ${surykatka-config-{{ class }}:json}
...@@ -110,7 +110,7 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg ...@@ -110,7 +110,7 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
{%- do PART_LIST.append('surykatka-json-%i-promise'% (class,)) %} {%- do PART_LIST.append('surykatka-json-%i-promise'% (class,)) %}
[surykatka-json-{{ class }}-promise] [surykatka-json-{{ class }}-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_file_state promise = check_file_state
name = surykatka-json-{{ class }}.py name = surykatka-json-{{ class }}.py
config-filename = ${surykatka-config-{{ class }}:json} config-filename = ${surykatka-config-{{ class }}:json}
config-state = not-empty config-state = not-empty
......
...@@ -82,7 +82,7 @@ wrapper-path = ${monitor-directory:bin}/monitor-collect-csv-dump ...@@ -82,7 +82,7 @@ wrapper-path = ${monitor-directory:bin}/monitor-collect-csv-dump
[monitor-check-memory-usage] [monitor-check-memory-usage]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-computer-memory-usage.py 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 config-command = {{ buildout_bin}}/check-computer-memory -db ${monitor-instance-parameter:collector-db} --threshold ${slap-parameter:memory-percent-threshold} --unit percent
...@@ -90,11 +90,8 @@ config-command = {{ buildout_bin}}/check-computer-memory -db ${monitor-instance- ...@@ -90,11 +90,8 @@ config-command = {{ buildout_bin}}/check-computer-memory -db ${monitor-instance-
recipe = slapos.cookbook:promise.plugin recipe = slapos.cookbook:promise.plugin
eggs = eggs =
slapos.toolbox slapos.toolbox
file = ${monitor-conf-parameters:promise-output-file} module = slapos.promise.plugin.check_server_cpu_load
content =
from slapos.promise.plugin.check_server_cpu_load import RunPromise
output = ${directory:plugins}/system-CPU-load-check.py output = ${directory:plugins}/system-CPU-load-check.py
mode = 600
config-cpu-load-threshold = ${slap-parameter:cpu-load-threshold} config-cpu-load-threshold = ${slap-parameter:cpu-load-threshold}
[publish-connection-information] [publish-connection-information]
......
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
# not need these here). # not need these here).
[template-instance] [template-instance]
filename = instance.cfg filename = instance.cfg
md5sum = 0974248c0b0ad5da45670386a5301e47 md5sum = 14132bba14a1e66e7abb1a7c58b333e5
...@@ -76,7 +76,7 @@ command-line = sudo -V ...@@ -76,7 +76,7 @@ command-line = sudo -V
[promise-sudo-on-host] [promise-sudo-on-host]
# assert sudo is installed, as it is required to enter the chroot 'cros_sdk' # assert sudo is installed, as it is required to enter the chroot 'cros_sdk'
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = ${:_buildout_section_name_}.py name = ${:_buildout_section_name_}.py
config-command = ${promise-sudo-on-host-bin:wrapper-path} config-command = ${promise-sudo-on-host-bin:wrapper-path}
......
...@@ -22,7 +22,7 @@ md5sum = c13b4f1a5aa526a8d3f8e02bf6baf785 ...@@ -22,7 +22,7 @@ md5sum = c13b4f1a5aa526a8d3f8e02bf6baf785
[instance-neo-admin] [instance-neo-admin]
filename = instance-neo-admin.cfg.in filename = instance-neo-admin.cfg.in
md5sum = dabc1e50475055b3ee9184dcace5e8d2 md5sum = b6e1ccb1d90160110202e5111eec2afa
[instance-neo-master] [instance-neo-master]
filename = instance-neo-master.cfg.in filename = instance-neo-master.cfg.in
......
...@@ -18,7 +18,7 @@ plugin = ${:etc}/plugin ...@@ -18,7 +18,7 @@ plugin = ${:etc}/plugin
[monitor-neo-health] [monitor-neo-health]
<= monitor-promise-base <= monitor-promise-base
module = check_neo_health promise = check_neo_health
name = ${:_buildout_section_name_}.py name = ${:_buildout_section_name_}.py
config-neoctl = ${neoctl:wrapper-path} config-neoctl = ${neoctl:wrapper-path}
{%- if bang_on_problem != None %} {%- if bang_on_problem != None %}
......
...@@ -26,4 +26,4 @@ md5sum = 6f42f0a8c5e5c0c657541a65c4d9ee57 ...@@ -26,4 +26,4 @@ md5sum = 6f42f0a8c5e5c0c657541a65c4d9ee57
[template-nextcloud-instance] [template-nextcloud-instance]
filename = nextcloud-instance.cfg.in filename = nextcloud-instance.cfg.in
md5sum = 86a92f542e516ac92802908b85354073 md5sum = 05f946a6523677e5dcf80e9fad230d1c
...@@ -28,7 +28,7 @@ depend = ...@@ -28,7 +28,7 @@ depend =
[redis-promise] [redis-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = redis.py name = redis.py
config-command = ${service-redis:promise_wrapper} config-command = ${service-redis:promise_wrapper}
...@@ -106,7 +106,7 @@ depends = ...@@ -106,7 +106,7 @@ depends =
[nextcloud-install-promise] [nextcloud-install-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-nextcloud-install.py name = check-nextcloud-install.py
config-command = ${nc-install-wrapper:output} config-command = ${nc-install-wrapper:output}
......
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = f9b6d01e29f2edddd9d6f99591976c33 md5sum = 56e986c74ef236f261834c57f5861ce0
[template-nginx-configuration] [template-nginx-configuration]
filename = template-nginx.cfg.in filename = template-nginx.cfg.in
......
...@@ -75,7 +75,7 @@ promises = ...@@ -75,7 +75,7 @@ promises =
[nginx-available-promise] [nginx-available-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-url = $${nginx-configuration:base-url}/status config-url = $${nginx-configuration:base-url}/status
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = c962079a88a6ce97d8ce20fa4e8edfd1 md5sum = de38ed0348a9d50e01dbf383a661d53e
[tomcat-server-xml] [tomcat-server-xml]
filename = server.xml.in filename = server.xml.in
......
...@@ -87,7 +87,7 @@ instance-promises = ...@@ -87,7 +87,7 @@ instance-promises =
[tomcat-listen-promise] [tomcat-listen-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-host = $${tomcat-instance:ip} config-host = $${tomcat-instance:ip}
config-port = $${tomcat-instance:port} config-port = $${tomcat-instance:port}
......
...@@ -18,15 +18,15 @@ md5sum = fddea033e1aa9d6147a1a47bd7cc4b62 ...@@ -18,15 +18,15 @@ md5sum = fddea033e1aa9d6147a1a47bd7cc4b62
[template-powerdns] [template-powerdns]
filename = instance-powerdns.cfg filename = instance-powerdns.cfg
md5sum = c04c3b490e7f9f35af3d204a9df51f35 md5sum = a6fcfcef942cd9b57c2b0c69e318362c
[template-pdns-configuration] [template-pdns-configuration]
_update_hash_filename_ = template/pdns.conf.jinja2 _update_hash_filename_ = template/pdns.conf.jinja2
md5sum = 20c37ea06a8fa405bc02470d5115fd11 md5sum = 851353e1d4dd562ace58b3345c2da515
[template-dns-replicate] [template-dns-replicate]
_update_hash_filename_ = instance-powerdns-replicate.cfg.jinja2 _update_hash_filename_ = instance-powerdns-replicate.cfg.jinja2
md5sum = 4ff993a39da03d9d66d7c0f98efeb1e0 md5sum = 5b4b46136c6547c27508c4789ac5d0ee
[iso-list] [iso-list]
_update_hash_filename_ = template/zz.countries.nexedi.dk.rbldnsd _update_hash_filename_ = template/zz.countries.nexedi.dk.rbldnsd
...@@ -34,4 +34,4 @@ md5sum = c4dc8c141d81b92d92cdb82ca67a13ee ...@@ -34,4 +34,4 @@ md5sum = c4dc8c141d81b92d92cdb82ca67a13ee
[template-zones-file] [template-zones-file]
_update_hash_filename_ = template/zones-file.yml.jinja2 _update_hash_filename_ = template/zones-file.yml.jinja2
md5sum = 612de569ac3d1e8cc10b830683ff92ae md5sum = 1fab79102f296a1259ce4ac9d054be9f
...@@ -66,14 +66,14 @@ name = {{dns_name}} ...@@ -66,14 +66,14 @@ name = {{dns_name}}
state = {{ slapparameter_dict.pop(state_key) }} state = {{ slapparameter_dict.pop(state_key) }}
{% endif%} {% endif%}
config-supported-zone-list = {{ ' '.join(supported_zone_list) }} config-supported-zone-list = {{ ' '.join(supported_zone_list) }}
config-soa = {{ "%s,%s" % (dns_domain, server_admin) }} config-soa = {{ "%s,%s,0,10800,3600,604800,3600" % (dns_domain, server_admin) }}
{% for parameter in sla_parameters -%} {% for parameter in sla_parameters -%}
sla-{{ parameter }} = {{ slapparameter_dict.pop( sla_key + parameter ) }} sla-{{ parameter }} = {{ slapparameter_dict.pop( sla_key + parameter ) }}
{% endfor -%} {% endfor -%}
[{{promise_section_title}}] [{{promise_section_title}}]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = {{promise_section_title}}.py name = {{promise_section_title}}.py
config-host = {{ '${' ~ request_section_title ~ ':connection-powerdns-ipv6}' }} config-host = {{ '${' ~ request_section_title ~ ':connection-powerdns-ipv6}' }}
config-port = {{ '${' ~ request_section_title ~ ':connection-powerdns-port}' }} config-port = {{ '${' ~ request_section_title ~ ':connection-powerdns-port}' }}
......
...@@ -137,7 +137,7 @@ extra-context = ...@@ -137,7 +137,7 @@ extra-context =
# Promises # Promises
[pdns-promise-listen-port] [pdns-promise-listen-port]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = pdns-port-listening.py name = pdns-port-listening.py
config-host = $${pdns:ipv4} config-host = $${pdns:ipv4}
config-port = $${pdns:port} config-port = $${pdns:port}
......
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# Configure ip/port binding # Configure ip/port binding
local-address={{ pdns.get('ipv4') }} local-address={{ pdns.get('ipv4') }}, {{ pdns.get('ipv6') }}
local-ipv6={{ pdns.get('ipv6') }}
local-port={{ pdns.get('port') }} local-port={{ pdns.get('port') }}
...@@ -48,4 +47,4 @@ edns-subnet-processing=yes ...@@ -48,4 +47,4 @@ edns-subnet-processing=yes
geoip-database-files={{ geo['database'] }} geoip-database-files={{ geo['database'] }}
geoip-zones-file={{ geo['zones-file'] }} geoip-zones-file={{ geo['zones-file'] }}
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
\ No newline at end of file
...@@ -22,7 +22,7 @@ domains: ...@@ -22,7 +22,7 @@ domains:
# Note: For each domain, one record of the domain name MUST exist with a soa record. # Note: For each domain, one record of the domain name MUST exist with a soa record.
records: records:
{{ zone }}: {{ zone }}:
- soa: {{ slapparameter_dict.get('soa', 'ns0.example.com,admin@example.com').replace(',', ' ') }} - soa: {{ slapparameter_dict.get('soa', 'ns0.example.com,admin@example.com,0,10800,3600,604800,3600').replace(',', ' ') }}
{%- for ns in slapparameter_dict.get('ns-record', 'ns0.example.com,ns1.example.com').split(',') %} {%- for ns in slapparameter_dict.get('ns-record', 'ns0.example.com,ns1.example.com').split(',') %}
- ns: {{ ns }} - ns: {{ ns }}
{%- endfor %} {%- endfor %}
......
...@@ -19,7 +19,7 @@ md5sum = efb4238229681447aa7fe73898dffad4 ...@@ -19,7 +19,7 @@ md5sum = efb4238229681447aa7fe73898dffad4
[instance-default] [instance-default]
filename = instance-default.cfg.in filename = instance-default.cfg.in
md5sum = c6dce31a36e4e13de62687e9888aeb77 md5sum = f6c583d24940a3a6838bd421dbb84a20
[proftpd-config-file] [proftpd-config-file]
filename = proftpd-config-file.cfg.in filename = proftpd-config-file.cfg.in
......
...@@ -86,7 +86,7 @@ template = inline:{{ slapparameter_dict['ssh-key'] | indent }} ...@@ -86,7 +86,7 @@ template = inline:{{ slapparameter_dict['ssh-key'] | indent }}
[proftpd-listen-promise] [proftpd-listen-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = ${:_buildout_section_name_}.py name = ${:_buildout_section_name_}.py
config-host = ${proftpd:ipv6} config-host = ${proftpd:ipv6}
config-port = ${proftpd:sftp-port} config-port = ${proftpd:sftp-port}
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 500b773d1a63a6a895f9b8038a582b05 md5sum = 9c4336f1f5143d3281c6706ff14abdd3
...@@ -33,7 +33,7 @@ pureftpd-dir = ${:srv}/pureftpd/ ...@@ -33,7 +33,7 @@ pureftpd-dir = ${:srv}/pureftpd/
[check-port-listening-promise] [check-port-listening-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = check_nginx_port.py name = check_nginx_port.py
[pureftpd-listen-promise] [pureftpd-listen-promise]
......
...@@ -18,7 +18,7 @@ md5sum = 71531ed9c9b79fa769ab367e7ea2d2a5 ...@@ -18,7 +18,7 @@ md5sum = 71531ed9c9b79fa769ab367e7ea2d2a5
[template-re6stnet] [template-re6stnet]
filename = instance-re6stnet.cfg.in filename = instance-re6stnet.cfg.in
md5sum = 870c34cf58acaaee21c71182dd3cb0cf md5sum = 98f86d2a10d909215ae88ba6a602da27
[template-apache-conf] [template-apache-conf]
filename = apache.conf.in filename = apache.conf.in
......
...@@ -170,14 +170,14 @@ context = ...@@ -170,14 +170,14 @@ context =
[re6st-registry-promise] [re6st-registry-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = re6st-registry.py name = re6st-registry.py
config-host = ${re6st-registry:ipv4} config-host = ${re6st-registry:ipv4}
config-port = ${re6st-registry:port} config-port = ${re6st-registry:port}
[apache-registry-promise] [apache-registry-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = apache-re6st-registry.py name = apache-re6st-registry.py
config-host = ${apache-conf:ipv6} config-host = ${apache-conf:ipv6}
config-port = ${apache-conf:port} config-port = ${apache-conf:port}
......
...@@ -18,7 +18,7 @@ md5sum = 8a08be95a04f1a47098c4fdef80bdfed ...@@ -18,7 +18,7 @@ md5sum = 8a08be95a04f1a47098c4fdef80bdfed
[instance-repman.cfg] [instance-repman.cfg]
_update_hash_filename_ = instance-repman.cfg.jinja2.in _update_hash_filename_ = instance-repman.cfg.jinja2.in
md5sum = 839642d7a56447b3f08fa69729faca61 md5sum = 697a1b546c883da45c14dbcd2d73b2b9
[config-toml.in] [config-toml.in]
_update_hash_filename_ = templates/config.toml.in _update_hash_filename_ = templates/config.toml.in
...@@ -34,7 +34,7 @@ md5sum = 0eeb24c6aa0760f0d33c4cc2828ddf30 ...@@ -34,7 +34,7 @@ md5sum = 0eeb24c6aa0760f0d33c4cc2828ddf30
[template-mariadb.cfg] [template-mariadb.cfg]
_update_hash_filename_ = instance-mariadb.cfg.jinja2.in _update_hash_filename_ = instance-mariadb.cfg.jinja2.in
md5sum = 21a29a41768b2370d671d3086b3ef2bb md5sum = a5c204cac552754520aee0570d379723
[template-my-cnf] [template-my-cnf]
_update_hash_filename_ = templates/my.cnf.in _update_hash_filename_ = templates/my.cnf.in
......
...@@ -327,13 +327,13 @@ dash = {{ dumps(dash) }} ...@@ -327,13 +327,13 @@ dash = {{ dumps(dash) }}
[{{ section('promise-check-computer-memory') }}] [{{ section('promise-check-computer-memory') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-computer-memory.py name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
[{{ section('promise') }}] [{{ section('promise') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = mariadb.py name = mariadb.py
config-command = "{{ parameter_dict['bin-directory'] }}/is-local-tcp-port-opened" "{{ ip }}" "{{ port }}" config-command = "{{ parameter_dict['bin-directory'] }}/is-local-tcp-port-opened" "{{ ip }}" "{{ port }}"
......
...@@ -216,21 +216,21 @@ depends = ...@@ -216,21 +216,21 @@ depends =
[proxysql-{{ name }}-admin-promise] [proxysql-{{ name }}-admin-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = proxysql-{{ name }}-admin-port-listening.py name = proxysql-{{ name }}-admin-port-listening.py
config-host = {{ ipv4 }} config-host = {{ ipv4 }}
config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-admin-port}' }} config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-admin-port}' }}
[proxysql-{{ name }}-promise] [proxysql-{{ name }}-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = proxysql-{{ name }}-port-listening.py name = proxysql-{{ name }}-port-listening.py
config-host = {{ ipv4 }} config-host = {{ ipv4 }}
config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-port}' }} config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-port}' }}
[proxysql-{{ name }}-ipv6-promise] [proxysql-{{ name }}-ipv6-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = proxysql-{{ name }}-ipv6-port-listening.py name = proxysql-{{ name }}-ipv6-port-listening.py
config-host = {{ ip }} config-host = {{ ip }}
config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-port}' }} config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-port}' }}
...@@ -403,14 +403,14 @@ context = ...@@ -403,14 +403,14 @@ context =
[repman-listen-promise] [repman-listen-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = repman_service_listen.py name = repman_service_listen.py
config-host = ${repman-parameter:ipv4} config-host = ${repman-parameter:ipv4}
config-port = ${repman-parameter:port} config-port = ${repman-parameter:port}
[repman-listen-ssl-promise] [repman-listen-ssl-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = repman_service_ssl_listen.py name = repman_service_ssl_listen.py
config-host = ${repman-parameter:ipv4} config-host = ${repman-parameter:ipv4}
config-port = ${repman-parameter:secure-port} config-port = ${repman-parameter:secure-port}
...@@ -508,13 +508,13 @@ return = domain secure_access ...@@ -508,13 +508,13 @@ return = domain secure_access
[repman-frontend-promise] [repman-frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = check_repman_frontend.py name = check_repman_frontend.py
config-url = https://${repman-frontend:connection-domain} config-url = https://${repman-frontend:connection-domain}
[repman-backend-promise] [repman-backend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = check_repman_backend.py name = check_repman_backend.py
config-url = ${nginx-parameter:backend-ssl-url} config-url = ${nginx-parameter:backend-ssl-url}
......
...@@ -19,4 +19,4 @@ md5sum = 0084214fae4ee1aad2c878aa393757af ...@@ -19,4 +19,4 @@ md5sum = 0084214fae4ee1aad2c878aa393757af
[template-selenium] [template-selenium]
filename = instance-selenium.cfg.in filename = instance-selenium.cfg.in
md5sum = 884196ea35de35fa9159517912441ce6 md5sum = 35ba19f7cb4fe7fc9469611f2446c94e
...@@ -283,7 +283,7 @@ instance-promises = ...@@ -283,7 +283,7 @@ instance-promises =
[check-port-listening-promise] [check-port-listening-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
[sshd-listen-promise] [sshd-listen-promise]
...@@ -304,7 +304,7 @@ config-port = $${selenium-server-hub-instance:port} ...@@ -304,7 +304,7 @@ config-port = $${selenium-server-hub-instance:port}
# Promise waiting for all nodes to be registered # Promise waiting for all nodes to be registered
[selenium-server-hub-nodes-registered-promise] [selenium-server-hub-nodes-registered-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-command = config-command =
$${selenium-server-check-nodes-registered:rendered} $${selenium-server-hub-instance:api-url} $${:expected-node-count} $${selenium-server-check-nodes-registered:rendered} $${selenium-server-hub-instance:api-url} $${:expected-node-count}
......
...@@ -337,8 +337,8 @@ class TestFrontend(WebServerMixin, SeleniumServerTestCase): ...@@ -337,8 +337,8 @@ class TestFrontend(WebServerMixin, SeleniumServerTestCase):
class TestSSHServer(SeleniumServerTestCase): class TestSSHServer(SeleniumServerTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
cls.ssh_key = paramiko.RSAKey.generate(1024) cls.ssh_key = paramiko.ECDSAKey.generate(bits=384)
return {'ssh-authorized-key': 'ssh-rsa {}'.format(cls.ssh_key.get_base64())} return {'ssh-authorized-key': 'ecdsa-sha2-nistp384 {}'.format(cls.ssh_key.get_base64())}
def test_connect(self): def test_connect(self):
parameter_dict = self.computer_partition.getConnectionParameterDict() parameter_dict = self.computer_partition.getConnectionParameterDict()
......
...@@ -18,7 +18,7 @@ md5sum = 84f099cc9852c4f53a075dccbb3880f0 ...@@ -18,7 +18,7 @@ md5sum = 84f099cc9852c4f53a075dccbb3880f0
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = c7c0bb9abbd0f8cc6c7956d83a61c4b3 md5sum = f565956476c31881b6e51ae1c27793ad
[template-apache-backend-conf] [template-apache-backend-conf]
filename = apache-backend.conf.in filename = apache-backend.conf.in
......
...@@ -203,7 +203,7 @@ input = inline: ...@@ -203,7 +203,7 @@ input = inline:
[{{ section('apache-promise') }}] [{{ section('apache-promise') }}]
# Check any apache port in ipv4, expect other ports and ipv6 to behave consistently # Check any apache port in ipv4, expect other ports and ipv6 to behave consistently
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = apache.py name = apache.py
config-host = {{ ipv4 }} config-host = {{ ipv4 }}
config-port = {{ apache_dict.values()[0][0] }} config-port = {{ apache_dict.values()[0][0] }}
...@@ -297,13 +297,13 @@ promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }} ...@@ -297,13 +297,13 @@ promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }}
[{{ section('monitor-promise-apachedex-result') }}] [{{ section('monitor-promise-apachedex-result') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-apachedex-result.py name = check-apachedex-result.py
config-command = "{{ parameter_dict['promise-check-apachedex-result'] }}" --apachedex_path "${directory:apachedex}" --status_file ${monitor-directory:private}/apachedex.report.json --threshold "${apachedex-parameters:promise-threshold}" config-command = "{{ parameter_dict['promise-check-apachedex-result'] }}" --apachedex_path "${directory:apachedex}" --status_file ${monitor-directory:private}/apachedex.report.json --threshold "${apachedex-parameters:promise-threshold}"
[{{ section('promise-check-computer-memory') }}] [{{ section('promise-check-computer-memory') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-computer-memory.py name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
......
...@@ -17,6 +17,7 @@ changes to the code, run tests and publish changes. ...@@ -17,6 +17,7 @@ changes to the code, run tests and publish changes.
```bash ```bash
# install this software release and request an instance # install this software release and request an instance
# use software-py3.cfg instead of software.cfg if the SR you want to test is written in Python 3
SR=https://lab.nexedi.com/nexedi/slapos/raw/1.0/software/slapos-sr-testing/software.cfg SR=https://lab.nexedi.com/nexedi/slapos/raw/1.0/software/slapos-sr-testing/software.cfg
COMP=slaprunner COMP=slaprunner
INSTANCE_NAME=$COMP INSTANCE_NAME=$COMP
...@@ -32,7 +33,7 @@ slapos request --node=computer_guid=$COMP $INSTANCE_NAME $SR ...@@ -32,7 +33,7 @@ slapos request --node=computer_guid=$COMP $INSTANCE_NAME $SR
source ( environment-script from step above ) source ( environment-script from step above )
# The source code is a git clone working copy on the instance # The source code is a git clone working copy on the instance
cd ~/srv/runner/instance/slappartXXX/parts/slapos/ cd ~/srv/runner/instance/slappartXXX/software_release/parts/slapos-repository/
# change directory to the directory containing test for this software # change directory to the directory containing test for this software
cd ./software/helloworld/test/ cd ./software/helloworld/test/
......
...@@ -18,7 +18,7 @@ md5sum = 8d6878ff1d2e75010c50a1a2b0c13b24 ...@@ -18,7 +18,7 @@ md5sum = 8d6878ff1d2e75010c50a1a2b0c13b24
[template-runner] [template-runner]
filename = instance-runner.cfg filename = instance-runner.cfg
md5sum = 2a09b11c7dbade65d50e66287bf4c7b9 md5sum = 384285ab789396b6e674a8125ce2d030
[template-runner-import-script] [template-runner-import-script]
filename = template/runner-import.sh.jinja2 filename = template/runner-import.sh.jinja2
...@@ -26,7 +26,7 @@ md5sum = f2e2493bc5da90a53f86e5bcf64d2d57 ...@@ -26,7 +26,7 @@ md5sum = f2e2493bc5da90a53f86e5bcf64d2d57
[instance-runner-import] [instance-runner-import]
filename = instance-runner-import.cfg.in filename = instance-runner-import.cfg.in
md5sum = ea7667f9af952bc4bdf43aad4520759f md5sum = a4ebf6918a2c68c02898b2142357f490
[instance-runner-export] [instance-runner-export]
filename = instance-runner-export.cfg.in filename = instance-runner-export.cfg.in
......
...@@ -134,7 +134,7 @@ mode = 755 ...@@ -134,7 +134,7 @@ mode = 755
[importer-consistency-promise] [importer-consistency-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = importer-consistency-promise.py name = importer-consistency-promise.py
config-command = ${importer-consistency-promise-bin:output} config-command = ${importer-consistency-promise-bin:output}
...@@ -158,7 +158,7 @@ mode = 755 ...@@ -158,7 +158,7 @@ mode = 755
[software-release-deployment-promise] [software-release-deployment-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = software-release-deployment-promise.py name = software-release-deployment-promise.py
config-command =${software-release-deployment-bin:output} config-command =${software-release-deployment-bin:output}
......
...@@ -87,7 +87,7 @@ return = site_url domain ...@@ -87,7 +87,7 @@ return = site_url domain
[custom-frontend-promise] [custom-frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = custom_frontend_promise.py name = custom_frontend_promise.py
config-url = https://$${request-custom-frontend:connection-domain} config-url = https://$${request-custom-frontend:connection-domain}
{% if slapparameter_dict.get('custom-frontend-basic-auth') -%} {% if slapparameter_dict.get('custom-frontend-basic-auth') -%}
...@@ -111,7 +111,7 @@ template = inline: ...@@ -111,7 +111,7 @@ template = inline:
[custom-frontend-url-ready-promise] [custom-frontend-url-ready-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = custom_frontend_ready_promise.py name = custom_frontend_ready_promise.py
config-command = $${custom-frontend-url-ready-promise-bin:rendered} config-command = $${custom-frontend-url-ready-promise-bin:rendered}
...@@ -436,7 +436,7 @@ mode = 700 ...@@ -436,7 +436,7 @@ mode = 700
[apache-httpd-promise] [apache-httpd-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = $${:filename}.py name = $${:filename}.py
filename = apache-httpd-listening-on-tcp filename = apache-httpd-listening-on-tcp
config-url = $${apache-httpd:access-url} config-url = $${apache-httpd:access-url}
...@@ -537,7 +537,7 @@ return = site_url domain ...@@ -537,7 +537,7 @@ return = site_url domain
[slaprunner-frontend-promise] [slaprunner-frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = slaprunner_frontend.py name = slaprunner_frontend.py
config-url = https://$${request-frontend:connection-domain}/login config-url = https://$${request-frontend:connection-domain}/login
...@@ -556,7 +556,7 @@ return = secure_access domain ...@@ -556,7 +556,7 @@ return = secure_access domain
[httpd-frontend-promise] [httpd-frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = slaprunner-apache-http-frontend.py name = slaprunner-apache-http-frontend.py
config-url = $${request-httpd-frontend:connection-secure_access} config-url = $${request-httpd-frontend:connection-secure_access}
...@@ -619,14 +619,14 @@ monitor-password = $${monitor-publish-parameters:monitor-password} ...@@ -619,14 +619,14 @@ monitor-password = $${monitor-publish-parameters:monitor-password}
[slaprunner-promise] [slaprunner-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = slaprunner.py name = slaprunner.py
config-host = $${slaprunner:ipv6} config-host = $${slaprunner:ipv6}
config-port = $${slaprunner:runner_port} config-port = $${slaprunner:runner_port}
[runner-sshd-promise] [runner-sshd-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = runner-sshd.py name = runner-sshd.py
config-host = $${slap-network-information:global-ipv6} config-host = $${slap-network-information:global-ipv6}
config-port = $${runner-sshd-port:port} config-port = $${runner-sshd-port:port}
...@@ -863,20 +863,20 @@ log = $${runnerdirectory:home}/instance/*/.slapgrid/log/instance.log $${runnerdi ...@@ -863,20 +863,20 @@ log = $${runnerdirectory:home}/instance/*/.slapgrid/log/instance.log $${runnerdi
[supervisord-promise] [supervisord-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = supervisord.py name = supervisord.py
config-host = $${slaprunner:ipv4} config-host = $${slaprunner:ipv4}
config-port = $${supervisord:port} config-port = $${supervisord:port}
[slapos-supervisord-promise] [slapos-supervisord-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = instance_supervisord.py name = instance_supervisord.py
config-command = ${buildout:bin-directory}/slapos node supervisorctl --cfg=$${slaprunner:slapos.cfg} pid config-command = ${buildout:bin-directory}/slapos node supervisorctl --cfg=$${slaprunner:slapos.cfg} pid
[slapos-proxy-promise] [slapos-proxy-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = slaproxy.py name = slaproxy.py
config-host = $${slaprunner:ipv4} config-host = $${slaprunner:ipv4}
config-port = $${slaprunner:proxy_port} config-port = $${slaprunner:proxy_port}
......
...@@ -339,9 +339,9 @@ class TestWeb(SlaprunnerTestCase): ...@@ -339,9 +339,9 @@ class TestWeb(SlaprunnerTestCase):
class TestSSH(SlaprunnerTestCase): class TestSSH(SlaprunnerTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
cls.ssh_key_list = [paramiko.RSAKey.generate(1024) for i in range(2)] cls.ssh_key_list = [paramiko.ECDSAKey.generate(bits=384) for i in range(2)]
return { return {
'user-authorized-key': 'ssh-rsa {}\nssh-rsa {}'.format( 'user-authorized-key': 'ecdsa-sha2-nistp384 {}\necdsa-sha2-nistp384 {}'.format(
*[key.get_base64() for key in cls.ssh_key_list] *[key.get_base64() for key in cls.ssh_key_list]
) )
} }
...@@ -363,7 +363,7 @@ class TestSSH(SlaprunnerTestCase): ...@@ -363,7 +363,7 @@ class TestSSH(SlaprunnerTestCase):
username, fingerprint_from_url = ssh_info.split(';fingerprint=') username, fingerprint_from_url = ssh_info.split(';fingerprint=')
client = paramiko.SSHClient() client = paramiko.SSHClient()
self.assertTrue(fingerprint_from_url.startswith('ssh-rsa-'), '') self.assertTrue(fingerprint_from_url.startswith('ssh-rsa-'), fingerprint_from_url)
fingerprint_from_url = fingerprint_from_url[len('ssh-rsa-'):] fingerprint_from_url = fingerprint_from_url[len('ssh-rsa-'):]
class KeyPolicy(object): class KeyPolicy(object):
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[instance-theia] [instance-theia]
_update_hash_filename_ = instance-theia.cfg.jinja.in _update_hash_filename_ = instance-theia.cfg.jinja.in
md5sum = e39925b69a8bc17d17be54c075ae2f88 md5sum = f396d9a0780f4fb17016dbd32b56d7b8
[instance] [instance]
_update_hash_filename_ = instance.cfg.in _update_hash_filename_ = instance.cfg.in
...@@ -23,11 +23,11 @@ md5sum = a7d78b4002266c69ece05a476df82791 ...@@ -23,11 +23,11 @@ md5sum = a7d78b4002266c69ece05a476df82791
[instance-import] [instance-import]
_update_hash_filename_ = instance-import.cfg.jinja.in _update_hash_filename_ = instance-import.cfg.jinja.in
md5sum = 861ef130f27175c2978a9b946b138dd5 md5sum = 57b707cf0ed83be1959d26a88c131906
[instance-export] [instance-export]
_update_hash_filename_ = instance-export.cfg.jinja.in _update_hash_filename_ = instance-export.cfg.jinja.in
md5sum = b3cedaa1603ca8ed83fdd94ef4b35cc8 md5sum = 190a736471f0e0cffcb2838968e01d84
[instance-resilient] [instance-resilient]
_update_hash_filename_ = instance-resilient.cfg.jinja _update_hash_filename_ = instance-resilient.cfg.jinja
...@@ -47,7 +47,7 @@ md5sum = 9e8c17a4b2d802695caf0c2c052f0d11 ...@@ -47,7 +47,7 @@ md5sum = 9e8c17a4b2d802695caf0c2c052f0d11
[yarn.lock] [yarn.lock]
_update_hash_filename_ = yarn.lock _update_hash_filename_ = yarn.lock
md5sum = c37c2e9578794967a404d08859c09813 md5sum = 6faa52754c46e505912a478bc8ba3300
[python-language-server-requirements.txt] [python-language-server-requirements.txt]
_update_hash_filename_ = python-language-server-requirements.txt _update_hash_filename_ = python-language-server-requirements.txt
...@@ -59,7 +59,7 @@ md5sum = 8157c22134200bd862a07c6521ebf799 ...@@ -59,7 +59,7 @@ md5sum = 8157c22134200bd862a07c6521ebf799
[slapos.css.in] [slapos.css.in]
_update_hash_filename_ = slapos.css.in _update_hash_filename_ = slapos.css.in
md5sum = d2930ec3ef973b7908f0fa896033fd64 md5sum = 841141fc699b8d8918ed0669e6e61995
[logo.png] [logo.png]
_update_hash_filename_ = logo.png _update_hash_filename_ = logo.png
......
...@@ -69,7 +69,7 @@ export-promises = ...@@ -69,7 +69,7 @@ export-promises =
[export-promise] [export-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = resiliency-export-promise.py name = resiliency-export-promise.py
config-command = $${export-promise-script:rendered} config-command = $${export-promise-script:rendered}
......
...@@ -127,7 +127,7 @@ import-promises = ...@@ -127,7 +127,7 @@ import-promises =
[import-promise] [import-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = resiliency-import-promise.py name = resiliency-import-promise.py
config-command = $${import-promise-script:rendered} config-command = $${import-promise-script:rendered}
......
...@@ -82,21 +82,21 @@ instance-promises = ...@@ -82,21 +82,21 @@ instance-promises =
[theia-listen-promise] [theia-listen-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-host = $${theia-instance:ip} config-host = $${theia-instance:ip}
config-port = $${theia-instance:port} config-port = $${theia-instance:port}
[frontend-listen-promise] [frontend-listen-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-host = $${frontend-instance:ip} config-host = $${frontend-instance:ip}
config-port = $${frontend-instance:port} config-port = $${frontend-instance:port}
[frontend-authentification-promise] [frontend-authentification-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
username = $${frontend-instance-password:username} username = $${frontend-instance-password:username}
password = $${frontend-instance-password:passwd} password = $${frontend-instance-password:passwd}
...@@ -106,7 +106,7 @@ config-url = https://$${:username}:$${:password}@[$${:ip}]:$${:port} ...@@ -106,7 +106,7 @@ config-url = https://$${:username}:$${:password}@[$${:ip}]:$${:port}
[remote-frontend-url-available-promise] [remote-frontend-url-available-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-url = $${remote-frontend:connection-secure_access} config-url = $${remote-frontend:connection-secure_access}
config-http-code = 401 config-http-code = 401
...@@ -114,7 +114,7 @@ config-http-code = 401 ...@@ -114,7 +114,7 @@ config-http-code = 401
{% if additional_frontend %} {% if additional_frontend %}
[remote-additional-frontend-url-available-promise] [remote-additional-frontend-url-available-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = $${:_buildout_section_name_}.py name = $${:_buildout_section_name_}.py
config-url = $${remote-additional-frontend:connection-secure_access} config-url = $${remote-additional-frontend:connection-secure_access}
config-http-code = 401 config-http-code = 401
...@@ -122,7 +122,7 @@ config-http-code = 401 ...@@ -122,7 +122,7 @@ config-http-code = 401
[slapos-standalone-listen-promise] [slapos-standalone-listen-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
# XXX promise plugins can not contain "slapos" in their names # XXX promise plugins can not contain "slapos" in their names
name = standalone-listen-promise.py name = standalone-listen-promise.py
config-host = $${slapos-standalone-instance:hostname} config-host = $${slapos-standalone-instance:hostname}
...@@ -130,13 +130,13 @@ config-port = $${slapos-standalone-instance:port} ...@@ -130,13 +130,13 @@ config-port = $${slapos-standalone-instance:port}
[slapos-standalone-ready-promise] [slapos-standalone-ready-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = standalone-ready-promise.py name = standalone-ready-promise.py
config-abstract = $${directory:runner}/standalone_ready config-abstract = $${directory:runner}/standalone_ready
[slapos-autorun-promise] [slapos-autorun-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_service_state promise = check_service_state
name = autorun-state-promise.py name = autorun-state-promise.py
config-service = $${slapos-autorun:service-name} config-service = $${slapos-autorun:service-name}
config-expect = $${slapos-autorun:autorun} config-expect = $${slapos-autorun:autorun}
......
/* backported fixes */
/* https://github.com/eclipse-theia/theia/commit/616c34e1c446a706f4cb02182b2d9195ef3ea854 */
.monaco-editor .monaco-list .monaco-list-row.focused,
.monaco-editor .monaco-list .monaco-list-row.focused,
.monaco-editor .monaco-list .monaco-list-row.focused .suggest-icon {
color: var(--theia-list-activeSelectionForeground) !important;
background-color: var(--theia-list-activeSelectionBackground) !important;
}
/* logo */ /* logo */
.theia-icon { .theia-icon {
background-image: url('/{{ logo_image }}'); background-image: url('/{{ logo_image }}');
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -19,8 +19,8 @@ md5sum = b43d5e8d1fc2d0eeb54f91cefe6a5bae ...@@ -19,8 +19,8 @@ md5sum = b43d5e8d1fc2d0eeb54f91cefe6a5bae
[template-turnserver] [template-turnserver]
filename = instance-turnserver.cfg.jinja2.in filename = instance-turnserver.cfg.jinja2.in
md5sum = 7af3318d7249e9afe22436d9fe200159 md5sum = 932c4d82faa8e28b62bfbfc3dfe31c02
[template-insecure-turnserver] [template-insecure-turnserver]
filename = instance-insecure-turnserver.cfg.jinja2.in filename = instance-insecure-turnserver.cfg.jinja2.in
md5sum = 3db65c3a16eb76ab438ac3817d1a5fea md5sum = 504f0f5ead8600b80ba43f828a0f82b6
...@@ -57,7 +57,7 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg ...@@ -57,7 +57,7 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
[promise-check-turnserver-port] [promise-check-turnserver-port]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = turnserver-port-listening.py name = turnserver-port-listening.py
config-host = {{ listening_ip }} config-host = {{ listening_ip }}
config-port = {{ turn_port }} config-port = {{ turn_port }}
......
...@@ -123,14 +123,14 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg ...@@ -123,14 +123,14 @@ hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
[promise-check-turnserver-port] [promise-check-turnserver-port]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = turnserver-port-listening.py name = turnserver-port-listening.py
config-host = {{ listening_ip }} config-host = {{ listening_ip }}
config-port = {{ turn_port }} config-port = {{ turn_port }}
[promise-check-turnserver-tls-port] [promise-check-turnserver-tls-port]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = turnserver-tls-port-listening.py name = turnserver-tls-port-listening.py
config-host = {{ listening_ip }} config-host = {{ listening_ip }}
config-port = {{ turn_tls_port }} config-port = {{ turn_tls_port }}
......
...@@ -3,7 +3,7 @@ request = portal.REQUEST ...@@ -3,7 +3,7 @@ request = portal.REQUEST
reference = request['reference'] reference = request['reference']
data_chunk = request['data_chunk'] data_chunk = request['data_chunk']
module = portal.data_stream_module promise = portal.data_stream_module
try: try:
data_stream = module[reference] data_stream = module[reference]
except KeyError: except KeyError:
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[caucase-jinja2-library] [caucase-jinja2-library]
filename = caucase.jinja2.library filename = caucase.jinja2.library
md5sum = a5c7a46c6fb85aa22a371d9d2cd9e57e md5sum = 1e3607e514320441ddccdb6d1a21f705
...@@ -37,7 +37,7 @@ command-line = '{{ buildout_bin_directory }}/caucased' ...@@ -37,7 +37,7 @@ command-line = '{{ buildout_bin_directory }}/caucased'
{% if promise -%} {% if promise -%}
[{{ prefix }}-promise] [{{ prefix }}-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = {{ prefix }}.py name = {{ prefix }}.py
config-command = '{{ buildout_bin_directory }}/caucase-probe' 'http://{{ netloc }}' config-command = '{{ buildout_bin_directory }}/caucase-probe' 'http://{{ netloc }}'
{%- endif %} {%- endif %}
...@@ -119,7 +119,7 @@ command-line = '{{ buildout_bin_directory }}/caucase-updater' ...@@ -119,7 +119,7 @@ command-line = '{{ buildout_bin_directory }}/caucase-updater'
{% if promise -%} {% if promise -%}
[{{ prefix }}-promise] [{{ prefix }}-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_certificate promise = check_certificate
name = {{ prefix }}.py name = {{ prefix }}.py
config-certificate = {{ crt_path }} config-certificate = {{ crt_path }}
config-key = {{ key_path }} config-key = {{ key_path }}
......
...@@ -26,11 +26,11 @@ md5sum = d10b8e35b02b5391cf46bf0c7dbb1196 ...@@ -26,11 +26,11 @@ md5sum = d10b8e35b02b5391cf46bf0c7dbb1196
[template-mariadb] [template-mariadb]
filename = instance-mariadb.cfg.in filename = instance-mariadb.cfg.in
md5sum = 7d064777c1c4e7b275b255db4f4b1da9 md5sum = c82ea00c4514b72fb97a6fa7ac36ec52
[template-kumofs] [template-kumofs]
filename = instance-kumofs.cfg.in filename = instance-kumofs.cfg.in
md5sum = fed6dd2bdc389b4fc7e7b7ca32c5d4b6 md5sum = cfe4696a67bf4886a5d8252a5274a941
[template-zope-conf] [template-zope-conf]
filename = zope.conf.in filename = zope.conf.in
...@@ -50,7 +50,7 @@ md5sum = 1102c3e37a5a2e8aa2d8a2607ab633c8 ...@@ -50,7 +50,7 @@ md5sum = 1102c3e37a5a2e8aa2d8a2607ab633c8
[template-postfix] [template-postfix]
filename = instance-postfix.cfg.in filename = instance-postfix.cfg.in
md5sum = 2a68a3e7c5c509cbd4cfa9e670ac91c7 md5sum = 0f666e5e7e52afda433feb9f02452717
[template-postfix-master-cf] [template-postfix-master-cf]
filename = postfix_master.cf.in filename = postfix_master.cf.in
...@@ -78,7 +78,7 @@ md5sum = fcc8470824c448a56e2282c43b870cb5 ...@@ -78,7 +78,7 @@ md5sum = fcc8470824c448a56e2282c43b870cb5
[template-zeo] [template-zeo]
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
md5sum = 79b6b422df512b5a075eba54a6895a01 md5sum = 1f33f3b93da32b34e2fd11471648835d
[template-zodb-base] [template-zodb-base]
filename = instance-zodb-base.cfg.in filename = instance-zodb-base.cfg.in
...@@ -86,11 +86,11 @@ md5sum = bc821f9f9696953b10a03ad7b59a1936 ...@@ -86,11 +86,11 @@ md5sum = bc821f9f9696953b10a03ad7b59a1936
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = 58ca95f6e0c067702a03fc3be66d50c1 md5sum = 769e81946c346530cebfce6ad7553165
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
md5sum = c6c1b3e4b2f3c6f256153dcfe9fbecad md5sum = d6166515fda7b09df754672536b131be
[template-haproxy-cfg] [template-haproxy-cfg]
filename = haproxy.cfg.in filename = haproxy.cfg.in
...@@ -102,4 +102,4 @@ md5sum = 5cf0316fdd17a940031e4083bbededd8 ...@@ -102,4 +102,4 @@ md5sum = 5cf0316fdd17a940031e4083bbededd8
[instance-wcfs.cfg.in] [instance-wcfs.cfg.in]
filename = instance-wcfs.cfg.in filename = instance-wcfs.cfg.in
md5sum = 945e8e4552a6bdf228b9609567b09399 md5sum = eb4be2669a9a56187cc4366272e11d18
...@@ -272,7 +272,7 @@ hash-files = ${rsyslogd-cfg:rendered} ...@@ -272,7 +272,7 @@ hash-files = ${rsyslogd-cfg:rendered}
[{{ section ('rsyslogd-listen-promise') }}] [{{ section ('rsyslogd-listen-promise') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = rsyslogd_listen_promise.py name = rsyslogd_listen_promise.py
config-command = test -S ${rsyslogd-cfg-parameter-dict:log-socket} config-command = test -S ${rsyslogd-cfg-parameter-dict:log-socket}
...@@ -303,7 +303,7 @@ certificate-and-key = ${directory:etc}/certificate-and-key-generated.pem ...@@ -303,7 +303,7 @@ certificate-and-key = ${directory:etc}/certificate-and-key-generated.pem
[{{ section('haproxy-promise') }}] [{{ section('haproxy-promise') }}]
<= monitor-promise-base <= monitor-promise-base
# Check any haproxy port in ipv4, expect other ports and ipv6 to behave consistently # Check any haproxy port in ipv4, expect other ports and ipv6 to behave consistently
module = check_socket_listening promise = check_socket_listening
name = haproxy.py name = haproxy.py
config-host = {{ ipv4 }} config-host = {{ ipv4 }}
config-port = {{ haproxy_dict.values()[0][0] }} config-port = {{ haproxy_dict.values()[0][0] }}
...@@ -382,13 +382,13 @@ promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }} ...@@ -382,13 +382,13 @@ promise-threshold = {{ slapparameter_dict['apachedex-promise-threshold'] }}
[{{ section('monitor-promise-apachedex-result') }}] [{{ section('monitor-promise-apachedex-result') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-apachedex-result.py name = check-apachedex-result.py
config-command = "{{ parameter_dict['promise-check-apachedex-result'] }}" --apachedex_path "${directory:apachedex}" --status_file ${monitor-directory:private}/apachedex.report.json --threshold "${apachedex-parameters:promise-threshold}" config-command = "{{ parameter_dict['promise-check-apachedex-result'] }}" --apachedex_path "${directory:apachedex}" --status_file ${monitor-directory:private}/apachedex.report.json --threshold "${apachedex-parameters:promise-threshold}"
[{{ section('promise-check-computer-memory') }}] [{{ section('promise-check-computer-memory') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-computer-memory.py name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
......
...@@ -86,7 +86,7 @@ rendered = ${directory:srv}/exporter.exclude ...@@ -86,7 +86,7 @@ rendered = ${directory:srv}/exporter.exclude
# Deploy zope promises scripts # Deploy zope promises scripts
[promise-template] [promise-template]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
config-host = ${kumofs-instance:ip} config-host = ${kumofs-instance:ip}
config-port = ${kumofs-instance:server-listen-port} config-port = ${kumofs-instance:server-listen-port}
...@@ -112,7 +112,7 @@ config-port = ${kumofs-instance:manager-port} ...@@ -112,7 +112,7 @@ config-port = ${kumofs-instance:manager-port}
[promise-check-computer-memory] [promise-check-computer-memory]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-computer-memory.py name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
......
...@@ -332,7 +332,7 @@ context = ...@@ -332,7 +332,7 @@ context =
{%if slapparameter_dict.get('max-slowqueries-threshold') and slapparameter_dict.get('slowest-query-threshold') %} {%if slapparameter_dict.get('max-slowqueries-threshold') and slapparameter_dict.get('slowest-query-threshold') %}
[{{ section('monitor-promise-slowquery-result') }}] [{{ section('monitor-promise-slowquery-result') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-slow-query-pt-digest-result.py name = check-slow-query-pt-digest-result.py
config-command = "{{ parameter_dict['promise-check-slow-queries-digest-result'] }}" --ptdigest_path "${directory:slowquery}" --status_file ${monitor-directory:private}/mariadb_slow_query.report.json --max_queries_threshold "${:max_queries_threshold}" --slowest_query_threshold "${:slowest_queries_threshold}" config-command = "{{ parameter_dict['promise-check-slow-queries-digest-result'] }}" --ptdigest_path "${directory:slowquery}" --status_file ${monitor-directory:private}/mariadb_slow_query.report.json --max_queries_threshold "${:max_queries_threshold}" --slowest_query_threshold "${:slowest_queries_threshold}"
max_queries_threshold = {{ slapparameter_dict['max-slowqueries-threshold'] }} max_queries_threshold = {{ slapparameter_dict['max-slowqueries-threshold'] }}
...@@ -341,13 +341,13 @@ slowest_queries_threshold = {{ slapparameter_dict['slowest-query-threshold'] }} ...@@ -341,13 +341,13 @@ slowest_queries_threshold = {{ slapparameter_dict['slowest-query-threshold'] }}
[{{ section('promise-check-computer-memory') }}] [{{ section('promise-check-computer-memory') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-computer-memory.py name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
[{{ section('promise') }}] [{{ section('promise') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = mariadb.py name = mariadb.py
config-command = "${binary-wrap-mysql:wrapper-path}" --execute ';' {% if database_list and database_list[0].get('user') %} --host="${my-cnf-parameters:ip}" --port="${my-cnf-parameters:port}" --user="{{ database_list[0]['user'] }}" --password="{{ database_list[0]['password'] }}" {% endif %} config-command = "${binary-wrap-mysql:wrapper-path}" --execute ';' {% if database_list and database_list[0].get('user') %} --host="${my-cnf-parameters:ip}" --port="${my-cnf-parameters:port}" --user="{{ database_list[0]['user'] }}" --password="{{ database_list[0]['password'] }}" {% endif %}
......
...@@ -80,7 +80,7 @@ wrapper-path = ${directory:run}/munnel ...@@ -80,7 +80,7 @@ wrapper-path = ${directory:run}/munnel
[{{ section('munnel-promise') }}] [{{ section('munnel-promise') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = munnel.py name = munnel.py
config-host = {{ ip }} config-host = {{ ip }}
config-port = {{ milter_port }} config-port = {{ milter_port }}
...@@ -262,14 +262,14 @@ wrapper-path = ${directory:run}/postfix-master ...@@ -262,14 +262,14 @@ wrapper-path = ${directory:run}/postfix-master
[{{ section('postfix-promise') }}] [{{ section('postfix-promise') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = postfix.py name = postfix.py
config-host = {{ ip }} config-host = {{ ip }}
config-port = {{ tcpv4_port }} config-port = {{ tcpv4_port }}
[{{ section('promise-check-computer-memory') }}] [{{ section('promise-check-computer-memory') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-computer-memory.py name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
......
...@@ -52,7 +52,7 @@ wrapper-path = ${directory:service-on-watch}/wcfs ...@@ -52,7 +52,7 @@ wrapper-path = ${directory:service-on-watch}/wcfs
[wcfs-promise] [wcfs-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = ${:_buildout_section_name_}.py name = ${:_buildout_section_name_}.py
config-command = {{ bin_directory }}/wcfs status {{ zurl }} config-command = {{ bin_directory }}/wcfs status {{ zurl }}
......
...@@ -55,7 +55,7 @@ post = test ! -s {{ "${" ~ zeo_section_name ~":pid-path}" }} || {{ bin_directory ...@@ -55,7 +55,7 @@ post = test ! -s {{ "${" ~ zeo_section_name ~":pid-path}" }} || {{ bin_directory
[{{ section(zeo_section_name ~ "-promise") }}] [{{ section(zeo_section_name ~ "-promise") }}]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = zeo-{{ family }}.py name = zeo-{{ family }}.py
config-host = {{ "${" ~ zeo_section_name ~ ":ip}" }} config-host = {{ "${" ~ zeo_section_name ~ ":ip}" }}
config-port = {{ "${" ~ zeo_section_name ~ ":port}" }} config-port = {{ "${" ~ zeo_section_name ~ ":port}" }}
...@@ -89,7 +89,7 @@ tidstorage-wrapper = ${directory:services}/tidstoraged ...@@ -89,7 +89,7 @@ tidstorage-wrapper = ${directory:services}/tidstoraged
[{{ section("promise-tidstorage") }}] [{{ section("promise-tidstorage") }}]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = tidstorage.py name = tidstorage.py
config-host = ${tidstorage:ip} config-host = ${tidstorage:ip}
config-port = ${tidstorage:port} config-port = ${tidstorage:port}
...@@ -177,7 +177,7 @@ mode = 755 ...@@ -177,7 +177,7 @@ mode = 755
[{{ section('promise-check-computer-memory') }}] [{{ section('promise-check-computer-memory') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-computer-memory.py name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
......
...@@ -358,7 +358,7 @@ hash-existing-files = ...@@ -358,7 +358,7 @@ hash-existing-files =
[{{ section("promise-" ~ name) }}] [{{ section("promise-" ~ name) }}]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = {{ name }}.py name = {{ name }}.py
config-host = {{ ipv4 }} config-host = {{ ipv4 }}
config-port = {{ port }} config-port = {{ port }}
...@@ -373,7 +373,7 @@ ipv4-port = {{ port }} ...@@ -373,7 +373,7 @@ ipv4-port = {{ port }}
[{{ section("promise-tunnel-" ~ name) }}] [{{ section("promise-tunnel-" ~ name) }}]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = {{ zope_tunnel_base_name }}.py name = {{ zope_tunnel_base_name }}.py
config-host = {{ '${' ~ zope_tunnel_section_name ~ ':ipv6}' }} config-host = {{ '${' ~ zope_tunnel_section_name ~ ':ipv6}' }}
config-port = {{ '${' ~ zope_tunnel_section_name ~ ':ipv6-port}' }} config-port = {{ '${' ~ zope_tunnel_section_name ~ ':ipv6-port}' }}
...@@ -384,7 +384,7 @@ config-port = {{ '${' ~ zope_tunnel_section_name ~ ':ipv6-port}' }} ...@@ -384,7 +384,7 @@ config-port = {{ '${' ~ zope_tunnel_section_name ~ ':ipv6-port}' }}
{% if longrequest_logger_interval > 0 -%} {% if longrequest_logger_interval > 0 -%}
[{{ section('promise-check-' ~name ~ '-longrequest-error-log') }}] [{{ section('promise-check-' ~name ~ '-longrequest-error-log') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_error_on_zope_longrequest_log promise = check_error_on_zope_longrequest_log
name = {{'check-' ~ name ~ '-longrequest-error-log.py'}} name = {{'check-' ~ name ~ '-longrequest-error-log.py'}}
config-log-file = {{ '${' ~ conf_parameter_name ~ ':longrequest-logger-file}' }} config-log-file = {{ '${' ~ conf_parameter_name ~ ':longrequest-logger-file}' }}
config-error-threshold = {{ slapparameter_dict["zope-longrequest-logger-error-threshold"] }} config-error-threshold = {{ slapparameter_dict["zope-longrequest-logger-error-threshold"] }}
...@@ -528,7 +528,7 @@ expected-value = ...@@ -528,7 +528,7 @@ expected-value =
[{{ section("promise-test-runner-apache-url") }}] [{{ section("promise-test-runner-apache-url") }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = ${:_buildout_section_name_}.py name = ${:_buildout_section_name_}.py
config-command = ${promise-test-runner-apache-url-executable:path} config-command = ${promise-test-runner-apache-url-executable:path}
...@@ -537,7 +537,7 @@ config-command = ${promise-test-runner-apache-url-executable:path} ...@@ -537,7 +537,7 @@ config-command = ${promise-test-runner-apache-url-executable:path}
[{{ section('promise-check-computer-memory') }}] [{{ section('promise-check-computer-memory') }}]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = check-computer-memory.py name = check-computer-memory.py
config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent config-command = "{{ parameter_dict["check-computer-memory-binary"] }}" -db ${monitor-instance-parameter:collector-db} --threshold "{{ slapparameter_dict["computer-memory-percent-threshold"] }}" --unit percent
......
...@@ -23,7 +23,6 @@ extends = ...@@ -23,7 +23,6 @@ extends =
../../component/mariadb/buildout.cfg ../../component/mariadb/buildout.cfg
../../component/perl/buildout.cfg ../../component/perl/buildout.cfg
../../component/sqlite3/buildout.cfg ../../component/sqlite3/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/xz-utils/buildout.cfg ../../component/xz-utils/buildout.cfg
../../component/zlib/buildout.cfg ../../component/zlib/buildout.cfg
../erp5/buildout.cfg ../erp5/buildout.cfg
...@@ -83,7 +82,6 @@ context = ...@@ -83,7 +82,6 @@ context =
key logrotate_cfg template-logrotate-base:rendered key logrotate_cfg template-logrotate-base:rendered
key gzip_location gzip:location key gzip_location gzip:location
key xz_utils_location xz-utils:location key xz_utils_location xz-utils:location
key stunnel_location stunnel:location
key template_monitor monitor2-template:rendered key template_monitor monitor2-template:rendered
key mariadb_link_binary template-mariadb:link-binary key mariadb_link_binary template-mariadb:link-binary
key mariadb_location mariadb:location key mariadb_location mariadb:location
......
...@@ -18,11 +18,11 @@ md5sum = e4e070f93adaf917f9427ae9f35573d9 ...@@ -18,11 +18,11 @@ md5sum = e4e070f93adaf917f9427ae9f35573d9
[instance-apache-php] [instance-apache-php]
filename = instance-apache-php.cfg.in filename = instance-apache-php.cfg.in
md5sum = 4afee4377fa9cbc1e4ff80647b2f279c md5sum = e7a14c01e6314e2bffebd7d80cf1c488
[instance-lamp] [instance-lamp]
filename = instance-lamp.cfg.jinja2.in filename = instance-lamp.cfg.jinja2.in
md5sum = 79f562260895df2665a85df5cb442193 md5sum = e0e2e88b6deeb011b998b78e4e468555
[template-apache.conf] [template-apache.conf]
filename = apache.conf.in filename = apache.conf.in
......
...@@ -207,7 +207,7 @@ backend-url = ${apache-php-configuration:url} ...@@ -207,7 +207,7 @@ backend-url = ${apache-php-configuration:url}
[promise] [promise]
# Check any apache port in ipv4, expect other ports and ipv6 to behave consistently # Check any apache port in ipv4, expect other ports and ipv6 to behave consistently
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = apache-httpd-port-listening.py name = apache-httpd-port-listening.py
config-host = ${apache-php-configuration:ip} config-host = ${apache-php-configuration:ip}
config-port = ${apache-php-configuration:port} config-port = ${apache-php-configuration:port}
......
...@@ -77,7 +77,7 @@ return = domain secure_access ...@@ -77,7 +77,7 @@ return = domain secure_access
[lamp-frontend-promise] [lamp-frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = lamp-http-frontend.py name = lamp-http-frontend.py
url = ${request-frontend:connection-secure_access} url = ${request-frontend:connection-secure_access}
config-url = ${:url} config-url = ${:url}
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[monitor2-template] [monitor2-template]
filename = instance-monitor.cfg.jinja2.in filename = instance-monitor.cfg.jinja2.in
md5sum = d4185c191e8b9df20e1f98cd8c556b1d md5sum = 3cba541a8b0b22c2648848ed1d259174
[monitor-httpd-conf] [monitor-httpd-conf]
_update_hash_filename_ = templates/monitor-httpd.conf.in _update_hash_filename_ = templates/monitor-httpd.conf.in
......
...@@ -302,14 +302,12 @@ pre = {{ monitor_statistic }} --history_folder ${monitor-directory:public} ...@@ -302,14 +302,12 @@ pre = {{ monitor_statistic }} --history_folder ${monitor-directory:public}
recipe = slapos.cookbook:promise.plugin recipe = slapos.cookbook:promise.plugin
eggs = eggs =
slapos.toolbox slapos.toolbox
content = module = slapos.promise.plugin.${:promise}
from slapos.promise.plugin.${:module} import RunPromise
mode = 600
output = ${directory:plugins}/${:name} output = ${directory:plugins}/${:name}
[monitor-httpd-promise] [monitor-httpd-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = monitor-httpd-listening-on-tcp.py name = monitor-httpd-listening-on-tcp.py
config-url = ${monitor-httpd-conf-parameter:url} config-url = ${monitor-httpd-conf-parameter:url}
config-http-code = 401 config-http-code = 401
...@@ -360,7 +358,7 @@ return = domain secure_access ...@@ -360,7 +358,7 @@ return = domain secure_access
# credentials. # credentials.
[check-monitor-password-promise] [check-monitor-password-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = check-monitor-frontend-password.py name = check-monitor-frontend-password.py
url = ${monitor-frontend:connection-secure_access} url = ${monitor-frontend:connection-secure_access}
config-url = ${:url} config-url = ${:url}
...@@ -371,7 +369,7 @@ config-password = ${monitor-instance-parameter:password} ...@@ -371,7 +369,7 @@ config-password = ${monitor-instance-parameter:password}
# supplied. # supplied.
[monitor-frontend-promise] [monitor-frontend-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = monitor-http-frontend.py name = monitor-http-frontend.py
url = ${monitor-frontend:connection-secure_access} url = ${monitor-frontend:connection-secure_access}
config-url = ${:url} config-url = ${:url}
...@@ -379,7 +377,7 @@ config-http-code = 401 ...@@ -379,7 +377,7 @@ config-http-code = 401
[monitor-bootstrap-promise] [monitor-bootstrap-promise]
<= monitor-promise-base <= monitor-promise-base
module = monitor_bootstrap_status promise = monitor_bootstrap_status
name = monitor-bootstrap-status.py name = monitor-bootstrap-status.py
config-process-pid-file = ${monitor-conf-parameters:pid-file} config-process-pid-file = ${monitor-conf-parameters:pid-file}
config-process-name = ${start-monitor:name} config-process-name = ${start-monitor:name}
...@@ -387,13 +385,13 @@ config-status-file = ${monitor-conf-parameters:promise-output-file} ...@@ -387,13 +385,13 @@ config-status-file = ${monitor-conf-parameters:promise-output-file}
[promise-check-slapgrid] [promise-check-slapgrid]
<= monitor-promise-base <= monitor-promise-base
module = check_partition_deployment_state promise = check_partition_deployment_state
name = buildout-${slap-connection:partition-id}-status.py name = buildout-${slap-connection:partition-id}-status.py
config-monitor-url = ${monitor-instance-parameter:monitor-base-url} config-monitor-url = ${monitor-instance-parameter:monitor-base-url}
[promise-check-free-disk-space] [promise-check-free-disk-space]
<= monitor-promise-base <= monitor-promise-base
module = check_free_disk_space promise = check_free_disk_space
name = check-free-disk-space.py name = check-free-disk-space.py
config-collectordb = ${monitor-instance-parameter:collector-db} config-collectordb = ${monitor-instance-parameter:collector-db}
config-threshold-file = ${directory:etc}/min-free-disk-size config-threshold-file = ${directory:etc}/min-free-disk-size
......
...@@ -14,23 +14,23 @@ ...@@ -14,23 +14,23 @@
# not need these here). # not need these here).
[pbsready] [pbsready]
filename = pbsready.cfg.in filename = pbsready.cfg.in
md5sum = 005125621d157b3ae04c428ea6060e37 md5sum = 1d3aba1ba770ad3fcc2ab6c0b9266409
[pbsready-import] [pbsready-import]
filename = pbsready-import.cfg.in filename = pbsready-import.cfg.in
md5sum = dd8f0728e53b49822eed5d613839558f md5sum = a8c9821951425bedbdea30a870fb5138
[pbsready-export] [pbsready-export]
filename = pbsready-export.cfg.in filename = pbsready-export.cfg.in
md5sum = 2b0c71b085cfe8017f28098c160b1f49 md5sum = 8f15263c4a27ec315eb3a12dbf7a7b34
[template-pull-backup] [template-pull-backup]
filename = instance-pull-backup.cfg.in filename = instance-pull-backup.cfg.in
md5sum = b240dc76a663190304d8bcb9cabcda8f md5sum = 4425db50d551fb8a974e547308990bac
[template-replicated] [template-replicated]
filename = template-replicated.cfg.in filename = template-replicated.cfg.in
md5sum = 41aee09e9f9abbae59b0442e1e76387f md5sum = c4012ccc2c473ae5c7cad9dcac61e0f1
[template-parts] [template-parts]
filename = template-parts.cfg.in filename = template-parts.cfg.in
......
...@@ -217,7 +217,7 @@ wrapper-path = $${rootdirectory:bin}/stalled-pull-push ...@@ -217,7 +217,7 @@ wrapper-path = $${rootdirectory:bin}/stalled-pull-push
[pull-push-stalled-promise] [pull-push-stalled-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = stalled-pull-push.py name = stalled-pull-push.py
config-command = $${pull-push-stalled-promise-bin:wrapper-path} config-command = $${pull-push-stalled-promise-bin:wrapper-path}
...@@ -233,7 +233,7 @@ context = ...@@ -233,7 +233,7 @@ context =
[notifier-feed-status-promise] [notifier-feed-status-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = notifier-feed-check-malformed-or-failure.py name = notifier-feed-check-malformed-or-failure.py
config-command = $${notifier-feed-status-promise-bin:rendered} config-command = $${notifier-feed-status-promise-bin:rendered}
......
...@@ -60,7 +60,7 @@ rendered = ${rootdirectory:bin}/exporter-status ...@@ -60,7 +60,7 @@ rendered = ${rootdirectory:bin}/exporter-status
[notifier-exporter-promise] [notifier-exporter-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = exporter-status.py name = exporter-status.py
config-command = ${notifier-exporter-promise-bin:rendered} config-command = ${notifier-exporter-promise-bin:rendered}
......
...@@ -81,7 +81,7 @@ mode = 700 ...@@ -81,7 +81,7 @@ mode = 700
[backup-checksum-integrity-promise] [backup-checksum-integrity-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = backup-checksum-integrity.py name = backup-checksum-integrity.py
config-command = $${backup-checksum-integrity-promise-bin:rendered} config-command = $${backup-checksum-integrity-promise-bin:rendered}
...@@ -159,7 +159,7 @@ wrapper-path = $${basedirectory:services}/resilient-web-takeover-httpd ...@@ -159,7 +159,7 @@ wrapper-path = $${basedirectory:services}/resilient-web-takeover-httpd
[resilient-web-takeover-httpd-promise] [resilient-web-takeover-httpd-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_url_available promise = check_url_available
name = resilient-web-takeover-httpd.py name = resilient-web-takeover-httpd.py
config-url = http://[$${resilient-web-takeover-httpd-configuration-file:listening-ip}]:$${resilient-web-takeover-httpd-configuration-file:listening-port}/ config-url = http://[$${resilient-web-takeover-httpd-configuration-file:listening-ip}]:$${resilient-web-takeover-httpd-configuration-file:listening-port}/
......
...@@ -165,7 +165,7 @@ wrapper-path = $${rootdirectory:bin}/stalled-notifier-callbacks ...@@ -165,7 +165,7 @@ wrapper-path = $${rootdirectory:bin}/stalled-notifier-callbacks
[notifier-stalled-promise] [notifier-stalled-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = stalled-notifier-callbacks.py name = stalled-notifier-callbacks.py
config-command = $${notifier-stalled-promise-bin:wrapper-path} config-command = $${notifier-stalled-promise-bin:wrapper-path}
...@@ -217,7 +217,7 @@ wrapper-path = $${basedirectory:scripts}/sshd-graceful ...@@ -217,7 +217,7 @@ wrapper-path = $${basedirectory:scripts}/sshd-graceful
[sshd-promise] [sshd-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_socket_listening promise = check_socket_listening
name = sshd.py name = sshd.py
config-host = $${slap-network-information:global-ipv6} config-host = $${slap-network-information:global-ipv6}
config-port = $${sshd-port:port} config-port = $${sshd-port:port}
...@@ -261,7 +261,7 @@ mode = 700 ...@@ -261,7 +261,7 @@ mode = 700
[resilient-sshkeys-sshd-promise] [resilient-sshkeys-sshd-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = public-key-existence.py name = public-key-existence.py
config-command = $${resilient-sshkeys-sshd-promise-bin:output} config-command = $${resilient-sshkeys-sshd-promise-bin:output}
...@@ -281,7 +281,7 @@ context = ...@@ -281,7 +281,7 @@ context =
[notifier-feed-status-promise] [notifier-feed-status-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = notifier-feed-check-malformed-or-failure.py name = notifier-feed-check-malformed-or-failure.py
config-command = $${notifier-feed-status-promise-bin:rendered} config-command = $${notifier-feed-status-promise-bin:rendered}
#---------------- #----------------
......
...@@ -148,7 +148,7 @@ mode = 700 ...@@ -148,7 +148,7 @@ mode = 700
[resilient-request-{{namebase}}-public-key-promise] [resilient-request-{{namebase}}-public-key-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = resilient-request-{{namebase}}-public-key.py name = resilient-request-{{namebase}}-public-key.py
config-command = ${resilient-request-{{namebase}}-public-key-promise-bin:output} config-command = ${resilient-request-{{namebase}}-public-key-promise-bin:output}
...@@ -170,7 +170,7 @@ mode = 700 ...@@ -170,7 +170,7 @@ mode = 700
[resilient-request-{{namebase}}-pseudo-replicating-{{id}}-public-key-promise] [resilient-request-{{namebase}}-pseudo-replicating-{{id}}-public-key-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = resilient-request-{{namebase}}-pseudo-replicating-{{id}}-public-key.py name = resilient-request-{{namebase}}-pseudo-replicating-{{id}}-public-key.py
config-command = ${resilient-request-{{namebase}}-pseudo-replicating-{{id}}-public-key-promise-bin:output} config-command = ${resilient-request-{{namebase}}-pseudo-replicating-{{id}}-public-key-promise-bin:output}
...@@ -238,7 +238,7 @@ mode = 700 ...@@ -238,7 +238,7 @@ mode = 700
[resilient-request-pbs-{{namebase}}-{{id}}-public-key-promise] [resilient-request-pbs-{{namebase}}-{{id}}-public-key-promise]
<= monitor-promise-base <= monitor-promise-base
module = check_command_execute promise = check_command_execute
name = resilient-request-pbs-{{namebase}}-{{id}}-public-key.py name = resilient-request-pbs-{{namebase}}-{{id}}-public-key.py
config-command = ${resilient-request-pbs-{{namebase}}-{{id}}-public-key-promise-bin:output} config-command = ${resilient-request-pbs-{{namebase}}-{{id}}-public-key-promise-bin:output}
......
...@@ -188,9 +188,9 @@ requests = 2.24.0 ...@@ -188,9 +188,9 @@ requests = 2.24.0
scandir = 1.10.0 scandir = 1.10.0
setproctitle = 1.1.10 setproctitle = 1.1.10
setuptools-dso = 1.7 setuptools-dso = 1.7
rubygemsrecipe = 0.4.2 rubygemsrecipe = 0.4.3
six = 1.12.0 six = 1.12.0
slapos.cookbook = 1.0.212 slapos.cookbook = 1.0.213
slapos.core = 1.6.19 slapos.core = 1.6.19
slapos.extension.strip = 0.4 slapos.extension.strip = 0.4
slapos.extension.shared = 1.0 slapos.extension.shared = 1.0
......
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