Commit 5c0de38d authored by Ivan Tyagov's avatar Ivan Tyagov

Merge remote-tracking branch 'origin/master' into oi-sensor-sr

parents 073d316e 86d54d98
......@@ -44,9 +44,9 @@ environment =
[apache]
recipe = slapos.recipe.cmmi
shared = true
version = 2.4.59
version = 2.4.62
url = https://archive.apache.org/dist/httpd/httpd-${:version}.tar.bz2
md5sum = 9f77eb01b2fddfb4b32d469af90fb01b
md5sum = cded7afa23c13c4854008d95a69ce016
configure-options = --disable-static
--enable-authn-alias
--enable-bucketeer
......
......@@ -31,8 +31,8 @@ post-make-hook = ${:_profile_base_location_}/${aspell-create-wrapper:filename}#$
[aspell]
recipe = slapos.recipe.cmmi
shared = true
url = https://ftp.gnu.org/gnu/aspell/aspell-0.60.7.tar.gz
md5sum = 8ef2252609c511cd2bb26f3a3932ef28
url = https://ftp.gnu.org/gnu/aspell/aspell-0.60.8.1.tar.gz
md5sum = 187bd142f522ada555c7aa6b9cbf56e6
configure-options =
--enable-curses="-lncursesw -ltinfow"
environment =
......
......@@ -18,8 +18,8 @@ parts =
[git]
recipe = slapos.recipe.cmmi
shared = true
url = https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.42.0.tar.xz
md5sum = e61c187f6863d5e977e60cdedf213ec0
url = https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.45.2.tar.xz
md5sum = a6af98f948a1f07cfeac57e91a0f2abe
configure-options =
--with-curl=${curl:location}
--with-openssl=${openssl:location}
......
......@@ -13,8 +13,8 @@ parts = haproxy
[haproxy]
recipe = slapos.recipe.cmmi
shared = true
url = https://www.haproxy.org/download/2.6/src/haproxy-2.6.16.tar.gz
md5sum = b01e605cdaf2742fcedf214a61e187b4
url = https://www.haproxy.org/download/2.6/src/haproxy-2.6.18.tar.gz
md5sum = 9cb80d59919ebf108d58ecf4618f9acf
configure-command = true
# for Linux kernel 2.6.28 and above, we use "linux-glibc" as the TARGET,
# otherwise use "generic".
......
......@@ -19,7 +19,6 @@ extends =
../libsigc/buildout.cfg
../libxml2/buildout.cfg
../libxslt/buildout.cfg
../patch/buildout.cfg
../perl/buildout.cfg
../pkgconfig/buildout.cfg
../potrace/buildout.cfg
......@@ -31,6 +30,7 @@ extends =
../defaults.cfg
[gcc]
min_version = 10.5
max_version = 11
[gsl]
......
diff -ur inkscape-0.92.5.orig/share/filters/CMakeLists.txt inkscape-0.92.5/share/filters/CMakeLists.txt
--- inkscape-0.92.5.orig/share/filters/CMakeLists.txt 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/filters/CMakeLists.txt 2024-04-05 12:44:16.628062522 +0000
@@ -1,6 +1,6 @@
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg > ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg.h
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg > ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg.h
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/filters.svg
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py
)
diff -ur inkscape-0.92.5.orig/share/filters/i18n.py inkscape-0.92.5/share/filters/i18n.py
--- inkscape-0.92.5.orig/share/filters/i18n.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/filters/i18n.py 2024-04-05 12:44:16.628062522 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from xml.dom import minidom
import sys
diff -ur inkscape-0.92.5.orig/share/filters/samplify.py inkscape-0.92.5/share/filters/samplify.py
--- inkscape-0.92.5.orig/share/filters/samplify.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/filters/samplify.py 2024-04-05 13:02:54.033210445 +0000
@@ -5,33 +5,33 @@
#
# Run it thus:
#
-# python samplify.py sample.svg filters.svg > out.svg
+# python3 samplify.py sample.svg filters.svg > out.svg
#
# It requires 'inkscape' in executable path for dimension queries.
-import sys, os, string
+import sys, os, string, subprocess
from lxml import etree
if len(sys.argv) < 3:
- sys.stderr.write ("Usage: python samplify.py sample.svg filters.svg > out.svg\n")
+ sys.stderr.write ("Usage: python3 samplify.py sample.svg filters.svg > out.svg\n")
sys.exit(1)
# namespaces we need to be aware of
NSS = {
-u'sodipodi' :u'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd',
-u'cc' :u'http://web.resource.org/cc/',
-u'svg' :u'http://www.w3.org/2000/svg',
-u'dc' :u'http://purl.org/dc/elements/1.1/',
-u'rdf' :u'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
-u'inkscape' :u'http://www.inkscape.org/namespaces/inkscape',
-u'xlink' :u'http://www.w3.org/1999/xlink',
-u'xml' :u'http://www.w3.org/XML/1998/namespace'
+'sodipodi' :'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd',
+'cc' :'http://web.resource.org/cc/',
+'svg' :'http://www.w3.org/2000/svg',
+'dc' :'http://purl.org/dc/elements/1.1/',
+'rdf' :'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
+'inkscape' :'http://www.inkscape.org/namespaces/inkscape',
+'xlink' :'http://www.w3.org/1999/xlink',
+'xml' :'http://www.w3.org/XML/1998/namespace'
}
# helper function to add namespace URI to a name
def addNS(tag, ns=None):
val = tag
- if ns!=None and len(ns)>0 and NSS.has_key(ns) and len(tag)>0 and tag[0]!='{':
+ if ns!=None and len(ns)>0 and ns in NSS and len(tag)>0 and tag[0]!='{':
val = "{%s}%s" % (NSS[ns], tag)
return val
@@ -88,10 +88,8 @@
file = sys.argv[1]
id = tdoc.getroot().attrib["id"]
for query in q.keys():
- f,err = os.popen3('inkscape --query-%s --query-id=%s "%s"' % (query,id,file))[1:]
- q[query] = float(f.read())
- f.close()
- err.close()
+ f = subprocess.Popen(["inkscape", "--query-%s"%query, "--query-id=%s"%id, "%s"%file], stdout=subprocess.PIPE)
+ q[query] = float(f.stdout.read())
# add some margins
q['width'] = q['width'] * 1.3
@@ -138,7 +136,7 @@
newroot.append(text)
if a_tooltip not in fi.keys():
- print "no menu-tooltip for", fi.attrib["id"]
+ print("no menu-tooltip for", fi.attrib["id"])
sys.exit()
text = etree.Element(e_text, nsmap=NSS)
@@ -156,5 +154,5 @@
tout.getroot().attrib['width'] = str(total_width)
tout.getroot().attrib['height'] = str(total_height)
-print etree.tostring(tout, encoding='UTF-8')
+print(etree.tostring(tout, encoding='UTF-8'))
diff -ur inkscape-0.92.5.orig/share/palettes/CMakeLists.txt inkscape-0.92.5/share/palettes/CMakeLists.txt
--- inkscape-0.92.5.orig/share/palettes/CMakeLists.txt 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/palettes/CMakeLists.txt 2024-04-05 12:44:16.628062522 +0000
@@ -2,7 +2,7 @@
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/palettes.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${I18N_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/palettes.h
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${I18N_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/palettes.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${I18N_FILES}
)
diff -ur inkscape-0.92.5.orig/share/palettes/PaletteGen.py inkscape-0.92.5/share/palettes/PaletteGen.py
--- inkscape-0.92.5.orig/share/palettes/PaletteGen.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/palettes/PaletteGen.py 2024-04-05 13:02:54.033210445 +0000
@@ -1,9 +1,9 @@
import colorsys
-print '''GIMP Palette
+print('''GIMP Palette
Name: Inkscape default
Columns: 3
-# generated by PaletteGen.py'''
+# generated by PaletteGen.py''')
# grays
@@ -25,7 +25,7 @@
line = "%3s %3s %3s White" % (rval, gval, bval)
else:
line = "%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - int(level * 100))
- print line
+ print(line)
# add three more steps near white
if i == g_steps - 1:
@@ -34,25 +34,25 @@
rval = int(round(r * 255))
gval = int(round(g * 255))
bval = int(round(b * 255))
- print "%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - (level_m * 100))
+ print("%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - (level_m * 100)))
level_m = level + 0.5 * g_step_size
r, g, b = colorsys.hls_to_rgb(0, level_m, 0)
rval = int(round(r * 255))
gval = int(round(g * 255))
bval = int(round(b * 255))
- print "%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - int(level_m * 100))
+ print("%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - int(level_m * 100)))
level_mm = level + 0.75 * g_step_size
r, g, b = colorsys.hls_to_rgb(0, level_mm, 0)
rval = int(round(r * 255))
gval = int(round(g * 255))
bval = int(round(b * 255))
- print "%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - (level_mm * 100))
+ print("%3s %3s %3s %s%% Gray" % (rval, gval, bval, 100 - (level_mm * 100)))
# standard HTML colors
-print '''128 0 0 Maroon (#800000)
+print('''128 0 0 Maroon (#800000)
255 0 0 Red (#FF0000)
128 128 0 Olive (#808000)
255 255 0 Yellow (#FFFF00)
@@ -63,7 +63,7 @@
0 0 128 Navy (#000080)
0 0 255 Blue (#0000FF)
128 0 128 Purple (#800080)
-255 0 255 Fuchsia (#FF00FF)'''
+255 0 255 Fuchsia (#FF00FF)''')
# HSL palette
h_steps = 15
@@ -88,4 +88,4 @@
bval = int(round(b * 255))
line = "%3s %3s %3s #%02X%02X%02X" % (rval, gval, bval, rval, gval, bval)
- print line
+ print(line)
diff -ur inkscape-0.92.5.orig/share/palettes/i18n.py inkscape-0.92.5/share/palettes/i18n.py
--- inkscape-0.92.5.orig/share/palettes/i18n.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/palettes/i18n.py 2024-04-05 12:44:16.628062522 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys
import glob
diff -ur inkscape-0.92.5.orig/share/patterns/CMakeLists.txt inkscape-0.92.5/share/patterns/CMakeLists.txt
--- inkscape-0.92.5.orig/share/patterns/CMakeLists.txt 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/patterns/CMakeLists.txt 2024-04-05 12:44:16.628062522 +0000
@@ -1,6 +1,6 @@
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg > ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg > ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg.h
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/patterns.svg
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py
)
diff -ur inkscape-0.92.5.orig/share/patterns/i18n.py inkscape-0.92.5/share/patterns/i18n.py
--- inkscape-0.92.5.orig/share/patterns/i18n.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/patterns/i18n.py 2024-04-05 12:47:06.522276571 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from xml.dom import minidom
import sys
diff -ur inkscape-0.92.5.orig/share/symbols/CMakeLists.txt inkscape-0.92.5/share/symbols/CMakeLists.txt
--- inkscape-0.92.5.orig/share/symbols/CMakeLists.txt 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/symbols/CMakeLists.txt 2024-04-05 12:44:16.628062522 +0000
@@ -2,7 +2,7 @@
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/symbols.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/symbols.h
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/symbols.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES}
)
diff -ur inkscape-0.92.5.orig/share/symbols/i18n.py inkscape-0.92.5/share/symbols/i18n.py
--- inkscape-0.92.5.orig/share/symbols/i18n.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/symbols/i18n.py 2024-04-05 12:44:16.628062522 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from xml.dom import minidom
import sys
diff -ur inkscape-0.92.5.orig/share/templates/CMakeLists.txt inkscape-0.92.5/share/templates/CMakeLists.txt
--- inkscape-0.92.5.orig/share/templates/CMakeLists.txt 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/templates/CMakeLists.txt 2024-04-05 12:44:16.628062522 +0000
@@ -2,7 +2,7 @@
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/templates.h
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/templates.h
+ COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES} > ${CMAKE_CURRENT_SOURCE_DIR}/templates.h
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/i18n.py ${_FILES}
)
diff -ur inkscape-0.92.5.orig/share/templates/i18n.py inkscape-0.92.5/share/templates/i18n.py
--- inkscape-0.92.5.orig/share/templates/i18n.py 2020-04-09 21:37:16.000000000 +0000
+++ inkscape-0.92.5/share/templates/i18n.py 2024-04-05 12:44:16.628062522 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from xml.dom import minidom
import sys
......@@ -55,17 +55,9 @@ command = ${coreutils-output:test} -x ${:keytool}
keytool = ${java-re-8:location}/bin/keytool
[java-re-temurin-11]
recipe = slapos.recipe.build
update =
from zc.buildout import UserError
raise UserError("unsupported platform")
[java-re-temurin-11:linux and platform.machine() == 'x86_64']
[java-re-temurin-linux-x64-base]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jre_x64_linux_hotspot_11.0.13_8.tar.gz
md5sum = 1b06100bcd0923d3f3279c2f09773af0
configure-command = :
make-binary = :
post-install =
......@@ -75,3 +67,26 @@ post-install =
${patchelf:location}/bin/patchelf --set-rpath %(rpath)s $file
done
rpath = ${alsa:location}/lib:${freetype:location}/lib:${fontconfig:location}/lib:${libpng:location}/lib:${libXrender:location}/lib:${libXtst:location}/lib:${libX11:location}/lib:${libXau:location}/lib:${libXext:location}/lib:${libXdmcp:location}/lib:${libXi:location}/lib:${libxcb:location}/lib:${zlib:location}/lib:@@LOCATION@@/lib:@@LOCATION@@/lib/server:@@LOCATION@@/lib/jli
[java-re-temurin-unsupported-base]
recipe = slapos.recipe.build
update =
from zc.buildout import UserError
raise UserError("unsupported platform")
[java-re-temurin-11]
<= java-re-temurin-unsupported-base
[java-re-temurin-11:linux and platform.machine() == 'x86_64']
<= java-re-temurin-linux-x64-base
url = https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jre_x64_linux_hotspot_11.0.13_8.tar.gz
md5sum = 1b06100bcd0923d3f3279c2f09773af0
[java-re-temurin-21]
<= java-re-temurin-unsupported-base
[java-re-temurin-21:linux and platform.machine() == 'x86_64']
<= java-re-temurin-linux-x64-base
url = https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jre_x64_linux_hotspot_21.0.3_9.tar.gz
md5sum = a028c69d40663040a4438d501b21b11a
......@@ -10,8 +10,8 @@ parts =
[kerberos]
recipe = slapos.recipe.cmmi
shared = true
url = https://web.mit.edu/kerberos/dist/krb5/1.20/krb5-1.20.2.tar.gz
md5sum = 7ac456e97c4959ebe5c836dc2f5aab2c
url = https://web.mit.edu/kerberos/dist/krb5/1.21/krb5-1.21.3.tar.gz
md5sum = beb34d1dfc72ba0571ce72bed03e06eb
configure-command = src/configure
configure-options =
--prefix=@@LOCATION@@
......
......@@ -18,6 +18,7 @@ configure-command = ${cmake:location}/bin/cmake
configure-options =
-DCMAKE_INSTALL_PREFIX=${:location}
-DCMAKE_INSTALL_RPATH=${:location}/lib:${bzip2:location}/lib:${popt:location}/lib:${zlib:location}/lib
-DCMAKE_INSTALL_LIBDIR=lib
make-options =
VERBOSE=1
environment =
......
[buildout]
extends =
../libsodium/buildout.cfg
../patch/buildout.cfg
../pkgconfig/buildout.cfg
parts =
......@@ -9,10 +10,13 @@ parts =
[libzmq]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/zeromq/zeromq4-1/releases/download/v4.1.6/zeromq-4.1.6.tar.gz
md5sum = c89db4dbc0b90c34c9f4983cbff6d321
url = https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz
md5sum = ae933b1e98411fd7cb8309f9502d2737
configure-options =
--without-documentation
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libsodium:location}/lib/pkgconfig
patches =
${:_profile_base_location_}/disable-stringop-overflow-gcc-10.5.patch#4705ba5b86e48e2fd2eaea1d1f891cfe
patch-options = -p1
Disable a stringop-overflow warning failing build on gcc 10.5
This is an original slapos patch probably no longer necessary once we update gcc
--- zeromq-4.3.5.orig/src/xpub.cpp 2023-06-18 23:40:34.000000000 +0900
+++ zeromq-4.3.5/src/xpub.cpp 2024-07-11 20:07:19.620329232 +0900
@@ -384,7 +384,10 @@
// Place the unsubscription to the queue of pending (un)subscriptions
// to be retrieved by the user later on.
blob_t unsub (size_ + 1);
+
+#pragma GCC diagnostic ignored "-Wstringop-overflow="
*unsub.data () = 0;
+#pragma GCC diagnostic pop
if (size_ > 0)
memcpy (unsub.data () + 1, data_, size_);
self_->_pending_data.ZMQ_PUSH_OR_EMPLACE_BACK (ZMQ_MOVE (unsub));
[buildout]
parts =
[macro.pythonpath.eggs]
[macro.variable.eggs]
recipe = slapos.recipe.build
init =
self.eggs = [e.strip() for e in options['eggs'].splitlines() if e.strip()]
update =
import os
from zc.buildout.easy_install import working_set
buildout = self.buildout['buildout']
eggs_directory = buildout['eggs-directory']
develop_eggs_directory = buildout['develop-eggs-directory']
dists = working_set(self.eggs, [develop_eggs_directory, eggs_directory])
paths = ':'.join(dist.location for dist in dists)
self.buildout[options['environment']]['PYTHONPATH'] = paths
print("PYTHONPATH=" + paths)
subpaths = dict(l.split() for l in options['subpaths'].splitlines())
def make_path(dist):
subpath = subpaths.get(dist.key)
return os.path.join(dist.location, subpath) if subpath else dist.location
paths = ':'.join(make_path(dist) for dist in dists)
environment = self.buildout[options['environment']]
variable = options['variable']
value = environment.get(variable)
if value:
paths = '%s:%s' % (paths, value)
environment[variable] = paths
print("%s=%s" %(variable, paths))
variable = PYTHONPATH
subpaths =
[macro.pythonpath.eggs]
<= macro.variable.eggs
......@@ -36,11 +36,3 @@ rpath =
${libpng:location}/lib
${freetype:location}/lib
need-matplotlibrc = ${matplotlibrc:location}
[versions]
matplotlib = 2.1.2
cycler = 0.11.0
matplotlib-inline = 0.1.6:whl
[versions:sys.version_info < (3,8)]
cycler = 0.10.0
......@@ -13,18 +13,17 @@ parts =
[miniupnp-repository]
recipe = slapos.recipe.build:gitclone
repository = https://github.com/miniupnp/miniupnp.git
revision = miniupnpd_2_3_0
revision = miniupnpd_2_3_7
git-executable = ${git:location}/bin/git
[miniupnpd]
recipe = slapos.recipe.cmmi
shared = true
path = ${miniupnp-repository:location}/miniupnpd
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${iptables:location}/lib/pkgconfig:${libuuid:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig
LDFLAGS=-L${libuuid:location}/lib -L${openssl:location}/lib -L${zlib:location}/lib
LDFLAGS=-L${libuuid:location}/lib -Wl,-rpath=${libuuid:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${iptables:location}/lib
# because these configure not support prefix syntax
configure-command = ./configure
configure-options =
......
......@@ -16,9 +16,9 @@ parts =
[openssh]
recipe = slapos.recipe.cmmi
shared = true
md5sum = 1100f170ca1bc669038ca3743e074094
md5sum = bc04ff77796758c0b37bd0bc9314cd3f
location = @@LOCATION@@
url = https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.7p1.tar.gz
url = https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.8p1.tar.gz
patch-binary = ${patch:location}/bin/patch
patch-options = -p1
patches =
......
......@@ -46,13 +46,13 @@ environment =
[openssl-3.0]
<= openssl-common
url = https://www.openssl.org/source/openssl-3.0.13.tar.gz
md5sum = c15e53a62711002901d3515ac8b30b86
url = https://www.openssl.org/source/openssl-3.0.14.tar.gz
md5sum = e6fe71fb59a502db54a25cd0f34ea67e
[openssl-quictls]
<= openssl-3.0
url = https://github.com/quictls/openssl/archive/refs/tags/openssl-3.0.13-quic1.tar.gz
md5sum = ff6a1f5fc5e7ea03aba9c97e7f26d97d
url = https://github.com/quictls/openssl/archive/refs/tags/openssl-3.0.14-quic1.tar.gz
md5sum = fa0ae39667afa8be6dbeadb3cc838e89
[openssl-1.1]
<= openssl-common
......
......@@ -8,9 +8,9 @@ parts =
[perl]
recipe = slapos.recipe.cmmi
shared = true
version = 5.38.0
version = 5.40.0
url = https://www.cpan.org/src/5.0/perl-${:version}.tar.xz
md5sum = e1c8aaec897dd386c741f97eef9f2e87
md5sum = cfe14ef0709b9687f9c514042e8e1e82
siteprefix =@@LOCATION@@/site_${:_buildout_section_name_}
configure-command =
sh Configure -des \
......
[buildout]
# Scipy requires BLAS/LAPACK libraries.
extends =
../meson/buildout.cfg
../ninja/buildout.cfg
../numpy/openblas.cfg
../pandas/buildout.cfg
../pkgconfig/buildout.cfg
parts = scipy
[scipy-env]
<= numpy-env
PATH=${meson:location}/bin:${ninja:location}/bin:${pkgconfig:location}/bin:${buildout:bin-directory}:%(PATH)s
PKG_CONFIG_PATH = ${openblas:location}/lib/pkgconfig
[scipy]
recipe = zc.recipe.egg:custom
......@@ -14,30 +19,51 @@ egg = scipy
environment = scipy-env
setup-eggs = ${numpy:egg}
rpath = ${numpy:rpath}
depends = ${scipy-pythonpath:recipe}
depends =
${scipy-pythonpath:recipe}
${scipy-pkgconfig:recipe}
[scipy-pythonpath]
<= macro.pythonpath.eggs
environment = scipy-env
eggs = ${scipy-setup-eggs:eggs}
[scipy-pkgconfig]
<= macro.variable.eggs
variable = PKG_CONFIG_PATH
environment = scipy-env
eggs = pybind11
subpaths =
pybind11 pybind11/share/pkgconfig/
depends = ${scipy-setup-eggs:recipe}
[scipy-setup-eggs]
recipe = zc.recipe.egg
scripts =
cython
pythran
eggs =
${cython:egg}
${numpy:egg}
${pandas:egg}
meson-python
pythran
pybind11
[versions]
pybind11 = 2.9.2
scipy = 1.8.1
pybind11 = 2.11.1
scipy = 1.12.0
meson-python = 0.13.2:whl
pyproject-metadata = 0.8.0:whl
meson = 1.4.1
beniget = 0.4.1
gast = 0.5.3
pythran = 0.11.0:whl
[versions:sys.version_info < (3,11)]
tomli = 2.0.1:whl
[scipy:sys.version_info < (3,8)]
depends =
......
......@@ -44,23 +44,23 @@ configure-options +=
make-options +=
DESTDIR=${buildout:destdir}
environment +=
PERL5LIB=${perl:location}/lib/5.38.0/
PERL5LIB=${perl:location}/lib/${perl:version}/
[intltool]
environment +=
PERL5LIB=${perl:location}/lib/5.38.0/
PERL5LIB=${perl:location}/lib/${perl:version}/
[autoconf]
environment +=
PERL5LIB=${perl:location}/lib/5.38.0/
PERL5LIB=${perl:location}/lib/${perl:version}/
[automake]
environment +=
PERL5LIB=${perl:location}/lib/5.38.0/
PERL5LIB=${perl:location}/lib/${perl:version}/
[firewalld]
environment +=
PERL5LIB=${perl:location}/lib/5.38.0/
PERL5LIB=${perl:location}/lib/${perl:version}/
[dbus]
......@@ -97,7 +97,7 @@ make-options +=
INSTALL_PREFIX=${buildout:destdir}
DESTDIR=${buildout:destdir}
environment +=
PERL5LIB=${perl:location}/lib/5.38.0/
PERL5LIB=${perl:location}/lib/${perl:version}/
[gobject-introspection]
pre-configure +=
......@@ -105,7 +105,7 @@ pre-configure +=
configure-options +=
--enable-shared
environment +=
PERL5LIB=${perl:location}/lib/5.38.0/
PERL5LIB=${perl:location}/lib/${perl:version}/
post-install =
sed -i 's#!${python:location}/bin/python${python:version}#!/opt/slapos/parts/python${python:version}/bin/python${python:version}#' ${python:location}/bin/python${python:version}-config
......@@ -121,14 +121,14 @@ environment +=
[perl-CPAN-package]
perl-PERL5LIB=${perl:location}/lib/5.38.0/
perl-PERL5LIB=${perl:location}/lib/${perl:version}/
pre-configure =
sed -i "s#'/opt/slapos/parts/perl#'${perl:location}#" ${perl:location}/lib/5.38.0/*-linux-thread-multi/Config.pm
sed -i "s#'/opt/slapos/parts/site_perl#'${buildout:destdir}/parts/site_perl#" ${perl:location}/lib/5.38.0/*-linux-thread-multi/Config.pm
sed -i "s#'/opt/slapos/parts/perl#'${perl:location}#" ${perl:location}/lib/${perl:version}/*-linux-thread-multi/Config.pm
sed -i "s#'/opt/slapos/parts/site_perl#'${buildout:destdir}/parts/site_perl#" ${perl:location}/lib/${perl:version}/*-linux-thread-multi/Config.pm
post-install =
sed -i "s#'${perl:location}#'/opt/slapos/parts/perl#" ${perl:location}/lib/5.38.0/*-linux-thread-multi/Config.pm
sed -i "s#'${buildout:destdir}/parts/site_perl#'/opt/slapos/parts/site_perl#" ${perl:location}/lib/5.38.0/*-linux-thread-multi/Config.pm
sed -i "s#'${perl:location}#'/opt/slapos/parts/perl#" ${perl:location}/lib/${perl:version}/*-linux-thread-multi/Config.pm
sed -i "s#'${buildout:destdir}/parts/site_perl#'/opt/slapos/parts/site_perl#" ${perl:location}/lib/${perl:version}/*-linux-thread-multi/Config.pm
[perl]
configure-command =
......
......@@ -20,8 +20,8 @@ parts =
[subversion]
recipe = slapos.recipe.cmmi
shared = true
url = https://downloads.apache.org/subversion/subversion-1.14.2.tar.bz2
md5sum = 9927b167d1c67d663ca63125907f6f69
url = https://archive.apache.org/dist/subversion/subversion-1.14.3.tar.bz2
md5sum = 19756a5ceb32a022698a66e48616ef6b
configure-options =
--disable-static
--with-apr=${apr:location}
......
......@@ -24,8 +24,8 @@ min_version = 8
[trafficserver]
recipe = slapos.recipe.cmmi
url = https://dlcdn.apache.org/trafficserver/trafficserver-9.2.4.tar.bz2
md5sum = 5a889ba1be6f325e4b523df85616f30b
url = https://archive.apache.org/dist/trafficserver/trafficserver-9.2.5.tar.bz2
md5sum = 73f9c41eeafdb5d20f0287796e9fcef2
shared = true
patch-options = -p1
configure-options =
......
......@@ -6,14 +6,11 @@ extends =
../pkgconfig/buildout.cfg
../xz-utils/buildout.cfg
[gcc]
min_version = 8
[util-linux]
recipe = slapos.recipe.cmmi
shared = true
url = https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.39/util-linux-2.39.2.tar.xz
md5sum = 2feb3e7c306f336a3d22a182dfffc942
url = https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.40/util-linux-2.40.2.tar.xz
md5sum = 88faefc8fefced097e58142077a3d14e
configure-options =
--disable-static
--enable-libuuid
......@@ -21,16 +18,19 @@ configure-options =
--disable-bash-completion
--disable-cal
--disable-cramfs
--disable-exch
--disable-fallocate
--disable-fsck
--enable-libblkid
--disable-libfdisk
--disable-liblastlog2
--enable-libmount
--disable-makeinstall-chown
--disable-makeinstall-setuid
--disable-more
--enable-mount
--disable-nls
--disable-pam-lastlog2
--disable-pivot_root
--disable-pylibmount
--disable-rename
......@@ -74,3 +74,7 @@ environment =
PATH=${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
LDFLAGS=-L${ncurses:location}/lib -Wl,-rpath=${ncurses:location}/lib
CFLAGS=-I${ncurses:location}/include
# disable year 2038 problem ONLY for 32 bit architectures
[libuuid:bits32]
configure-options += --disable-year2038
......@@ -50,7 +50,7 @@ CGO_LDFLAGS += -Wl,-rpath=${zlib:location}/lib
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/wendelin.core.git
branch = master
revision = wendelin.core-2.0.alpha3-9-gda765ef
revision = wendelin.core-2.0.alpha3-22-g07087ec8
# dir is pretty name as top-level recipe
location = ${buildout:parts-directory}/wendelin.core
git-executable = ${git:location}/bin/git
[buildout]
extends =
../gettext/buildout.cfg
../lunzip/buildout.cfg
../openssl/buildout.cfg
../patch/buildout.cfg
../pcre/buildout.cfg
../perl/buildout.cfg
../pkgconfig/buildout.cfg
../zlib/buildout.cfg
parts =
wget
[wget]
recipe = slapos.recipe.cmmi
shared = true
url = http://ftp.gnu.org/gnu/wget/wget-1.20.3.tar.lz
md5sum = 3bc242eb69165247b1793dd0b794ff52
configure-options =
--enable-ipv6
--enable-opie
--disable-iri
--disable-pcre2
--with-ssl=openssl
--with-libssl-prefix=${openssl:location}
--with-zlib-lib=${zlib:location}
environment =
# Python 3 is used for things we don't need. This is an optional dependency,
# unless PYTHON is set (previously set by [python]): wget complains (rightly)
# if it points to Python 2.7 (which we may still use).
PYTHON=
PATH=${gettext:location}/bin:${lunzip:location}/bin:${patch:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig
LDFLAGS=-L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${openssl:location}/lib -L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib -Wl,-rpath=${openssl:location}/lib
CPPFLAGS=-I${zlib:location}/include -I${openssl:location}/include -I${pcre:location}/include
......@@ -12,17 +12,17 @@ extends =
[zbar]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/mchehab/zbar/archive/0.23.90.tar.gz
md5sum = cb1667e20c1d7acf1b9911414adaeb84
url = https://github.com/mchehab/zbar/archive/refs/tags/0.23.93.tar.gz
md5sum = 3f69d17f6495de023b59b3539ce5e605
pre-configure =
autoreconf -vfi -I ${libtool:location}/share/aclocal -I ${pkgconfig:location}/share/aclocal
configure-options =
configure-options =
--disable-video
--without-imagemagick
--without-gtk
--without-xv
--without-qt
--without-python
--without-python
--without-x
--without-jpg
--without-dbus
......
......@@ -5,7 +5,5 @@ parts =
[zlib]
recipe = slapos.recipe.cmmi
shared = true
url = https://zlib.net/fossils/zlib-1.3.tar.gz
md5sum = 60373b133d630f74f4a1f94c1185a53f
environment =
CFLAGS=-fPIC
url = https://zlib.net/fossils/zlib-1.3.1.tar.gz
md5sum = 9855b6d802d7fe5b7bd5b196a2271655
......@@ -25,7 +25,7 @@ def main():
obj = json.load(infile, object_pairs_hook=collections.OrderedDict)
except ValueError as e:
exit_code = 1
print(e, file=sys.stderr)
print(f'{f}:{e.lineno}', e, file=sys.stderr)
else:
with open(f, 'w') as outfile:
json.dump(obj, outfile, ensure_ascii=False, sort_keys=False, indent=2, separators=(',', ': '))
......
......@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '1.0.360'
version = '1.0.365'
name = 'slapos.cookbook'
long_description = open("README.rst").read()
......@@ -163,7 +163,6 @@ setup(name=name,
'urlparse = slapos.recipe._urlparse:Recipe',
'uuid = slapos.recipe._uuid:Recipe',
'userinfo = slapos.recipe.userinfo:Recipe',
'webchecker = slapos.recipe.web_checker:Recipe',
'wrapper = slapos.recipe.wrapper:Recipe',
'zabbixagent = slapos.recipe.zabbixagent:Recipe',
'zeo = slapos.recipe.zeo:Recipe',
......
......@@ -96,6 +96,7 @@ class Recipe(GenericBaseRecipe):
ip=self.options['ip'],
port=int(self.options['port']),
openoffice_port=int(self.options['openoffice-port']),
ooo_enable_scripting=self.options.get('ooo_enable_scripting', 'false'),
)
environment_variable_list = []
for env_line in self.options['environment'].splitlines():
......
......@@ -12,6 +12,8 @@ working_path = %(working_path)s
uno_path = %(uno_path)s
# Folder where soffice.bin is installed
office_binary_path = %(office_binary_path)s
# Whether running scripts on the loaded document is allowed
ooo_enable_scripting = %(ooo_enable_scripting)s
#
## Monitor Settings
#
......
[web_checker]
url = %(frontend_url)s
working_directory = %(web_checker_working_directory)s
varnishlog_binary_path = %(varnishlog_binary_path)s
wget_binary_path = %(wget_binary_path)s
email_address = %(web_checker_mail_address)s
smtp_host = %(web_checker_smtp_host)s
debug_level = debug
file_log_path = %(web_checker_log)s
[header_list]
Expires = True
Vary = Accept-Language, Cookie, Accept-Encoding
Accept-Language, Cookie
Accept-Language,Cookie,Accept-Encoding
Accept-Language,Cookie
Accept-Encoding
Cache-Control = max-age=300
max-age=3600
public,max-age=300
public,max-age=3600
[header url=(.*_form)]
Vary = Accept-Encoding
[header url=.*/favicon.ico]
Last-Modified = True
[header content-type=(text/css|.*/javascript)]
Last-Modified = True
Cache-Control = public,max-age=300
public,max-age=3600
public
[no_header content-type=(image/.*|application/font)]
Vary = None
[erp5_extension_list]
prohibited_folder_name_list = web_page_module
document_module
prohibited_file_name_list = WebSection_viewAsWeb
Base_viewHistory
list
......@@ -45,17 +45,17 @@ def createInstanceParameterSchemaValidatorTest(path):
"http://json-schema.org/draft-04/schema#": jsonschema.Draft4Validator,
"http://json-schema.org/draft-06/schema#": jsonschema.Draft6Validator,
"http://json-schema.org/draft-07/schema#": jsonschema.Draft7Validator,
"http://json-schema.org/draft/2019-09/schema": jsonschema.Draft201909Validator,
"http://json-schema.org/draft/2019-09/schema#": jsonschema.Draft201909Validator,
"http://json-schema.org/draft/2020-12/schema": jsonschema.Draft202012Validator,
"http://json-schema.org/draft/2020-12/schema#": jsonschema.Draft202012Validator,
"https://json-schema.org/draft/2019-09/schema": jsonschema.Draft201909Validator,
"https://json-schema.org/draft/2019-09/schema#": jsonschema.Draft201909Validator,
"https://json-schema.org/draft/2020-12/schema": jsonschema.Draft202012Validator,
"https://json-schema.org/draft/2020-12/schema#": jsonschema.Draft202012Validator,
}
def run(self, *args, **kwargs):
with open(path, "r") as json_file:
json_dict = json.load(json_file)
validator = validator_dict.get(
json_dict.get('$schema'),
jsonschema.Draft7Validator)
validator = validator_dict.get(json_dict.get('$schema'))
if validator is None:
raise ValueError("%s has an invalid $schema %s" % (path, json_dict.get('$schema')))
validator.check_schema(json_dict)
return run
......
......@@ -13,13 +13,15 @@ def makeRecipe(recipe_class, options, name='test', buildout=None):
and SLAPOS_TEST_DEVELOP_EGGS_DIRECTORY environment variables, so that the
test recipe does not need to install eggs again when using working set.
"""
_buildout = {
_buildout = six.moves.UserDict({
'buildout': {
'bin-directory': '',
'find-links': '',
'allow-hosts': '',
'allow-unknown-extras': False,
'develop-eggs-directory': '',
'eggs-directory': '',
'directory': '',
'python': 'testpython',
},
'testpython': {
......@@ -31,7 +33,7 @@ def makeRecipe(recipe_class, options, name='test', buildout=None):
'server-url': '',
'software-release-url': '',
}
}
})
_buildout['buildout']['eggs-directory'] = os.environ['SLAPOS_TEST_EGGS_DIRECTORY']
_buildout['buildout']['develop-eggs-directory'] = os.environ['SLAPOS_TEST_DEVELOP_EGGS_DIRECTORY']
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"extends": "./schema-definitions.json#",
"title": "Input Parameters",
"properties": {
......
# OWASP Dependency Track
https://dependencytrack.org/
Can be used to ingest SBOM of slapos software release produced with [nxdbom](https://lab.nexedi.com/nexedi/nxd-bom)
[instance-profile]
filename = instance.cfg.in
md5sum = 5545f52ea36d5116523c5569999915ae
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"additionalProperties": false,
"properties": {}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"url": {
"title": "URL",
"description": "URL to access Dependency-Track.",
"type": "string",
"format": "uri"
}
}
}
[buildout]
parts =
publish-connection-parameter
extends = ${monitor2-template:output}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[dependency-track-instance]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:service}/$${:_buildout_section_name_}
command-line =
${java:location}/bin/java
-jar ${dependency-track-bundled.jar:location}/dependency-track-bundled.jar
-host $${:ip}
-port $${:port}
environment =
ALPINE_DATABASE_MODE=external
ALPINE_DATABASE_URL=jdbc:postgresql://$${postgresql:ipv4}:$${postgresql:port}/$${postgresql:dbname}
ALPINE_DATABASE_DRIVER=org.postgresql.Driver
ALPINE_DATABASE_USERNAME=$${postgresql:superuser}
ALPINE_DATABASE_PASSWORD=$${postgresql:password}
HOME=$${directory:srv-dependency-track}
hash-existing-files =
$${buildout:directory}/software_release/buildout.cfg
ip = $${instance-parameter:ipv4-random}
port = 18080
promises =
$${dependency-track-promise:name}
[dependency-track-frontend-certificate]
recipe = plone.recipe.command
command =
if [ ! -e $${:cert-file} ]
then
${openssl-output:openssl} req -x509 -nodes -sha256 -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=$${:common-name}" \
-newkey rsa -keyout $${:cert-file} \
-out $${:cert-file}
fi
update-command = $${:command}
cert-file = $${directory:var}/$${:_buildout_section_name_}.pem
common-name = $${dependency-track-frontend-config:ip}
location =
$${:cert-file}
[dependency-track-frontend-config]
recipe = slapos.recipe.template:jinja2
url = ${stack-haproxy-default-backend-config:target}
output = $${directory:etc}/$${:_buildout_section_name_}
context =
key pidfile :pidfile
key content :content
content =
listen app
log global
bind $${:ip}:$${:port} ssl crt $${dependency-track-frontend-certificate:cert-file} alpn h2,http/1.1
server app $${dependency-track-instance:ip}:$${dependency-track-instance:port}
pidfile = $${directory:run}/$${:_buildout_section_name_}.pid
ip = $${instance-parameter:ipv6-random}
port = 8443
[dependency-track-frontend]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
command-line =
${haproxy:location}/sbin/haproxy -f $${dependency-track-frontend-config:output}
url = https://[$${dependency-track-frontend-config:ip}]:$${dependency-track-frontend-config:port}
[dependency-track-promise]
<= monitor-promise-base
promise = check_url_available
name = $${:_buildout_section_name_}.py
config-url= $${dependency-track-frontend:url}/
[postgresql-password]
recipe = slapos.cookbook:generate.password
[postgresql]
recipe = slapos.cookbook:postgres
bin = ${postgresql:location}/bin
services = $${directory:service}
dbname = dependency-track_db
superuser = dependency-track-psql
password = $${postgresql-password:passwd}
pgdata-directory = $${directory:srv}/postgresql
ipv4 = $${instance-parameter:ipv4-random}
# disable listening on ipv6
ipv6 =
port = 5432
promises = $${postgresql-promise:name}
[postgresql-psql]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:bin}/$${:_buildout_section_name_}
command-line =
$${postgresql:bin}/psql
-h $${postgresql:pgdata-directory}
-U $${postgresql:superuser}
-d $${postgresql:dbname}
[postgresql-promise]
<= monitor-promise-base
promise = check_command_execute
name = promise-postgresql.py
config-command = $${postgresql-psql:wrapper-path} -c '\q'
[postgresql-backup-crontab-entry]
recipe = slapos.cookbook:cron.d
name = $${:_buildout_section_name_}
cron-entries = $${cron:cron-entries}
time = daily
command = $${postgresql-backup:wrapper-path}
[postgresql-backup]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:bin}/$${:_buildout_section_name_}
# XXX there's a recipe for backup in slapos cookbook, but it does not create
# the backup file in an atomic way, which is not acceptable here, because we
# don't want to risk pulling a partial file. To prevent this, we create a
# temp file and move it when finished.
command-line =
sh -c "$${postgresql:bin}/pg_dump \
-h $${postgresql:pgdata-directory} \
-U $${postgresql:superuser} \
--format=custom \
-f $${:backup-file}.tmp \
$${postgresql:dbname} \
&& mv $${:backup-file}.tmp $${:backup-file}"
backup-file = $${directory:srv-backup}/backup.pg_dump
[postgresql-restore-backup]
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:bin}/$${:_buildout_section_name_}
command-line =
sh -e -c "\
echo 'This will replace current database with latest backup. Hit Ctrl+C to cancel';
sleep 10;
$${postgresql:bin}/dropdb \
-h $${postgresql:pgdata-directory} \
-U $${postgresql:superuser} \
--if-exists \
$${postgresql:dbname};
$${postgresql:bin}/createdb \
-h $${postgresql:pgdata-directory} \
-U $${postgresql:superuser} \
$${postgresql:dbname};
$${postgresql:bin}/pg_restore \
--exit-on-error \
-h $${postgresql:pgdata-directory} \
-U $${postgresql:superuser} \
-d $${postgresql:dbname} \
$${postgresql-backup:backup-file}"
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = ${dcron-output:crond}
cron-entries = $${directory:etc-cron.d}
crontabs = $${directory:var-crontabs}
cronstamps = $${directory:var-cronstamps}
catcher = $${cron-simplelogger:wrapper}
binary = $${directory:bin}/crond
[cron-service]
recipe = slapos.cookbook:wrapper
command-line = $${cron:binary}
wrapper-path = $${directory:services}/crond
hash-existing-files = $${buildout:directory}/software_release/buildout.cfg
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${directory:bin}/cron_simplelogger
log = $${directory:log}/cron.log
[rapidcdn-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Dependency Track 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 = $${dependency-track-frontend:url}
return = domain secure_access
[rapidcdn-frontend-available-promise]
<= monitor-promise-base
promise = check_url_available
name = $${:_buildout_section_name_}.py
config-url = $${rapidcdn-frontend:connection-secure_access}
[instance-parameter]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
etc-cron.d = $${:etc}/cron.d
var = $${buildout:directory}/var
var-crontabs = $${:var}/crontabs
var-cronstamps = $${:var}/cronstamps
var-cron-entries = $${:var}/cron-entries
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp
run = $${buildout:directory}/run
service = $${:etc}/service
srv-dependency-track = $${:srv}/dependency-track
srv-backup = $${:srv}/backup
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = $${rapidcdn-frontend-available-promise:config-url}
backup-crontab = $${postgresql-backup-crontab-entry:name}
restore-backup-script = $${postgresql-restore-backup:wrapper-path}
[buildout]
extends =
../../component/defaults.cfg
../../component/java/buildout.cfg
../../component/postgresql/buildout.cfg
../../component/dcron/buildout.cfg
../../stack/haproxy/default-backend.cfg
../../stack/slapos.cfg
buildout.hash.cfg
../../stack/monitor/buildout.cfg
parts =
slapos-cookbook
instance-profile
[java]
<= java-re-temurin-21
[dependency-track-bundled.jar]
recipe = slapos.recipe.build:download
url = https://github.com/DependencyTrack/dependency-track/releases/download/4.11.4/dependency-track-bundled.jar
md5sum = a1c5e8f216a999b6d497b133c93588a6
[instance-profile]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
{
"name": "Dependency-Track",
"description": "Dependency-Track is an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain.",
"serialisation": "xml",
"software-type": {
"default": {
"title": "Default",
"software-type": "default",
"description": "Default",
"request": "instance-dependency-track-input-schema.json",
"response": "instance-dependency-track-output-schema.json",
"index": 1
}
}
}
Tests for DependencyTrack software release
##############################################################################
#
# Copyright (c) 2024 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from setuptools import setup, find_packages
version = '0.0.1.dev0'
name = 'slapos.test.dependencytrack'
with open("README.md") as f:
long_description = f.read()
setup(name=name,
version=version,
description="Test for SlapOS' dependencytrack",
long_description=long_description,
long_description_content_type='text/markdown',
maintainer="Nexedi",
maintainer_email="info@nexedi.com",
url="https://lab.nexedi.com/nexedi/slapos",
packages=find_packages(),
install_requires=[
'slapos.core',
'slapos.cookbook',
'slapos.libnetworkcache',
'supervisor',
'requests'
],
zip_safe=True,
test_suite='test',
)
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
# Copyright (c) 2024 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
......@@ -24,37 +24,23 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import re
from slapos.recipe.librecipe import GenericSlapRecipe
import requests
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
setUpModule, InstanceTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', 'software.cfg')))
class TestDependencyTrack(InstanceTestCase):
__partition_reference__ = 'DT' # postgresql use a socket in data dir
class Recipe(GenericSlapRecipe):
"""
Create web checker configuration.
"""
def _install(self):
path_list = []
try:
web_checker_mail_address = self.options['mail-address']
web_checker_smtp_host = self.options['smtp-host']
web_checker_frontend_url = self.options['frontend-url']
except KeyError:
# BBB
web_checker_mail_address = self.parameter_dict['web-checker-mail-address']
web_checker_smtp_host = self.parameter_dict['web-checker-smtp-host']
web_checker_frontend_url = self.parameter_dict['web-checker-frontend-url']
web_checker_working_directory = \
self.options['web-checker-working-directory']
config = dict(
web_checker_mail_address = web_checker_mail_address,
web_checker_smtp_host = web_checker_smtp_host,
web_checker_working_directory = web_checker_working_directory,
frontend_url = web_checker_frontend_url,
wget_binary_path = self.options['wget-binary-path'],
varnishlog_binary_path = self.options['varnishlog-binary-path'],
web_checker_log = self.options['web-checker-log'],
)
path_list.append(self.createFile(self.options['web-checker-config'],
self.substituteTemplate(self.getTemplateFilename('web_checker.cfg.in'),
config)))
return path_list
def test(self):
url = self.computer_partition.getConnectionParameterDict()['url']
resp = requests.get(url, verify=False)
self.assertTrue(resp.text)
self.assertTrue(resp.ok)
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {
"test-node-title": {
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {
"image-to-test-url": {
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {
"allow_subgroups": {
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {
"allow_subgroups": {
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"required": [
"target-url"
],
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Values returned by headless Chromium instantiation",
"properties": {
"frontend-url": {
......
{
"$schema": "http://json-schema.org/draft-06/schema",
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "object",
"description": "Parameters to instantiate JS drone",
"additionalProperties": false,
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Input Parameters",
"properties": {
"urls": {
......
{
"$schema": "http://json-schema.org/draft-07/schema#",
"name": "Output Parameters",
"properties": {
"url": {
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {
"frontend": {
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Input Parameters",
"properties": {
"enable-device-hotplug": {
"title": "Enable device hotplug mode",
"description": "Allows to increase amount of RAM (ram-size) and CPU (cmp-count) without restart of the VM process, up to defined maximums (ram-max-size and cpu-max-count). Operation system have to support online addition of RAM and CPU.",
"type": "boolean",
"default": false
},
"ram-size": {
"title": "RAM size",
"description": "RAM size, in MB.",
"type": "integer",
"default": 4096,
"minimum": 1024,
"multipleOf": 512
},
"ram-max-size": {
"title": "Maximum RAM size, in MB",
"description": "Define the maximum size of the memory. The size is in MB and should be a multiple of 512. Defaults to ram-size + 512",
"type": "integer",
"default": 4608,
"minimum": 1024,
"multipleOf": 512
},
"ram-hotplug-slot-size": {
"title": "Size of Hotpluggable RAM slot, in MB",
"description": "Define the RAM size to plug on one hotpluggable slot in MB, understand the size of one RAM bar. The RAM hotplugged on each slot will always have the same RAM size.",
"type": "integer",
"default": 512,
"minimum": 512,
"multipleOf": 512
},
"auto-ballooning": {
"title": "Enable qemu auto ballooning.",
"description": "Enable virtio balloon device to allows KVM guests to reduce/re-increase their memory size.",
"type": "boolean",
"default": true
},
"disk-size": {
"title": "Disk size",
"description": "Disk size, in GB.",
"type": "integer",
"default": 40,
"minimum": 1
},
"disk-type": {
"title": "Disk type",
"description": "Type of QEMU disk drive.",
"type": "string",
"default": "virtio",
"enum": [
"ide",
"sd",
"mtd",
"floppy",
"pflash",
"virtio"
]
},
"disk-format": {
"title": "Type of disk drive to create by QEMU.",
"description": "Type of QEMU disk drive, to create.",
"type": "string",
"default": "qcow2",
"enum": [
"qcow2",
"raw",
"vdi",
"vmdk",
"cloop",
"qed"
]
},
"disk-cache": {
"title": "Cache option to use with Disk.",
"description": "Disk cache controls how the host cache is used to access block data.",
"type": "string",
"default": "writeback",
"enum": [
"none",
"writeback",
"unsafe",
"directsync",
"writethrough"
]
},
"disk-aio": {
"title": "Disk aio to use.",
"description": "Selects between pthread based disk I/O and native Linux AIO.",
"type": "string",
"default": "threads",
"enum": [
"threads",
"native"
]
},
"cpu-count": {
"title": "CPU count",
"description": "Number of CPU cores.",
"type": "integer",
"minimum": 1,
"default": 2
},
"cpu-max-count": {
"title": "Maximum CPU amount",
"description": "Specifies the maximum number of CPUs. Defaults to cpu-count + 1",
"type": "integer",
"minimum": 1
},
"numa": {
"title": "Simulate a multi node NUMA system.",
"description": "Simulate a multi node NUMA system. If mem and cpus are omitted, resources are split equally. Each numa option are separated by space: node,nodeid=4,cpus=40-49,mem=64g node,nodeid=1,cpus=10-19,mem=128g. Set this option if you know what you're doing.",
"type": "string"
},
"machine-options": {
"title": "Machine options.",
"description": "Select the emulated machine by name. Ex: pc-i440fx-2.4,accel=kvm",
"type": "string"
},
"cpu-model": {
"title": "CPU model.",
"description": "Select the emulated CPU model. Ex: SandyBridge,+erms,+smep,+smx,+vmx",
"type": "string",
"default": "host"
},
"network-adapter": {
"title": "Network adapter",
"description": "Network adapter provided to the guest. Allows to support legacy guests, which do not have drivers for default virtio-net-pci.",
"type": "string",
"default": "virtio-net-pci",
"enum": [
"virtio-net-pci",
"e1000",
"ne2k_isa",
"ne2k_pci",
"pcnet",
"rtl8139",
"usb-net",
"vmxnet3"
]
},
"nbd-host": {
"title": "NBD hostname",
"description": "hostname (or IP) of the NBD server containing the boot image.",
"type": "string",
"format": "internet-address"
},
"nbd-port": {
"title": "NBD port",
"description": "Port of the NBD server containing the boot image.",
"type": "integer",
"default": 1024,
"minimum": 1,
"maximum": 65535
},
"nbd2-host": {
"title": "Second NBD hostname",
"description": "hostname (or IP) of the second NBD server (containing drivers for example).",
"type": "string",
"format": "internet-address"
},
"nbd2-port": {
"title": "Second NBD port",
"description": "Port of the second NBD server containing the boot image.",
"type": "integer",
"minimum": 1,
"maximum": 65535
},
"virtual-hard-drive-url": {
"title": "Existing disk image URL",
"description": "If specified, will download an existing disk image (qcow2, raw, ...), and will use it as main virtual hard drive. Can be used to download and use an already installed and customized virtual hard drive.",
"format": "uri",
"type": "string"
},
"virtual-hard-drive-md5sum": {
"title": "Checksum of virtual hard drive",
"description": "MD5 checksum of virtual hard drive, required if virtual-hard-drive-url is specified.",
"type": "string"
},
"virtual-hard-drive-gzipped": {
"title": "Define if virtual hard drive to download is gzipped",
"description": "Define if virtual hard drive to download is gzipped using gzip. This help to reduce size of file to download.",
"type": "boolean",
"default": false
},
"wipe-disk-ondestroy": {
"title": "Wipe disks when destroy the VM",
"description": "Say if disks should be wiped by writing new data over every single bit before delete them. This option is used to securely delete VM disks",
"type": "boolean",
"default": false
},
"wipe-disk-iterations": {
"title": "Wipe disk iterations",
"description": "Number of disk overwrite iterations with random data. Default is 1. WARNING: Increase this value will slow down partition destruction and increase IO.",
"type": "integer",
"default": 1,
"minimum": 1
},
"use-tap": {
"title": "Use QEMU TAP network interface",
"description": "Use QEMU TAP network interface, requires taps creation on SlapOS Node.",
"type": "boolean",
"default": true
},
"use-nat": {
"title": "Use QEMU USER Mode interface (NAT)",
"description": "Use QEMU user-mode network stack (NAT).",
"type": "boolean",
"default": true
},
"nat-rules": {
"title": "List of rules for NAT of QEMU user mode network stack.",
"description": "List of rules for NAT of QEMU user mode network stack, as space-separated list of ports (with optional protocol). For each port specified, it will redirect port x of the VM (example: \"80 udp:53\") to the port x + 10000 of the public IPv6 of the host (example: \"10080 udp:10053\").",
"type": "string",
"default": "22 80 443"
},
"nat-restrict-mode": {
"title": "Isolate the NAT Interface (No Internet access)",
"description": "If this option is enabled, the NAT interface will be isolated, i.e. it will not be able to contact the host and no guest IP packets will be routed over the host to the outside. This option does not affect any explicitly set nat rules.",
"type": "boolean",
"default": false
},
"enable-vhost": {
"title": "Use vhost-net to improve network performance of tap interface",
"description": "The vhost-net provides much improved network performance for your VM. Only work if the vhost-net kernel module is loaded and available on host machine, please keep this option off if you're not shure.",
"type": "boolean",
"default": false
},
"monitor-interface-url": {
"title": "Monitor Web Interface URL",
"description": "Give Url of HTML web interface that will be used to render this monitor instance.",
"type": "string",
"format": "uri",
"default": "https://monitor.app.officejs.com"
},
"monitor-cors-domains": {
"title": "Monitor CORS domains",
"description": "List of cors domains separated with space. Needed for ajax query on this monitor instance from a different domain.",
"type": "string",
"default": "monitor.app.officejs.com"
},
"enable-http-server": {
"title": "Enable local http server",
"description": "Set if local http server which serve files to the vm should be deployed. If set to true, get file into the vm with URL: http://10.0.2.100/FILE.",
"type": "boolean",
"default": false
},
"httpd-port": {
"title": "Local http server port",
"description": "Port of the local http server used to share files.",
"type": "integer",
"default": 8081,
"minimum": 1,
"maximum": 65535
},
"authorized-key": {
"title": "Public keys to get from all virtual machines.",
"description": "Set the public keys to add in your virtual machine. The public key file will be available in the VM via url http://10.0.2.100/authorized_keys if you keep the NAT interface enabled",
"type": "string"
},
"bootstrap-script-url": {
"title": "VM bootstrap script URL.",
"description": "If dedicaced disk image is used, this script will be downloaded and run at first boot of the virtual machine. Set md5sum to URL like: http://example.com/file#MD5SUM. Get file in vm at http://10.0.2.100/vm-bootstrap.",
"type": "string",
"format": "uri"
},
"data-to-vm": {
"title": "Text content to send to this virtual machine.",
"description": "Text content which will be written in a file 'data' of http server of this virtual machine instance. The file will be available via URL: http://10.0.2.100/data in the VM.",
"type": "string",
"textarea": true
},
"frontend-instance-guid": {
"title": "Frontend Instance ID",
"description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
"type": "string"
},
"frontend-software-type": {
"title": "Frontend Software Type",
"description": "Type of the frontend instance, like \"frontend\".",
"type": "string",
"default": "RootSoftwareInstance"
},
"frontend-software-url": {
"title": "Frontend Software URL",
"description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
"type": "string",
"format": "uri",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
},
"frontend-additional-instance-guid": {
"title": "Additional Frontend Instance ID",
"description": "Unique identifier of the additional frontend instance, like \"SOFTINST-11031\", if empty won't be requested.",
"type": "string"
},
"frontend-additional-software-type": {
"title": "Additional Frontend Software Type",
"description": "Type of the frontend instance, like \"frontend\".",
"type": "string",
"default": "RootSoftwareInstance"
},
"frontend-additional-software-url": {
"title": "Additional Frontend Software URL",
"description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
"type": "string",
"format": "uri",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
},
"boot-image-url-list": {
"title": "Boot image list",
"description": "The list shall be list of direct URLs to images, followed by hash (#), then by image MD5SUM. Each image shall appear on newline, like: \"https://example.com/image.iso#06226c7fac5bacfa385872a19bb99684<newline>https://example.com/another-image.iso#31b40d58b18e038498ddb46caea1361c\". They will be provided in KVM image list according to the order on the list. After updating the list, the instance has to be restarted to refresh it. Amount of images is limited to 4, and one image can be maximum 20GB. Image will be downloaded and checked against its MD5SUM 4 times, then it will be considered as impossible to download with given MD5SUM. Each image has to be downloaded in time shorter than 4 hours, so in case of very slow images to access, it can take up to 16 hours to download all of them. Note: The instance has to be restarted in order to update the list of available images in the VM. Note: Maximum 3 ISOs are supported.",
"type": "string",
"textarea": true
},
"boot-image-url-select": {
"title": "Boot image",
"type": "array",
"oneOf": [
{
"const": [
"https://shacache.nxdcdn.com/bc469019b9057073d36ff8f5402c95ff0a0363657358336dc9a05fc6af66276229aa727ec46cf17b84d308f44b825de7f24ea1a256062a14e0f605cd70bae02f#2dcf188877075d7b58ca46e27ca31bb9"
],
"title": "Debian Buster 10.12 netinst x86_64"
},
{
"const": [
"https://shacache.nxdcdn.com/ce5ddfdbdaccdf929b7fe321212356347d82a02f6b7733427282b416f113d91e587682b003e9d376ac189c3b731595c50c236962aadf2720c16d9f36913577c0#23bf2a2d60271e553e63525e794415f1"
],
"title": "Centos 8.2004 Minimal x86_64"
},
{
"const": [
"https://shacache.nxdcdn.com/8017c532ed74586b718662d8b11cf8c34fa638b0affd0413ed38623989b8f98ffd0bcb475246e279ea2f3c194a3e33c55e0f376a9727de13e4bfd87e75e47b5d#e8d2a77c51b599c10651608a5d8c286f"
],
"title": "Ubuntu Jammy 22.04.1 Live Server x86_64"
},
{
"const": [
"https://shacache.nxdcdn.com/302c990c6d69575ff24c96566e5c7e26bf36908abb0cd546e22687c46fb07bf8dba595bf77a9d4fd9ab63e75c0437c133f35462fd41ea77f6f616140cd0e5e6a#f3a306f40e4a313fb5a584d73b3dee8f"
],
"title": "Ubuntu Focal 20.04.1 Live Server x86_64"
},
{
"const": [
"https://shacache.nxdcdn.com/6635269a7eb6fbd6b85fda40cd94f14a27bf53cb1fc82ffcce9fe386a025a43e1ab681db7e8cec50416bfbfc90262f0d95273686a101c74b3f17646f0a34c85b#3708a59af6cf820a95cafe0ae73ac399"
],
"title": "openSUSE Leap 15.2 NET x86_64"
},
{
"const": [
"https://shacache.nxdcdn.com/fc17e8c6ae0790162f4beb8fa6226d945cff638429588999b3a08493ff27b280dc2939fba825ae04be1d9082ea8d7c3c002c5e4c39fbbcf88b8ab5104619e28a#ebcdb2223a77f098af3923fe1fa180aa"
],
"title": "Arch Linux 2020.09.01 x86_64"
},
{
"const": [
"https://shacache.nxdcdn.com/c5a511f349a1146b615e6fab9c24f9be4362046adcf24f0ff82c470d361fac5f6628895e2110ebf8ff87db49d4c413a0a332699da6b1bec64275e0c17a15b999#ca7a1e555c04b4d9a549065fa2ddf713"
],
"title": "Fedora Server 32-1.6 netinst x86_64"
},
{
"const": [
"https://shacache.nxdcdn.com/6c355def68b3c0427f21598cb054ffc893568902f205601ac60f192854769b31bc9cff8eeb6ce99ef975a8fb887d8d3e56fc6cd5ea5cb4b3bba1175c520047cb#57088b77f795ca44b00971e44782ee23"
],
"title": "FreeBSD 12.1 RELEASE bootonly x86_64"
}
]
},
"whitelist-domains": {
"title": "Whitelist domains",
"description": "List of whitelisted domain names to be accessed from the VM. They will be resolved to IPs depending on where the VM end up. IPs can be used too.",
"type": "string",
"textarea": true
},
"external-disk": {
"title": "External disks",
"description": "Allows to set paths and types of manually provided external disks. Use index to order disks. Changing this parameter leads to kvm process restart.",
"$defs": {
"instance-parameters": {
"type": "object",
"default": {},
"patternProperties": {
".*": {
"properties": {
"path": {
"title": "Path of the provided image",
"description": "Absolute or relative path (to the partition root path) of the provided image. Image has to be provided, with read and write permissions of the partition user. Please note, that if the name starts with 'rbd:' it's considered special and won't be used as relative path.",
"type": "string"
"properties": {
"enable-device-hotplug": {
"title": "Enable device hotplug mode",
"description": "Allows to increase amount of RAM (ram-size) and CPU (cmp-count) without restart of the VM process, up to defined maximums (ram-max-size and cpu-max-count). Operation system have to support online addition of RAM and CPU.",
"type": "boolean",
"default": false
},
"ram-size": {
"title": "RAM size",
"description": "RAM size, in MB.",
"type": "integer",
"default": 4096,
"minimum": 1024,
"multipleOf": 512
},
"ram-max-size": {
"title": "Maximum RAM size, in MB",
"description": "Define the maximum size of the memory. The size is in MB and should be a multiple of 512. Defaults to ram-size + 512",
"type": "integer",
"default": 4608,
"minimum": 1024,
"multipleOf": 512
},
"ram-hotplug-slot-size": {
"title": "Size of Hotpluggable RAM slot, in MB",
"description": "Define the RAM size to plug on one hotpluggable slot in MB, understand the size of one RAM bar. The RAM hotplugged on each slot will always have the same RAM size.",
"type": "integer",
"default": 512,
"minimum": 512,
"multipleOf": 512
},
"auto-ballooning": {
"title": "Enable qemu auto ballooning.",
"description": "Enable virtio balloon device to allows KVM guests to reduce/re-increase their memory size.",
"type": "boolean",
"default": true
},
"disk-size": {
"title": "Disk size",
"description": "Disk size, in GB.",
"type": "integer",
"default": 40,
"minimum": 1
},
"disk-type": {
"title": "Disk type",
"description": "Type of QEMU disk drive.",
"type": "string",
"default": "virtio",
"enum": [
"ide",
"sd",
"mtd",
"floppy",
"pflash",
"virtio"
]
},
"disk-format": {
"title": "Type of disk drive to create by QEMU.",
"description": "Type of QEMU disk drive, to create.",
"type": "string",
"default": "qcow2",
"enum": [
"qcow2",
"raw",
"vdi",
"vmdk",
"cloop",
"qed"
]
},
"disk-cache": {
"title": "Cache option to use with Disk.",
"description": "Disk cache controls how the host cache is used to access block data.",
"type": "string",
"default": "writeback",
"enum": [
"none",
"writeback",
"unsafe",
"directsync",
"writethrough"
]
},
"disk-aio": {
"title": "Disk aio to use.",
"description": "Selects between pthread based disk I/O and native Linux AIO.",
"type": "string",
"default": "threads",
"enum": [
"threads",
"native"
]
},
"cpu-count": {
"title": "CPU count",
"description": "Number of CPU cores.",
"type": "integer",
"minimum": 1,
"default": 2
},
"cpu-max-count": {
"title": "Maximum CPU amount",
"description": "Specifies the maximum number of CPUs. Defaults to cpu-count + 1",
"type": "integer",
"minimum": 1
},
"numa": {
"title": "Simulate a multi node NUMA system.",
"description": "Simulate a multi node NUMA system. If mem and cpus are omitted, resources are split equally. Each numa option are separated by space: node,nodeid=4,cpus=40-49,mem=64g node,nodeid=1,cpus=10-19,mem=128g. Set this option if you know what you're doing.",
"type": "string"
},
"machine-options": {
"title": "Machine options.",
"description": "Select the emulated machine by name. Ex: pc-i440fx-2.4,accel=kvm",
"type": "string"
},
"cpu-model": {
"title": "CPU model.",
"description": "Select the emulated CPU model. Ex: SandyBridge,+erms,+smep,+smx,+vmx",
"type": "string",
"default": "host"
},
"network-adapter": {
"title": "Network adapter",
"description": "Network adapter provided to the guest. Allows to support legacy guests, which do not have drivers for default virtio-net-pci.",
"type": "string",
"default": "virtio-net-pci",
"enum": [
"virtio-net-pci",
"e1000",
"ne2k_isa",
"ne2k_pci",
"pcnet",
"rtl8139",
"usb-net",
"vmxnet3"
]
},
"nbd-host": {
"title": "NBD hostname",
"description": "hostname (or IP) of the NBD server containing the boot image.",
"type": "string",
"format": "internet-address"
},
"nbd-port": {
"title": "NBD port",
"description": "Port of the NBD server containing the boot image.",
"type": "integer",
"default": 1024,
"minimum": 1,
"maximum": 65535
},
"nbd2-host": {
"title": "Second NBD hostname",
"description": "hostname (or IP) of the second NBD server (containing drivers for example).",
"type": "string",
"format": "internet-address"
},
"nbd2-port": {
"title": "Second NBD port",
"description": "Port of the second NBD server containing the boot image.",
"type": "integer",
"minimum": 1,
"maximum": 65535
},
"virtual-hard-drive-url": {
"title": "Existing disk image URL",
"description": "If specified, will download an existing disk image (qcow2, raw, ...), and will use it as main virtual hard drive. Can be used to download and use an already installed and customized virtual hard drive.",
"format": "uri",
"type": "string"
},
"virtual-hard-drive-md5sum": {
"title": "Checksum of virtual hard drive",
"description": "MD5 checksum of virtual hard drive, required if virtual-hard-drive-url is specified.",
"type": "string"
},
"virtual-hard-drive-gzipped": {
"title": "Define if virtual hard drive to download is gzipped",
"description": "Define if virtual hard drive to download is gzipped using gzip. This help to reduce size of file to download.",
"type": "boolean",
"default": false
},
"wipe-disk-ondestroy": {
"title": "Wipe disks when destroy the VM",
"description": "Say if disks should be wiped by writing new data over every single bit before delete them. This option is used to securely delete VM disks",
"type": "boolean",
"default": false
},
"wipe-disk-iterations": {
"title": "Wipe disk iterations",
"description": "Number of disk overwrite iterations with random data. Default is 1. WARNING: Increase this value will slow down partition destruction and increase IO.",
"type": "integer",
"default": 1,
"minimum": 1
},
"use-tap": {
"title": "Use QEMU TAP network interface",
"description": "Use QEMU TAP network interface, requires taps creation on SlapOS Node.",
"type": "boolean",
"default": true
},
"use-nat": {
"title": "Use QEMU USER Mode interface (NAT)",
"description": "Use QEMU user-mode network stack (NAT).",
"type": "boolean",
"default": true
},
"nat-rules": {
"title": "List of rules for NAT of QEMU user mode network stack.",
"description": "List of rules for NAT of QEMU user mode network stack, as space-separated list of ports (with optional protocol). For each port specified, it will redirect port x of the VM (example: \"80 udp:53\") to the port x + 10000 of the public IPv6 of the host (example: \"10080 udp:10053\").",
"type": "string",
"default": "22 80 443"
},
"nat-restrict-mode": {
"title": "Isolate the NAT Interface (No Internet access)",
"description": "If this option is enabled, the NAT interface will be isolated, i.e. it will not be able to contact the host and no guest IP packets will be routed over the host to the outside. This option does not affect any explicitly set nat rules.",
"type": "boolean",
"default": false
},
"enable-vhost": {
"title": "Use vhost-net to improve network performance of tap interface",
"description": "The vhost-net provides much improved network performance for your VM. Only work if the vhost-net kernel module is loaded and available on host machine, please keep this option off if you're not shure.",
"type": "boolean",
"default": false
},
"monitor-interface-url": {
"title": "Monitor Web Interface URL",
"description": "Give Url of HTML web interface that will be used to render this monitor instance.",
"type": "string",
"format": "uri",
"default": "https://monitor.app.officejs.com"
},
"monitor-cors-domains": {
"title": "Monitor CORS domains",
"description": "List of cors domains separated with space. Needed for ajax query on this monitor instance from a different domain.",
"type": "string",
"default": "monitor.app.officejs.com"
},
"enable-http-server": {
"title": "Enable local http server",
"description": "Set if local http server which serve files to the vm should be deployed. If set to true, get file into the vm with URL: http://10.0.2.100/FILE.",
"type": "boolean",
"default": false
},
"httpd-port": {
"title": "Local http server port",
"description": "Port of the local http server used to share files.",
"type": "integer",
"default": 8081,
"minimum": 1,
"maximum": 65535
},
"authorized-key": {
"title": "Public keys to get from all virtual machines.",
"description": "Set the public keys to add in your virtual machine. The public key file will be available in the VM via url http://10.0.2.100/authorized_keys if you keep the NAT interface enabled",
"type": "string"
},
"bootstrap-script-url": {
"title": "VM bootstrap script URL.",
"description": "If dedicaced disk image is used, this script will be downloaded and run at first boot of the virtual machine. Set md5sum to URL like: http://example.com/file#MD5SUM. Get file in vm at http://10.0.2.100/vm-bootstrap.",
"type": "string",
"format": "uri"
},
"data-to-vm": {
"title": "Text content to send to this virtual machine.",
"description": "Text content which will be written in a file 'data' of http server of this virtual machine instance. The file will be available via URL: http://10.0.2.100/data in the VM.",
"type": "string",
"textarea": true
},
"frontend-instance-guid": {
"title": "Frontend Instance ID",
"description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
"type": "string"
},
"frontend-software-type": {
"title": "Frontend Software Type",
"description": "Type of the frontend instance, like \"frontend\".",
"type": "string",
"default": "RootSoftwareInstance"
},
"frontend-software-url": {
"title": "Frontend Software URL",
"description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
"type": "string",
"format": "uri",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
},
"frontend-additional-instance-guid": {
"title": "Additional Frontend Instance ID",
"description": "Unique identifier of the additional frontend instance, like \"SOFTINST-11031\", if empty won't be requested.",
"type": "string"
},
"frontend-additional-software-type": {
"title": "Additional Frontend Software Type",
"description": "Type of the frontend instance, like \"frontend\".",
"type": "string",
"default": "RootSoftwareInstance"
},
"frontend-additional-software-url": {
"title": "Additional Frontend Software URL",
"description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
"type": "string",
"format": "uri",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
},
"boot-image-url-list": {
"title": "Boot image list",
"description": "The list shall be list of direct URLs to images, followed by hash (#), then by image MD5SUM. Each image shall appear on newline, like: \"https://example.com/image.iso#06226c7fac5bacfa385872a19bb99684<newline>https://example.com/another-image.iso#31b40d58b18e038498ddb46caea1361c\". They will be provided in KVM image list according to the order on the list. After updating the list, the instance has to be restarted to refresh it. Amount of images is limited to 4, and one image can be maximum 20GB. Image will be downloaded and checked against its MD5SUM 4 times, then it will be considered as impossible to download with given MD5SUM. Each image has to be downloaded in time shorter than 4 hours, so in case of very slow images to access, it can take up to 16 hours to download all of them. Note: The instance has to be restarted in order to update the list of available images in the VM. Note: Maximum 3 ISOs are supported.",
"type": "string",
"textarea": true
},
"boot-image-url-select": {
"title": "Boot image",
"type": "array",
"oneOf": [
{
"const": [
"https://shacache.nxdcdn.com/bc469019b9057073d36ff8f5402c95ff0a0363657358336dc9a05fc6af66276229aa727ec46cf17b84d308f44b825de7f24ea1a256062a14e0f605cd70bae02f#2dcf188877075d7b58ca46e27ca31bb9"
],
"title": "Debian Buster 10.12 netinst x86_64"
},
{
"const": [
"https://shacache.nxdcdn.com/ce5ddfdbdaccdf929b7fe321212356347d82a02f6b7733427282b416f113d91e587682b003e9d376ac189c3b731595c50c236962aadf2720c16d9f36913577c0#23bf2a2d60271e553e63525e794415f1"
],
"title": "Centos 8.2004 Minimal x86_64"
},
{
"const": [
"https://shacache.nxdcdn.com/8017c532ed74586b718662d8b11cf8c34fa638b0affd0413ed38623989b8f98ffd0bcb475246e279ea2f3c194a3e33c55e0f376a9727de13e4bfd87e75e47b5d#e8d2a77c51b599c10651608a5d8c286f"
],
"title": "Ubuntu Jammy 22.04.1 Live Server x86_64"
},
"format": {
"title": "Format of a disk image",
"description": "Format of a disk image. Note: rbd type is experimental.",
"type": "string",
"default": "autodetect",
"enum": [
"autodetect",
"qcow2",
"rbd",
"raw",
"vdi",
"vmdk",
"cloop",
"qed"
]
{
"const": [
"https://shacache.nxdcdn.com/302c990c6d69575ff24c96566e5c7e26bf36908abb0cd546e22687c46fb07bf8dba595bf77a9d4fd9ab63e75c0437c133f35462fd41ea77f6f616140cd0e5e6a#f3a306f40e4a313fb5a584d73b3dee8f"
],
"title": "Ubuntu Focal 20.04.1 Live Server x86_64"
},
"cache": {
"title": "Cache value for the disk",
"description": "Cache value directly passed to the kvm -drive invocation as cache=value.",
"type": "string",
"default": "writeback",
"enum": [
"writeback",
"none",
"unsafe",
"directsync",
"writethrough"
]
{
"const": [
"https://shacache.nxdcdn.com/6635269a7eb6fbd6b85fda40cd94f14a27bf53cb1fc82ffcce9fe386a025a43e1ab681db7e8cec50416bfbfc90262f0d95273686a101c74b3f17646f0a34c85b#3708a59af6cf820a95cafe0ae73ac399"
],
"title": "openSUSE Leap 15.2 NET x86_64"
},
"index": {
"title": "Index of a disk",
"description": "An index value used to order disks for the VM, required if more than one disk is used to have stable ordering.",
"type": "integer",
"default": 0
{
"const": [
"https://shacache.nxdcdn.com/fc17e8c6ae0790162f4beb8fa6226d945cff638429588999b3a08493ff27b280dc2939fba825ae04be1d9082ea8d7c3c002c5e4c39fbbcf88b8ab5104619e28a#ebcdb2223a77f098af3923fe1fa180aa"
],
"title": "Arch Linux 2020.09.01 x86_64"
},
{
"const": [
"https://shacache.nxdcdn.com/c5a511f349a1146b615e6fab9c24f9be4362046adcf24f0ff82c470d361fac5f6628895e2110ebf8ff87db49d4c413a0a332699da6b1bec64275e0c17a15b999#ca7a1e555c04b4d9a549065fa2ddf713"
],
"title": "Fedora Server 32-1.6 netinst x86_64"
},
{
"const": [
"https://shacache.nxdcdn.com/6c355def68b3c0427f21598cb054ffc893568902f205601ac60f192854769b31bc9cff8eeb6ce99ef975a8fb887d8d3e56fc6cd5ea5cb4b3bba1175c520047cb#57088b77f795ca44b00971e44782ee23"
],
"title": "FreeBSD 12.1 RELEASE bootonly x86_64"
}
]
},
"whitelist-domains": {
"title": "Whitelist domains",
"description": "List of whitelisted domain names to be accessed from the VM. They will be resolved to IPs depending on where the VM end up. IPs can be used too.",
"type": "string",
"textarea": true
},
"external-disk": {
"title": "External disks",
"description": "Allows to set paths and types of manually provided external disks. Use index to order disks. Changing this parameter leads to kvm process restart.",
"type": "object",
"default": {},
"patternProperties": {
".*": {
"properties": {
"path": {
"title": "Path of the provided image",
"description": "Absolute or relative path (to the partition root path) of the provided image. Image has to be provided, with read and write permissions of the partition user. Please note, that if the name starts with 'rbd:' it's considered special and won't be used as relative path.",
"type": "string"
},
"format": {
"title": "Format of a disk image",
"description": "Format of a disk image. Note: rbd type is experimental.",
"type": "string",
"default": "autodetect",
"enum": [
"autodetect",
"qcow2",
"rbd",
"raw",
"vdi",
"vmdk",
"cloop",
"qed"
]
},
"cache": {
"title": "Cache value for the disk",
"description": "Cache value directly passed to the kvm -drive invocation as cache=value.",
"type": "string",
"default": "writeback",
"enum": [
"writeback",
"none",
"unsafe",
"directsync",
"writethrough"
]
},
"index": {
"title": "Index of a disk",
"description": "An index value used to order disks for the VM, required if more than one disk is used to have stable ordering.",
"type": "integer",
"default": 0
}
}
}
}
}
}
}
}
},
"unevaluatedProperties": false,
"allOf": [
{
"$ref": "#/$defs/instance-parameters"
}
]
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters For NDB Server",
"properties": {}
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"name": "Output Parameters",
"properties": {
"nbd_url": {
......
{
"$schema": "http://json-schema.org/draft-06/schema#",
"name": "Output Parameters",
"properties": {
"backend-url": {
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-06/schema",
"$schema": "https://json-schema.org/draft/2020-12/schema#",
"description": "Parameters to instantiate resilient KVM",
"unevaluatedProperties": false,
"allOf": [
{
"$ref": "./instance-kvm-input-schema.json#"
"$ref": "./instance-kvm-input-schema.json#/$defs/instance-parameters"
}
],
"properties": {
"resilient-clone-number": {
"title": "Amount of backup(s) to create",
"description": "Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone.",
"type": "integer",
"default": 1,
"optional": true
},
{
"properties": {
"resilient-clone-number": {
"title": "Amount of backup(s) to create",
"description": "Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone.",
"type": "integer",
"default": 1,
"optional": true
},
"-sla-0-computer_guid": {
"title": "Target computer for main instance",
"description": "Target computer GUID for main instance.",
"type": "string",
"optional": true
},
"-sla-1-computer_guid": {
"title": "Target computer for first clone",
"description": "Target computer for first clone and PBS.",
"type": "string",
"optional": true
},
"-sla-pbs1-computer_guid": {
"title": "Target computer for first PBS",
"description": "Target computer for first PBS instance.",
"type": "string",
"optional": true
},
"-sla-2-computer_guid": {
"title": "Target computer for second clone",
"description": "Target computer for second clone and PBS.",
"type": "string",
"optional": true
},
"-sla-pbs2-computer_guid": {
"title": "Target computer for second PBS",
"description": "Target computer for second PBS instance.",
"type": "string",
"optional": true
},
"resiliency-backup-periodicity": {
"title": "Periodicity of backup",
"description": "Periodicity of backup, in cron format.",
"type": "string",
"optional": true
},
"remove-backup-older-than": {
"title": "Remove backups older than...",
"description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.",
"type": "string",
"default": "2W",
"optional": true
}
}
"-sla-0-computer_guid": {
"title": "Target computer for main instance",
"description": "Target computer GUID for main instance.",
"type": "string",
"optional": true
},
"-sla-1-computer_guid": {
"title": "Target computer for first clone",
"description": "Target computer for first clone and PBS.",
"type": "string",
"optional": true
},
"-sla-pbs1-computer_guid": {
"title": "Target computer for first PBS",
"description": "Target computer for first PBS instance.",
"type": "string",
"optional": true
},
"-sla-2-computer_guid": {
"title": "Target computer for second clone",
"description": "Target computer for second clone and PBS.",
"type": "string",
"optional": true
},
"-sla-pbs2-computer_guid": {
"title": "Target computer for second PBS",
"description": "Target computer for second PBS instance.",
"type": "string",
"optional": true
},
"resiliency-backup-periodicity": {
"title": "Periodicity of backup",
"description": "Periodicity of backup, in cron format.",
"type": "string",
"optional": true
},
"remove-backup-older-than": {
"title": "Remove backups older than...",
"description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.",
"type": "string",
"default": "2W",
"optional": true
}
]
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {
"dns_sr_url": {
......
{
"$schema": "https://json-schema.org/draft-04/schema#",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"url": {
......
{
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"type": "object",
"properties": {
......
{
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Values returned by node-monitoring instanciation",
"type": "object",
"properties": {
......
......@@ -79,6 +79,7 @@ numpy = 1.22.0
# For numy = 1.22.0
setuptools = 44.1.1
scipy = 1.11.4
# Build GCC with Fortran for OpenBLAS (scipy & numpy)
[gcc]
......
{
"$schema": "http://json-schema.org/draft-07/schema#",
"name": "Output Parameters",
"properties": {
"backend-url": {
......
......@@ -44,7 +44,7 @@ md5sum = b7906ca3a6b17963f78f680fc0842b74
[ru_lopcomm_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/lopcomm/libinstance.jinja2.cfg
md5sum = caa51d27f5a5cd5b23e4c088b3e3bb02
md5sum = c3bd882559ab9cd2a068519ea5d8c92e
[ru_sunwave_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sunwave/libinstance.jinja2.cfg
......
{
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Core Network Input Parameters",
"type": "object",
"properties": {
......
{
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by Core Network instantiation (stub)",
"type": "object",
"properties": {}
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {
"user-authorized-key": {
......
{
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by eNB/gNB instantiation (stub)",
"type": "object",
"properties": {}
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {
"bandwidth": {
......
{
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by ORS eNB instantiation (stub)",
"type": "object",
"properties": {}
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {
"nr_bandwidth": {
......
{
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by ORS gNB instantiation (stub)",
"type": "object",
"properties": {}
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {}
}
{
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by UEsim instantiation (stub)",
"type": "object",
"properties": {}
......
......@@ -275,7 +275,7 @@ inline =
HostKey ${sshd-ssh-host-ecdsa-key:output}
PasswordAuthentication no
PubkeyAuthentication yes
HostKeyAlgorithms ssh-rsa,ssh-dss,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp521
HostKeyAlgorithms ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp521
AuthorizedKeysFile ${buildout:directory}/.ssh/authorized_keys
Subsystem sftp {{ openssh_location }}/libexec/sftp-server
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "SIM Card Parameters",
"required": [
"sim_algo",
......
......@@ -29,7 +29,6 @@ extends =
# redis-server
../../component/redis/buildout.cfg
../../component/git/buildout.cfg
../../component/wget/buildout.cfg
# backup
../../component/rdiff-backup/buildout.cfg
../../component/rsync/buildout.cfg
......@@ -39,15 +38,8 @@ parts =
# in 99,9% of Slapos Software Releases)
slapos-cookbook
dcron
unzip
curl
openssl
python3
nginx
ffmpeg
postgresql
redis
wget
# peetube sections
peertube
peertube-build
......@@ -65,7 +57,7 @@ md5sum = 1c9639748d66e8c49fc27e4705f87622
recipe = slapos.recipe.cmmi
path = ${peertube:location}
environment =
PATH=${unzip:location}/bin:${vim:location}/bin:${nodejs:location}/bin:${yarn:location}/bin:${python3:location}/bin:${nginx:location}/sbin:${postgresql10:location}/bin:${redis:location}/bin:${git:location}/bin:${wget:location}/bin:%(PATH)s
PATH=${unzip:location}/bin:${vim:location}/bin:${nodejs:location}/bin:${yarn:location}/bin:${python3:location}/bin:${nginx:location}/sbin:${postgresql10:location}/bin:${redis:location}/bin:${git:location}/bin:%(PATH)s
CPPFLAGS=-I${openssl:location}/include
LDFLAGS=-L${curl:location}/lib -Wl,-rpath -Wl,${openssl:location}/lib -Wl
pre-configure =
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {
"-dns-type": {
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {
"record": {
......
......@@ -19,8 +19,8 @@ md5sum = 7f9749ab75475bd5d98be27a570c7731
[instance-default]
filename = instance-default.cfg.in
md5sum = 49167e0b289a87723c3108c4dc4fa8b5
md5sum = 65c9ca38322af7b825cd2f78db5fccd4
[proftpd-config-file]
filename = proftpd-config-file.cfg.in
md5sum = 82cc600f4fce9852370f9d1f7c4cd3a6
md5sum = 934317a31c6e9e7bd6a3b0f3e8508367
......@@ -65,7 +65,6 @@ sftp-log=${directory:log}/proftpd-sftp.log
xfer-log=${directory:log}/proftpd-xfer.log
ban-log=${directory:log}/proftpd-ban.log
ssh-host-rsa-key=${ssh-host-rsa-key:output}
ssh-host-dsa-key=${ssh-host-dsa-key:output}
ssh-host-ecdsa-key=${ssh-host-ecdsa-key:output}
ssh-authorized-key = ${ssh-authorized-keys:output}
ban-table=${directory:srv}/proftpd-ban-table
......@@ -118,9 +117,6 @@ command = {{ ssh_keygen_bin }} -f ${:output} -N '' ${:extra-args}
[ssh-host-rsa-key]
<=ssh-keygen-base
extra-args=-t rsa
[ssh-host-dsa-key]
<=ssh-keygen-base
extra-args=-t dsa
[ssh-host-ecdsa-key]
<=ssh-keygen-base
extra-args=-t ecdsa -b 521
......
......@@ -18,7 +18,6 @@ AllowOverwrite on
# SFTP
SFTPEngine on
SFTPHostKey {{ proftpd['ssh-host-rsa-key'] }}
SFTPHostKey {{ proftpd['ssh-host-dsa-key'] }}
SFTPHostKey {{ proftpd['ssh-host-ecdsa-key'] }}
SFTPAuthorizedUserKeys file:{{ proftpd['ssh-authorized-key'] }}
......
......@@ -22,7 +22,7 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-frontend]
filename = instance-frontend.cfg.in
md5sum = b3c5694042035f13832479dca3481597
md5sum = af6c2d8dfa36c9012c6ef905689972ff
[profile-master]
filename = instance-master.cfg.in
......@@ -38,7 +38,7 @@ md5sum = cba4d995962f7fbeae3f61c9372c4181
[template-frontend-haproxy-configuration]
_update_hash_filename_ = templates/frontend-haproxy.cfg.in
md5sum = 545a0ff2f2dfaeb4342232398d8c8ebe
md5sum = 49fc74e8948181014c1af863dbff1b59
[template-frontend-haproxy-crt-list]
_update_hash_filename_ = templates/frontend-haproxy-crt-list.in
......@@ -50,7 +50,7 @@ md5sum = d56e2cfab274cbbbe5b387f2f6e417df
[template-backend-haproxy-configuration]
_update_hash_filename_ = templates/backend-haproxy.cfg.in
md5sum = 629f4cc34dd7512eb61f10eac4e62d7a
md5sum = 13942d8f5525b748cf3cfc2665a87f63
[template-empty]
_update_hash_filename_ = templates/empty.in
......@@ -106,11 +106,11 @@ md5sum = 107dc147d94d02d2084b97b8ec591831
[template-frontend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/frontend-haproxy-rsyslogd.conf.in
md5sum = afbf1a74322f927a10306657b9a590ad
md5sum = 9f60941ba505bcb9eec5b09676411038
[template-backend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in
md5sum = ba91b7778c3d730353d42d7804ef8050
md5sum = 53bb2f095db7bc5cd3a238d3c1416502
[template-slave-introspection-httpd-nginx]
_update_hash_filename_ = templates/slave-introspection-httpd-nginx.conf.in
......
......@@ -651,7 +651,7 @@ output = ${directory:bin}/trafficserver-rotate
xz_binary = {{ software_parameter_dict['xz_location'] ~ '/bin/xz' }}
pattern = *.old
# days to keep log files
keep_days = 365
keep_days = ${configuration:rotate-num}
extra-context =
raw find_executable {{ software_parameter_dict['findutils'] }}/bin/find
......
{
"$schema": "http://json-schema.org/draft-07/schema",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"-frontend-quantity": {
"description": "Quantity of Frontends Replicate.",
......
{
"$schema": "http://json-schema.org/draft-07/schema",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"custom_domain": {
"description": "Custom Domain to use for the website. Shall contain only letters, numbers and -, and can look like example.com, first2.example.com special-site.example.com.",
......
......@@ -38,7 +38,6 @@ url = ${:_profile_base_location_}/software.py
recipe = plone.recipe.command
stop-on-error = True
location = ${buildout:parts-directory}/${:_buildout_section_name_}
update-command = ${:command}
command =
rm -fr ${:location} &&
mkdir -p ${:location} &&
......@@ -216,7 +215,7 @@ kedifa = 0.0.7
zc.lockfile = 1.4
python2-secrets = 1.0.5
validators = 0.12.2
validators = 0.32.0
ecdsa = 0.13
furl = 2.1.0
......
......@@ -6,7 +6,7 @@ module(
# haproxy emits enough information by itself
# Also cut out first empty space in msg, which is related to rsyslogd
# internal and end up cutting on 8k, as it's default of $MaxMessageSize
template(name="rawoutput" type="string" string="%msg:2:8192%\n")
template(name="rawoutput" type="string" string="%msg:2:65537%\n")
$ActionFileDefaultTemplate rawoutput
$FileCreateMode 0600
......
......@@ -2,8 +2,9 @@ global
pidfile {{ configuration['pid-file'] }}
# master-worker is compatible with foreground with process management
master-worker
tune.http.logurilen 16384
log {{ configuration['log-socket'] }} len 65535 local0
log {{ configuration['log-socket'] }} local0
defaults
log global
mode http
......
......@@ -6,7 +6,7 @@ module(
# haproxy emits enough information by itself
# Also cut out first empty space in msg, which is related to rsyslogd
# internal and end up cutting on 8k, as it's default of $MaxMessageSize
template(name="rawoutput" type="string" string="%msg:2:8192%\n")
template(name="rawoutput" type="string" string="%msg:2:65537%\n")
$ActionFileDefaultTemplate rawoutput
$FileCreateMode 0600
......
......@@ -8,12 +8,13 @@ global
# master-worker is compatible with foreground with process management
master-worker
expose-experimental-directives
log {{ configuration['log-socket'] }} local0
tune.http.logurilen 16384
log {{ configuration['log-socket'] }} len 65535 local0
defaults
mode http
log global
option httplog
log-format "%{+E}o {{ '{' }}%b{{ '}' }} %ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq!!!%ci - %[capture.req.hdr(0)] [%trl] \"%HM %[capture.req.uri] %HV\" %ST %B \"%[capture.req.hdr(1)]\" \"%[capture.req.hdr(2)]\" %Ta"
timeout queue 60s
timeout server {{ configuration['request-timeout'] }}s
timeout client {{ configuration['request-timeout'] }}s
......@@ -42,7 +43,6 @@ defaults
capture request header REMOTE_USER len 255
capture request header Referer len 255
capture request header User-Agent len 255
log-format "%{+E}o {{ '{' }}%b{{ '}' }} %ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq!!!%ci - %[capture.req.hdr(0)] [%trl] \"%HM %[capture.req.uri] %HV\" %ST %B \"%[capture.req.hdr(1)]\" \"%[capture.req.hdr(2)]\" %Ta"
# setup Via
http-request add-header Via "%HV rapid-cdn-frontend-{{ configuration['node-id'] }}-{{ configuration['version-hash'] }}"
# setup X-Forwarded-For
......
......@@ -2111,7 +2111,8 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
)
# check retention
old_time = time.time() - (400 * 24 * 3600)
# 4000 is default configuration:rotate-num, so make the log a bit older
old_time = time.time() - (4010 * 24 * 3600)
os.utime(
os.path.join(ats_logrotate_dir, older_file_name + '.xz'),
(old_time, old_time))
......@@ -2365,7 +2366,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
)
result = fakeHTTPSResult(
parameter_dict['domain'],
'test-path/deep/.././deeper',
'/test-path/deep/.././deeper' * 250,
headers={
'Timeout': '10', # more than default backend-connect-timeout == 5
'Accept-Encoding': 'gzip',
......@@ -2379,7 +2380,8 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
headers = self.assertResponseHeaders(result)
self.assertNotIn('Strict-Transport-Security', headers)
self.assertEqualResultJson(result, 'Path', '?a=b&c=/test-path/deeper')
self.assertEqualResultJson(
result, 'Path', '?a=b&c=' + '/test-path/deeper' * 250)
try:
j = result.json()
......@@ -2399,7 +2401,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
'_Url_access_log',
r'^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} - - '
r'\[\d{2}\/.{3}\/\d{4}\:\d{2}\:\d{2}\:\d{2} \+\d{4}\] '
r'"GET \/test-path\/deep\/..\/.\/deeper '
r'"GET \/(\/test-path\/deep\/..\/.\/deeper){250} '
r'HTTP\/%(http_version)s" \d{3} '
r'\d+ "-" "TEST USER AGENT" \d+' % dict(
http_version=self.max_client_version)
......@@ -2423,7 +2425,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
r'\d+/\d+\/\d+\/\d+\/\d+ '
r'200 \d+ - - ---- '
r'\d+\/\d+\/\d+\/\d+\/\d+ \d+\/\d+ '
r'"GET /test-path/deeper HTTP/1.1"'
r'"GET (/test-path/deeper){250} HTTP/1.1"'
)
result_http = fakeHTTPResult(
......@@ -2582,10 +2584,10 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin, AtsMixin):
self.certificate_pem,
result.certificate)
self.assertEqual(
# 502 and 503 are both ok as response codes by the backend-haproxy
self.assertIn(
result.status_code,
http.client.BAD_GATEWAY
)
[http.client.BAD_GATEWAY, http.client.SERVICE_UNAVAILABLE])
finally:
self.stopAuthenticatedServerProcess()
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters",
"properties": {
"slave-frontend": {
......
{
"$schema": "http://json-schema.org/draft-07/schema#",
"name": "Output Parameters",
"properties": {
"backend-url": {
......
{
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"db_password": {
"description": "Database password. If no password set, a password will be generated. This parameter is set only if database is not created yet.",
......
......@@ -35,11 +35,11 @@ branch = master
[eggs]
eggs +=
slapos.core
dummy +=
${vifib:location}
${slapos-bin:location}
extra-paths +=
${vifib:location}/master
${slapos-bin:location}
......@@ -63,7 +63,3 @@ url = ${:_profile_base_location_}/${:filename}
[template-haproxy-cfg]
url = ${:_profile_base_location_}/${:filename}
[versions]
python-memcached = 1.47
xml-marshaller = 1.0.2
......@@ -47,6 +47,11 @@ setup = ${slapos-repository:location}/software/backupserver/test/
egg = slapos.test.dufs
setup = ${slapos-repository:location}/software/dufs/test/
[slapos.test.dependency-track-setup]
<= setup-develop-egg
egg = slapos.test.dependencytrack
setup = ${slapos-repository:location}/software/dependency-track/test/
[slapos.test.erp5-setup]
<= setup-develop-egg
egg = slapos.test.erp5
......@@ -272,6 +277,11 @@ setup = ${slapos-repository:location}/software/osie-coupler/test/
egg = slapos.test.oi_sensor
setup = ${slapos-repository:location}/software/oi-sensor/test/
[slapos.test.slapos-testing-setup]
<= setup-develop-egg
egg = slapos.test.slapos_testing
setup = ${slapos-repository:location}/software/slapos-testing/test/
[slapos.core-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/slapos.core.git
......@@ -360,6 +370,7 @@ eggs +=
${slapos.test.caucase-setup:egg}
${slapos.test.cloudooo-setup:egg}
${slapos.test.dream-setup:egg}
${slapos.test.dependency-track-setup:egg}
${slapos.test.dufs-setup:egg}
${slapos.test.erp5-setup:egg}
${slapos.test.erp5testnode-setup:egg}
......@@ -394,6 +405,7 @@ eggs +=
${slapos.test.restic_rest_server-setup:egg}
${slapos.test.seleniumserver-setup:egg}
${slapos.test.slapos-master-setup:egg}
${slapos.test.slapos-testing-setup:egg}
${slapos.test.ssh-setup:egg}
${slapos.test.theia-setup:egg}
${slapos.test.turnserver-setup:egg}
......@@ -452,6 +464,7 @@ tests =
caucase ${slapos.test.caucase-setup:setup}
cloudooo ${slapos.test.cloudooo-setup:setup}
dream ${slapos.test.dream-setup:setup}
dependency-track ${slapos.test.dependency-track-setup:setup}
dufs ${slapos.test.dufs-setup:setup}
erp5 ${slapos.test.erp5-setup:setup}
erp5-py3 ${slapos.test.erp5-setup:setup}
......@@ -490,6 +503,7 @@ tests =
restic-rest-server ${slapos.test.restic_rest_server-setup:setup}
seleniumserver ${slapos.test.seleniumserver-setup:setup}
slapos-master ${slapos.test.slapos-master-setup:setup}
slapos-testing ${slapos.test.slapos-testing-setup:setup}
ssh ${slapos.test.ssh-setup:setup}
theia ${slapos.test.theia-setup:setup}
turnserver ${slapos.test.turnserver-setup:setup}
......
##############################################################################
#
# Copyright (c) 2019 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from setuptools import setup, find_packages
version = '0.0.1.dev0'
name = 'slapos.test.slapos_testing'
description = "Test for SlapOS' slapos-testing"
setup(
name=name,
version=version,
description=description,
long_description=description,
long_description_content_type='text/plain',
maintainer="Nexedi",
maintainer_email="info@nexedi.com",
url="https://lab.nexedi.com/nexedi/slapos",
packages=find_packages(),
install_requires=[
'slapos.core',
'slapos.libnetworkcache',
],
zip_safe=True,
test_suite='test',
)
##############################################################################
#
# Copyright (c) 2019 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
from slapos.testing.testcase import (
makeModuleSetUpAndTestCaseClass,
installSoftwareUrlList,
)
parent_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
software_files = ['software%s.cfg' % v for v in ('', '-py3next', '-py2')]
software_urls = [os.path.join(parent_folder, name) for name in software_files]
_, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass(
parent_folder + '/{' + '|'.join(software_files) + '}' # used only for display
)
def setUpModule():
# Supply every version of the software.
installSoftwareUrlList(
SlapOSInstanceTestCase,
software_urls,
debug=bool(int(os.environ.get('SLAPOS_TEST_DEBUG', 0))),
)
class SlaposTestingTestCase(SlapOSInstanceTestCase):
def requestDefaultInstance(cls, state='started'):
# This method is called for requesting and destroying (state='destroyed').
for name, url in zip(software_files, software_urls):
cls.slap.request(
software_release=url,
software_type=None, # default
partition_reference='Instance_of_' + name,
partition_parameter_kw=cls._instance_parameter_dict,
state=state,
)
def test():
# Just test that each version of the software compiled and instantiates.
pass
......@@ -23,7 +23,7 @@ md5sum = 9658a11340c018de816d0de40683706a
[instance-import]
_update_hash_filename_ = instance-import.cfg.jinja.in
md5sum = d0ff7b93e392f9b9233f9ae6ba81583f
md5sum = 647d99aa6f96b2515ac28013145fe81f
[instance-export]
_update_hash_filename_ = instance-export.cfg.jinja.in
......
......@@ -67,8 +67,8 @@ autorun = stopped
# Change the gravatar favicon seed
[favicon.ico]
seed = Import {{ root_title }}
[frontend-instance-favicon.ico]
seed = {{ theia_id }} {{ root_title }}
# The resilient stack calls post-notification-run:output followed by
......
{
"$schema": "http://json-schema.org/draft-06/schema",
"type": "object",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"description": "Parameters to instantiate Theia",
"additionalProperties": false,
"properties": {
"autorun": {
"title": "Automatically Run Software/Instance",
"description": "The option used to pilot automatic build and run of software and instances hosted inside Theia. When 'running', build and run is done automatically in the background. When 'stopped' build and run processes are stopped and need to be run manually. When 'user-controlled', the user can manage it directly in the local supervisord. ",
"type": "string",
"enum": [
"running",
"stopped",
"user-controlled"
],
"default": "running"
},
"initial-embedded-instance": {
"title": "Initial Embedded Instance Configuration",
"description": "One-shot optional JSON preconfiguration for an embedded instance. Only applied once when Theia is instantiated. Changing this option afterward will have no effect.",
"type": "string",
"textarea": true,
"examples": [
"{\"software-url\": \"~/srv/project/slapos/software/html5as-base/software.cfg\"}",
"{\"software-url\": \"~/srv/project/slapos/software/html5as/software.cfg\", \"software-type\": \"replicate\", \"instance-parameters\": {\"replicate-quantity\": 3}}"
]
},
"forward-slapos-frontend-requests": {
"title": "Forward Frontend Requests in the Embedded SlapOS",
"description": "Embedded SlapOS instance by default forwards frontend requests as shared instances attached to the Theia instance, so that HTTP frontends can be allocated for services. This behavior can be disabled, in that case frontends will not be allocated.",
"type": "string",
"enum": [
"enabled",
"disabled"
],
"default": "enabled"
},
"frontend-guid": {
"title": "Frontend Instance ID",
"description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
"type": "string"
},
"frontend-sr": {
"title": "Frontend Software URL",
"description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
"type": "string",
"format": "uri",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
},
"frontend-sr-type": {
"title": "Frontend Software Type",
"description": "Type of the frontend instance, like \"frontend\".",
"type": "string",
"default": "RootSoftwareInstance"
},
"additional-frontend-guid": {
"title": "Additional Frontend Instance ID",
"description": "Unique identifier of the additional frontend instance, like \"SOFTINST-11031\", if empty won't be requested.",
"type": "string"
},
"additional-frontend-sr": {
"title": "Additional Frontend Software URL",
"description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
"type": "string",
"format": "uri",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
},
"additional-frontend-sr-type": {
"title": "Additional Frontend Software Type",
"description": "Type of the frontend instance, like \"frontend\".",
"type": "string",
"default": "RootSoftwareInstance"
"$defs": {
"instance-parameters": {
"type": "object",
"properties": {
"autorun": {
"title": "Automatically Run Software/Instance",
"description": "The option used to pilot automatic build and run of software and instances hosted inside Theia. When 'running', build and run is done automatically in the background. When 'stopped' build and run processes are stopped and need to be run manually. When 'user-controlled', the user can manage it directly in the local supervisord. ",
"type": "string",
"enum": [
"running",
"stopped",
"user-controlled"
],
"default": "running"
},
"initial-embedded-instance": {
"title": "Initial Embedded Instance Configuration",
"description": "One-shot optional JSON preconfiguration for an embedded instance. Only applied once when Theia is instantiated. Changing this option afterward will have no effect.",
"type": "string",
"textarea": true,
"examples": [
"{\"software-url\": \"~/srv/project/slapos/software/html5as-base/software.cfg\"}",
"{\"software-url\": \"~/srv/project/slapos/software/html5as/software.cfg\", \"software-type\": \"replicate\", \"instance-parameters\": {\"replicate-quantity\": 3}}"
]
},
"forward-slapos-frontend-requests": {
"title": "Forward Frontend Requests in the Embedded SlapOS",
"description": "Embedded SlapOS instance by default forwards frontend requests as shared instances attached to the Theia instance, so that HTTP frontends can be allocated for services. This behavior can be disabled, in that case frontends will not be allocated.",
"type": "string",
"enum": [
"enabled",
"disabled"
],
"default": "enabled"
},
"frontend-guid": {
"title": "Frontend Instance ID",
"description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
"type": "string"
},
"frontend-sr": {
"title": "Frontend Software URL",
"description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
"type": "string",
"format": "uri",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
},
"frontend-sr-type": {
"title": "Frontend Software Type",
"description": "Type of the frontend instance, like \"frontend\".",
"type": "string",
"default": "RootSoftwareInstance"
},
"additional-frontend-guid": {
"title": "Additional Frontend Instance ID",
"description": "Unique identifier of the additional frontend instance, like \"SOFTINST-11031\", if empty won't be requested.",
"type": "string"
},
"additional-frontend-sr": {
"title": "Additional Frontend Software URL",
"description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
"type": "string",
"format": "uri",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg"
},
"additional-frontend-sr-type": {
"title": "Additional Frontend Software Type",
"description": "Type of the frontend instance, like \"frontend\".",
"type": "string",
"default": "RootSoftwareInstance"
}
}
}
}
},
"unevaluatedProperties": false,
"allOf": [
{
"$ref": "#/$defs/instance-parameters"
}
]
}
{
"$schema": "http://json-schema.org/draft-06/schema",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"type": "object",
"description": "Parameters to instantiate resilient Theia",
"unevaluatedProperties": false,
"allOf": [
{
"$ref": "./instance-input-schema.json#"
"$ref": "./instance-input-schema.json#/$defs/instance-parameters"
}
],
"properties": {
"resilient-clone-number": {
"title": "Amount of backup(s) to create",
"description": "Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone.",
"type": "integer",
"default": 1,
"minimum": 0,
"maximum": 2,
"optional": true
},
{
"properties": {
"resilient-clone-number": {
"title": "Amount of backup(s) to create",
"description": "Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone.",
"type": "integer",
"default": 1,
"minimum": 0,
"maximum": 2,
"optional": true
},
"-sla-theia0-computer_guid": {
"title": "Target computer for main instance",
"description": "Target computer GUID for main instance.",
"type": "string",
"optional": true
},
"-sla-theia1-computer_guid": {
"title": "Target computer for first clone",
"description": "Target computer for first clone instance.",
"type": "string",
"optional": true
},
"-sla-pbs1-computer_guid": {
"title": "Target computer for first PBS",
"description": "Target computer for first PBS instance.",
"type": "string",
"optional": true
},
"-sla-theia2-computer_guid": {
"title": "Target computer for second clone",
"description": "Target computer for second clone instance.",
"type": "string",
"optional": true
},
"-sla-pbs2-computer_guid": {
"title": "Target computer for second PBS",
"description": "Target computer for second PBS instance.",
"type": "string",
"optional": true
},
"resiliency-backup-periodicity": {
"title": "Periodicity of backup",
"description": "Periodicity of backup, in cron format.",
"type": "string",
"optional": true
},
"remove-backup-older-than": {
"title": "Remove backups older than...",
"description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.",
"type": "string",
"default": "2W",
"optional": true
}
}
"-sla-theia0-computer_guid": {
"title": "Target computer for main instance",
"description": "Target computer GUID for main instance.",
"type": "string",
"optional": true
},
"-sla-theia1-computer_guid": {
"title": "Target computer for first clone",
"description": "Target computer for first clone instance.",
"type": "string",
"optional": true
},
"-sla-pbs1-computer_guid": {
"title": "Target computer for first PBS",
"description": "Target computer for first PBS instance.",
"type": "string",
"optional": true
},
"-sla-theia2-computer_guid": {
"title": "Target computer for second clone",
"description": "Target computer for second clone instance.",
"type": "string",
"optional": true
},
"-sla-pbs2-computer_guid": {
"title": "Target computer for second PBS",
"description": "Target computer for second PBS instance.",
"type": "string",
"optional": true
},
"resiliency-backup-periodicity": {
"title": "Periodicity of backup",
"description": "Periodicity of backup, in cron format.",
"type": "string",
"optional": true
},
"remove-backup-older-than": {
"title": "Remove backups older than...",
"description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.",
"type": "string",
"default": "2W",
"optional": true
}
]
}
}
......@@ -650,6 +650,15 @@ class TestTheiaResilientInterface(ResilientTheiaMixin, TestTheia):
monitor_setup_params['password'],
)).raise_for_status()
def test_all_favicon_are_different(self):
favicon_relpath = os.path.join('srv', 'frontend-static', 'favicon.ico')
with open(self.getPartitionPath('export', favicon_relpath), 'rb') as f:
export_favicon = f.read()
with open(self.getPartitionPath('import', favicon_relpath), 'rb') as f:
import_favicon = f.read()
if export_favicon == import_favicon:
self.fail('Import favicon and export favicon are not different')
class TestTheiaResilientWithEmbeddedInstance(ResilientTheiaMixin, TestTheiaWithEmbeddedInstance):
pass
......@@ -498,8 +498,9 @@ class TakeoverMixin(ExportAndImportMixin):
def _requestTakeover(self, takeover_url, takeover_password):
resp = requests.get("%s?password=%s" % (takeover_url, takeover_password), verify=True)
self.assertEqual(requests.codes.ok, resp.status_code)
self.assertNotIn("Error", resp.text, "An Error occured: %s" % resp.text)
self.assertIn("Success", resp.text, "An Error occured: %s" % resp.text)
# Allow KeyError because of stricter "slapos request" command
self.assertNotIn("Error", resp.text.replace("KeyError: \\'frozen\\'", ""))
self.assertIn("Success", resp.text)
return resp.text
def _doTakeover(self):
......
......@@ -46,7 +46,6 @@ extends =
../../component/grep/buildout.cfg
../../component/dash/buildout.cfg
../../component/bash/buildout.cfg
../../component/wget/buildout.cfg
../../component/aspell/buildout.cfg
../../component/6tunnel/buildout.cfg
../../component/userhosts/buildout.cfg
......@@ -228,7 +227,6 @@ context =
key template_fonts_conf template-fonts-conf:output
key userhosts_location userhosts:location
key unixodbc_location unixodbc:location
key wget_location wget:location
key extra_path_list eggs:extra-paths
key python_executable_for_kernel erp5-python-interpreter-jupyter:exe
key erp5_kernel_location erp5-kernel:location
......
......@@ -50,7 +50,6 @@ extends =
../../component/grep/buildout.cfg
../../component/dash/buildout.cfg
../../component/bash/buildout.cfg
../../component/wget/buildout.cfg
../../component/aspell/buildout.cfg
../../component/6tunnel/buildout.cfg
../../component/userhosts/buildout.cfg
......@@ -233,7 +232,6 @@ context =
key template_fonts_conf template-fonts-conf:output
key userhosts_location userhosts:location
key unixodbc_location unixodbc:location
key wget_location wget:location
key extra_path_list eggs:extra-paths
key python_executable_for_kernel erp5-python-interpreter-jupyter:exe
key erp5_kernel_location erp5-kernel:location
......@@ -633,7 +631,6 @@ scripts =
tidstoraged
tidstorage_repozo
wcfs
web_checker_utility
extra-paths =
${erp5:location}
......@@ -963,7 +960,7 @@ z3c.pt = 3.3.1
zc.lockfile = 2.0
zdaemon = 4.4
zExceptions = 4.3
Zope = 4.8.9+SlapOSPatched002
Zope = 4.8.11+SlapOSPatched002
zope.annotation = 4.8
zope.authentication = 4.5.0
zope.browser = 2.4
......
{
"$schema": "http://json-schema.org/draft-04/schema",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Resiliency Parameters",
"description": "List of possible parameters used in the resilient stack",
"type": "object",
......
......@@ -138,10 +138,10 @@ eggs =
# The last version of setuptools compatible with Python 3.7
setuptools = 67.8.0
# Use SlapOS patched zc.buildout
zc.buildout = 3.0.1+slapos002
zc.buildout = 3.0.1+slapos004
pip = 23.2.1
# Use SlapOS patched zc.recipe.egg (zc.recipe.egg 2.x is for Buildout 2)
zc.recipe.egg = 2.0.8.dev0+slapos002
zc.recipe.egg = 2.0.8.dev0+slapos004
aiofiles = 23.1.0:whl
aiohttp = 3.8.5:whl
......@@ -269,6 +269,7 @@ lxml-html-clean = 0.1.1
manuel = 1.11.2
MarkupSafe = 2.1.3
matplotlib = 2.1.2
matplotlib-inline = 0.1.6:whl
meld3 = 1.0.2
mistune = 0.8.4
mock = 3.0.5
......@@ -352,13 +353,13 @@ sgmllib3k = 1.0.0
simplegeneric = 0.8.1
singledispatch = 3.4.0.3
six = 1.16.0
slapos.cookbook = 1.0.360
slapos.core = 1.11.0
slapos.cookbook = 1.0.365
slapos.core = 1.12.0
slapos.extension.shared = 1.0
slapos.libnetworkcache = 0.25
slapos.rebootstrap = 4.7
slapos.recipe.build = 0.57
slapos.recipe.cmmi = 0.20
slapos.recipe.cmmi = 0.22
slapos.recipe.template = 5.1
slapos.toolbox = 0.142
smmap = 5.0.0
......@@ -435,6 +436,7 @@ beautifulsoup4 = 4.8.2
certifi = 2020.4.5.1
charset-normalizer = 2.0.12
click = 6.7
cycler = 0.10.0
distro = 1.6.0
feedparser = 5.2.1
Flask = 1.1.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