...
 
Commits (27)
......@@ -14,7 +14,7 @@ recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/cloudooo.git
branch = master
git-executable = ${git:location}/bin/git
revision = 0ff799ebcfea1013342f5450e88ff5c3b8536e89
revision = 67e233f25845335aaf191e80abae53733d1f2579
[cloudooo]
recipe = zc.recipe.egg
......
......@@ -17,7 +17,7 @@ patches =
patch-options = -p1
make-options =
PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
post-make-hook = ${:_profile_base_location_}/dcron-hooks.py#860e914dff4108b47565965fe5ebc7b5:post_make_hook
post-make-hook = ${:_profile_base_location_}/dcron-hooks.py#d7985eef1ceef01af00ffb1d38708c8d:post_make_hook
environment =
PATH=${patch:location}/bin:%(PATH)s
randomsleep_install = ${randomsleep:location}
......
......@@ -2,4 +2,4 @@ import os
import shutil
def post_make_hook(options, buildout):
crontab_path = os.path.join(options['location'], 'bin', 'crontab')
os.chmod(crontab_path, 0750)
os.chmod(crontab_path, 0o750)
......@@ -30,8 +30,7 @@ configure-options=
--with-cc-opt="-I ${openssl-1.0:location}/include -I ${pcre:location}/include -I ${zlib:location}/include"
[nginx-dav-ext-module]
recipe = hexagonit.recipe.download
ignore-existing = true
recipe = slapos.recipe.build:download-unpacked
url = https://github.com/arut/nginx-dav-ext-module/archive/v0.0.3.tar.gz
strip-top-level-dir = true
md5sum = 2cb502dbda335be4ebd5fed0b3182bae
......
......@@ -3,8 +3,7 @@ parts =
noVNC
[noVNC]
recipe = hexagonit.recipe.download
ignore-existing = true
recipe = slapos.recipe.build:download-unpacked
# version-1.0.0 release on Feb 22, 2018
url = https://github.com/novnc/noVNC/archive/v1.0.0.tar.gz
md5sum = d63c2944abd12fecec6ec504e82f27c8
......
......@@ -13,7 +13,7 @@ egg =
pysvn
find-links = http://pysvn.barrys-emacs.org/source_kits/pysvn-1.7.10.tar.gz
patches =
${:_profile_base_location_}/pysvn-1.7.10-inc_lib_dir.patch#02d00b58d537242aa5bb5c9202dedbf1
${:_profile_base_location_}/pysvn-1.7.10-inc_lib_dir.patch#08371129e0d0a215fb7f7811a860a89c
${:_profile_base_location_}/pysvn-issue-179.patch#bd3f9629f95f0f749c5a5e93c797ee2b
patch-options = -p1
patch-binary = ${patch:location}/bin/patch
......
diff -ur pysvn-1.7.10.orig/setup.py pysvn-1.7.10/setup.py
--- pysvn-1.7.10.orig/setup.py 2010-12-30 13:26:51.000000000 +0100
+++ pysvn-1.7.10/setup.py 2015-08-14 10:29:25.562686564 +0200
@@ -19,6 +19,7 @@
@@ -19,6 +19,10 @@
import os
import os.path
import setuptools.command.bdist_egg
+from ConfigParser import ConfigParser
+try:
+ from ConfigParser import ConfigParser
+except ImportError:
+ from configparser import ConfigParser
pysvn_version_info = {}
f = open( 'Builder/version.info', 'r' )
......
......@@ -17,16 +17,17 @@ extends =
../zlib/buildout.cfg
parts =
python3.5
python3
[python3]
<= python3.6
[python3-common]
recipe = slapos.recipe.cmmi
shared = true
package_version_suffix =
# This is actually the default setting for prefix, but we can't use it in
# other settings in this part if we don't set it explicitly here.
prefix = ${buildout:parts-directory}/${:_buildout_section_name_}
executable = ${:prefix}/bin/${:_buildout_section_name_}
executable = @@LOCATION@@/bin/${:_buildout_section_name_}
patch-options = -p1
patches =
......@@ -51,16 +52,10 @@ environment =
CPPFLAGS=-I${zlib:location}/include -I${xz-utils:location}/include -I${readline:location}/include -I${libexpat:location}/include -I${libffi:location}/include -I${ncurses:location}/include -I${ncurses:location}/include/ncursesw -I${bzip2:location}/include -I${gdbm:location}/include -I${openssl:location}/include -I${sqlite3:location}/include -I${gettext:location}/include
LDFLAGS=-L${zlib:location}/lib -L${xz-utils:location}/lib -L${readline:location}/lib -L${libexpat:location}/lib -L${libffi:location}/lib -L${ncurses:location}/lib -L${bzip2:location}/lib -L${gdbm:location}/lib -L${openssl:location}/lib -L${sqlite3:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${xz-utils:location}/lib -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${libexpat:location}/lib -Wl,-rpath=${libffi:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${bzip2:location}/lib -Wl,-rpath=${gdbm:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${sqlite3:location}/lib -L${gettext:location}/lib -Wl,-rpath=${gettext:location}/lib -Wl,-rpath=${file:location}/lib
[python3.5]
<= python3-common
package_version = 3.5.3
md5sum = 57d1f8bfbabf4f2500273fb0706e6f21
[python3.6.6]
[python3.6]
<= python3-common
package_version = 3.6.6
md5sum = c3f30a0aff425dda77d19e02f420d6ba
executable = @@LOCATION@@/bin/python3.6
package_version = 3.6.10
md5sum = 986078f11b39074be22a199e56491d98
# Python 3.7 have to use gcc 8(actually, gcc 4+)
# See https://bugs.python.org/issue34112
......@@ -71,7 +66,6 @@ package_version = 3.7.2
md5sum = df6ec36011808205beda239c72f947cb
patch-options =
patches =
executable = @@LOCATION@@/bin/python3.7
environment =
PATH=${gcc-8.2:location}/bin::${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${zlib:location}/include -I${xz-utils:location}/include -I${readline:location}/include -I${libexpat:location}/include -I${libffi:location}/include -I${ncurses:location}/include -I${ncurses:location}/include/ncursesw -I${bzip2:location}/include -I${gdbm:location}/include -I${openssl:location}/include -I${sqlite3:location}/include -I${gettext:location}/include
......
......@@ -26,4 +26,4 @@ script =
wrapper_script_path = os.path.join(self.options['bin_dir'], 'randomsleep')
with open(wrapper_script_path, 'w') as f:
f.write(self.options['wrapper_script_code'])
os.chmod(wrapper_script_path, 0750)
os.chmod(wrapper_script_path, 0o750)
......@@ -14,4 +14,4 @@
# not need these here).
[surykatka-requirements]
_update_hash_filename_ = requirements.txt
md5sum = 2dfe4f8b8c5b6f5d3478b70e53c49201
md5sum = c4bd35bcc5c9c25efe1edff5dd022605
Click==7.0
certifi==2019.11.28
chardet==3.0.4
Click==7.0
dnspython==1.16.0
forcediphttpsadapter==1.0.1
idna==2.8
miniupnpc==2.0.2
peewee==3.13.1
requests==2.22.0
surykatka==0.2.0
urllib3==1.25.7
surykatka==0.4.2
urllib3==1.25.8
......@@ -61,7 +61,7 @@ setup(name=name,
packages=find_packages(),
include_package_data=True,
install_requires=[
'enum34', # for inotify-simple
'enum34; python_version<"3.4"', # for inotify-simple
'jsonschema',
'hexagonit.recipe.download',
'netaddr', # to manipulate on IP addresses
......
......@@ -48,6 +48,6 @@ gitdb = 0.6.4
pycrypto = 2.6.1
pycurl = 7.43.0
slapos.recipe.download = 1.0
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
smmap = 0.9.0
......@@ -9,7 +9,7 @@ gitdb = 0.6.4
plone.recipe.command = 1.1
pycrypto = 2.6.1
rdiff-backup = 1.0.5+SlapOSPatched001
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
smmap = 0.9.0
numpy = 1.16.4
......
......@@ -84,4 +84,4 @@ packages +=
python-dev
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -59,4 +59,4 @@ template =
raw runTestSuite_py ${buildout:bin-directory}/${runTestSuite_py:interpreter}
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -14,7 +14,7 @@
# not need these here).
[template]
filename = instance.cfg.in
md5sum = d8ce8da7ea7d82c33958bdbabbaad956
md5sum = 8f0cd544851aaf4c819c4858e056ce24
[template-common]
filename = instance-common.cfg.in
......@@ -26,7 +26,7 @@ md5sum = 378f6da53a02b2bfe7777a493fc95585
[template-caddy-replicate]
filename = instance-apache-replicate.cfg.in
md5sum = a34ab1970f91731c32ed7f2471632c86
md5sum = 95a4a388d0731f06c084efbdd8a56e66
[template-slave-list]
filename = templates/apache-custom-slave-list.cfg.in
......@@ -82,7 +82,7 @@ md5sum = baf7b89cc9ab5506100b0c900808c1ea
[template-trafficserver-logging-config]
filename = templates/trafficserver/logging.config.jinja2
md5sum = 0f30ca0d299d0150b22fe8b0ee12f150
md5sum = 6aed31174dc262ced02f31624321df41
[template-nginx-eventsource-slave-virtualhost]
filename = templates/nginx-eventsource-slave.conf.in
......
{% if slap_software_type in software_type %}
{% import "caucase" as caucase with context %}
{#- SERVER_POLLUTED_KEY_LIST is a list of keys which comes from various SlapOS Master implementations, which mix request and publish keys on each slave information -#}
{%- set SERVER_POLLUTED_KEY_LIST = ['connection-parameter-hash', 'timestamp', 'slave_title', 'slap_software_type'] -%}
{%- set TRUE_VALUES = ['y', 'yes', '1', 'true'] -%}
......@@ -448,6 +449,21 @@ command =
touch ${aikc-config:user-created}
fi
{% do part_list.append('aikc-user-caucase-updater') %}
{{ caucase.updater(
prefix='aikc-user-caucase-updater',
buildout_bin_directory=parameter_dict['bin_directory'],
updater_path='${directory:service}/aikc-user-caucase-updater',
url='${aikc-config:caucase-url}',
data_dir='${directory:srv}/caucase-updater',
crt_path='${aikc-config:key}',
ca_path='${aikc-config:user-ca-certificate}',
crl_path='${aikc-config:user-crl}',
key_path='${aikc-config:key}',
mode='user',
)}}
[aikc-check-certificate]
recipe = slapos.recipe.template:jinja2
rendered = ${directory:bin}/aikc-check-certificate
......
......@@ -65,6 +65,9 @@ extra-context =
raw template_monitor {{ monitor2_template }}
raw common_profile {{ common_profile }}
section parameter_dict dynamic-template-caddy-frontend-parameters
caucase-jinja2-library = {{ caucase_jinja2_library }}
import-list =
file caucase :caucase-jinja2-library
[dynamic-template-kedifa]
< = jinja2-template-base
......
......@@ -22,7 +22,7 @@ gitdb = 0.6.4
plone.recipe.command = 1.1
pycrypto = 2.6.1
rdiff-backup = 1.0.5+SlapOSPatched001
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
smmap = 0.9.0
numpy = 1.16.4
......
squid = format {
Format = '%<cqtq> %<ttms> %<chi> %<crc>/%<pssc> %<psql> %<cqhm> %<cquc> %<caun> %<phr>/%<pqsn> %<psct>'
Format = '%<cqtq> %<ttms> %<chi> %<crc>/%<pssc> %<psql> %<cqhm> %<cquc> %<cluc> %<caun> %<phr>/%<pqsn> %<psct>'
}
log.ascii {
Format = squid,
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
T-0:aikc-user-caucase-updater-on-watch RUNNING
T-0:bootstrap-monitor EXITED
T-0:certificate_authority-{hash-generic}-on-watch RUNNING
T-0:crond-{hash-generic}-on-watch RUNNING
......
......@@ -39,4 +39,4 @@ eggs =
cns.recipe.symlink = 0.2.3
collective.recipe.environment = 0.2.0
plone.recipe.command = 1.1
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -53,7 +53,7 @@ mysqlclient = 1.3.12
# indirect dependancies
cp.recipe.cmd = 0.5
plone.recipe.command = 1.1
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
zope.exceptions = 4.0.7
zope.testing = 4.1.3
zc.recipe.testrunner = 2.0.0
......
......@@ -61,7 +61,7 @@ output = ${buildout:directory}/template-default.cfg
mode = 0644
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
dnspython = 1.15.0
PyXML = 0.8.5
WebOb = 1.8.5
......
......@@ -15,4 +15,4 @@ md5sum = efd3b712a2294207f265a9c45648d5cf
mode = 0644
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -23,5 +23,5 @@ gems +=
fluent-plugin-bin
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
rubygemsrecipe = 0.2.2+slapos001
......@@ -337,5 +337,5 @@ cns.recipe.symlink = 0.2.3
docutils = 0.12
plone.recipe.command = 1.1
rubygemsrecipe = 0.2.2+slapos001
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
z3c.recipe.scripts = 1.0.1
......@@ -42,4 +42,4 @@ mode = 755
md5sum = 78b77a6bda9958f547f7d89b747731e3
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -53,5 +53,5 @@ context =
# Pin versions of eggs used that are not already pinned by stack/slapos.cfg
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
rubygemsrecipe = 0.2.2+slapos001
......@@ -71,7 +71,7 @@ async = 0.6.1
gitdb = 0.5.4
pycrypto = 2.6
rdiff-backup = 1.0.5+SlapOSPatched001
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
smmap = 0.8.2
plone.recipe.command = 1.1
......@@ -48,4 +48,4 @@ md5sum = 8cde04bfd0c0e9bd56744b988275cfd8
PyRSS2Gen = 1.1
cns.recipe.symlink = 0.2.3
plone.recipe.command = 1.1
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -116,7 +116,7 @@ output = ${buildout:directory}/runTestSuite.in
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
selenium = 3.14.1
urllib3 = 1.24
certifi = 2018.10.15
\ No newline at end of file
......@@ -85,7 +85,7 @@ pyzmq = 16.0.2
scikit-learn = 0.18.1
seaborn = 0.7.1
simplegeneric = 0.8.1
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
statsmodels = 0.8.0
terminado = 0.6
tornado = 4.4.2
......
......@@ -198,7 +198,7 @@ websockify = 0.5.1
collective.recipe.environment = 0.2.0
gitdb = 0.6.4
pycurl = 7.43.0
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
smmap = 0.9.0
numpy = 1.16.4
......@@ -28,10 +28,8 @@
import httplib
import json
import os
import re
import requests
import slapos.util
import subprocess
import sqlite3
import urlparse
import unittest
......@@ -39,20 +37,10 @@ import unittest
from slapos.recipe.librecipe import generateHashFromFiles
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
has_kvm = os.access('/dev/kvm', os.R_OK|os.W_OK)
skipUnlessKvm = unittest.skipUnless(has_kvm, 'kvm not loaded or not allowed')
def sanityCheck():
try:
output = subprocess.check_output("lsmod | grep kvm_intel", shell=True)
except subprocess.CalledProcessError as e:
state = False
output = e.output
else:
state = True
if state is True and re.search(r'kvm.*kvm_intel', output):
return True
if sanityCheck():
if has_kvm:
setUpModule, InstanceTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software.cfg')))
......@@ -61,12 +49,11 @@ else:
class SanityCheckTestCase(unittest.TestCase):
def test_kvm_sanity_check(self):
if not(sanityCheck()):
self.fail('This environment is not usable for kvm testing, as it '
'lacks kvm_intel kernel module')
self.fail('This environment is not usable for kvm testing,'
' as it lacks kvm_intel kernel module')
@unittest.skipIf(not sanityCheck(), 'missing kvm_intel module')
@skipUnlessKvm
class ServicesTestCase(InstanceTestCase):
def test_hashes(self):
hash_files = [
......@@ -162,7 +149,7 @@ class MonitorAccessMixin(object):
)
@unittest.skipIf(not sanityCheck(), 'missing kvm_intel module')
@skipUnlessKvm
class TestAccessDefault(MonitorAccessMixin, InstanceTestCase):
__partition_reference__ = 'ad'
expected_partition_with_monitor_base_url_count = 1
......@@ -179,7 +166,7 @@ class TestAccessDefault(MonitorAccessMixin, InstanceTestCase):
self.assertFalse('url-additional' in connection_parameter_dict)
@unittest.skipIf(not sanityCheck(), 'missing kvm_intel module')
@skipUnlessKvm
class TestAccessDefaultAdditional(MonitorAccessMixin, InstanceTestCase):
__partition_reference__ = 'ada'
expected_partition_with_monitor_base_url_count = 1
......@@ -210,7 +197,7 @@ class TestAccessDefaultAdditional(MonitorAccessMixin, InstanceTestCase):
self.assertTrue('<title>noVNC</title>' in result.text)
@unittest.skipIf(not sanityCheck(), 'missing kvm_intel module')
@skipUnlessKvm
class TestAccessKvmCluster(MonitorAccessMixin, InstanceTestCase):
__partition_reference__ = 'akc'
expected_partition_with_monitor_base_url_count = 2
......@@ -241,7 +228,7 @@ class TestAccessKvmCluster(MonitorAccessMixin, InstanceTestCase):
self.assertFalse('kvm0-url-additional' in connection_parameter_dict)
@unittest.skipIf(not sanityCheck(), 'missing kvm_intel module')
@skipUnlessKvm
class TestAccessKvmClusterAdditional(MonitorAccessMixin, InstanceTestCase):
__partition_reference__ = 'akca'
expected_partition_with_monitor_base_url_count = 2
......@@ -282,7 +269,7 @@ class TestAccessKvmClusterAdditional(MonitorAccessMixin, InstanceTestCase):
self.assertTrue('<title>noVNC</title>' in result.text)
@unittest.skipIf(not sanityCheck(), 'missing kvm_intel module')
@skipUnlessKvm
class TestInstanceResilient(InstanceTestCase):
__partition_reference__ = 'ir'
instance_max_retry = 20
......@@ -309,7 +296,7 @@ class TestInstanceResilient(InstanceTestCase):
'takeover-kvm-1-url',
'url']))
@unittest.skipIf(not sanityCheck(), 'missing kvm_intel module')
@skipUnlessKvm
class TestAccessResilientAdditional(InstanceTestCase):
__partition_reference__ = 'ara'
expected_partition_with_monitor_base_url_count = 1
......
......@@ -14,7 +14,7 @@
# not need these here).
[template]
filename = instance.cfg
md5sum = d778b6f436ae6864819eb2ff2d12a86f
md5sum = dc9770bacea2c504b92ad2162e58d222
[template-monitor]
_update_hash_filename_ = instance-monitor.cfg.jinja2
......@@ -30,7 +30,7 @@ md5sum = 9e237dbdda59e788202f0da194a57d41
[template-monitor-edgebot]
_update_hash_filename_ = instance-monitor-edgebot.cfg.jinja2
md5sum = 8786e4245db0d27dfa4815222d970e52
md5sum = f28a329e830ed737d468abcb4e89e1a2
[network-bench-cfg]
filename = network_bench.cfg.in
......@@ -42,4 +42,4 @@ md5sum = cad2402bbd21907cfed6bc5af8c5d3ab
[template-surykatka-ini]
_update_hash_filename_ = surykatka.ini.jinja2
md5sum = 40870921e05d93b5843ab34abd7e3902
md5sum = a2de719a5a65438c8c3ee5195442beb6
......@@ -22,7 +22,19 @@
"check-certificate-expiration-days": {
"default": "15",
"title": "Default certificate expiration days check",
"description": "Default amount of days to consider certitifcate as being to-be-expired (default: 15).",
"description": "Default amount of days to consider certificate as being to-be-expired (default: 15).",
"type": "string"
},
"check-maximum-elapsed-time": {
"default": "2",
"title": "Default maximum elapsed time for a site to reply (seconds)",
"description": "Default maximum elapsed time for a site to reply to be considered good (default: 2s).",
"type": "string"
},
"failure-amount": {
"default": "1",
"title": "Default amount of failures to consider URL as in bad state",
"description": "Default amount of failures to consider URL as in bad state, can be set to higher value for endpoints with accepted short outages (default: 1).",
"type": "string"
}
}
......
......@@ -21,7 +21,19 @@
"check-certificate-expiration-days": {
"default": "Master default",
"title": "Certificate expiration days check",
"description": "Default amount of days to consider certitifcate as being to-be-expired (default: comes from master partition).",
"description": "Amount of days to consider certificate as being to-be-expired (default: comes from master partition).",
"type": "string"
},
"check-maximum-elapsed-time": {
"default": "Master default",
"title": "Maximum elapsed time for a site to reply (seconds)",
"description": "Maximum elapsed time for a site to reply to be considered good.(default: comes from master partition).",
"type": "string"
},
"failure-amount": {
"default": "Master default",
"title": "Amount of failures to consider URL as in bad state",
"description": "Amount of failures to consider URL as in bad state, can be set to higher value for endpoints with accepted short outages (default: comes from master partition).",
"type": "string"
}
}
......
......@@ -5,7 +5,7 @@
{%- do CONFIGURATION.__setitem__(k[14:], v) %}
{%- endif %}
{%- endfor %}
{%- set slave_instance_list = [] %}
{%- set slave_instance_dict = {} %}
{%- set extra_slave_instance_list = slapparameter_dict.get('extra_slave_instance_list') %}
{%- if extra_slave_instance_list %}
{#- Create slaves to process with setting up defaults #}
......@@ -16,19 +16,31 @@
{%- if 'check-certificate-expiration-days' not in slave %}
{%- do slave.__setitem__('check-certificate-expiration-days', CONFIGURATION['check-certificate-expiration-days']) %}
{%- endif %}
{%- if 'failure-amount' not in slave %}
{%- do slave.__setitem__('failure-amount', CONFIGURATION['failure-amount']) %}
{%- endif %}
{%- if 'check-maximum-elapsed-time' not in slave %}
{%- do slave.__setitem__('check-maximum-elapsed-time', CONFIGURATION['check-maximum-elapsed-time']) %}
{%- endif %}
{%- if 'check-frontend-ip' not in slave %}
{%- do slave.__setitem__('check-frontend-ip', CONFIGURATION['check-frontend-ip']) %}
{%- endif %}
{%- if 'url' in slave %}
{%- do slave_instance_list.append(slave) %}
{%- set class = slave['check-maximum-elapsed-time'] %}
{%- if class not in slave_instance_dict %}
{%- do slave_instance_dict.__setitem__(class, []) %}
{%- endif %}
{%- do slave_instance_dict[class].append(slave) %}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- set part_list = [] %}
{%- for slave in sorted(slave_instance_list) %}
{%- set part_id = 'http-query-' ~ slave['slave_reference'] ~ '-promise' %}
{%- do part_list.append(part_id) %}
{%- set safe_name = part_id.replace('_', '').replace('.', '-').replace(' ', '-') %}
{%- for class, slave_instance_list in slave_instance_dict.items() %}
{#- class is used to separate surykatka with different timeouts #}
{%- for slave in sorted(slave_instance_list) %}
{%- set part_id = 'http-query-' ~ slave['slave_reference'] ~ '-promise' %}
{%- do part_list.append(part_id) %}
{%- set safe_name = part_id.replace('_', '').replace('.', '-').replace(' ', '-') %}
[{{part_id}}]
<= monitor-promise-base
module = check_surykatka_json
......@@ -37,75 +49,81 @@ config-report = http_query
config-url = {{ slave['url'] }}
config-status-code = {{ slave['check-status-code'] }}
config-certificate-expiration-days = {{ slave['check-certificate-expiration-days'] }}
config-failure-amount = {{ slave['failure-amount'] }}
config-maximum-elapsed-time = {{ slave['check-maximum-elapsed-time'] }}
config-ip-list = {{ slave['check-frontend-ip'] }}
config-json-file = ${surykatka-config:json}
{% endfor %}
config-json-file = ${surykatka-config-{{ class }}:json}
{%- endfor %}
[surykatka-bot-promise]
[surykatka-bot-promise-{{ class }}]
<= monitor-promise-base
module = check_surykatka_json
name = surykatka-bot-promise.py
name = surykatka-bot-promise-{{ class }}.py
config-report = bot_status
config-json-file = ${surykatka-config:json}
[buildout]
extends = {{ monitor_template_output }}
parts =
cron
cron-entry-surykatka-status
monitor-base
publish-connection-information
surykatka
surykatka-bot-promise
{% for part_id in sorted(part_list) %}
{{ part_id }}
{% endfor %}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
config-json-file = ${surykatka-config-{{ class }}:json}
[surykatka-config]
[surykatka-config-{{ class }}]
recipe = slapos.recipe.template:jinja2
db = ${directory:srv}/surykatka.db
rendered = ${directory:etc}/surykatka.ini
db = ${directory:srv}/surykatka-{{ class }}.db
rendered = ${directory:etc}/surykatka-{{ class }}.ini
template = {{ template_surykatka_ini }}
slave_instance_list = {{ dumps(slave_instance_list) }}
nameserver = {{ dumps(CONFIGURATION['nameserver']) }}
json = ${directory:srv}/surykatka.json
json = ${directory:srv}/surykatka-{{ class }}.json
{#- timeout is just a bit bigger than class time #}
timeout = {{ int(class) + 2 }}
context =
import json_module json
key db :db
key nameserver :nameserver
key slave_instance_list :slave_instance_list
key timeout :timeout
[surykatka]
[surykatka-{{ class }}]
recipe = slapos.cookbook:wrapper
config = ${surykatka-config:rendered}
config = ${surykatka-config-{{ class }}:rendered}
command-line =
{{ surykatka_binary }} --run crawl --reload --configuration ${:config}
wrapper-path = ${monitor-directory:service}/${:_buildout_section_name_}
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
[surykatka-status-json]
[surykatka-status-json-{{ class }}]
recipe = slapos.recipe.template:jinja2
json = ${surykatka-config-{{ class }}:json}
template = inline:#!/bin/sh
if {{ surykatka_binary }} --run status --configuration ${surykatka:config} --output json > ${surykatka-config:json}.tmp ; then
mv -f ${surykatka-config:json}.tmp ${surykatka-config:json}
if {{ surykatka_binary }} --run status --configuration ${surykatka-{{ class }}:config} --output json > ${:json}.tmp ; then
mv -f ${:json}.tmp ${:json}
else
rm -f ${surykatka-config:json}.tmp
rm -f ${:json}.tmp
fi
rendered = ${monitor-directory:bin}/${:_buildout_section_name_}
mode = 0755
[cron-entry-surykatka-status]
[cron-entry-surykatka-status-{{ class }}]
recipe = slapos.cookbook:cron.d
cron-entries = ${directory:etc}/cron.d
name = surykatka-status
name = surykatka-status-{{ class }}
frequency = */2 * * * *
command = ${surykatka-status-json:rendered}
command = ${surykatka-status-json-{{ class }}:rendered}
{%- do part_list.append('surykatka-' + class) %}
{%- do part_list.append('surykatka-bot-promise-' + class) %}
{%- do part_list.append('cron-entry-surykatka-status-' + class) %}
{%- endfor %}
[buildout]
extends = {{ monitor_template_output }}
parts =
cron
monitor-base
publish-connection-information
{% for part_id in sorted(part_list) %}
{{ part_id }}
{% endfor %}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-connection-information]
recipe = slapos.cookbook:publish.serialised
......
......@@ -44,6 +44,11 @@ context = import json_module json
raw template_json_edgetest_test ${json-test-template:target}
mode = 0644
[surykatka-wrapped]
recipe = slapos.cookbook:wrapper
wrapper-path = $${buildout:bin-directory}/surykatka-wrapped
command-line = ${surykatka:location}/bin/python3.7 ${surykatka:executable}
[instance-base-edgebot]
recipe = slapos.recipe.template:jinja2
template = ${template-monitor-edgebot:target}
......@@ -59,7 +64,7 @@ context = import json_module json
key slapparameter_dict slap-configuration:configuration
key slap_software_type slap-configuration:slap-software-type
raw software_type edgebot
key surykatka_binary :surykatka-binary
key surykatka_binary surykatka-wrapped:wrapper-path
key template_surykatka_ini :template-surykatka-ini
raw buildout_bin ${buildout:bin-directory}
raw monitor_template_output ${monitor-template:output}
......@@ -79,6 +84,8 @@ configuration.check-status-code = 200
configuration.nameserver =
configuration.check-frontend-ip =
configuration.check-certificate-expiration-days = 15
configuration.check-maximum-elapsed-time = 2
configuration.failure-amount = 2
# use monitor-base-port to have monitor listening on each instance
# on different port and also on different port than other services
# it makes it possible to instantiate it correctly on signle IP, for
......
......@@ -87,4 +87,4 @@ eggs +=
plone.recipe.command
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
[SURYKATKA]
INTERVAL = 120
TIMEOUT = {{ timeout }}
SQLITE = {{ db }}
{%- set nameserver_list = nameserver.split() %}
{%- if len(nameserver_list) > 0 %}
......
This diff is collapsed.
......@@ -19,7 +19,7 @@ parts +=
versions = versions
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
[template-instance]
......
......@@ -166,7 +166,7 @@ persistent = 4.5.0
pycrypto = 2.6.1
pycurl = 7.43.0
setproctitle = 1.1.10
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
smmap2 = 2.0.1
transaction = 1.7.0
zodbpickle = 1.0.4
......
......@@ -82,4 +82,4 @@ packages +=
screen xz-utils
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -33,7 +33,7 @@ rendered = ${buildout:directory}/instance-nextcloud.cfg
extensions = jinja2.ext.do
context =
key gzip_location gzip:location
key python3_location python3.6.6:location
key python3_location python3:location
key news_updater_location news-updater:location
key php_location apache-php:location
raw redis_bin ${redis:location}/bin/redis-server
......
......@@ -45,7 +45,7 @@ output = ${buildout:directory}/instance-nginx.cfg.in
mode = 0644
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
inotifyx = 0.2.2
gitdb2 = 2.0.3
smmap2 = 2.0.3
......@@ -36,4 +36,4 @@ url = https://downloads.sourceforge.net/project/plantuml/1.2018.13/plantuml.1.20
md5sum = cda05c8163237de039d777c197b3d282
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -52,7 +52,7 @@ mode = 0644
PyRSS2Gen = 1.1
cns.recipe.symlink = 0.2.3
plone.recipe.command = 1.1
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
dnspython = 1.15.0
passlib = 1.7.1
GitPython = 2.1.11
......
......@@ -44,5 +44,5 @@ context =
[versions]
collective.recipe.environment = 1.1.0
collective.recipe.grp = 1.1.0
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
plone.recipe.command = 1.1
......@@ -34,4 +34,4 @@ context =
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -36,4 +36,4 @@ output = ${buildout:directory}/instance.cfg
output = ${buildout:directory}/runTestSuite.in
[versions]
slapos.recipe.template = 4.3
\ No newline at end of file
slapos.recipe.template = 4.4
\ No newline at end of file
......@@ -89,7 +89,7 @@ context =
[versions]
re6stnet = 0.551
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
# Required by:
# re6stnet==0.533
......
......@@ -34,4 +34,4 @@ output = ${buildout:directory}/template.cfg
[versions]
plone.recipe.command = 1.1
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -46,4 +46,4 @@ output = ${buildout:directory}/template-selenium.cfg
[versions]
plone.recipe.command = 1.1
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -11,4 +11,4 @@ extends = common.cfg
Pygments = 1.6
collective.recipe.environment = 0.2.0
collective.recipe.template = 1.10
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -191,7 +191,7 @@ plantuml = 0.1.1
pysftp = 0.2.9
requests-toolbelt = 0.8.0
selenium = 3.141.0
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
# modern versions for SSL fixed support
requests = 2.20.0
......
......@@ -15,5 +15,5 @@
[template]
filename = instance.cfg
md5sum = b48db2861644d9e9c30d2652c100d70e
md5sum = 47eb5f8e6f56729e2ce0e6213bccf4f7
......@@ -66,6 +66,10 @@ repository = ${slapos.recipe.template-repository:location}
<= download-source
repository = ${slapos.toolbox-repository:location}
[slapos.rebootstrap]
<= download-source
repository = ${slapos.rebootstrap-repository:location}
[slapos-test-runner]
recipe = slapos.cookbook:wrapper
......@@ -73,7 +77,7 @@ wrapper-path = $${create-directory:bin}/runTestSuite
command-line =
${buildout:bin-directory}/runTestSuite
--python_interpreter=${buildout:bin-directory}/${eggs:interpreter}
--source_code_path_list=$${kedifa:location},$${caucase:location},$${erp5.util:location},$${slapos.cookbook:location},$${slapos.core:location},$${slapos.recipe.build:location},$${slapos.recipe.cmmi:location},$${slapos.recipe.template:location},$${slapos.toolbox:location},$${slapos.libnetworkcache:location}
--source_code_path_list=$${kedifa:location},$${caucase:location},$${erp5.util:location},$${slapos.cookbook:location},$${slapos.core:location},$${slapos.recipe.build:location},$${slapos.recipe.cmmi:location},$${slapos.recipe.template:location},$${slapos.toolbox:location},$${slapos.libnetworkcache:location},$${slapos.rebootstrap:location}
# Notes about environment:
# * slapos.cookbook:wrapper does not seem to allow "extending" PATH. Tests
......
......@@ -2,11 +2,11 @@
extends =
../../component/python3/buildout.cfg
software.cfg
python = python3.5
python = python3
[nghttp2]
environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:${libtool:location}/bin:${m4:location}/bin:${python3.5:location}/bin:%(PATH)s
PATH=${autoconf:location}/bin:${automake:location}/bin:${libtool:location}/bin:${m4:location}/bin:${python3:location}/bin:%(PATH)s
[supervisor-repository]
<= git-clone-repository
......
......@@ -89,6 +89,10 @@ egg = slapos.toolbox
setup = ${slapos.toolbox-repository:location}
depends = ${slapos.core-setup:egg}
[slapos.rebootstrap-setup]
<= setup-develop-egg
egg = slapos.rebootstrap[test]
setup = ${slapos.rebootstrap-repository:location}
[eggs]
recipe = zc.recipe.egg
......@@ -109,6 +113,7 @@ eggs =
${slapos.recipe.template-setup:egg}
${slapos.toolbox-setup:egg}
${slapos.libnetworkcache-setup:egg}
${slapos.rebootstrap-setup:egg}
mock
zope.testing
httmock
......@@ -176,6 +181,9 @@ repository = https://lab.nexedi.com/nexedi/slapos.recipe.cmmi.git
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.toolbox.git
[slapos.rebootstrap-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.rebootstrap.git
[template]
recipe = slapos.recipe.template
......@@ -191,7 +199,7 @@ erp5.util =
# All depencies should be pinned.
Pygments = 2.1.3
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
zc.lockfile = 1.4
bcrypt = 3.1.4
dnspython = 1.15.0
......
......@@ -170,7 +170,7 @@ gitdb = 0.6.4
gunicorn = 19.7.1
prettytable = 0.7.2
pycurl = 7.43.0
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
collective.recipe.environment = 0.2.0
smmap = 0.9.0
lockfile = 0.12.2
......
......@@ -73,5 +73,5 @@ url = ${:_profile_base_location_}/config/${:filename}
filename = user_db.csv
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
apache-libcloud = 2.4.0
......@@ -59,7 +59,7 @@ eggs = collective.recipe.template
collective.recipe.template = 1.11
plone.recipe.command = 1.1
slapos.recipe.build = 0.28
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
# Replicate slapos stack, but without shacache to not have to compile the entire world for a simple test.
[buildout]
......
......@@ -26,10 +26,6 @@ parts =
[nodejs]
<= nodejs-10.6.0
[python3]
<= python3.6.6
[yarn]
# this could become a component, but it needs to be invoked from nodejs explicitly,
# otherwise it uses system's nodejs
......@@ -216,4 +212,4 @@ mode = 0644
output = ${buildout:directory}/instance.cfg
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -30,4 +30,4 @@ output = ${buildout:directory}/instance.cfg
<= download-base
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -62,4 +62,4 @@ md5sum = 0ea12a4ad2d2e3d406476e35b8d3e3fb
mode = 640
[versions]
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
......@@ -85,7 +85,7 @@ PasteScript = 2.0.2
WSGIUtils = 0.7
python-magic = 0.4.6
rdiff-backup = 1.0.5+SlapOSPatched001
slapos.recipe.template = 4.3
slapos.recipe.template = 4.4
# Required by:
# PasteScript==2.0
......
......@@ -138,14 +138,14 @@ pytz = 2016.10
requests = 2.13.0
six = 1.12.0
slapos.cookbook = 1.0.124
slapos.core = 1.5.8
slapos.core = 1.5.9
slapos.extension.strip = 0.4
slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.20
slapos.rebootstrap = 4.3
slapos.rebootstrap = 4.4
slapos.recipe.build = 0.42
slapos.recipe.cmmi = 0.12
slapos.toolbox = 0.104
slapos.toolbox = 0.106
stevedore = 1.21.0
subprocess32 = 3.5.3
unicodecsv = 0.14.1
......@@ -261,7 +261,7 @@ rpdb = 0.1.5
# Required by:
# slapos.core==1.5.0
supervisor = 3.3.3
supervisor = 4.1.0
# Required by:
# slapos.toolbox==0.94
......