Commit 2d361404 authored by Kirill Smelkov's avatar Kirill Smelkov

Merge branch 'master' into x/lte-multiru

* master: (34 commits)
  software/end-to-end-testing: remove pattern from input schema
  stack/slapos: version up slapos.core 1.10.8
  software/end-to-end-testing: add end-to-end-testing software Use runTestSuite interface to launch tests that request instances on actual SlapOS cloud.
  python-xmlsec: install setuptools-scm as wheel (fix python3 install)
  component/xmlsec: version up 1.2.37 ( on py3 only )
  software/fluentd/test: adjust test for msgpack >= 1.0
  component/zodbtools: remove profiles for ZODB4* tests on python3
  software/slapos-testing: remove redundant eggs
  *: only install backports-lzma on python2
  stack/erp5: backport DateTime fixes
  component/nodejs: remove unused 8.9.4
  software/dream: remove useless version pins
  software/dream: pin dream repository revision
  software/dream: use current nodejs version
  software/dream: follow buildout naming conventions for section names
  pygolang: Unbreak tests
  ZEO: Fix ZEO4-wc2 installation, take2
  wendelin.core: tests: Pin ZopeUndo
  wendelin.core: Unbreak tests
  software/ors-amarisoft: update changelog
  ...
parents cae1653b 20c0623a
...@@ -48,6 +48,7 @@ recipe = zc.recipe.egg:develop ...@@ -48,6 +48,7 @@ recipe = zc.recipe.egg:develop
setup = ${ZEO4-repository:location} setup = ${ZEO4-repository:location}
egg = ZEO egg = ZEO
egg-versions = egg-versions =
ZEO = 4.3.1
[ZEO4-repository] [ZEO4-repository]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
......
...@@ -24,6 +24,7 @@ extends = ...@@ -24,6 +24,7 @@ extends =
../icu/buildout.cfg ../icu/buildout.cfg
../openssl/buildout.cfg ../openssl/buildout.cfg
../libnsl/buildout.cfg ../libnsl/buildout.cfg
../libsodium/buildout.cfg
../sqlite3/buildout.cfg ../sqlite3/buildout.cfg
../oniguruma/buildout.cfg ../oniguruma/buildout.cfg
../xz-utils/buildout.cfg ../xz-utils/buildout.cfg
...@@ -78,9 +79,12 @@ configure-options = ...@@ -78,9 +79,12 @@ configure-options =
--enable-mbstring --enable-mbstring
--enable-pcntl --enable-pcntl
--enable-session --enable-session
--enable-sysvsem
--with-apxs2=${apache:location}/bin/apxs --with-apxs2=${apache:location}/bin/apxs
--with-bz2=${bzip2:location} --with-bz2=${bzip2:location}
--with-curl --with-curl
--with-freetype
--with-jpeg
--with-gettext=${gettext:location} --with-gettext=${gettext:location}
--with-imap-ssl --with-imap-ssl
--with-imap=${cclient:location} --with-imap=${cclient:location}
...@@ -88,6 +92,7 @@ configure-options = ...@@ -88,6 +92,7 @@ configure-options =
--with-mysqli=mysqlnd --with-mysqli=mysqlnd
--with-openssl=${openssl:location} --with-openssl=${openssl:location}
--with-pdo-mysql=mysqlnd --with-pdo-mysql=mysqlnd
--with-sodium=${libsodium:location}
--with-zip --with-zip
--with-zlib --with-zlib
...@@ -95,7 +100,7 @@ configure-options = ...@@ -95,7 +100,7 @@ configure-options =
# It will create a pear/temp directory under the SR instead of a shared /tmp/pear/temp. # It will create a pear/temp directory under the SR instead of a shared /tmp/pear/temp.
# XXX we could mkdir tmp there # XXX we could mkdir tmp there
environment = environment =
PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${libzip:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${curl:location}/lib/pkgconfig:${icu:location}/lib/pkgconfig:${oniguruma:location}/lib/pkgconfig:${argon2:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${mariadb:location}/lib/pkgconfig:${libjpeg:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${libiconv:location}/lib/pkgconfig:${libzip:location}/lib/pkgconfig PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig:${libzip:location}/lib/pkgconfig:${sqlite3:location}/lib/pkgconfig:${curl:location}/lib/pkgconfig:${icu:location}/lib/pkgconfig:${oniguruma:location}/lib/pkgconfig:${argon2:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig:${mariadb:location}/lib/pkgconfig:${libjpeg:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${libiconv:location}/lib/pkgconfig:${libzip:location}/lib/pkgconfig:${libsodium:location}/lib/pkgconfig
PATH=${pkgconfig:location}/bin:${bzip2:location}/bin:${libxml2:location}/bin:${xz-utils:location}/bin:%(PATH)s PATH=${pkgconfig:location}/bin:${bzip2:location}/bin:${libxml2:location}/bin:${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${libzip:location}/include CPPFLAGS=-I${libzip:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath -Wl,${bzip2:location}/lib -Wl,-rpath -Wl,${curl:location}/lib -L${libtool:location}/lib -Wl,-rpath -Wl,${libtool:location}/lib -L${mariadb:location}/lib -Wl,-rpath -Wl,${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libzip:location}/lib -Wl,-rpath -Wl,${libzip:location}/lib -L${argon2:location}/lib/x86_64-linux-gnu -Wl,-rpath -Wl,${argon2:location}/lib/x86_64-linux-gnu -Wl,-rpath -Wl,${zstd:location}/lib -L${libnsl:location}/lib -Wl,-rpath -Wl,${libnsl:location}/lib -L${sqlite3:location}/lib -Wl,-rpath -Wl,${sqlite3:location}/lib LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath -Wl,${bzip2:location}/lib -Wl,-rpath -Wl,${curl:location}/lib -L${libtool:location}/lib -Wl,-rpath -Wl,${libtool:location}/lib -L${mariadb:location}/lib -Wl,-rpath -Wl,${mariadb:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -L${libzip:location}/lib -Wl,-rpath -Wl,${libzip:location}/lib -L${argon2:location}/lib/x86_64-linux-gnu -Wl,-rpath -Wl,${argon2:location}/lib/x86_64-linux-gnu -Wl,-rpath -Wl,${zstd:location}/lib -L${libnsl:location}/lib -Wl,-rpath -Wl,${libnsl:location}/lib -L${sqlite3:location}/lib -Wl,-rpath -Wl,${sqlite3:location}/lib
......
From a02c80e17f794dc5eaea1c4edd3a2a3277a13638 Mon Sep 17 00:00:00 2001
From: Kazuhiko SHIOZAKI <kazuhiko@nexedi.com>
Date: Tue, 18 Jul 2023 10:26:54 +0200
Subject: [PATCH 1/4] Cast int to float in compare methods.
---
src/DateTime/DateTime.py | 30 ++++++++++-------------------
src/DateTime/tests/test_datetime.py | 17 ++++++++++++++++
2 files changed, 27 insertions(+), 20 deletions(-)
diff --git a/src/DateTime/DateTime.py b/src/DateTime/DateTime.py
index 2d2d97f..c141306 100644
--- a/src/DateTime/DateTime.py
+++ b/src/DateTime/DateTime.py
@@ -1256,12 +1256,10 @@ class DateTime(object):
"""
if t is None:
t = 0
- if isinstance(t, float):
+ if isinstance(t, (float, int)):
return self._micros > long(t * 1000000)
- try:
+ else:
return self._micros > t._micros
- except AttributeError:
- return self._micros > t
__gt__ = greaterThan
@@ -1279,12 +1277,10 @@ class DateTime(object):
"""
if t is None:
t = 0
- if isinstance(t, float):
+ if isinstance(t, (float, int)):
return self._micros >= long(t * 1000000)
- try:
+ else:
return self._micros >= t._micros
- except AttributeError:
- return self._micros >= t
__ge__ = greaterThanEqualTo
@@ -1301,12 +1297,10 @@ class DateTime(object):
"""
if t is None:
t = 0
- if isinstance(t, float):
+ if isinstance(t, (float, int)):
return self._micros == long(t * 1000000)
- try:
+ else:
return self._micros == t._micros
- except AttributeError:
- return self._micros == t
def notEqualTo(self, t):
"""Compare this DateTime object to another DateTime object
@@ -1348,12 +1342,10 @@ class DateTime(object):
"""
if t is None:
t = 0
- if isinstance(t, float):
+ if isinstance(t, (float, int)):
return self._micros < long(t * 1000000)
- try:
+ else:
return self._micros < t._micros
- except AttributeError:
- return self._micros < t
__lt__ = lessThan
@@ -1370,12 +1362,10 @@ class DateTime(object):
"""
if t is None:
t = 0
- if isinstance(t, float):
+ if isinstance(t, (float, int)):
return self._micros <= long(t * 1000000)
- try:
+ else:
return self._micros <= t._micros
- except AttributeError:
- return self._micros <= t
__le__ = lessThanEqualTo
diff --git a/src/DateTime/tests/test_datetime.py b/src/DateTime/tests/test_datetime.py
index 249e79a..e6b3f93 100644
--- a/src/DateTime/tests/test_datetime.py
+++ b/src/DateTime/tests/test_datetime.py
@@ -228,6 +228,23 @@ class DateTimeTests(unittest.TestCase):
self.assertTrue(dt.lessThanEqualTo(dt1))
self.assertTrue(dt.notEqualTo(dt1))
self.assertFalse(dt.equalTo(dt1))
+ # Compare a date to float
+ dt = DateTime(1.0)
+ self.assertFalse(dt.greaterThan(1.0))
+ self.assertTrue(dt.greaterThanEqualTo(1.0))
+ self.assertFalse(dt.lessThan(1.0))
+ self.assertTrue(dt.lessThanEqualTo(1.0))
+ self.assertFalse(dt.notEqualTo(1.0))
+ self.assertTrue(dt.equalTo(1.0))
+ # Compare a date to int
+ dt = DateTime(1)
+ self.assertEqual(dt, DateTime(1.0))
+ self.assertFalse(dt.greaterThan(1))
+ self.assertTrue(dt.greaterThanEqualTo(1))
+ self.assertFalse(dt.lessThan(1))
+ self.assertTrue(dt.lessThanEqualTo(1))
+ self.assertFalse(dt.notEqualTo(1))
+ self.assertTrue(dt.equalTo(1))
def test_compare_methods_none(self):
# Compare a date to None
--
2.40.1
From 892e66132025ab8c213e4be57dd10f0f8eec7e60 Mon Sep 17 00:00:00 2001
From: Kazuhiko SHIOZAKI <kazuhiko@nexedi.com>
Date: Fri, 14 Jul 2023 21:10:06 +0200
Subject: [PATCH 2/4] Fix compare methods between DateTime(0) and None (fix
#52).
This is a fixup commit of 'further py3 work' that changed the behaviour of compare methods between DateTime(0) and None.
Now None is less than any DateTime instance including DateTime(0), just same as DateTime 2.
---
src/DateTime/DateTime.py | 10 +++++-----
src/DateTime/tests/test_datetime.py | 14 +++++++-------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/DateTime/DateTime.py b/src/DateTime/DateTime.py
index c141306..caf67e1 100644
--- a/src/DateTime/DateTime.py
+++ b/src/DateTime/DateTime.py
@@ -1255,7 +1255,7 @@ class DateTime(object):
long integer microseconds.
"""
if t is None:
- t = 0
+ return True
if isinstance(t, (float, int)):
return self._micros > long(t * 1000000)
else:
@@ -1276,7 +1276,7 @@ class DateTime(object):
long integer microseconds.
"""
if t is None:
- t = 0
+ return True
if isinstance(t, (float, int)):
return self._micros >= long(t * 1000000)
else:
@@ -1296,7 +1296,7 @@ class DateTime(object):
long integer microseconds.
"""
if t is None:
- t = 0
+ return False
if isinstance(t, (float, int)):
return self._micros == long(t * 1000000)
else:
@@ -1341,7 +1341,7 @@ class DateTime(object):
long integer microseconds.
"""
if t is None:
- t = 0
+ return False
if isinstance(t, (float, int)):
return self._micros < long(t * 1000000)
else:
@@ -1361,7 +1361,7 @@ class DateTime(object):
long integer microseconds.
"""
if t is None:
- t = 0
+ return False
if isinstance(t, (float, int)):
return self._micros <= long(t * 1000000)
else:
diff --git a/src/DateTime/tests/test_datetime.py b/src/DateTime/tests/test_datetime.py
index e6b3f93..1dd6c32 100644
--- a/src/DateTime/tests/test_datetime.py
+++ b/src/DateTime/tests/test_datetime.py
@@ -248,13 +248,13 @@ class DateTimeTests(unittest.TestCase):
def test_compare_methods_none(self):
# Compare a date to None
- dt = DateTime('1997/1/1')
- self.assertTrue(dt.greaterThan(None))
- self.assertTrue(dt.greaterThanEqualTo(None))
- self.assertFalse(dt.lessThan(None))
- self.assertFalse(dt.lessThanEqualTo(None))
- self.assertTrue(dt.notEqualTo(None))
- self.assertFalse(dt.equalTo(None))
+ for dt in (DateTime('1997/1/1'), DateTime(0)):
+ self.assertTrue(dt.greaterThan(None))
+ self.assertTrue(dt.greaterThanEqualTo(None))
+ self.assertFalse(dt.lessThan(None))
+ self.assertFalse(dt.lessThanEqualTo(None))
+ self.assertTrue(dt.notEqualTo(None))
+ self.assertFalse(dt.equalTo(None))
def test_pickle(self):
dt = DateTime()
--
2.40.1
From 4a9798072c87d2fe53b2e1e15b004ff982f9686a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Thu, 30 Nov 2023 06:19:54 +0100
Subject: [PATCH 3/4] Make it possible to pickle datetimes returned by
asdatetime
Fixes #58
---
src/DateTime/pytz_support.py | 5 +++++
src/DateTime/tests/test_datetime.py | 7 +++++++
2 files changed, 12 insertions(+)
diff --git a/src/DateTime/pytz_support.py b/src/DateTime/pytz_support.py
index 9ebf3db..e0746ea 100644
--- a/src/DateTime/pytz_support.py
+++ b/src/DateTime/pytz_support.py
@@ -199,9 +199,14 @@ for hour in range(0, 13):
_old_zmap['+%s00' % fhour] = 'GMT+%i' % hour
+def _p(zone):
+ return _numeric_timezones[zone]
+
+
def _static_timezone_factory(data):
zone = data[0]
cls = type(zone, (StaticTzInfo,), dict(
+ __reduce__=lambda _: (_p, (zone, )),
zone=zone,
_utcoffset=memorized_timedelta(data[5][0][0]),
_tzname=data[6][:-1])) # strip the trailing null
diff --git a/src/DateTime/tests/test_datetime.py b/src/DateTime/tests/test_datetime.py
index 1dd6c32..b9eeea9 100644
--- a/src/DateTime/tests/test_datetime.py
+++ b/src/DateTime/tests/test_datetime.py
@@ -270,6 +270,13 @@ class DateTimeTests(unittest.TestCase):
for key in DateTime.__slots__:
self.assertEqual(getattr(dt, key), getattr(new, key))
+ def test_pickle_asdatetime_with_tz(self):
+ dt = DateTime('2002/5/2 8:00am GMT+8')
+ data = pickle.dumps(dt.asdatetime(), 1)
+ new = DateTime(pickle.loads(data))
+ for key in DateTime.__slots__:
+ self.assertEqual(getattr(dt, key), getattr(new, key))
+
def test_pickle_with_numerical_tz(self):
for dt_str in ('2007/01/02 12:34:56.789 +0300',
'2007/01/02 12:34:56.789 +0430',
--
2.40.1
From 6ac321746ab86374871623ddaf414b7948325d22 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Sun, 3 Dec 2023 15:57:01 +0100
Subject: [PATCH 4/4] Repair equality comparison between DateTime instances and
other types
Fixes #60
---
src/DateTime/DateTime.py | 20 +++++++++++++++-----
src/DateTime/tests/test_datetime.py | 17 +++++++++++++++++
2 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/src/DateTime/DateTime.py b/src/DateTime/DateTime.py
index caf67e1..84570b9 100644
--- a/src/DateTime/DateTime.py
+++ b/src/DateTime/DateTime.py
@@ -1258,8 +1258,10 @@ class DateTime(object):
return True
if isinstance(t, (float, int)):
return self._micros > long(t * 1000000)
- else:
+ try:
return self._micros > t._micros
+ except AttributeError:
+ return self._micros > t
__gt__ = greaterThan
@@ -1279,8 +1281,10 @@ class DateTime(object):
return True
if isinstance(t, (float, int)):
return self._micros >= long(t * 1000000)
- else:
+ try:
return self._micros >= t._micros
+ except AttributeError:
+ return self._micros >= t
__ge__ = greaterThanEqualTo
@@ -1299,8 +1303,10 @@ class DateTime(object):
return False
if isinstance(t, (float, int)):
return self._micros == long(t * 1000000)
- else:
+ try:
return self._micros == t._micros
+ except AttributeError:
+ return self._micros == t
def notEqualTo(self, t):
"""Compare this DateTime object to another DateTime object
@@ -1344,8 +1350,10 @@ class DateTime(object):
return False
if isinstance(t, (float, int)):
return self._micros < long(t * 1000000)
- else:
+ try:
return self._micros < t._micros
+ except AttributeError:
+ return self._micros < t
__lt__ = lessThan
@@ -1364,8 +1372,10 @@ class DateTime(object):
return False
if isinstance(t, (float, int)):
return self._micros <= long(t * 1000000)
- else:
+ try:
return self._micros <= t._micros
+ except AttributeError:
+ return self._micros <= t
__le__ = lessThanEqualTo
diff --git a/src/DateTime/tests/test_datetime.py b/src/DateTime/tests/test_datetime.py
index b9eeea9..970a072 100644
--- a/src/DateTime/tests/test_datetime.py
+++ b/src/DateTime/tests/test_datetime.py
@@ -230,6 +230,8 @@ class DateTimeTests(unittest.TestCase):
self.assertFalse(dt.equalTo(dt1))
# Compare a date to float
dt = DateTime(1.0)
+ self.assertTrue(dt == DateTime(1.0)) # testing __eq__
+ self.assertFalse(dt != DateTime(1.0)) # testing __ne__
self.assertFalse(dt.greaterThan(1.0))
self.assertTrue(dt.greaterThanEqualTo(1.0))
self.assertFalse(dt.lessThan(1.0))
@@ -239,12 +241,27 @@ class DateTimeTests(unittest.TestCase):
# Compare a date to int
dt = DateTime(1)
self.assertEqual(dt, DateTime(1.0))
+ self.assertTrue(dt == DateTime(1)) # testing __eq__
+ self.assertFalse(dt != DateTime(1)) # testing __ne__
self.assertFalse(dt.greaterThan(1))
self.assertTrue(dt.greaterThanEqualTo(1))
self.assertFalse(dt.lessThan(1))
self.assertTrue(dt.lessThanEqualTo(1))
self.assertFalse(dt.notEqualTo(1))
self.assertTrue(dt.equalTo(1))
+ # Compare a date to string; there is no implicit type conversion
+ # but behavior if consistent as when comparing, for example, an int
+ # and a string.
+ dt = DateTime("2023")
+ self.assertFalse(dt == "2023") # testing __eq__
+ self.assertTrue(dt != "2023") # testing __ne__
+ if sys.version_info > (3, ):
+ self.assertRaises(TypeError, dt.greaterThan, "2023")
+ self.assertRaises(TypeError, dt.greaterThanEqualTo, "2023")
+ self.assertRaises(TypeError, dt.lessThan, "2023")
+ self.assertRaises(TypeError, dt.lessThanEqualTo, "2023")
+ self.assertTrue(dt.notEqualTo("2023"))
+ self.assertFalse(dt.equalTo("2023"))
def test_compare_methods_none(self):
# Compare a date to None
--
2.40.1
...@@ -15,4 +15,5 @@ environment = ...@@ -15,4 +15,5 @@ environment =
M4=${m4:location}/bin/m4 M4=${m4:location}/bin/m4
PATH=${bison:location}/bin:${xz-utils:location}/bin:%(PATH)s PATH=${bison:location}/bin:${xz-utils:location}/bin:%(PATH)s
# CFLAGS to workaround https://github.com/westes/flex/issues/442 # CFLAGS to workaround https://github.com/westes/flex/issues/442
CFLAGS=-g -O2 -D_GNU_SOURCE # -fpic is needed to fix compilation on Fedora for slapos-node package
CFLAGS=-g -O2 -D_GNU_SOURCE -fpic
...@@ -5,7 +5,7 @@ parts = ...@@ -5,7 +5,7 @@ parts =
[libsodium] [libsodium]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://download.libsodium.org/libsodium/releases/old/unsupported/libsodium-1.0.8.tar.gz url = https://download.libsodium.org/libsodium/releases/old/libsodium-1.0.17.tar.gz
md5sum = 0a66b86fd3aab3fe4c858edcd2772760 md5sum = 0f71e2680187a1558b5461e6879342c5
configure-options = configure-options =
--disable-static --disable-static
...@@ -72,14 +72,6 @@ md5sum = 28bf6a4d98b238403fa58a0805f4a979 ...@@ -72,14 +72,6 @@ md5sum = 28bf6a4d98b238403fa58a0805f4a979
PATH = ${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s PATH = ${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s
configure-command = ./configure configure-command = ./configure
[nodejs-8.9.4]
<= nodejs-base
version = v8.9.4
md5sum = 4ddc1daff327d7e6f63da57fdfc24f55
openssl-location = ${openssl-1.0:location}
PATH = ${pkgconfig:location}/bin:${python2.7:location}/bin:%(PATH)s
configure-command = ./configure
[nodejs-8.12.0] [nodejs-8.12.0]
<= nodejs-base <= nodejs-base
version = v8.12.0 version = v8.12.0
......
...@@ -18,8 +18,10 @@ parts = ...@@ -18,8 +18,10 @@ parts =
# tune pygolang to install with all and for-tests extras. # tune pygolang to install with all and for-tests extras.
# list all_test-dependent eggs that must come through in-tree recipes.
[pygolang] [pygolang]
egg = pygolang[all_test] egg = pygolang[all_test]
depends += ${numpy:egg}
# bin/python is preinstalled with sys.path to pygolang & friends. # bin/python is preinstalled with sys.path to pygolang & friends.
[pygolang-python] [pygolang-python]
......
...@@ -31,7 +31,7 @@ PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig:${libxslt:location}/lib/pkgcon ...@@ -31,7 +31,7 @@ PKG_CONFIG_PATH=${libxml2:location}/lib/pkgconfig:${libxslt:location}/lib/pkgcon
[versions] [versions]
xmlsec = 1.3.13 xmlsec = 1.3.13
setuptools-scm = 7.0.5 setuptools-scm = 7.0.5:whl
toml = 0.10.2 toml = 0.10.2
[versions:python2] [versions:python2]
......
...@@ -6,6 +6,9 @@ extends = ...@@ -6,6 +6,9 @@ extends =
../pkgconfig/buildout.cfg ../pkgconfig/buildout.cfg
../xz-utils/buildout.cfg ../xz-utils/buildout.cfg
[gcc]
min_version = 8
[util-linux] [util-linux]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
[buildout] [buildout]
extends = extends =
# test*.cfg first extend from neoppod/software<ZODB-flavour>.cfg to use ../../stack/erp5/buildout.cfg
# appropriate ZODB and versions of other components. ../../software/neoppod/software.cfg
../pytest/buildout.cfg ../pytest/buildout.cfg
../scipy/buildout.cfg ../scipy/buildout.cfg
......
# SlapOS software release to test wendelin.core/ZODB4-wc2 on Nexedi testing infrastructure. # SlapOS software release to test wendelin.core/ZODB4-wc2 on Nexedi testing infrastructure.
[buildout] [buildout]
extends = test.cfg extends = test-common.cfg
[ZODB] [ZODB]
major = 4-wc2 major = 4-wc2
# SlapOS software release to test wendelin.core/ZODB5 on Nexedi testing infrastructure. # SlapOS software release to test wendelin.core/ZODB5 on Nexedi testing infrastructure.
[buildout] [buildout]
extends = extends = test-common.cfg
../../stack/erp5/buildout.cfg
../../software/neoppod/software-zodb5.cfg [ZODB]
test-common.cfg major = 5
# ZEO[test] needs ZopeUndo
[versions]
ZopeUndo = 5.0
# SlapOS software release to test wendelin.core on Nexedi testing infrastructure.
[buildout]
extends =
../../stack/erp5/buildout.cfg
../../software/neoppod/software.cfg
test-common.cfg
...@@ -10,8 +10,8 @@ extends = ...@@ -10,8 +10,8 @@ extends =
[xmlsec] [xmlsec]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
url = https://www.aleksey.com/xmlsec/download/older-releases/xmlsec1-1.2.34.tar.gz url = https://github.com/lsh123/xmlsec/releases/download/xmlsec-1_2_37/xmlsec1-1.2.37.tar.gz
md5sum = 87b0074e7ae535e061acf8ef64dada1b md5sum = 98dd3c884e2816c25c038a6e8af138fb
shared = true shared = true
configure-options = configure-options =
--disable-crypto-dl --disable-crypto-dl
......
...@@ -2,5 +2,8 @@ ...@@ -2,5 +2,8 @@
[buildout] [buildout]
extends = extends =
test-zodb4.cfg test-common.cfg
test-py2.cfg test-py2.cfg
[ZODB]
major = 4
...@@ -2,5 +2,8 @@ ...@@ -2,5 +2,8 @@
[buildout] [buildout]
extends = extends =
test-zodb4-wc2.cfg test-common.cfg
test-py2.cfg test-py2.cfg
[ZODB]
major = 4-wc2
# SlapOS software release to test zodbtools/ZODB4-wc2-py3 on Nexedi testing infrastructure.
[buildout]
extends = test-common.cfg
[ZODB]
major = 4-wc2
# SlapOS software release to test zodbtools/ZODB4-py3 on Nexedi testing infrastructure.
[buildout]
extends = test-common.cfg
[ZODB]
major = 4
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
}, },
"mimetype-entry-addition": { "mimetype-entry-addition": {
"description": "The list of entry to add to the cloudooo mimetype registry. Each entry should on one line which format is: \"<source_mimetype> <destination_mimetype> <handler>\"", "description": "The list of entry to add to the cloudooo mimetype registry. Each entry should on one line which format is: \"<source_mimetype> <destination_mimetype> <handler>\"",
"textarea": true,
"type": "string" "type": "string"
} }
} }
......
[instance] [instance]
filename = instance.cfg filename = instance.cfg
md5sum = a4e19280bc672cc98e0fef241c8439ba md5sum = e4092f606716171a5c9c5980c70573b3
[buildout] [buildout]
parts = parts =
dream_simulation dream-simulation
dream_platform dream-platform
dream_test_suite dream-test-suite
dream_interpreter dream-interpreter
grunt_watch grunt-watch
publish-connection-parameter publish-connection-parameter
dream-platform-url-available dream-platform-url-available
...@@ -22,44 +22,44 @@ url = $${slap-connection:server-url} ...@@ -22,44 +22,44 @@ url = $${slap-connection:server-url}
key = $${slap-connection:key-file} key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file} cert = $${slap-connection:cert-file}
[dream_platform_parameter] [dream-platform-parameter]
port = 18080 port = 18080
host = $${instance-parameter:ipv6-random} host = $${instance-parameter:ipv6-random}
url = http://[$${:host}]:$${:port} url = http://[$${:host}]:$${:port}
# interpreter # interpreter
[dream_interpreter] [dream-interpreter]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/dream_interpreter command-line = ${buildout:bin-directory}/dream_interpreter
wrapper-path = $${buildout:bin-directory}/dream_interpreter wrapper-path = $${buildout:bin-directory}/dream_interpreter
# service # service
[dream_platform] [dream-platform]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/dream_platform --debug --host $${dream_platform_parameter:host} --port $${dream_platform_parameter:port} --log $${directory:log}/dream_platform.log command-line = ${buildout:bin-directory}/dream_platform --debug --host $${dream-platform-parameter:host} --port $${dream-platform-parameter:port} --log $${directory:log}/dream_platform.log
wrapper-path = $${directory:service}/dream_platform wrapper-path = $${directory:service}/dream_platform
[dream-platform-url-available] [dream-platform-url-available]
<= monitor-promise-base <= monitor-promise-base
promise = 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}
[grunt_watch] [grunt-watch]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = bash -c 'cd ${dream-repository.git:location}; PATH=${nodejs:location}/bin/:$PATH ${dream-repository.git:location}/node_modules/grunt-cli/bin/grunt watch -f > $${directory:log}/grunt.log' command-line = bash -c 'cd ${dream-repository.git:location}; PATH=${nodejs:location}/bin/:$PATH ${dream-repository.git:location}/node_modules/grunt-cli/bin/grunt watch -f > $${directory:log}/grunt.log'
wrapper-path = $${directory:service}/dream_grunt_watch wrapper-path = $${directory:service}/dream_grunt_watch
# CLI # CLI
[dream_simulation] [dream-simulation]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${buildout:bin-directory}/dream_simulation command-line = ${buildout:bin-directory}/dream_simulation
wrapper-path = $${directory:script}/dream_simulation wrapper-path = $${directory:script}/dream_simulation
[dream_test_suite] [dream-test-suite]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = ${dream_testrunner:script} command-line = ${dream-testrunner:script}
wrapper-path = $${directory:script}/dream_test_suite wrapper-path = $${directory:script}/dream_test_suite
[directory] [directory]
...@@ -74,4 +74,4 @@ log = $${:var}/log ...@@ -74,4 +74,4 @@ log = $${:var}/log
[publish-connection-parameter] [publish-connection-parameter]
recipe = slapos.cookbook:publishurl recipe = slapos.cookbook:publishurl
url = $${dream_platform_parameter:url} url = $${dream-platform-parameter:url}
...@@ -9,8 +9,8 @@ extends = ...@@ -9,8 +9,8 @@ extends =
parts = parts =
slapos-cookbook slapos-cookbook
manpy manpy
dream_testrunner dream-testrunner
npm_install npm-install
instance instance
[gcc] [gcc]
...@@ -20,22 +20,22 @@ max_version = 0 ...@@ -20,22 +20,22 @@ max_version = 0
[python] [python]
part = python2.7 part = python2.7
[dream-repository.git]
revision = f3bcf115741886835df8c0ca0fdbf510d77d8db8
[instance] [instance]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
[dream_testrunner] [dream-testrunner]
recipe = zc.recipe.testrunner recipe = zc.recipe.testrunner
eggs = dream eggs = dream
script = dream_testrunner script = dream_testrunner
initialization = initialization =
${manpy:initialization} ${manpy:initialization}
[nodejs] [npm-install]
<= nodejs-8.9.4
[npm_install]
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = true stop-on-error = true
command = command =
...@@ -52,8 +52,4 @@ simpy = 3.0.5 ...@@ -52,8 +52,4 @@ simpy = 3.0.5
zope.dottedname = 4.1.0 zope.dottedname = 4.1.0
tablib = 0.10.0 tablib = 0.10.0
mysqlclient = 1.3.12 mysqlclient = 1.3.12
# indirect dependancies
cp.recipe.cmd = 0.5
plone.recipe.command = 1.1
zc.recipe.testrunner = 2.0.0 zc.recipe.testrunner = 2.0.0
# End To End Testing
This software release is used to run end-to-end test of SlapOS softwares on an actual SlapOS cloud such as Rapid.Space. Since it can supply softwares and request instances on an actual cloud, it needs a SlaPOS client certificate and the URLs of your tests.
## Input parameters
```
{
"client.crt": <content of client.crt>,
"client.key": <content of client.key>,
"master-url": <url of SlapOS master>,
"tests": [
{
"url": "<url of test1 script>",
"md5sum": "MD5sum of test1 script"
},
{
"url": "<url of test2 python script>",
"md5sum": "MD5sum of test2 python script"
},
...
]
}
```
Example:
(`e2e-parameters.json`)
```
{
"client.crt": "Certificate:...-----END CERTIFICATE-----\n",
"master-url": "https://slap.vifib.com",
"tests": [
{
"url": "https://lab.nexedi.com/lu.xu/slapos/raw/feat/end-to-end-testing/software/end-to-end-testing/test_test.py",
"md5sum": "c074373dbb4154aa924ef5781dade7a0"
}
]
}
```
## Generate client certificate
Follow [How To Set Up SlapOS Client](https://handbook.rapid.space/user/rapidspace-HowTo.Setup.SlapOS.Client) to prepare `slapos-client.cfg` if you don't have one.
A convenience script `generate_parameters.py` is provided to compute these parameters in JSON format from an existing SlapOS client configuration:
```
python3 generate_parameters.py --cfg <absolute path to slapos-client.cfg> -o <output path>
```
## Adding tests
There are 3 example tests available in end-to-end testing SR:
- test_test.py
Simple successful test and failed test
- test_kvm.py
Request a KVM instance with published SR and verify one of the connection parameters
- test_health.py
Request a Monitor instance with published SR and log promises output
All tests should be written in Python with a `.py` extension and should have names that start with `test_`.
Once your test is prepared, you have the option to input a URL and its corresponding md5sum as parameters. This will enable the end-to-end testing instance to automatically detect the test.
## Running tests
### In Nexedi ERP5 automated test environment (testnodes)
When performing tests on a software release (SR) using the ERR5 test suite, you can use "SlapOS.SoftwareReleases.IntegrationTest". Additionally, make sure to fill in the "Slapos Parameters" field with the content of the input parameter mentioned above.
### In Theia locally
#### Using virtualenv
Using slapos.core for quick testing:
```
python3 -m venv testenv
source testenv/bin/activate
pip install -e path/to/my/slapos.core
export SLAPOS_E2E_TEST_CLIENT_CFG=my_test_client_cfg
export SLAPOS_E2E_TEST_LOG_FILE=my_test_log_file
python -m unittest my_test_file_in_development
# edit e2e.py in path/to/my/slapos.core or the instanciated one if improvements are needed
```
#### Using an instance of software/end-to-end-testing
1. Setup and instantiate the runner
```
slapos supply ~/srv/project/slapos/software/end-to-end-testing/software.cfg slaprunner
slapos request <e2e_instance_name> ~/srv/project/slapos/software/end-to-end-testing/software.cfg --parameters-file <e2e_parameter_json_file>
```
Your tests should be listed in <e2e_parameter_json_file> with URL and MD5sum
2. Go to instance directory and run test
```
cd ~/srv/runner/instance/slappartX
./bin/runTestSuite
```
Downloaded tests and the reusable `e2e.py` script can be found in the `~/srv/runner/instance/slappartX/var/tests/` directory.
To quickly test, you have the option to modify the test script directly here(`~/srv/runner/instance/slappartX/var/tests/`). After making the necessary changes, you can relaunch the tests by running `./bin/runTestSuite`.
## FAQ
Q1. What is the difference between `slapos-sr-testing` and `end-to-end-testing`?
- slapos-sr-testing requests SRs on a slapproxy in an SlapOSStandalone inside the slapos-sr-testing instance (same kind of thing as Theia or webrunner).
- end-to-end-testing requests SRs on the actual master, in real compute nodes (COMP-XXX). To do this it needs a slapos certificate which is passed as instance parameter to end-to-end-testing instance in the test suite.
So unlike slapos-sr-testing, end-to-end-testing does not contain the SRs it tests, it merely runs the python tests scripts (like mentioned `test_kvm.py`) and integrates with the ERP5 test suite. This also means we cannot access the files in the partition of the tested SRs, as those are on other computers. All we have access to is what a normal user requesting on panel would have access to.
[instance.cfg]
filename = instance.cfg.in
md5sum = 962830010e0a257d52c22141db3d34cf
import argparse
import configparser
import json
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--cfg', required=True)
parser.add_argument('-o', '--output', required=True)
args = parser.parse_args()
configp = configparser.ConfigParser()
configp.read(args.cfg)
with open(configp.get('slapconsole', 'cert_file')) as f:
crt = f.read()
with open(configp.get('slapconsole', 'key_file')) as f:
key = f.read()
url = configp.get('slapos', 'master_url')
with open(args.output, 'w') as f:
json.dump(
{
'client.crt': crt,
'client.key': key,
'master-url': url
}, f, indent=2)
if __name__ == '__main__':
main()
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"client.crt": {
"type": "string",
"default": "Certificate:\ndefault-client-crt\n-----END CERTIFICATE-----\n"
},
"client.key": {
"type": "string",
"default": "-----BEGIN PRIVATE KEY-----\ndefault-client-key\n-----END PRIVATE KEY-----\n"
},
"master-url": {
"type": "string",
"format": "uri",
"default": "https://slap.vifib.com"
},
"tests": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"md5sum": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Values returned by End to End Testing instanciation",
"additionalProperties": false,
"properties": {},
"type": "object"
}
[buildout]
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
extends =
${nxdtest-instance.cfg:output}
parts =
.nxdtest
[slap-configuration]
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}
bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
cfg = $${buildout:directory}/.slapos
nxdtestdir = $${:var}/nxdtest
log = $${:var}/log
[client.crt]
recipe = slapos.recipe.template
output = $${directory:cfg}/client.crt
inline = $${slap-configuration:configuration.client.crt}
[client.key]
recipe = slapos.recipe.template
output = $${directory:cfg}/client.key
inline = $${slap-configuration:configuration.client.key}
[slapos-client.cfg]
recipe = slapos.recipe.template
output = $${directory:cfg}/slapos-client.cfg
inline =
[slapos]
master_url = $${slap-configuration:configuration.master-url}
[slapconsole]
cert_file = $${client.crt:output}
key_file = $${client.key:output}
[env.sh]
recipe = slapos.recipe.template:jinja2
output = $${directory:cfg}/env.sh
inline =
export HOME=$${directory:home}
[runTestSuite]
# extended from stack/nxdtest
env.sh = $${env.sh:output}
workdir = $${directory:nxdtestdir}
[.nxdtest]
recipe = slapos.recipe.template:jinja2
output = $${runTestSuite:workdir}/.nxdtest
python_for_test = ${python_for_test:executable}
testdir = $${tests:location}
log-output = $${directory:log}/e2e-testing.log
context =
key python_for_test :python_for_test
key testdir :testdir
key slapos_cfg slapos-client.cfg:output
key log_file :log-output
inline =
import os
directory = "{{ testdir }}"
slapos_cfg = {{ repr(slapos_cfg) }}
log_file = {{ repr(log_file) }}
dir_list = os.listdir(directory)
for filename in dir_list:
name, ext = os.path.splitext(filename)
if name.startswith('test') and ext == '.py':
TestCase(
name,
[{{ repr(python_for_test) }} , '-m', 'unittest', '-v', name],
cwd=directory,
env={'SLAPOS_E2E_TEST_CLIENT_CFG': slapos_cfg,
'SLAPOS_E2E_TEST_LOG_FILE': log_file},
summaryf=UnitTest.summary,
)
[tests]
recipe = slapos.recipe.build
tests = $${slap-configuration:configuration.tests}
location = $${directory:var}/tests
install =
import os
os.mkdir(location)
buildout_offline = self.buildout['buildout']['offline']
try:
# Allow to do self.download() which can only be used in "online" mode
self.buildout['buildout']['offline'] = 'false'
for i, test in enumerate(options['tests']):
tmp = self.download(test['url'], test['md5sum'])
path = os.path.join(location, 'test%s.py' % i)
os.rename(tmp, path)
finally:
# reset the parameter
self.buildout['buildout']['offline'] = buildout_offline
[buildout]
extends =
../../component/pygolang/buildout.cfg
../../stack/slapos.cfg
../../stack/nxdtest.cfg
buildout.hash.cfg
parts =
instance.cfg
slapos-cookbook
[instance.cfg]
recipe = slapos.recipe.template
output = ${buildout:directory}/instance.cfg
url = ${:_profile_base_location_}/${:filename}
[e2e.py]
recipe = slapos.recipe.build:download
output = ${buildout:directory}/${:filename}
url = ${:_profile_base_location_}/${:filename}
[python_for_test]
<= python-interpreter
interpreter = python_for_test
executable = ${buildout:bin-directory}/${:interpreter}
depends = ${lxml-python:egg}
eggs =
${pygolang:egg}
slapos.core
websocket-client
requests
[versions]
websocket-client = 1.4.2
{
"name": "End-To-End-Testing",
"description": "End-To-End Testing on SlapOS Cloud",
"serialisation": "json-in-xml",
"software-type": {
"default": {
"title": "default",
"software-type": "default",
"description": "default",
"request": "instance-input-schema.json",
"response": "instance-output-schema.json"
}
}
}
import slapos.testing.e2e as e2e
import time
class HealthTest(e2e.EndToEndTestCase):
@classmethod
def test_health_promise_feed(self):
instance_name = e2e.time.strftime('e2e-test-health-%Y-%B-%d-%H:%M:%S')
product = self.product.slapmonitor
parameter_dict = {}
self.request(
self.product.slapmonitor,
instance_name,
software_type='default',
filter_kw={"computer_guid": "COMP-4057"})
self.waitUntilGreen(instance_name)
self.connection_dict = self.getInstanceInfos(instance_name).connection_dict
resp, url = self.waitUntilMonitorURLReady(instance_name=instance_name)
self.getMonitorPromises(resp.content)
import slapos.testing.e2e as e2e
class KvmTest(e2e.EndToEndTestCase):
def test(self):
instance_name = e2e.time.strftime('e2e-test-kvm-%Y-%B-%d-%H:%M:%S')
# instance_name = 'e2e-kvm-test' # avoid timestamp to reuse instance
self.request(self.product.kvm, instance_name)
self.waitUntilGreen(instance_name)
connection_dict = self.request(self.product.kvm, instance_name)
self.assertIn('url', connection_dict)
import unittest
class Test(unittest.TestCase):
def test_fail(self):
self.assertEqual(0, 1)
def test_succeed(self):
self.assertEqual(0, 0)
...@@ -103,6 +103,10 @@ ...@@ -103,6 +103,10 @@
"null" "null"
] ]
}, },
"with-max-rlimit-nofile": {
"description": "Set open file descriptors soft limit to hard limit",
"type": "boolean"
},
"family-override": { "family-override": {
"description": "Family-wide options, possibly overriding global options", "description": "Family-wide options, possibly overriding global options",
"default": {}, "default": {},
......
...@@ -32,6 +32,7 @@ import glob ...@@ -32,6 +32,7 @@ import glob
import http.client import http.client
import json import json
import os import os
import resource
import shutil import shutil
import socket import socket
import sqlite3 import sqlite3
...@@ -1100,3 +1101,36 @@ class TestNEO(ZopeSkinsMixin, CrontabMixin, ERP5InstanceTestCase): ...@@ -1100,3 +1101,36 @@ class TestNEO(ZopeSkinsMixin, CrontabMixin, ERP5InstanceTestCase):
'var', 'var',
'log', 'log',
f)) f))
class TestWithMaxRlimitNofileParameter(ERP5InstanceTestCase, TestPublishedURLIsReachableMixin):
"""Test setting the with-max-rlimit-nofile parameter sets the open fd soft limit to the hard limit.
"""
__partition_reference__ = 'with-max-rlimit-nofile'
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps({'with-max-rlimit-nofile': True})}
def test_with_max_rlimit_nofile(self):
with self.slap.instance_supervisor_rpc as supervisor:
all_process_info = supervisor.getAllProcessInfo()
_, current_hard_limit = resource.getrlimit(resource.RLIMIT_NOFILE)
process_info, = (p for p in all_process_info if p['name'].startswith('zope-'))
self.assertEqual(
resource.prlimit(process_info['pid'], resource.RLIMIT_NOFILE),
(current_hard_limit, current_hard_limit))
class TestUnsetWithMaxRlimitNofileParameter(ERP5InstanceTestCase, TestPublishedURLIsReachableMixin):
"""Test not setting the with-max-rlimit-nofile parameter doesn't change the soft limit of erp5
"""
__partition_reference__ = 'unset-with-max-rlimit-nofile'
def test_unset_with_max_rlimit_nofile(self):
with self.slap.instance_supervisor_rpc as supervisor:
all_process_info = supervisor.getAllProcessInfo()
limit = resource.getrlimit(resource.RLIMIT_NOFILE)
process_info, = (p for p in all_process_info if p['name'].startswith('zope-'))
self.assertEqual(
resource.prlimit(process_info['pid'], resource.RLIMIT_NOFILE), limit)
...@@ -92,8 +92,8 @@ class WendelinTutorialTestCase(FluentdTestCase): ...@@ -92,8 +92,8 @@ class WendelinTutorialTestCase(FluentdTestCase):
@classmethod @classmethod
def measureDict(cls): def measureDict(cls):
return {k: v.encode() for k, v in return {k: v for k, v in
zip((b'pressure', b'humidity', b'temperature'), cls._measurementList)} zip(('pressure', 'humidity', 'temperature'), cls._measurementList)}
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
# not need these here). # not need these here).
[template-nextcloud-install.sh] [template-nextcloud-install.sh]
filename = nextcloud-install.sh.in filename = nextcloud-install.sh.in
md5sum = 965cc84d4c8e39f06850fac361575647 md5sum = f31dfd6fce79fcf1c13cbd96dd366492
[template-nextcloud-config.json] [template-nextcloud-config.json]
filename = nextcloud-config.json.in filename = nextcloud-config.json.in
md5sum = 6f42f0a8c5e5c0c657541a65c4d9ee57 md5sum = 133ad47aec7e16f716eb710ef38823e8
[template-nextcloud-instance] [template-nextcloud-instance]
filename = nextcloud-instance.cfg.in filename = nextcloud-instance.cfg.in
md5sum = a59b081bd39f61c7361fdb6c54fc2039 md5sum = 65d2fef4aa41fa70e5194d73a8cb2c4a
...@@ -35,6 +35,19 @@ ...@@ -35,6 +35,19 @@
"timeout": 0 "timeout": 0
}, },
"logfile": "{{ parameter_dict['data-dir'] }}/nextcloud.log", "logfile": "{{ parameter_dict['data-dir'] }}/nextcloud.log",
"datadirectory": "{{ parameter_dict['data-dir'] }}" "loglevel" => 2,
"datadirectory": "{{ parameter_dict['data-dir'] }}",
"preview_ffmpeg_path": "{{ parameter_dict['ffmpeg-path'] }}",
"tempdirectory": "{{ parameter_dict['tmp-dir'] }}",
"apps_paths": [
{
"path": "{{ parameter_dict['nextcloud'] }}/apps",
"url": "/apps",
"writable": true
}
],
"default_phone_region": "FR",
"default_locale": "fr_FR",
"default_timezone": "Europe/Paris"
} }
} }
...@@ -115,19 +115,9 @@ ...@@ -115,19 +115,9 @@
"type": "string", "type": "string",
"format": "uri" "format": "uri"
}, },
"instance.trusted-domain-1": { "instance.trusted-domain-list": {
"title": "Authorized domain on nextcloud", "title": "Authorized domain(s) on nextcloud",
"description": "Trusted domain used to connect to Nextcloud instance.", "description": "Trusted domain(s) used to connect to Nextcloud instance. Space separated.",
"type": "string"
},
"instance.trusted-domain-2": {
"title": "Second authorized domain on nextcloud",
"description": "Trusted domain used to connect to Nextcloud instance.",
"type": "string"
},
"instance.trusted-domain-3": {
"title": "Third authorized domain on nextcloud",
"description": "Trusted domain used to connect to Nextcloud instance.",
"type": "string" "type": "string"
}, },
"instance.trusted-proxy-list": { "instance.trusted-proxy-list": {
......
...@@ -140,4 +140,4 @@ if [ -f "{{ parameter_dict['nextcloud'] }}/config/CAN_INSTALL" ]; then ...@@ -140,4 +140,4 @@ if [ -f "{{ parameter_dict['nextcloud'] }}/config/CAN_INSTALL" ]; then
rm {{ parameter_dict['nextcloud'] }}/config/CAN_INSTALL rm {{ parameter_dict['nextcloud'] }}/config/CAN_INSTALL
fi fi
date > {{ parameter_dict['nextcloud'] }}/.slapos-install-done date > {{ parameter_dict['installed-file'] }}
...@@ -8,6 +8,7 @@ redis = ${directory:srv}/redis ...@@ -8,6 +8,7 @@ redis = ${directory:srv}/redis
redis-log = ${directory:log}/redis redis-log = ${directory:log}/redis
data = ${directory:srv}/data data = ${directory:srv}/data
backup = ${directory:backup}/nextcloud backup = ${directory:backup}/nextcloud
tmp = ${buildout:directory}/tmp
[service-redis] [service-redis]
recipe = slapos.cookbook:redis.server recipe = slapos.cookbook:redis.server
...@@ -42,13 +43,15 @@ rotate-num = 30 ...@@ -42,13 +43,15 @@ rotate-num = 30
[instance-parameter] [instance-parameter]
nextcloud = ${:document-root} nextcloud = ${:document-root}
installed-file = ${directory:etc}/.nextcloud-install-done
admin-user = admin admin-user = admin
admin-password = admin admin-password = admin
ffmpeg-path = {{ ffmpeg_location }}/bin/ffmpeg
tmp-dir = ${nc-directory:tmp}
trusted-domain-list = trusted-domain-list =
[${apache-php-configuration:ip}]:${apache-php-configuration:port} [${apache-php-configuration:ip}]:${apache-php-configuration:port}
${slap-parameter:instance.trusted-domain-1} ${request-frontend:connection-domain}
${slap-parameter:instance.trusted-domain-2} ${slap-parameter:instance.trusted-domain-list}
${slap-parameter:instance.trusted-domain-3}
trusted-proxy-list = ${slap-parameter:instance.trusted-proxy-list} trusted-proxy-list = ${slap-parameter:instance.trusted-proxy-list}
cli-url = ${slap-parameter:instance.cli-url} cli-url = ${slap-parameter:instance.cli-url}
...@@ -69,6 +72,9 @@ collabora-url = ${slap-parameter:instance.collabora-url} ...@@ -69,6 +72,9 @@ collabora-url = ${slap-parameter:instance.collabora-url}
stun-server = ${slap-parameter:instance.stun-server} stun-server = ${slap-parameter:instance.stun-server}
turn-server = ${slap-parameter:instance.turn-server} turn-server = ${slap-parameter:instance.turn-server}
turn-secret = ${slap-parameter:instance.turn-secret} turn-secret = ${slap-parameter:instance.turn-secret}
# php.ini
php.opcache.revalidate-freq = 60
php.opcache.interned-strings-buffer = 24
[nextcloud-install.sh] [nextcloud-install.sh]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -105,7 +111,7 @@ input = inline:#!/bin/bash ...@@ -105,7 +111,7 @@ input = inline:#!/bin/bash
echo "Nextcloud is not installed."; echo "Nextcloud is not installed.";
exit 1; exit 1;
fi fi
if [ ! -f "${instance-parameter:nextcloud}/.slapos-install-done" ]; then if [ ! -f "${instance-parameter:installed-file}" ]; then
echo "Nextcloud is not configured."; echo "Nextcloud is not configured.";
exit 1; exit 1;
fi fi
...@@ -203,7 +209,5 @@ instance.turn-server = ...@@ -203,7 +209,5 @@ instance.turn-server =
instance.turn-secret = instance.turn-secret =
instance.cli-url = ${apache-php-configuration:url} instance.cli-url = ${apache-php-configuration:url}
instance.trusted-domain-1 =
instance.trusted-domain-2 =
instance.trusted-domain-3 =
instance.trusted-proxy-list = instance.trusted-proxy-list =
instance.trusted-domain-list =
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
extends = extends =
buildout.hash.cfg buildout.hash.cfg
../../component/redis/buildout.cfg ../../component/redis/buildout.cfg
../../component/ffmpeg/buildout.cfg
../../stack/lamp/buildout.cfg ../../stack/lamp/buildout.cfg
[nc-download] [nc-download]
...@@ -28,6 +29,7 @@ context = ...@@ -28,6 +29,7 @@ context =
key python3_location python3:location key python3_location python3:location
key news_updater_location news-updater:location key news_updater_location news-updater:location
key php_location apache-php:location key php_location apache-php:location
key ffmpeg_location ffmpeg:location
raw redis_bin ${redis:location}/bin/redis-server raw redis_bin ${redis:location}/bin/redis-server
raw redis_cli ${redis:location}/bin/redis-cli raw redis_cli ${redis:location}/bin/redis-cli
key nextcloud_install_sh template-nextcloud-install.sh:target key nextcloud_install_sh template-nextcloud-install.sh:target
...@@ -42,7 +44,6 @@ db-user = nextcloud ...@@ -42,7 +44,6 @@ db-user = nextcloud
[nc-download-unpacked] [nc-download-unpacked]
recipe = slapos.recipe.build:download-unpacked recipe = slapos.recipe.build:download-unpacked
shared = true
[news-updater] [news-updater]
<= nc-download-unpacked <= nc-download-unpacked
...@@ -66,8 +67,8 @@ md5sum = 88adcbc34ef7e461f515ba96b82365d9 ...@@ -66,8 +67,8 @@ md5sum = 88adcbc34ef7e461f515ba96b82365d9
[nextcloud-app-snappymail] [nextcloud-app-snappymail]
<= nc-download-unpacked <= nc-download-unpacked
url = https://snappymail.eu/repository/nextcloud/snappymail-2.29.1-nextcloud.tar.gz url = https://snappymail.eu/repository/nextcloud/snappymail-2.29.4-nextcloud.tar.gz
md5sum = b7500ea4e089d8a9e3fa381d6df3a3b0 md5sum = 676bf0fa3b9f0fb9f0208304cf302a26
[nextcloud-app-news] [nextcloud-app-news]
<= nc-download-unpacked <= nc-download-unpacked
......
Changelog Changelog
========= =========
Version 1.0.344 (2023-11-03)
-------------
* Set dpc_snr_target to 25 for PUSCH also
Version 1.0.341 (2023-10-20)
-------------
* Publish amarisoft version and license expiration information
* Add network name parameter
Version 1.0.340 (2023-10-20)
-------------
* Update RRH firmware and reset
Version 1.0.339 (2023-10-16) Version 1.0.339 (2023-10-16)
------------- -------------
* Lopcomm firmware update * Lopcomm firmware update
* RRH reset (reboot) function added * RRH reset (reboot) function added
* Fix cpri_tx_dbm parameter * Fix cpri_tx_dbm parameter
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
md5sum = 2491969d49f8bf9b172e89b1c0e9d98e md5sum = c605292e57a12e42d9c2676e38c072c6
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -303,6 +303,7 @@ config-longrequest-logger-interval = {{ dumps(zope_parameter_dict.get('longreque ...@@ -303,6 +303,7 @@ config-longrequest-logger-interval = {{ dumps(zope_parameter_dict.get('longreque
config-longrequest-logger-timeout = {{ dumps(zope_parameter_dict.get('longrequest-logger-timeout', 1)) }} config-longrequest-logger-timeout = {{ dumps(zope_parameter_dict.get('longrequest-logger-timeout', 1)) }}
config-large-file-threshold = {{ dumps(zope_parameter_dict.get('large-file-threshold', "10MB")) }} config-large-file-threshold = {{ dumps(zope_parameter_dict.get('large-file-threshold', "10MB")) }}
config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }} config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }}
config-with-max-rlimit-nofile = {{ dumps(slapparameter_dict.get('with-max-rlimit-nofile', false)) }}
{# BBB: zope_parameter_dict used to contain 'webdav', so fallback to it -#} {# BBB: zope_parameter_dict used to contain 'webdav', so fallback to it -#}
config-webdav = {{ dumps(current_zope_family_override_dict.get('webdav', zope_parameter_dict.get('webdav', False))) }} config-webdav = {{ dumps(current_zope_family_override_dict.get('webdav', zope_parameter_dict.get('webdav', False))) }}
config-publisher-timeout = {{ dumps(current_zope_family_override_dict.get('publisher-timeout', global_publisher_timeout)) }} config-publisher-timeout = {{ dumps(current_zope_family_override_dict.get('publisher-timeout', global_publisher_timeout)) }}
...@@ -446,7 +447,7 @@ config-haproxy-server-check-path = {{ dumps(balancer_dict.get('haproxy-server-ch ...@@ -446,7 +447,7 @@ config-haproxy-server-check-path = {{ dumps(balancer_dict.get('haproxy-server-ch
config-monitor-passwd = ${monitor-htpasswd:passwd} config-monitor-passwd = ${monitor-htpasswd:passwd}
config-ssl = {{ dumps(balancer_dict['ssl']) }} config-ssl = {{ dumps(balancer_dict['ssl']) }}
config-name = ${:name} config-name = ${:name}
config-shared-certificate-authority-path = ${directory:ca-dir} config-shared-certificate-authority-path = ${directory:ca-dir}
config-backend-path-dict = {{ dumps(zope_backend_path_dict) }} config-backend-path-dict = {{ dumps(zope_backend_path_dict) }}
config-ssl-authentication-dict = {{ dumps(ssl_authentication_dict) }} config-ssl-authentication-dict = {{ dumps(ssl_authentication_dict) }}
config-apachedex-promise-threshold = {{ dumps(monitor_dict.get('apachedex-promise-threshold', 70)) }} config-apachedex-promise-threshold = {{ dumps(monitor_dict.get('apachedex-promise-threshold', 70)) }}
......
...@@ -337,7 +337,6 @@ eggs += ...@@ -337,7 +337,6 @@ eggs +=
${python-pynacl:egg} ${python-pynacl:egg}
${python-cryptography:egg} ${python-cryptography:egg}
${python-mysqlclient:egg} ${python-mysqlclient:egg}
${backports.lzma:egg}
${bcrypt:egg} ${bcrypt:egg}
${psycopg2:egg} ${psycopg2:egg}
${selenium:egg} ${selenium:egg}
......
...@@ -141,11 +141,8 @@ eggs += ...@@ -141,11 +141,8 @@ eggs +=
${lxml-python:egg} ${lxml-python:egg}
${python-PyYAML:egg} ${python-PyYAML:egg}
${python-cryptography:egg} ${python-cryptography:egg}
${backports.lzma:egg}
${pycurl:egg} ${pycurl:egg}
${bcrypt:egg} ${bcrypt:egg}
dnspython
Jinja2
${kedifa-setup:egg} ${kedifa-setup:egg}
${caucase-setup:egg} ${caucase-setup:egg}
${erp5.util-setup:egg} ${erp5.util-setup:egg}
...@@ -163,12 +160,13 @@ eggs += ...@@ -163,12 +160,13 @@ eggs +=
${statsmodels:egg} ${statsmodels:egg}
${scipy:egg} ${scipy:egg}
zope.testing zope.testing
supervisor
${extra-eggs:eggs} ${extra-eggs:eggs}
[eggs/scripts] [eggs/scripts]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = ${eggs:eggs} eggs =
${eggs:eggs}
supervisor
scripts = scripts =
slapos slapos
supervisord supervisord
......
...@@ -25,7 +25,7 @@ eggs += ...@@ -25,7 +25,7 @@ eggs +=
${msgpack-python:egg} ${msgpack-python:egg}
${msgpack-numpy:egg} ${msgpack-numpy:egg}
${ipython:egg} ${ipython:egg}
[generic_testrunner_init] [generic_testrunner_init]
recipe = slapos.recipe.build recipe = slapos.recipe.build
init = init =
...@@ -49,13 +49,13 @@ initialization = ...@@ -49,13 +49,13 @@ initialization =
# library to the path # library to the path
initialization += initialization +=
${generic_testrunner_init:initialization} ${generic_testrunner_init:initialization}
[testrunner] [testrunner]
# we need to override the test suite runner to add our custom libstdc++ dynamic # we need to override the test suite runner to add our custom libstdc++ dynamic
# library to the path # library to the path
initialization += initialization +=
${generic_testrunner_init:initialization} ${generic_testrunner_init:initialization}
[erp5_repository_list] [erp5_repository_list]
repository_id_list += wendelin repository_id_list += wendelin
...@@ -63,8 +63,11 @@ repository_id_list += wendelin ...@@ -63,8 +63,11 @@ repository_id_list += wendelin
list += ${wendelin:location}/bt5 list += ${wendelin:location}/bt5
# Jupyter is by default enabled in Wendelin # Jupyter is by default enabled in Wendelin
# and also the soft limit of open file descriptors is set
# to the hard limit.
[erp5-defaults] [erp5-defaults]
jupyter-enable-default = true jupyter-enable-default = true
with-max-rlimit-nofile-enable-default = true
[wendelin] [wendelin]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
......
...@@ -185,6 +185,7 @@ context = ...@@ -185,6 +185,7 @@ context =
key instance_common_cfg instance-common:output key instance_common_cfg instance-common:output
key jupyter_enable_default erp5-defaults:jupyter-enable-default key jupyter_enable_default erp5-defaults:jupyter-enable-default
key wcfs_enable_default erp5-defaults:wcfs-enable-default key wcfs_enable_default erp5-defaults:wcfs-enable-default
key with_max_rlimit_nofile_enable_default erp5-defaults:with-max-rlimit-nofile-enable-default
key kumo_location kumo:location key kumo_location kumo:location
key local_bt5_repository local-bt5-repository:list key local_bt5_repository local-bt5-repository:list
key logrotate_location logrotate:location key logrotate_location logrotate:location
...@@ -338,6 +339,8 @@ cloudooo-connection-url-list = ...@@ -338,6 +339,8 @@ cloudooo-connection-url-list =
jupyter-enable-default = false jupyter-enable-default = false
# WCFS is by default disabled in ERP5 # WCFS is by default disabled in ERP5
wcfs-enable-default = false wcfs-enable-default = false
# with-max-rlimit-nofile option of zopewsgi is disabled in ERP5
with-max-rlimit-nofile-enable-default = false
[erp5] [erp5]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
...@@ -684,6 +687,12 @@ extra-paths = ...@@ -684,6 +687,12 @@ extra-paths =
patch-binary = ${patch:location}/bin/patch patch-binary = ${patch:location}/bin/patch
Acquisition-patches = ${:_profile_base_location_}/../../component/egg-patch/Acquisition/aq_dynamic-4.7.patch#85b0090e216cead0fc86c5c274450d96 Acquisition-patches = ${:_profile_base_location_}/../../component/egg-patch/Acquisition/aq_dynamic-4.7.patch#85b0090e216cead0fc86c5c274450d96
Acquisition-patch-options = -p1 Acquisition-patch-options = -p1
DateTime-patches =
${:_profile_base_location_}/../../component/egg-patch/DateTime/0001-Cast-int-to-float-in-compare-methods.patch#9898a58ce90dd31c884a7183aeec4361
${:_profile_base_location_}/../../component/egg-patch/DateTime/0002-Fix-compare-methods-between-DateTime-0-and-None-fix-.patch#733903a564c8b14df65c45c4f2eec262
${:_profile_base_location_}/../../component/egg-patch/DateTime/0003-Make-it-possible-to-pickle-datetimes-returned-by-asd.patch#e94a71ef40de130720e621e296537000
${:_profile_base_location_}/../../component/egg-patch/DateTime/0004-Repair-equality-comparison-between-DateTime-instance.patch#ea146c00dfbc31c7d96af8abc6f0b301
DateTime-patch-options = -p1
Products.BTreeFolder2-patches = ${:_profile_base_location_}/../../component/egg-patch/Products.BTreeFolder2/0001-Add-a-confirmation-prompt-on-Delete-All-Objects-butt.patch#44de3abf382e287b8766c2f29ec1cf74 Products.BTreeFolder2-patches = ${:_profile_base_location_}/../../component/egg-patch/Products.BTreeFolder2/0001-Add-a-confirmation-prompt-on-Delete-All-Objects-butt.patch#44de3abf382e287b8766c2f29ec1cf74
Products.BTreeFolder2-patch-options = -p1 Products.BTreeFolder2-patch-options = -p1
Products.CMFCore-patches = ${:_profile_base_location_}/../../component/egg-patch/Products.CMFCore/portal_skins_ZMI_find.patch#19ec05c0477c50927ee1df6eb75d1e7f Products.CMFCore-patches = ${:_profile_base_location_}/../../component/egg-patch/Products.CMFCore/portal_skins_ZMI_find.patch#19ec05c0477c50927ee1df6eb75d1e7f
...@@ -740,6 +749,7 @@ depends = ...@@ -740,6 +749,7 @@ depends =
# patched eggs # patched eggs
Acquisition = 4.7+SlapOSPatched001 Acquisition = 4.7+SlapOSPatched001
DateTime = 4.9+SlapOSPatched004
Products.DCWorkflow = 2.4.1+SlapOSPatched001 Products.DCWorkflow = 2.4.1+SlapOSPatched001
ocropy = 1.0+SlapOSPatched001 ocropy = 1.0+SlapOSPatched001
PyPDF2 = 1.26.0+SlapOSPatched002 PyPDF2 = 1.26.0+SlapOSPatched002
......
...@@ -70,11 +70,11 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04 ...@@ -70,11 +70,11 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 3f7b28085ceff321a3cb785db60f7c3e md5sum = 55232eae0bcdb68a7cb2598d2ba9d60c
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
md5sum = 098e1d02159aeca9b36f2a0726b7b230 md5sum = 2bb2addc8deddff00053a065f5e2793e
[template-zeo] [template-zeo]
filename = instance-zeo.cfg.in filename = instance-zeo.cfg.in
...@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880 ...@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = 9e6440425167a506bd473a3697eaa9e6 md5sum = 8a2c78000e1e791dc48305a2e7330b16
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
{% set jupyter_zope_family = jupyter_dict.get('zope-family', '') -%} {% set jupyter_zope_family = jupyter_dict.get('zope-family', '') -%}
{% set wcfs_dict = slapparameter_dict.get('wcfs', {}) -%} {% set wcfs_dict = slapparameter_dict.get('wcfs', {}) -%}
{% set wcfs_enable = wcfs_dict.get('enable', wcfs_enable_default.lower() in ('true', 'yes')) -%} {% set wcfs_enable = wcfs_dict.get('enable', wcfs_enable_default.lower() in ('true', 'yes')) -%}
{% set with_max_rlimit_nofile_enable = slapparameter_dict.get(
'with-max-rlimit-nofile',
with_max_rlimit_nofile_enable_default.lower() in ('true', 'yes'))
%}
{% set test_runner_enabled = slapparameter_dict.get('test-runner', {}).get('enabled', True) -%} {% set test_runner_enabled = slapparameter_dict.get('test-runner', {}).get('enabled', True) -%}
{% set test_runner_node_count = slapparameter_dict.get('test-runner', {}).get('node-count', 3) -%} {% set test_runner_node_count = slapparameter_dict.get('test-runner', {}).get('node-count', 3) -%}
{% set test_runner_extra_database_count = slapparameter_dict.get('test-runner', {}).get('extra-database-count', 3) -%} {% set test_runner_extra_database_count = slapparameter_dict.get('test-runner', {}).get('extra-database-count', 3) -%}
...@@ -311,6 +315,7 @@ config-longrequest-logger-interval = {{ dumps(zope_parameter_dict.get('longreque ...@@ -311,6 +315,7 @@ config-longrequest-logger-interval = {{ dumps(zope_parameter_dict.get('longreque
config-longrequest-logger-timeout = {{ dumps(zope_parameter_dict.get('longrequest-logger-timeout', 1)) }} config-longrequest-logger-timeout = {{ dumps(zope_parameter_dict.get('longrequest-logger-timeout', 1)) }}
config-large-file-threshold = {{ dumps(zope_parameter_dict.get('large-file-threshold', "10MB")) }} config-large-file-threshold = {{ dumps(zope_parameter_dict.get('large-file-threshold', "10MB")) }}
config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }} config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }}
config-with-max-rlimit-nofile = {{ dumps(with_max_rlimit_nofile_enable) }}
{# BBB: zope_parameter_dict used to contain 'webdav', so fallback to it -#} {# BBB: zope_parameter_dict used to contain 'webdav', so fallback to it -#}
config-webdav = {{ dumps(current_zope_family_override_dict.get('webdav', zope_parameter_dict.get('webdav', False))) }} config-webdav = {{ dumps(current_zope_family_override_dict.get('webdav', zope_parameter_dict.get('webdav', False))) }}
config-publisher-timeout = {{ dumps(current_zope_family_override_dict.get('publisher-timeout', global_publisher_timeout)) }} config-publisher-timeout = {{ dumps(current_zope_family_override_dict.get('publisher-timeout', global_publisher_timeout)) }}
......
{% from "instance_zodb_base" import zodb_dict with context %} {% from "instance_zodb_base" import zodb_dict with context %}
{% set webdav = slapparameter_dict['webdav'] -%} {% set webdav = slapparameter_dict['webdav'] -%}
{% set with_max_rlimit_nofile = slapparameter_dict['with-max-rlimit-nofile'] -%}
{% set thread_amount = slapparameter_dict['thread-amount'] %} {% set thread_amount = slapparameter_dict['thread-amount'] %}
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%} {% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
{% set ports = itertools.count(slapparameter_dict['port-base']) -%} {% set ports = itertools.count(slapparameter_dict['port-base']) -%}
...@@ -346,6 +347,7 @@ wrapped-command-line = ...@@ -346,6 +347,7 @@ wrapped-command-line =
--access-log-file={{ '${' ~ conf_parameter_name ~ ':z2-log}' }} --access-log-file={{ '${' ~ conf_parameter_name ~ ':z2-log}' }}
{% if longrequest_logger_interval > 0 %} --long-request-log-file={{ '${' ~ conf_parameter_name ~ ':longrequest-logger-file}' }} {% endif %} {% if longrequest_logger_interval > 0 %} --long-request-log-file={{ '${' ~ conf_parameter_name ~ ':longrequest-logger-file}' }} {% endif %}
{% if webdav %}-w{% endif %} {% if webdav %}-w{% endif %}
{% if with_max_rlimit_nofile %}--with-max-rlimit-nofile{% endif %}
{{ ipv4 }}:${:port} {{ ipv4 }}:${:port}
{% if timerserver_interval %}--timerserver-interval={{ timerserver_interval }}{% endif %} {% if timerserver_interval %}--timerserver-interval={{ timerserver_interval }}{% endif %}
'${:configuration-file}' '${:configuration-file}'
......
...@@ -43,6 +43,7 @@ init = ...@@ -43,6 +43,7 @@ init =
default-cloudooo-url-list = ${default-cloudooo-url-list:url-list} default-cloudooo-url-list = ${default-cloudooo-url-list:url-list}
jupyter-enable-default = {{ jupyter_enable_default }} jupyter-enable-default = {{ jupyter_enable_default }}
wcfs-enable-default = {{ wcfs_enable_default }} wcfs-enable-default = {{ wcfs_enable_default }}
with-max-rlimit-nofile-enable-default = {{ with_max_rlimit_nofile_enable_default }}
local-bt5-repository = {{ ' '.join(local_bt5_repository.split()) }} local-bt5-repository = {{ ' '.join(local_bt5_repository.split()) }}
[context] [context]
...@@ -58,6 +59,7 @@ extra-context = ...@@ -58,6 +59,7 @@ extra-context =
key default_cloudooo_url_list dynamic-template-erp5-parameters:default-cloudooo-url-list key default_cloudooo_url_list dynamic-template-erp5-parameters:default-cloudooo-url-list
key jupyter_enable_default dynamic-template-erp5-parameters:jupyter-enable-default key jupyter_enable_default dynamic-template-erp5-parameters:jupyter-enable-default
key wcfs_enable_default dynamic-template-erp5-parameters:wcfs-enable-default key wcfs_enable_default dynamic-template-erp5-parameters:wcfs-enable-default
key with_max_rlimit_nofile_enable_default dynamic-template-erp5-parameters:with-max-rlimit-nofile-enable-default
key local_bt5_repository dynamic-template-erp5-parameters:local-bt5-repository key local_bt5_repository dynamic-template-erp5-parameters:local-bt5-repository
key openssl_location :openssl-location key openssl_location :openssl-location
import re re import re re
......
...@@ -63,6 +63,8 @@ part-list = ...@@ -63,6 +63,8 @@ part-list =
# database information # database information
db-name = lamp db-name = lamp
db-user = lamp db-user = lamp
# Publish default lamp slave frontend url
default-frontend = True
#---------------- #----------------
#-- Instance-level buildout profiles. #-- Instance-level buildout profiles.
...@@ -113,6 +115,7 @@ context = ...@@ -113,6 +115,7 @@ context =
key custom_application_template custom-application-deployment:path key custom_application_template custom-application-deployment:path
key db_name custom-application-deployment:db-name key db_name custom-application-deployment:db-name
key db_user custom-application-deployment:db-user key db_user custom-application-deployment:db-user
key default_frontend custom-application-deployment:default-frontend
key lamp_apache_httpd template-apache-httpd:target key lamp_apache_httpd template-apache-httpd:target
[instance-apache-php] [instance-apache-php]
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
# not need these here). # not need these here).
[lamp-instance] [lamp-instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 7854dd0edd48f2d91c16412c4a875ca4 md5sum = 6395a5d69e2fee494a7d00fd2ac563cb
[instance-apache-php] [instance-apache-php]
filename = instance-apache-php.cfg.in filename = instance-apache-php.cfg.in
md5sum = 1e4762a6a7631d517fb45c84f9c989fe md5sum = 41602a61d5f9609281dbfa3f27da0626
[instance-lamp] [instance-lamp]
filename = instance-lamp.cfg.jinja2.in filename = instance-lamp.cfg.jinja2.in
md5sum = 347ddf1516bf2ddb5f6fb23539382847 md5sum = de1f450a80547d12334b712016138078
[template-apache.conf] [template-apache.conf]
filename = apache.conf.in filename = apache.conf.in
...@@ -30,7 +30,7 @@ md5sum = e49410f0a4bf28993a56bb28aff0a6f0 ...@@ -30,7 +30,7 @@ md5sum = e49410f0a4bf28993a56bb28aff0a6f0
[template-php.ini] [template-php.ini]
filename = php.ini.in filename = php.ini.in
md5sum = bf21c6d68ef85ee7de090375424d0c5c md5sum = 677e1185a99d337cd1be778c548a6d30
[template-apache-httpd] [template-apache-httpd]
filename = apache-httpd.conf.in filename = apache-httpd.conf.in
......
...@@ -152,7 +152,7 @@ context = ...@@ -152,7 +152,7 @@ context =
[apache-php-conf] [apache-php-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
url = {{ parameter_dict['template-apache-conf'] }} url = {{ parameter_dict['template-apache-conf'] }}
output = ${directory:etc}/apache.confgraceful output = ${directory:etc}/apache.conf
context = context =
section parameter_dict apache-php-configuration section parameter_dict apache-php-configuration
extensions = jinja2.ext.do extensions = jinja2.ext.do
...@@ -230,6 +230,27 @@ command-line = ${instance-parameter:php-bin} -c ${php.ini-conf:output} ...@@ -230,6 +230,27 @@ command-line = ${instance-parameter:php-bin} -c ${php.ini-conf:output}
<= monitor-publish <= monitor-publish
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
backend-url = ${apache-php-configuration:url} backend-url = ${apache-php-configuration:url}
{% if parameter_dict['publish-frontend'] -%}
url = ${lamp-frontend-promise:url}
{% endif -%}
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Instance Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
shared = true
config-url = ${apache-php-configuration:url}
config-https-only = true
return = domain secure_access
[lamp-frontend-promise]
<= monitor-promise-base
promise = check_url_available
name = lamp-http-frontend.py
url = ${request-frontend:connection-secure_access}
config-url = ${:url}
#---------------- #----------------
......
...@@ -30,11 +30,13 @@ config-{{ key }} = {{ dumps(value) }} ...@@ -30,11 +30,13 @@ config-{{ key }} = {{ dumps(value) }}
config-monitor-passwd = ${monitor-instance-parameter:password} config-monitor-passwd = ${monitor-instance-parameter:password}
config-database-list = ${request-mariadb:connection-database-list} config-database-list = ${request-mariadb:connection-database-list}
return = return =
url
backend-url backend-url
monitor-base-url monitor-base-url
{% do part_list.append('request-apache') -%} {% do part_list.append('request-apache') -%}
{% do publish_dict.__setitem__('backend-url', '${request-apache:connection-backend-url}') -%} {% do publish_dict.__setitem__('backend-url', '${request-apache:connection-backend-url}') -%}
{% do publish_dict.__setitem__('url', '${request-apache:connection-url}') -%}
{% do monitor_base_url_dict.__setitem__('apache', '${request-apache:connection-monitor-base-url}') -%} {% do monitor_base_url_dict.__setitem__('apache', '${request-apache:connection-monitor-base-url}') -%}
[request-mariadb] [request-mariadb]
...@@ -59,27 +61,6 @@ return = ...@@ -59,27 +61,6 @@ return =
{% do publish_dict.__setitem__('mariadb-url-list', '${request-mariadb:connection-database-list}') -%} {% do publish_dict.__setitem__('mariadb-url-list', '${request-mariadb:connection-database-list}') -%}
{% do monitor_base_url_dict.__setitem__('mariadb', '${request-mariadb:connection-monitor-base-url}') -%} {% do monitor_base_url_dict.__setitem__('mariadb', '${request-mariadb:connection-monitor-base-url}') -%}
[request-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Instance Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
shared = true
config-url = ${request-apache:connection-backend-url}
config-https-only = true
return = domain secure_access
[lamp-frontend-promise]
<= monitor-promise-base
promise = check_url_available
name = lamp-http-frontend.py
url = ${request-frontend:connection-secure_access}
config-url = ${:url}
config-custom-domain = {{ slapparameter_dict.get('custom-domain', '') }}
{% do publish_dict.__setitem__('url', '${lamp-frontend-promise:url}') -%}
[publish-early] [publish-early]
recipe = slapos.cookbook:publish-early recipe = slapos.cookbook:publish-early
-init = -init =
......
...@@ -67,6 +67,7 @@ template-apache-conf = {{ template_apache_conf }} ...@@ -67,6 +67,7 @@ template-apache-conf = {{ template_apache_conf }}
apache-location = {{ apache_location }} apache-location = {{ apache_location }}
apache-php-location = {{ apache_php_location }} apache-php-location = {{ apache_php_location }}
template-php-ini = {{ template_php_ini }} template-php-ini = {{ template_php_ini }}
publish-frontend = !py!{{ default_frontend }}
# XXX no failure if `custom_application_template` is empty # XXX no failure if `custom_application_template` is empty
[application-parameters] [application-parameters]
......
...@@ -65,7 +65,7 @@ apc.lazy_functions=0 ...@@ -65,7 +65,7 @@ apc.lazy_functions=0
opcache.enable=1 opcache.enable=1
opcache.enable_cli=1 opcache.enable_cli=1
opcache.memory_consumption=128 opcache.memory_consumption=128
opcache.interned_strings_buffer=8 opcache.interned_strings_buffer={{ instance_dict.get('php.opcache.interned-strings-buffer', 8) }}
opcache.max_accelerated_files=10000 opcache.max_accelerated_files=10000
opcache.revalidate_freq=1 opcache.revalidate_freq={{ instance_dict.get('php.opcache.revalidate-freq', 1) }}
opcache.save_comments=1 opcache.save_comments=1
...@@ -30,7 +30,7 @@ md5sum = 1b8645835f04081861266436505fd28f ...@@ -30,7 +30,7 @@ md5sum = 1b8645835f04081861266436505fd28f
[template-replicated] [template-replicated]
filename = template-replicated.cfg.in filename = template-replicated.cfg.in
md5sum = 52762882e0d631f51d2c9e5f8b31c0b6 md5sum = 67c863b15dbfa937babdbd620f95c1ff
[template-parts] [template-parts]
filename = template-parts.cfg.in filename = template-parts.cfg.in
......
...@@ -48,25 +48,25 @@ config-{{ parameter_name }} = {{ dumps(parameter_value) }} ...@@ -48,25 +48,25 @@ config-{{ parameter_name }} = {{ dumps(parameter_value) }}
{% for key, value in six.iteritems(monitor_dict) -%} {% for key, value in six.iteritems(monitor_dict) -%}
config-{{ key }} = {{ value }} config-{{ key }} = {{ value }}
{% endfor -%} {% endfor -%}
{% if sla_parameter_dict == {} -%} {% set sla_key_main = "-sla-%s%s-" % (namebase, 0) -%}
{% set sla_key_secondary = "-sla-%s-" % (0) -%}
{% set sla_key_main_length = sla_key_main | length -%}
{% set sla_key_secondary_length = sla_key_secondary | length -%}
{% set sla_dict = {} -%}
{% for key in sla_parameter_dict.keys() -%}
{% if key.startswith(sla_key_main) -%}
{% do sla_dict.__setitem__(key[sla_key_main_length:], sla_parameter_dict.get(key)) -%}
{% elif key.startswith(sla_key_secondary) and key[sla_key_secondary_length:] not in sla_dict -%}
{% do sla_dict.__setitem__(key[sla_key_secondary_length:], sla_parameter_dict.get(key)) -%}
{% endif -%}
{% endfor -%}
{% if sla_dict == {} %}
sla-mode = unique_by_network sla-mode = unique_by_network
{% else %} {% else %}
{% set sla_key_main = "-sla-%s%s-" % (namebase, 0) -%}
{% set sla_key_secondary = "-sla-%s-" % (0) -%}
{% set sla_key_main_length = sla_key_main | length -%}
{% set sla_key_secondary_length = sla_key_secondary | length -%}
{% set sla_dict = {} -%}
{% for key in sla_parameter_dict.keys() -%}
{% if key.startswith(sla_key_main) -%}
{% do sla_dict.__setitem__(key[sla_key_main_length:], sla_parameter_dict.get(key)) -%}
{% elif key.startswith(sla_key_secondary) and key[sla_key_secondary_length:] not in sla_dict -%}
{% do sla_dict.__setitem__(key[sla_key_secondary_length:], sla_parameter_dict.get(key)) -%}
{% endif -%}
{% endfor -%}
{% for key, value in six.iteritems(sla_dict) -%} {% for key, value in six.iteritems(sla_dict) -%}
sla-{{ key }} = {{ value }} sla-{{ key }} = {{ value }}
{% endfor -%} {% endfor %}
{% endif -%} {% endif %}
{% if 'monitor-base-url' in monitor_return and not monitor_parameter_dict.get('set-monitor-url', False) -%} {% if 'monitor-base-url' in monitor_return and not monitor_parameter_dict.get('set-monitor-url', False) -%}
{% do monitor_url_list.append('${request-' ~ namebase ~ ':connection-monitor-base-url}') -%} {% do monitor_url_list.append('${request-' ~ namebase ~ ':connection-monitor-base-url}') -%}
...@@ -100,24 +100,24 @@ config-on-notification = ${request-pbs-{{namebase}}-{{id}}:connection-feeds-url} ...@@ -100,24 +100,24 @@ config-on-notification = ${request-pbs-{{namebase}}-{{id}}:connection-feeds-url}
{% for key, value in six.iteritems(monitor_dict) -%} {% for key, value in six.iteritems(monitor_dict) -%}
config-{{ key }} = {{ value }} config-{{ key }} = {{ value }}
{% endfor -%} {% endfor -%}
{% if sla_parameter_dict == {} -%} {% set sla_key_main = "-sla-%s%s-" % (namebase, id) -%}
{% set sla_key_secondary = "-sla-%s-" % (id) -%}
{% set sla_key_main_length = sla_key_main | length -%}
{% set sla_key_secondary_length = sla_key_secondary | length -%}
{% set sla_dict = {} -%}
{% for key in sla_parameter_dict.keys() -%}
{% if key.startswith(sla_key_main) -%}
{% do sla_dict.__setitem__(key[sla_key_main_length:], sla_parameter_dict.get(key)) -%}
{% elif key.startswith(sla_key_secondary) and key[sla_key_secondary_length:] not in sla_dict -%}
{% do sla_dict.__setitem__(key[sla_key_secondary_length:], sla_parameter_dict.get(key)) -%}
{% endif -%}
{% endfor -%}
{% if sla_dict == {} %}
sla-mode = unique_by_network sla-mode = unique_by_network
{% else %} {% else %}
{% set sla_key_main = "-sla-%s%s-" % (namebase, id) -%}
{% set sla_key_secondary = "-sla-%s-" % (id) -%}
{% set sla_key_main_length = sla_key_main | length -%}
{% set sla_key_secondary_length = sla_key_secondary | length -%}
{% set sla_dict = {} -%}
{% for key in sla_parameter_dict.keys() -%}
{% if key.startswith(sla_key_main) -%}
{% do sla_dict.__setitem__(key[sla_key_main_length:], sla_parameter_dict.get(key)) -%}
{% elif key.startswith(sla_key_secondary) and key[sla_key_secondary_length:] not in sla_dict -%}
{% do sla_dict.__setitem__(key[sla_key_secondary_length:], sla_parameter_dict.get(key)) -%}
{% endif -%}
{% endfor -%}
{% for key, value in six.iteritems(sla_dict) -%} {% for key, value in six.iteritems(sla_dict) -%}
sla-{{ key }} = {{ value }} sla-{{ key }} = {{ value }}
{% endfor -%} {% endfor %}
{% endif %} {% endif %}
[publish-connection-information] [publish-connection-information]
...@@ -202,21 +202,21 @@ config-{{ key }} = {{ value }} ...@@ -202,21 +202,21 @@ config-{{ key }} = {{ value }}
{% endfor -%} {% endfor -%}
return = ssh-key notification-url feeds-url {{ monitor_return }} return = ssh-key notification-url feeds-url {{ monitor_return }}
shared = false shared = false
{% if sla_parameter_dict == {} -%} {% set sla_key_main = "-sla-%s%s-" % ("pbs", id) -%}
{% set sla_key_secondary = "-sla-%s-" % (id) -%}
{% set sla_key_main_length = sla_key_main | length -%}
{% set sla_key_secondary_length = sla_key_secondary | length -%}
{% set sla_dict = {} -%}
{% for key in sla_parameter_dict.keys() -%}
{% if key.startswith(sla_key_main) -%}
{% do sla_dict.__setitem__(key[sla_key_main_length:], sla_parameter_dict.get(key)) -%}
{% elif key.startswith(sla_key_secondary) and key[sla_key_secondary_length:] not in sla_dict -%}
{% do sla_dict.__setitem__(key[sla_key_secondary_length:], sla_parameter_dict.get(key)) -%}
{% endif -%}
{% endfor -%}
{% if sla_dict == {} %}
sla-mode = unique_by_network sla-mode = unique_by_network
{% else %} {% else %}
{% set sla_key_main = "-sla-%s%s-" % ("pbs", id) -%}
{% set sla_key_secondary = "-sla-%s-" % (id) -%}
{% set sla_key_main_length = sla_key_main | length -%}
{% set sla_key_secondary_length = sla_key_secondary | length -%}
{% set sla_dict = {} -%}
{% for key in sla_parameter_dict.keys() -%}
{% if key.startswith(sla_key_main) -%}
{% do sla_dict.__setitem__(key[sla_key_main_length:], sla_parameter_dict.get(key)) -%}
{% elif key.startswith(sla_key_secondary) and key[sla_key_secondary_length:] not in sla_dict -%}
{% do sla_dict.__setitem__(key[sla_key_secondary_length:], sla_parameter_dict.get(key)) -%}
{% endif -%}
{% endfor -%}
{% for key, value in six.iteritems(sla_dict) -%} {% for key, value in six.iteritems(sla_dict) -%}
sla-{{ key }} = {{ value }} sla-{{ key }} = {{ value }}
{% endfor %} {% endfor %}
......
...@@ -118,7 +118,10 @@ eggs = ...@@ -118,7 +118,10 @@ eggs =
${lxml-python:egg} ${lxml-python:egg}
${pycurl:egg} ${pycurl:egg}
${python-cryptography:egg} ${python-cryptography:egg}
${backports.lzma:egg} ${:extra-eggs}
extra-eggs =
[slapos-toolbox-dependencies:python2]
extra-eggs = ${backports.lzma:egg}
# Install a slapos command with networkcache enabled in ${buildout:bin-directory} # Install a slapos command with networkcache enabled in ${buildout:bin-directory}
[slapos-command] [slapos-command]
...@@ -300,7 +303,7 @@ simplegeneric = 0.8.1 ...@@ -300,7 +303,7 @@ simplegeneric = 0.8.1
singledispatch = 3.4.0.3 singledispatch = 3.4.0.3
six = 1.16.0 six = 1.16.0
slapos.cookbook = 1.0.329 slapos.cookbook = 1.0.329
slapos.core = 1.10.7 slapos.core = 1.10.8
slapos.extension.shared = 1.0 slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.25 slapos.libnetworkcache = 0.25
slapos.rebootstrap = 4.5 slapos.rebootstrap = 4.5
...@@ -361,6 +364,8 @@ statsmodels = 0.11.1 ...@@ -361,6 +364,8 @@ statsmodels = 0.11.1
# it can be removed when slapos-node uses current python3 # it can be removed when slapos-node uses current python3
[versions:sys.version_info < (3,8)] [versions:sys.version_info < (3,8)]
Flask = 1.1.2 Flask = 1.1.2
itsdangerous = 0.24
Jinja2 = 2.11.3
MarkupSafe = 2.0.1 MarkupSafe = 2.0.1
typing-extensions = 4.7.1:whl typing-extensions = 4.7.1:whl
Werkzeug = 2.0.2 Werkzeug = 2.0.2
......
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