Commit e5643ca9 authored by Joanne Hugé's avatar Joanne Hugé

Update Release Candidate

parents a9e718c4 944edd5e
......@@ -7,6 +7,7 @@ extends =
../perl/buildout.cfg
../pkgconfig/buildout.cfg
../xz-utils/buildout.cfg
../zstd/buildout.cfg
../zlib/buildout.cfg
../nghttp2/buildout.cfg
parts =
......@@ -15,11 +16,11 @@ parts =
[curl]
recipe = slapos.recipe.cmmi
shared = true
url = http://curl.haxx.se/download/curl-7.67.0.tar.xz
md5sum = d55351b88dec558dd3a24dabb2c2d899
url = http://curl.haxx.se/download/curl-7.76.0.tar.xz
md5sum = 41178ceea57c863f883b6fe2c3ac276f
configure-options =
--disable-static
--disable-esni
--disable-ech
--disable-ldap
--disable-ldaps
--disable-rtsp
......@@ -30,6 +31,7 @@ configure-options =
--disable-imap
--disable-smtp
--disable-gopher
--disable-mqtt
--disable-manual
--enable-ipv6
--disable-sspi
......@@ -42,8 +44,10 @@ configure-options =
--without-mesalink
--without-nss
--without-libpsl
--without-libgsasl
--without-libmetalink
--without-libssh2
--without-libssh
--without-librtmp
--without-libidn2
--with-nghttp2=${nghttp2:location}
......@@ -52,8 +56,11 @@ configure-options =
--without-quiche
--without-zsh-functions-dir
--without-fish-functions-dir
--without-brotli
--with-zstd=${zstd:location}
--without-gssapi
environment =
PATH=${perl:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${openssl:location}/lib/pkgconfig:${nghttp2:location}/lib/pkgconfig
LDFLAGS=-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${nghttp2:location}/lib
LDFLAGS=-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${openssl:location}/lib -Wl,-rpath=${nghttp2:location}/lib -Wl,-rpath=${zstd:location}/lib
......@@ -33,6 +33,9 @@ configure-options =
--with-ld=@@LOCATION@@/bin/ld
--with-as=${binutils:location}/bin/as
--with-internal-zlib
${:extra-configure-options}
extra-configure-options =
post-install =
cd '%(location)s/bin'
ln -s gcc cc
......@@ -54,6 +57,12 @@ environment =
LDFLAGS=-Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${isl:location}/lib -Wl,-rpath=${mpc:location}/lib -Wl,-rpath=${mpfr:location}/lib
PATH=${binutils:location}/bin:${gettext:location}/bin:${perl:location}/bin:${tar:location}/bin:%(PATH)s
[gcc-common:os.path.isdir('/usr/lib/arm-linux-gnueabihf') and os.access('/proc/device-tree/model', os.R_OK) and 'OLinuXino-LIME2' in open('/proc/device-tree/model').read()]
extra-configure-options =
--with-arch=armv7-a
--with-fpu=vfp
--with-float=hard
[gcc-5.5]
<= gcc-common
version = 5.5.0
......
......@@ -44,8 +44,8 @@ environment-extra =
[golang1.15]
<= golang-common
url = https://golang.org/dl/go1.15.10.src.tar.gz
md5sum = 898a4aea4bf5d4adc924154e347acfa3
url = https://golang.org/dl/go1.15.11.src.tar.gz
md5sum = bd7617d2b959eb6e0b0df2a19e435a06
# go1.15 needs go1.4 to bootstrap
environment-extra =
......@@ -53,8 +53,8 @@ environment-extra =
[golang1.16]
<= golang-common
url = https://golang.org/dl/go1.16.2.src.tar.gz
md5sum = 516f63e11c64b1984045c035d4c2f65d
url = https://golang.org/dl/go1.16.3.src.tar.gz
md5sum = 48183a40d6522f1ea59b7d63377b7072
# go1.16 needs go1.4 to bootstrap
environment-extra =
......
......@@ -48,8 +48,8 @@ patches =
recipe = slapos.recipe.build:gitclone
#repository = https://github.com/proftpd/mod_auth_web
# XXX until https://github.com/proftpd/mod_auth_web/pull/1 gets merged, we use
# the source repository of this PR directly
repository = https://github.com/jwm/mod_auth_web
# a copy of this repository on nexedi gitlab
repository = https://lab.nexedi.com/jerome/mod_auth_web
revision = dec090bd0e287544a34be156ee17f715bd4286f9
git-executable = ${git:location}/bin/git
......
......@@ -73,8 +73,8 @@ md5sum = 6097fdb9cbab47c96471274b9044e983
# XXX: This is not the latest version because
# Debian does not provide a stable URL for it.
<= debian-amd64-netinst-base
version = 10.7.0
md5sum = 7227c779619e6c8a0a1b0f55d10c6270
version = 10.8.0
md5sum = e221f43f4fdd409250908fc4305727d4
[debian-amd64-testing-netinst.iso]
<= debian-amd64-netinst-base
......
......@@ -18,4 +18,4 @@ md5sum = 8288e59eb442c662544daffbf446a033
[template-deploy-test]
filename = instance.cfg.in
md5sum = b673c497abe5b3e7de4c7fc8b01aa3d0
md5sum = c5db797980951b764b69aaa4b60a0380
......@@ -28,7 +28,7 @@ recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/bin/$${:_buildout_section_name_}
template = inline:
#!/bin/sh
export PATH=${python-with-eggs:location}:$PATH
export PATH=${python2.7-with-eggs:location}:$PATH
exec ${buildout:bin-directory}/${runTestSuite_py:interpreter} ${:_profile_base_location_}/runTestSuite.py --partition_ipv4 {{ list(partition_ipv4)[0] }} --partition_path $${buildout:directory} --test_reference "{{ slapparameter_dict.get('image-to-test-url') }} {{ slapparameter_dict.get('script-to-test-url')}}" --test_location "${test-location:base}/{{ slapparameter_dict.get('test-relative-directory', 'playbook/roles/standalone-shared') }}" --python_interpreter=${buildout:bin-directory}/${runTestSuite_py:interpreter} "$@"
mode = 0755
context =
......@@ -37,7 +37,7 @@ context =
[switch_softwaretype]
default = $${:deploy-test}
deploy-test = $${dynamic-template-deploy-test:rendered}
deploy-test = dynamic-template-deploy-test:rendered
[dynamic-template-deploy-test]
recipe = slapos.recipe.template:jinja2
......
......@@ -152,9 +152,12 @@ def main():
revision = args.revision
test_suite_title = args.test_suite_title or args.test_suite
# TODO: rewrite this unsing nxdtest, EggTestSuite no longer exist in erp5.util
suite = testsuite.EggTestSuite(
1, test_suite=args.test_suite, node_quantity=args.node_quantity,
python_interpreter=args.python_interpreter,
shared_part_list=os.environ.get('SLAPOS_TEST_SHARED_PART_LIST', ''),
log_directory=os.environ.get('SLAPOS_TEST_LOG_DIRECTORY', ''),
egg_test_path_dict={
os.path.basename(os.path.normpath(path)): path
for path in args.test_location.split(',')},
......
......@@ -2,9 +2,8 @@
extends =
buildout.hash.cfg
https://lab.nexedi.com/nexedi/slapos/raw/1.0.182/software/kvm/software.cfg
parts =
eggs
python-with-eggs
template-deploy-test
runTestSuite_py
playbook
......@@ -15,7 +14,9 @@ eggs =
erp5.util
interpreter = ${:_buildout_section_name_}
[python-with-eggs]
[python2.7-with-eggs]
# create interpreters named "python" and "python2.7" so that
# instance profile can use them in $PATH
recipe = plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
......@@ -23,8 +24,8 @@ stop-on-error = true
command =
rm -fr ${:location} &&
mkdir -p ${:location} &&
ln -s ${buildout:bin-directory}/pythonwitheggs ${:location}/python &&
ln -s ${buildout:bin-directory}/pythonwitheggs ${:location}/python2.7
ln -s ${buildout:bin-directory}/${python-with-eggs:interpreter} ${:location}/python &&
ln -s ${buildout:bin-directory}/${python-with-eggs:interpreter} ${:location}/python2.7
update-command = ${:command}
[playbook]
......
......@@ -35,13 +35,13 @@ part = python3
<= go-git-package
go.importpath = github.com/grafana/grafana
repository = https://github.com/grafana/grafana
revision = v7.4.3-0-g010f20c1c8
revision = v7.5.2-0-gca413c612f
[go_github.com_grafana_loki]
<= go-git-package
go.importpath = github.com/grafana/loki
repository = https://github.com/grafana/loki
revision = v2.1.0-188-g877f524c36
revision = v2.2.0-0-ga27c7991
[go_github.com_influxdata_influxdb]
<= go-git-package
......@@ -60,12 +60,10 @@ revision = v1.17.3-0-g24a552b90b
install =
${go_github.com_grafana_loki:location}:./cmd/loki
${go_github.com_grafana_loki:location}:./cmd/promtail
${go_github.com_grafana_loki:location}:./cmd/logcli
${go_github.com_influxdata_telegraf:location}:./cmd/...
${go_github.com_influxdata_influxdb:location}:./cmd/...
# use recent go
golang = ${golang1.16:location}
# disable cgo, to prevent loki/promtail from using go-systemd
environment =
CGO_ENABLED = 0
......
......@@ -19,7 +19,7 @@ md5sum = e6d5c7bb627b4f1d3e7c99721b7c58fe
[template-kvm]
filename = instance-kvm.cfg.jinja2
md5sum = 0c00ca332d364a2c620cd260d51d4649
md5sum = 31b17b55200ea065cb97085283ef5568
[template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in
......
......@@ -735,21 +735,6 @@ key_info = Get the publick key file in your VM with the command: wget {{ kvm_htt
{% endif %}
{% endif %}
{% if use_tap and slap_configuration.get('tap-ipv4-addr') -%}
ipv4-network-info =
PERMANENT SOLUTION: in your VM, add the lines below in /etc/network/interfaces and then run: "ifup {{ iface }}"
auto {{ iface }}
iface {{ iface }} inet static
address {{ slap_configuration.get('tap-ipv4-addr') }}
netmask {{ slap_configuration.get('tap-ipv4-netmask') }}
gateway {{ slap_configuration.get('tap-ipv4-gateway') }}
{% if enable_http %}
${helper:blank-line}
TEMPORARY SOLUTION: run in your VM the command: "wget -O- {{ kvm_http }}/${network-config-ipv4:filename} | /bin/sh -"
(the configuration will be gone after the next reboot)
{% endif %}
{% endif %}
ipv6-network-info =
{% if use_tap and slap_configuration.get('tap-ipv6-addr') %}
PERMANENT SOLUTION: in your VM, add the lines below in /etc/network/interfaces and then run: "ifup {{ iface }}"
......
......@@ -17,8 +17,8 @@ part = python3
[metabase.jar]
recipe = slapos.recipe.build:download
url = https://downloads.metabase.com/v0.36.0/metabase.jar
md5sum = 0a5e780dcf7d9ffe73f1ed789f863a57
url = https://downloads.metabase.com/v0.38.3/metabase.jar
md5sum = b91e4b9ae13c892894fec8bab2fd195f
[instance-profile]
recipe = slapos.recipe.template
......
......@@ -14,7 +14,7 @@
# not need these here).
[template-nextcloud-install.sh]
filename = nextcloud-install.sh.in
md5sum = 209abce3f82706fb80995f7efea70a9c
md5sum = 094c26b177fdde69b41d81b89bab542b
[template-apache-httpd]
filename = apache-httpd.conf.in
......@@ -26,4 +26,4 @@ md5sum = 6f42f0a8c5e5c0c657541a65c4d9ee57
[template-nextcloud-instance]
filename = nextcloud-instance.cfg.in
md5sum = b62f438d380363387fe225fa3d7e2291
md5sum = 86a92f542e516ac92802908b85354073
......@@ -125,12 +125,11 @@ array (
);
EOF
# Install some nextcloud app
php_cmd {{ parameter_dict['nextcloud'] }}/occ app:install spreed
php_cmd {{ parameter_dict['nextcloud'] }}/occ app:install richdocuments
php_cmd {{ parameter_dict['nextcloud'] }}/occ app:install calendar
php_cmd {{ parameter_dict['nextcloud'] }}/occ app:install rainloop
php_cmd {{ parameter_dict['nextcloud'] }}/occ app:install news
# Install some nextcloud apps
{%for app_name, app_location in nextcloud_apps.items() %}
cp -a {{ app_location }} {{ parameter_dict['nextcloud'] }}/apps/{{ app_name }}
php_cmd {{ parameter_dict['nextcloud'] }}/occ app:enable {{ app_name }}
{%endfor%}
php_cmd {{ parameter_dict['nextcloud'] }}/occ config:app:set richdocuments wopi_url --value="{{ parameter_dict.get('collabora-url', '') }}"
php_cmd {{ parameter_dict['nextcloud'] }}/occ config:app:set spreed stun_servers --value="[\"{{ parameter_dict['stun-server'] }}\"]"
......
......@@ -86,6 +86,7 @@ template = {{ nextcloud_install_sh }}
rendered = ${directory:scripts}/nextcloud-install
context =
section parameter_dict instance-parameter
section nextcloud_apps nextcloud-apps
mode = 744
depends =
${service-redis:recipe}
......@@ -98,6 +99,11 @@ depends =
${nextcloud-config-update:recipe}
${nextcloud-install-promise:name}
[nextcloud-apps]
{% for app_name, app_location in nextcloud_apps.items() %}
{{ app_name }} = {{ app_location }}
{%endfor%}
[nextcloud-install-promise]
<= monitor-promise-base
module = check_command_execute
......
......@@ -40,6 +40,7 @@ context =
raw nextcloud_install_sh ${template-nextcloud-install.sh:location}/${template-nextcloud-install.sh:filename}
raw nextcloud_apache_httpd ${template-apache-httpd:location}/${template-apache-httpd:filename}
raw nextcloud_parameter_json ${template-nextcloud-config.json:location}/${template-nextcloud-config.json:filename}
section nextcloud_apps nextcloud-apps
[custom-application-deployment]
path = ${template-nextcloud-instance:rendered}
......@@ -50,3 +51,40 @@ recipe = hexagonit.recipe.download
url = https://github.com/nextcloud/news-updater/archive/10.0.1.tar.gz
md5sum = 37387199c0482e08d01e9294cd95eaad
strip-top-level-dir = true
[nc-download-app]
<= nc-download-base
download-only = false
strip-top-level-dir = true
[nextcloud-app-spreed]
<= nc-download-app
url = https://github.com/nextcloud/spreed/releases/download/v6.0.5/spreed-6.0.5.tar.gz
md5sum = 002c09e543edc141f6ca848782573376
[nextcloud-app-richdocuments]
<= nc-download-app
url = https://github.com/nextcloud/richdocuments/releases/download/v3.7.17/richdocuments.tar.gz
md5sum = 5559cd14a4a0a93d2a39b260538839f8
[nextcloud-app-calendar]
<= nc-download-app
url = https://github.com/nextcloud/calendar/releases/download/v1.7.3/calendar.tar.gz
md5sum = ab398d943eb6939e3e71df5b1a1abf87
[nextcloud-app-rainloop]
<= nc-download-app
url = https://github.com/pierre-alain-b/rainloop-nextcloud/releases/download/6.1.4/rainloop.tar.gz
md5sum = 7cefc3dd3bd52b42d381de7d7447691f
[nextcloud-app-news]
<= nc-download-app
url = https://github.com/nextcloud/news/releases/download/14.2.2/news.tar.gz
md5sum = d0f4b355a3609c159ed12dfa55ca5109
[nextcloud-apps]
spreed = ${nextcloud-app-spreed:location}
richdocuments = ${nextcloud-app-richdocuments:location}
calendar = ${nextcloud-app-calendar:location}
rainloop = ${nextcloud-app-rainloop:location}
news = ${nextcloud-app-news:location}
......@@ -8,7 +8,6 @@ LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule mime_module modules/mod_mime.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
......@@ -31,17 +30,6 @@ ErrorLog "{{ error_log }}"
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" combined
CustomLog "{{ access_log }}" combined
{% if uri_scheme == 'https' -%}
# SSL Configuration
SSLCertificateFile {{ certificate }}
SSLCertificateKeyFile {{ key }}
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:HIGH:!aNULL:!MD5
SSLHonorCipherOrder on
{% endif -%}
<Directory />
Options FollowSymLinks
AllowOverride None
......@@ -50,10 +38,5 @@ SSLHonorCipherOrder on
Listen {{ ipv6 }}:{{ apache_port }}
<VirtualHost *:{{ apache_port }}>
{% if uri_scheme == 'https' -%}
SSLEngine On
SSLProxyEngine On
{% endif -%}
ProxyPass / http://{{ re6st_ipv4 }}:{{ re6st_port }}/
</VirtualHost>
......@@ -14,24 +14,16 @@
# not need these here).
[template]
filename = instance.cfg.in
md5sum = 610fc6fd0444d3bab3fca4478572749a
md5sum = 01938aa1683b7994f814fff6d964b9ba
[template-re6stnet]
filename = instance-re6stnet.cfg.in
md5sum = 002f7405f565c82219b0d4b92790ff8c
md5sum = 4e4475c8ef80a3a53aa63a2ae444586d
[template-apache-conf]
filename = apache.conf.in
md5sum = 2ed3c4e9b9d58d2e57cda227bdd454d2
md5sum = 3d55f7c9c4fc7279f06bfe6313a78a4b
[template-re6st-registry-conf]
filename = re6st-registry.conf.in
md5sum = b0f0facfea82a4481f4fb5b0b263e09a
[template-wrapper]
filename = wrapper.in
md5sum = 7633bdfc0e638ff9979f963fbbca8f13
[template-registry-run]
filename = registry-run.in
md5sum = 0bf4f2c03e06b55c6c6cc55fa33e65d6
md5sum = feb4b3318f37414d1bf3d16a03aec93d
......@@ -78,6 +78,11 @@
"description": "Prevent tunnelling accross borders of listed countries",
"type": "string",
"default": ""
},
"backup-repository": {
"title": "Git backup repository",
"description": "URL of Git repository where backups are pushed. Nothing is pushed if empty.",
"type": "string"
}
}
}
{% set bin_directory = parameter_dict['bin-directory'] -%}
{% set python_bin = parameter_dict['python-executable'] -%}
{% set re6st_registry = parameter_dict['re6st-registry'] -%}
{% set re6stnet = parameter_dict['re6stnet'] -%}
{% set publish_dict = {} -%}
{% set part_list = [] -%}
{% set ipv6 = (ipv6_set | list)[0] -%}
{% set ipv4 = (ipv4_set | list)[0] -%}
{% set uri_scheme = slapparameter_dict.get('uri-scheme', 'http') -%}
{% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%}
[directory]
recipe = slapos.cookbook:mkdirectory
......@@ -19,35 +14,16 @@ log = ${:var}/log
services = ${:etc}/service
script = ${:etc}/run
run = ${:var}/run
ca-dir = ${:etc}/ssl
requests = ${:ca-dir}/requests
private = ${:ca-dir}/private
certs = ${:ca-dir}/certs
newcerts = ${:ca-dir}/newcerts
crl = ${:ca-dir}/crl
re6st = ${:srv}/res6stnet
[re6stnet-dirs]
recipe = slapos.cookbook:mkdirectory
registry = ${directory:re6st}/registry
data = ${directory:srv}/re6stnet
log = ${directory:log}/re6stnet
conf = ${directory:etc}/re6stnet
ssl = ${:conf}/ssl
token = ${:conf}/token
run = ${directory:run}/re6stnet
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = {{ openssl_bin }}/openssl
ca-dir = ${directory:ca-dir}
requests-directory = ${directory:requests}
wrapper = ${directory:services}/certificate_authority
ca-private = ${directory:private}
ca-certs = ${directory:certs}
ca-newcerts = ${directory:newcerts}
ca-crl = ${directory:crl}
[apache-conf]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-apache-conf'] }}
......@@ -64,56 +40,33 @@ context =
key access_log :access-log
key error_log :error-log
key pid_file :pid-file
raw certificate ${directory:certs}/apache.crt
raw key ${directory:private}/apache.key
raw ipv6 {{ ipv6 }}
raw uri_scheme {{ uri_scheme }}
{% set apache_wrapper = '${directory:services}/httpd' -%}
{% if uri_scheme == 'https' -%}
{% set apache_wrapper = '${directory:bin}/httpd_raw' -%}
{% endif -%}
[apache-httpd]
recipe = slapos.cookbook:wrapper
wrapper-path = {{ apache_wrapper }}
command-line = "{{ parameter_dict['apache-location'] }}/bin/httpd" -f "${apache-conf:rendered}" -DFOREGROUND
{% if uri_scheme == 'https' %}
[apache-ca]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
executable = ${apache-httpd:wrapper-path}
wrapper = ${directory:bin}/httpd
key-file = ${certificate-authority:ca-private}/apache.key
cert-file = ${certificate-authority:ca-certs}/apache.crt
[{{ section('apache-ca-service') }}]
recipe = slapos.cookbook:wrapper
command-line = ${apache-ca:wrapper}
wrapper-path = ${directory:services}/httpd
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
{% endif %}
command-line = "{{ parameter_dict['apache-location'] }}/bin/httpd" -f "${apache-conf:rendered}" -DFOREGROUND
[apache-httpd-graceful]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-wrapper'] }}
rendered = ${directory:script}/httpd-graceful
mode = 0700
context =
raw content {{ parameter_dict['apache-location'] }}/bin/httpd -Sf ${apache-conf:rendered}; if [ $? -eq 0 ]; then kill -USR1 $(cat ${apache-conf:pid-file}); fi
raw dash {{ dash_binary }}
template = inline:{{'{{content}}'}}
context = key content :script
script =
#!/bin/sh -e
{{ parameter_dict['apache-location'] }}/bin/httpd -Sf ${apache-conf:rendered}
{{ bin_directory }}/slapos-kill --pidfile ${apache-conf:pid-file} -s USR1
[logrotate-apache]
< = logrotate-entry-base
name = apache
log = ${apache-conf:error-log} ${apache-conf:access-log}
post = test ! -s ${apache-conf:pid-file} || {{ parameter_dict['bin-directory'] }}/slapos-kill --pidfile ${apache-conf:pid-file} -s USR1
post = test ! -s ${apache-conf:pid-file} || {{ bin_directory }}/slapos-kill --pidfile ${apache-conf:pid-file} -s USR1
[re6st-registry-conf-dict]
port = 9201
ipv4 = {{ ipv4 }}
ipv6 = {{ ipv6 }}
db = ${re6stnet-dirs:registry}/registry.db
db = ${re6stnet-dirs:data}/registry.db
ca = ${re6stnet-dirs:ssl}/re6stnet.crt
key = ${re6stnet-dirs:ssl}/re6stnet.key
dh = ${re6stnet-dirs:ssl}/dh.pem
......@@ -135,18 +88,35 @@ same-country = {{ slapparameter_dict.get('same-country', '') }}
[re6st-registry-conf]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-re6st-registry-conf'] }}
rendered = ${directory:etc}/re6st-registry.conf
rendered = ${re6stnet-dirs:conf}/registry.conf
context = section parameter_dict re6st-registry-conf-dict
depends = ${re6st-compat:recipe}
[re6st-compat]
recipe = slapos.recipe.build
update =
import errno, os
res6stnet = self.buildout['directory']['srv'] + '/res6stnet'
try:
os.rename(res6stnet + '/registry', self.buildout['re6stnet-dirs']['data'])
except OSError as e:
if e.errno != errno.ENOENT:
raise
else:
os.rmdir(res6stnet)
[re6st-registry-wrapper]
recipe = slapos.recipe.template:jinja2
template = {{ parameter_dict['template-registry-run'] }}
rendered = ${directory:services}/re6st-registry
pid-file = ${directory:run}/registry.pid
context =
key pid_file :pid-file
raw re6st_command {{ re6st_registry }}
key re6st_conf re6st-registry-conf:rendered
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:services}/re6st-registry
pidfile = ${directory:run}/registry.pid
command-line = {{ bin_directory }}/re6st-registry @${re6st-registry-conf:rendered}
[cron-entry-re6st-backup]
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = re6stnet-backup
time = hourly
command = {{ parameter_dict['re6stnet-backup'] }} ${logrotate-directory:backup}/re6stnet ${re6st-registry-conf-dict:db} {{ slapparameter_dict.get('backup-repository', '') }}
[re6st-registry]
recipe = slapos.cookbook:re6stnet.registry
......@@ -167,7 +137,7 @@ key-file = ${re6st-registry-conf-dict:key}
cert-file = ${re6st-registry-conf-dict:ca}
dh-file = ${re6st-registry-conf-dict:dh}
slave-instance-list = ${slap-parameter:slave_instance_list}
slave-instance-list = {{ slapparameter_dict.get('slave_instance_list', '{}') }}
environment =
PATH={{ openssl_bin }}
......@@ -181,14 +151,14 @@ command-line = "{{ python_bin }}" ${re6st-registry:manager-wrapper}
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = re6stnet-check-token
frequency = */5 * * * *
time = *:0/5
command = {{ python_bin }} ${re6st-registry:manager-wrapper}
[logrotate-entry-re6stnet]
< = logrotate-entry-base
name = re6stnet
log = ${re6st-registry-conf-dict:logfile}
post = test ! -s ${re6st-registry-wrapper:pid-file} || {{ parameter_dict['bin-directory'] }}/slapos-kill --pidfile ${re6st-registry-wrapper:pid-file} -s USR1
post = [ ! -s ${re6st-registry-wrapper:pidfile} ] || {{ bin_directory }}/slapos-kill --pidfile ${re6st-registry-wrapper:pidfile} -s USR1
[port-redirection]
recipe = slapos.recipe.template:jinja2
......@@ -214,7 +184,7 @@ name = apache-re6st-registry.py
config-hostname = ${apache-conf:ipv6}
config-port = ${apache-conf:port}
{% do publish_dict.__setitem__('re6stry-url', uri_scheme ~ '://[${apache-conf:ipv6}]:${apache-conf:port}') -%}
{% do publish_dict.__setitem__('re6stry-url', 'http://[${apache-conf:ipv6}]:${apache-conf:port}') -%}
{% do publish_dict.__setitem__('re6stry-local-url', 'http://${re6st-registry:ipv4}:${re6st-registry:port}/') -%}
{% do publish_dict.__setitem__('slave-amount', '${re6st-registry:slave-amount}') -%}
[publish]
......@@ -230,12 +200,12 @@ extends =
{{ logrotate_cfg }}
parts =
certificate-authority
logrotate-apache
logrotate-entry-re6stnet
re6stnet-manage
cron-entry-logrotate
cron-entry-re6st-manage
cron-entry-re6st-backup
apache-httpd
apache-httpd-graceful
publish
......@@ -244,12 +214,3 @@ parts =
re6st-registry-promise
apache-registry-promise
monitor-base
# Complete parts with sections
{{ part_list | join('\n ') }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[slap-parameter]
slave_instance_list = {}
......@@ -16,27 +16,21 @@ recipe = slapos.recipe.template:jinja2
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
extra-context =
context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key ipv6_set slap-configuration:ipv6
key ipv4_set slap-configuration:ipv4
key slapparameter_dict slap-configuration:configuration
key computer_id slap-configuration:computer
raw logrotate_cfg {{ template_logrotate_base }}
raw dash_binary {{ dash_location }}/bin/dash
raw openssl_bin {{ openssl_location}}/bin
${:extra-context}
[dynamic-template-re6stnet-parameters]
bin-directory = {{ bin_directory }}
python-executable = {{ python_with_eggs }}
re6st-registry = {{ bin_directory }}/re6st-registry
re6stnet = {{ bin_directory }}/re6stnet
template-apache-conf = {{ template_apache_conf }}
template-wrapper = {{ template_wrapper }}
apache-location = {{ apache_location }}
re6stnet-backup = {{ re6stnet_backup }}
template-re6st-registry-conf = {{ template_re6st_registry_conf }}
template-registry-run = {{ template_registry_run }}
[dynamic-template-re6stnet]
< = jinja2-template-base
......@@ -48,7 +42,9 @@ extra-context =
raw monitor2_template_rendered {{ monitor2_template_rendered }}
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
recipe = slapos.cookbook:switch-softwaretype
default = ${dynamic-template-re6stnet:rendered}
default = dynamic-template-re6stnet:rendered
registry = ${:default}
# BBB
RootSoftwareInstance = ${:default}
port {{ parameter_dict['port'] }}
4 {{ parameter_dict['ipv4'] }}
authorized-origin {{ parameter_dict['ipv4'] }}
# 6 {{ parameter_dict['ipv6'] }}
6 ''
db {{ parameter_dict['db'] }}
ca {{ parameter_dict['ca'] }}
key {{ parameter_dict['key'] }}
......
#!/bin/bash
echo $$ > {{ pid_file }}
exec {{ re6st_command }} @{{ re6st_conf }}
......@@ -2,13 +2,10 @@
extends =
buildout.hash.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/gzip/buildout.cfg
../../component/openssl/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/apache/buildout.cfg
../../component/pycurl/buildout.cfg
../../component/git/buildout.cfg
../../component/python-cryptography/buildout.cfg
../../stack/slapos.cfg
......@@ -17,10 +14,22 @@ extends =
parts +=
slapos-cookbook
dash
template
[re6st-eggs]
[re6stnet-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/re6stnet.git
git-executable = ${git:location}/bin/git
[re6stnet-setup-env]
PATH = ${git:location}/bin:%(PATH)s
[re6stnet-develop]
recipe = zc.recipe.egg:develop
setup = ${re6stnet-repository:location}
environment = re6stnet-setup-env
[re6stnet]
recipe = zc.recipe.egg
interpreter = python-${:_buildout_section_name_}
eggs =
......@@ -28,6 +37,33 @@ eggs =
${python-cryptography:egg}
pyOpenSSL
re6stnet
initialization =
import os
path = os.environ.get('PATH', '')
os.environ['PATH'] = '${git:location}/bin' + (path and ':' + path)
depends = ${re6stnet-develop:recipe}
[re6stnet-backup]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/re6st-backup
template =
inline:#!/bin/sh -e
PATH={{git_location}}/bin:{{sqlite3_location}}/bin:$PATH
cd "$1" || {
rm -rf "$1.new"
git init --bare "$1.new"
rm "$1.new"/description "$1.new"/hooks/*
mv "$1.new" "$1"
cd "$1"
}
h=`sqlite3 "$2" .dump |git hash-object --stdin -w`
git update-index --add --cacheinfo 0644 "$h" registry.sql
git diff --cached --quiet || GIT_WORK_TREE=$PWD GIT_DIR=$PWD git \
-c gc.auto=100 -c gc.autoDetach=false commit --allow-empty-message -qm ''
[ ! "$3" ] || git push --mirror "$3"
context =
key git_location git:location
key sqlite3_location sqlite3:location
[download-base]
recipe = slapos.recipe.build:download
......@@ -43,17 +79,15 @@ context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key apache_location apache:location
key dash_location dash:location
key logrotate_location logrotate:location
key openssl_location openssl:location
key re6stnet_backup re6stnet-backup:rendered
key template_apache_conf template-apache-conf:target
key template_re6stnet template-re6stnet:target
key template_re6st_registry_conf template-re6st-registry-conf:target
key template_logrotate_base template-logrotate-base:rendered
key template_wrapper template-wrapper:target
key template_registry_run template-registry-run:target
key monitor2_template_rendered monitor2-template:rendered
raw python_with_eggs ${buildout:bin-directory}/${re6st-eggs:interpreter}
raw python_with_eggs ${buildout:bin-directory}/${re6stnet:interpreter}
[template-re6stnet]
< = download-base
......@@ -64,15 +98,5 @@ context =
[template-re6st-registry-conf]
< = download-base
[template-wrapper]
< = download-base
[template-registry-run]
< = download-base
[versions]
re6stnet = 0.551
# Required by:
# re6stnet==0.533
miniupnpc = 1.9
......@@ -29,7 +29,6 @@ import os
import requests
import json
from slapos.recipe.librecipe import generateHashFromFiles
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
setUpModule, Re6stnetTestCase = makeModuleSetUpAndTestCaseClass(
......@@ -57,35 +56,3 @@ class TestPortRedirection(Re6stnetTestCase):
'srcPort': 9201,
'destPort': 9201,
}, portredir_config[0])
class ServicesTestCase(Re6stnetTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'uri-scheme': 'https'}
def test_hashes(self):
hash_files = [
'software_release/buildout.cfg',
]
expected_process_names = [
'httpd-{hash}-on-watch',
]
with self.slap.instance_supervisor_rpc as supervisor:
process_names = [
process['name'] for process in supervisor.getAllProcessInfo()
]
hash_files = [
os.path.join(self.computer_partition_root_path, path)
for path in hash_files
]
for name in expected_process_names:
h = generateHashFromFiles(hash_files)
expected_process_name = name.format(hash=h)
self.assertIn(expected_process_name, process_names)
#!{{ dash }}
{{ content }}
......@@ -15,7 +15,7 @@
[instance]
filename = instance.cfg.in
md5sum = ec1d3d947222354d73a94eb974f46d66
md5sum = 7cdff4ef4e8a7d1ac5f529865a7d8c6a
[yarn.lock]
filename = yarn.lock
......
......@@ -220,9 +220,9 @@ recipe = plone.recipe.command
location = $${directory:frontend-static}/$${:folder-name}
folder-name = fonts
command =
mkdir $${:location}
ln -s ${source-code-pro-fonts:location} $${:location}/source-code-pro
ln -s ${jetbrains-mono-fonts:location} $${:location}/jetbrains-mono
mkdir -p $${:location}
ln -sf ${source-code-pro-fonts:location} $${:location}/source-code-pro
ln -sf ${jetbrains-mono-fonts:location} $${:location}/jetbrains-mono
stop-on-error = true
[frontend-instance-logo]
......@@ -230,10 +230,7 @@ recipe = plone.recipe.command
filename = logo.png
full-path = $${directory:frontend-static}/$${:filename}
command =
if [ ! -e $${:full-path} ]
then
ln -s ${logo.png:output} $${:full-path}
fi
cp -f ${logo.png:output} $${:full-path}
stop-on-error = true
[frontend-instance-slapos.css]
......
......@@ -36,6 +36,6 @@ mode = 0644
depends = ${caucase-jinja2-library-eggs:eggs}
[versions]
caucase = 0.9.9
caucase = 0.9.10
pem = 21.1.0
PyJWT = 1.7.1
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