Commit 257b58dc authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Merge remote-tracking branch 'origin/erp5-cluster' into cedric.ln-erp5-cluster

parents c22d3e90 552710db
[buildout]
extends =
../gmp/buildout.cfg
../xz-utils/buildout.cfg
parts =
coreutils-output
......@@ -12,7 +13,7 @@ configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_} --enable-install-program=tr,basename,uname,cat,cp,ls
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
LDFLAGS =-Wl,--as-needed
LDFLAGS=-Wl,--as-needed -L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib
[coreutils-output]
# Shared binary location to ease migration
......
......@@ -26,12 +26,12 @@ depends =
${liberation-fonts:location}
${ipaex-fonts:location}
version = 34.0.5
version = 36.0.1
# MD5SUMs are available at :
# https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${:version}/MD5SUMS
x86 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 dfe5bc7643b3a5636e6775d236f071a5
x86-64 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 1ffca0d8ef608123f2b9b30382043b6a
x86 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-i686/en-US/firefox-${:version}.tar.bz2 b079611053993a13decefb2d5a796e41
x86-64 = http://download-installer.cdn.mozilla.net/pub/firefox/releases/${:version}/linux-x86_64/en-US/firefox-${:version}.tar.bz2 d3ba7c117b7663a3ec644acc80e73811
script =
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
......
......@@ -43,3 +43,36 @@ md5sum = 9f2acd83291a31dbe053912f4115db75
<= fonts-base
url = ftp://ftp.free.fr/mirrors/ftp.debian.org/pool/main/f/fonts-android/fonts-android_4.3.orig.tar.xz
md5sum = 2d41d5342eb5f61591ddeec5b80da74d
# Microsoft's TrueType core fonts
# non-free so not enabled by default
[msttcore-fonts]
location = ${fonts:location}/${:_buildout_section_name_}
recipe = slapos.recipe.build
script =
from zc.buildout.download import Download
d = self.options['location']
fonts = []
download = lambda x, dl=Download(self.buildout['buildout']): (
dl("http://downloads.sf.net/corefonts/%%s32.exe" %% name, md5sum=md5sum)
for md5sum, name in (x.split() for x in x.splitlines() if x))
extract = lambda x, d=d, p7z="${p7zip:location}/bin/7za": any(
subprocess.check_call((p7z, "x", "-ssc-", path, "*.ttf"), cwd=d)
for path, is_temp in x)
try: fonts += download(self.options['fonts']); os.makedirs(d); extract(fonts)
except: shutil.rmtree(d, ignore_errors=True); raise
finally: any(os.remove(path) for path, is_temp in fonts if is_temp)
slapos_promise =
slapos_update_promise = ${:slapos_promise}
fonts =
cbdc2fdd7d2ed0832795e86a8b9ee19a andale
9637df0e91703179f0723ec095a36cb5 arial
c9089ae0c3b3d0d8c4b0a95979bb9ff0 arialb
2b30de40bb5e803a0452c7715fc835d1 comic
4e412c772294403ab62fb2d247d85c60 courie
4d90016026e2da447593b41a8d8fa8bd georgi
7907c7dd6684e9bade91cff82683d9d7 impact
ed39c8ef91b9fb80f76f702568291bd5 times
0d7ea16cac6261f8513a061fbfcdb2b5 trebuc
12d2a75f8156e10607be1eaa8e8ef120 verdan
230a1d13a365b22815f502eb24d9149b webdin
......@@ -13,8 +13,8 @@ parts =
[freetype]
recipe = slapos.recipe.cmmi
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.5.4.tar.bz2
md5sum = 438585445a2f1f71c77590155fd96616
url = http://download.savannah.gnu.org/releases/freetype/freetype-2.5.5.tar.bz2
md5sum = 2a7a314927011d5030903179cf183be0
pkg_config_depends = ${zlib:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig
location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-options =
......
......@@ -4,20 +4,20 @@ extends =
../nettle/buildout.cfg
../p11-kit/buildout.cfg
../pkgconfig/buildout.cfg
../xz-utils/buildout.cfg
../lunzip/buildout.cfg
../zlib/buildout.cfg
parts = gnutls
[gpg-error]
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.17.tar.bz2
md5sum = b4f8d8b9ff14aed41f279aa844563539
url = ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.18.tar.bz2
md5sum = 12312802d2065774b787cbfc22cc04e9
[gcrypt]
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.2.tar.bz2
md5sum = b54395a93cb1e57619943c082da09d5f
url = ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.3.tar.bz2
md5sum = 4262c3aadf837500756c2051a5c4ae5e
configure-options =
--with-gpg-error-prefix=${gpg-error:location}
environment =
......@@ -26,8 +26,8 @@ environment =
[gnutls]
recipe = slapos.recipe.cmmi
url = ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.20.tar.xz
md5sum = 637ef52191bf87a597240a49cc533972
url = ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.21.tar.lz
md5sum = a653d93a5a26434474c603470cc86666
configure-options =
--disable-static
--disable-libdane
......@@ -35,7 +35,7 @@ configure-options =
--disable-crywrap
--without-tpm
environment =
PATH=${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${pkgconfig:location}/bin:${lunzip:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${nettle:location}/lib/pkgconfig:${p11-kit:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig
CPPFLAGS=-I${gmp:location}/include -I${zlib:location}/include
LDFLAGS=-L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib -Wl,-rpath=${nettle:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
......@@ -11,8 +11,8 @@ parts = haproxy
[haproxy]
recipe = slapos.recipe.cmmi
url = http://www.haproxy.org/download/1.5/src/haproxy-1.5.10.tar.gz
md5sum = 5631457ea1f84b3c0d8e5bc8015ed329
url = http://www.haproxy.org/download/1.5/src/haproxy-1.5.11.tar.gz
md5sum = 5500a79d0d2b238d4a1e9749bd0c2cb2
configure-command = true
# If the system is running on Linux 2.6, we use "linux26" as the TARGET,
# otherwise use "generic".
......
......@@ -9,14 +9,14 @@ parts =
[libreoffice-bin]
recipe = slapos.recipe.build
# here, two %s are used, first one is for directory name (eg. x86_64), and second one is for filename (eg. x86-64).
version = 4.3.4.1
version = 4.4.0.3
url = http://downloadarchive.documentfoundation.org/libreoffice/old/${:version}/rpm/%s/LibreOffice_${:version}_Linux_%s_rpm.tar.gz
# supported architectures md5sums
md5sum_x86 = 6fddbe8508fd2e6d5b942ad360013da2
md5sum_x86-64 = b3b0eab681d2cd2d22e3c065530b36c2
md5sum_x86 = ac2c90333a1b84e6ff0740560d02e8a2
md5sum_x86-64 = c2848dcc87f6d17e1a2c835a195435bb
# where office code can be found?
officedir = libreoffice4.3
officedir = libreoffice4.4
# script to install
script =
......
......@@ -20,9 +20,9 @@ parts =
[mariadb]
recipe = slapos.recipe.cmmi
version = 10.0.16
version = 10.0.17
url = https://downloads.mariadb.org/f/mariadb-${:version}/source/mariadb-${:version}.tar.gz/from/http:/ftp.osuosl.org/pub/mariadb
md5sum = 7b1a197ea5d4027833a3a2ed26fc4cae
md5sum = 3101d1e79c1b04699cde10780f959625
patch-options = -p0
patches =
${:_profile_base_location_}/mariadb_10.0.8_create_system_tables__no_test.patch#a176d491cf45fccd53ee397c70393bc4
......
......@@ -2,19 +2,19 @@
extends =
../gcc/buildout.cfg
../libatlas/buildout.cfg
../openblas/buildout.cfg
[numpy-env]
PATH = ${gcc-fortran:location}/bin:%(PATH)s
BLAS = ${libatlas:location}/lib/libcblas.a
LAPACK = ${libatlas:location}/lib/liblapack.a
ATLAS = ${libatlas:location}/lib/libatlas.a
OPENBLAS = ${openblas:location}/lib/libopenblas.so
LAPACK = ${openblas:location}/lib/libopenblas.so
ATLAS = ${openblas:location}/lib/libopenblas.so
[numpy]
recipe = zc.recipe.egg:custom
egg = numpy
environment = numpy-env
# no need to add libatlas location because they are statically linked.
rpath =
${gcc-fortran:location}/lib
${gcc-fortran:location}/lib64
${openblas:location}/lib
[buildout]
parts =
openblas
[openblas]
recipe = slapos.recipe.cmmi
url = http://github.com/xianyi/OpenBLAS/tarball/v0.2.13
md5sum = 74adf4c0d0d82bff4774be5bf2134183
configure-command = true
make-options =
PREFIX="${buildout:parts-directory}/${:_buildout_section_name_}"
BINARY="$(uname -m | grep -q x86_64 && echo 64 || echo 32)"
NO_STATIC=1
USE_OPENMP=1
USE_THREAD=1
# to build generic binary that supports multiple architecture in one binary
# DYNAMIC_ARCH=1
environment =
PATH=${gcc-fortran:location}/bin:%(PATH)s
LD_LIBRARY_PATH=${gcc-fortran:location}/lib:${gcc-fortran:location}/lib64
LDFLAGS=-Wl,-rpath=${gcc-fortran:location}/lib -Wl,-rpath=${gcc-fortran:location}/lib64
......@@ -16,8 +16,8 @@ parts =
[openssl]
recipe = slapos.recipe.cmmi
url = https://www.openssl.org/source/openssl-1.0.1k.tar.gz
md5sum = d4f002bd22a56881340105028842ae1f
url = https://www.openssl.org/source/openssl-1.0.1m.tar.gz
md5sum = d143d1555d842a069cb7cc34ba745a06
patch-binary = ${patch:location}/bin/patch
patches =
${:_profile_base_location_}/openssl-nodoc.patch#b4887a7b4e18402447bc6227d2493b92
......
[buildout]
parts =
p7zip
[p7zip]
recipe = slapos.recipe.cmmi
url = http://downloads.sf.net/project/p7zip/p7zip/${:version}/p7zip_${:version}_src_all.tar.bz2
version = 9.38.1
md5sum = 6cba8402ccab2370d3b70c5e28b3d651
configure-command = rm -r DOC
make-options =
DEST_HOME=${buildout:parts-directory}/${:_buildout_section_name_}
[buildout]
extends =
../numpy/buildout.cfg
../scipy/buildout.cfg
parts =
scikit-learn
......
......@@ -6,8 +6,8 @@ parts =
[stunnel]
recipe = slapos.recipe.cmmi
url = https://www.stunnel.org/downloads/stunnel-5.10.tar.gz
md5sum = a0edda805eb7d6ea600a230fb0979ea1
url = https://www.stunnel.org/downloads/stunnel-5.11.tar.gz
md5sum = 213df05124cda9bd0a6c9eaa0c25a48a
configure-options =
--enable-ipv6
--disable-libwrap
......
......@@ -29,5 +29,5 @@ patches =
environment =
PATH=${pkgconfig:location}/bin:${xz-utils: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
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
......@@ -36,9 +36,7 @@ class Recipe(GenericBaseRecipe):
self.mode = int(self.directory.pop('mode', '700'), 8)
def install(self):
for path in sorted(self.directory.values()):
if not os.path.exists(path):
for path in sorted(self.directory.itervalues()):
if path and not os.path.isdir(path):
os.makedirs(path, self.mode)
elif not os.path.isdir(path):
raise OSError("%s path exits, but it's not a directory.")
return []
......@@ -67,7 +67,7 @@ mode = 0644
[template-backup-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-backup-script.sh.in
md5sum = 0d8fb8ea80966af7d67ad50d50547dce
md5sum = 47b20031db3b575651d8515d5add23e6
output = ${buildout:directory}/template-backup-script.sh.in
mode = 0644
......
......@@ -29,7 +29,7 @@ if [ $RESULT -eq 0 ]
then
${coreutils-output:echo} "`${coreutils-output:date} -u`,$${:statistic_log},$${:hostname} backup success" >> $${:status_log}
${coreutils-output:rm} -f $${:statistic_log}
${findutils-output:find} rdiff-backup-data/ -name "session_statistic*" | ${coreutils-output:sort} | ${coreutils-output:tail} -n 1 | ${findutils-output:xargs} ${rdiff-backup-output:rdiff-backup} --calculate-average >> $${:statistic_log}
${findutils-output:find} rdiff-backup-data/ -maxdepth 1 -name "session_statistic*" | ${coreutils-output:sort} | ${coreutils-output:tail} -n 1 | ${findutils-output:xargs} ${rdiff-backup-output:rdiff-backup} --calculate-average >> $${:statistic_log}
else
${coreutils-output:echo} "`${coreutils-output:date} -u`,$${:statistic_log},$${:hostname} backup failed" >> $${:status_log}
fi
......
......@@ -27,7 +27,6 @@
},
"deadlock-debugger-password": {
"description": "Password for /manage_debug_threads",
"default": "random",
"type": "string"
},
"inituser-login": {
......@@ -37,12 +36,10 @@
},
"inituser-password": {
"description": "Password of the initial/rescue user",
"default": "random",
"type": "string"
},
"developer-list": {
"description": "List of logins which should get the Developper role (required to modify portal_components' content)",
"default": "inituser-login's value",
"description": "List of logins which should get the Developper role (required to modify portal_components' content), defaulting to inituser-login's value",
"items": {
"pattern": "/^\\S+$/",
"type": "string"
......@@ -62,17 +59,10 @@
"type": "object"
},
"hosts-dict": {
"description": "Hostname-to-IP mapping",
"default": {
"erp5-catalog-0": "some-ip",
"erp5-catalog-...": "some-ip",
"erp5-cloudooo": "some-ip",
"erp5-memcached-persistent": "some-ip",
"erp5-memcached-volatile": "some-ip"
},
"description": "Host entries to be used in addition to and/or overriding auto-generated ones (erp5-catalog-0, erp5-cloudooo, erp5-memcached-persistent, erp5-memcached-volatile and erp5-smtpd)",
"patternProperties": {
".*": {
"description": "An IP to which current entry will resolve",
"description": "An IP or domain name to which current entry will resolve",
"type": "string"
}
},
......@@ -220,9 +210,9 @@
"default": "daily",
"type": "string"
},
"tidstorage-timestamp-path": {
"description": "Path to backup timestamp file, occurrences of '%(backup)s' being replaced with the path to partition's srv/backup/tidstorage directory",
"default": "%(backup)s/repozo_tidstorage_timestamp.log",
"tidstorage-repozo-path": {
"description": "Directory for backup timestamp and tidstorage status files.",
"default": "~/srv/backup/tidstorage",
"type": "string"
}
},
......@@ -262,7 +252,7 @@
}
},
"type": "object"
},
}
},
"patternProperties": {
".": {
......
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Values returned by ERP5 instanciation",
"description": "Values returned by ERP5 instantiation",
"properties": {
"hosts-dict": {
"description": "Hosts mapping, including auto-generated entries",
"patternProperties": {
".*": {
"description": "IP or domain names current entry resolves to",
"type": "string"
}
},
"type": "object"
},
"site-id": {
"description": "Chosen ERP5Site object identifier",
"type": "string"
......
......@@ -59,9 +59,8 @@
"type": "integer"
},
"incremental-retention-days": {
"description": "How many days incremental backups (binlogs) must be retained, -1 meaning incremental backups are disabled and 0 meaning no expiration",
"description": "How many days incremental backups (binlogs) must be retained, -1 meaning incremental backups are disabled and 0 meaning no expiration, defaulting to full-retention-days' value",
"minimum": -1,
"default": "full-retention-days' value",
"type": "integer"
}
},
......@@ -75,19 +74,16 @@
"innodb-buffer-pool-size": {
"description": "See MariaDB documentation on innodb_buffer_pool_size",
"minimum": 0,
"default": "MariaDB's default",
"type": "integer"
},
"innodb-log-file-size": {
"description": "See MariaDB documentation on innodb_log_file_size",
"minimum": 0,
"default": "MariaDB's default",
"type": "integer"
},
"innodb-log-buffer-size": {
"description": "See MariaDB documentation on innodb_log_buffer_size",
"minimum": 0,
"default": "MariaDB's default",
"type": "integer"
},
"long-query-time": {
......
......@@ -93,7 +93,7 @@ mode = 0644
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
md5sum = 5ff1c3c0083ad7d331e9e2da7dc601cb
md5sum = 681cd5a4dddceba1e756e9aa409477a6
download-only = true
on-update = true
......@@ -101,7 +101,7 @@ on-update = true
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm-cluster.cfg.jinja2.in
mode = 644
md5sum = 9dc4b77be3d350b41baaf57d147e07e2
md5sum = 0d51e71a7967ead2f88e11cc797037a4
download-only = true
on-update = true
......
......@@ -9,7 +9,7 @@
"title": "Frontend Instance ID",
"description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
"type": "string",
"default": "SOFTINST-11031"
"default": ""
},
"frontend-software-type": {
"title": "Frontend Software Type",
......@@ -26,6 +26,97 @@
},
"type": "object"
},
"slave-frontend": {
"instance-guid": {
"title": "Main Frontend Instance ID",
"description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
"type": "string",
"default": ""
},
"frontend-software-type": {
"title": "Frontend Software Type",
"description": "Type of the frontend instance, like \"frontend\".",
"type": "string",
"default": "default"
},
"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"
},
"slave-frontend-dict": {
"description": "kvm instances definition",
"patternProperties": {
".*": {
"properties": {
"domain": {
"title": "Name of the domain to be used",
"description": "Name of the domain to be used (example: mydomain.com). Subdomains of this domain will be used for the slave instances (example: instance12345.mydomain.com).",
"type": "string",
"format": "uri",
"default": ""
},
"url": {
"title": "URL of backend to use.",
"description": "URL of backend to use. This URL will be used to request frontend if parameter 'kvm-partition-name' is not set.",
"format": "uri",
"type": "string",
"default": ""
},
"enable-cache": {
"title": "Specify if cached will be used for this slave frontend.",
"description": "Specify if slave frontend should use a squid to connect to backend.",
"type": "boolean",
"default": false
},
"type": {
"title": "Specify if slave frontend will redirect to a zope backend.",
"description": "If specified, Apache RewriteRule will use Zope's Virtual Host Daemon. Possible values: 'zope', 'default'.",
"type": "string",
"default": "default"
},
"zope-path": {
"title": "Specify path to the VirtualHostRoot of the zope.",
"description": "Only used if type is 'zope'. Will append the specified path to the VirtualHostRoot of the zope's VirtualHostMonster.",
"type": "string",
"default": ""
},
"https-only": {
"title": "Specify if website should be accessed using https only.",
"description": "Specify if website should be accessed using https only. If so, the frontend will redirect the user to https if accessed from http.",
"type": "boolean",
"default": false
},
"kvm-partition-name": {
"title": "Reference name in 'kvm-partition-dict' to get IPv6 for slave frontend from.",
"description": "Only work if 'use-nat' is true and 'service-port' is set. This will allow to get URL from defined nat-rules. Play the same as url.",
"type": "string",
"default": ""
},
"service-port": {
"allOf": [{
"$ref": "#/definitions/tcpv4port"
}, {
"title": "Specify the port of service to run in VM.",
"description": "This will allow to get URL from defined nat-rules. The port should exist in nat-rules of KVM referenced by 'kvm-partition-name'"
}]
},
"url-scheme": {
"title": "Say If HTTP service to run into the Virtual Machine will use http or https.",
"description": "Say If HTTP service to run into the Virtual Machine will use http or https. Possible values: http, https",
"type": "string",
"default": "http"
}
},
"type": "object"
}
},
"type": "object"
},
"type": "object"
},
"kvm-partition-dict": {
"description": "kvm instances definition",
"patternProperties": {
......@@ -121,7 +212,8 @@
"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 comma-separated list of ports. For each port specified, it will redirect port x of the VM (example: 80) to the port x + 10000 of the public IPv6 (example: 10080). Defaults to \"22 80 443\". Ignored if \"use-tap\" parameter is enabled.",
"type": "string"
"type": "array",
"default": [22, 80, 443]
}
},
"type": "object"
......
{% set publish_dict = {} -%}
{% set frontend_dict = slapparameter_dict.get('frontend', {}) -%}
{% set slave_frontend_dict = slapparameter_dict.get('slave-frontend', {}) -%}
{% set slave_frontend_sr = slave_frontend_dict.get('software-url', 'http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg') -%}
{% set slave_frontend_stype = slave_frontend_dict.get('software-type', 'default') -%}
{% set slave_frontend_iguid = slave_frontend_dict.get('instance-guid', '') -%}
{% set kvm_instance_dict = {} -%}
[request-common]
recipe = slapos.cookbook:request
......@@ -14,6 +19,7 @@ config-use-ipv6 = {{ dumps(slapparameter_dict.get('use-ipv6', False)) }}
# Request kvm instances
{% for instance_name, kvm_parameter_dict in slapparameter_dict.get('kvm-partition-dict', {'kvm-default': {}}).items() -%}
{% set section = 'request-' ~ instance_name -%}
{% set use_nat = kvm_parameter_dict.get('use-nat', True) -%}
[{{ section }}]
<= request-common
software-type = kvm
......@@ -35,7 +41,8 @@ config-cpu-count = {{ dumps(kvm_parameter_dict.get('cpu-count', 1)) }}
{% set nat_rules_list = kvm_parameter_dict.get('nat-rules', [22, 80, 443]) -%}
config-nat-rules = {{ nat_rules_list | join(' ') }}
config-use-nat = {{ dumps(kvm_parameter_dict.get('use-nat', True)) }}
config-publish-nat-url = True
config-use-nat = {{ use_nat }}
config-use-tap = {{ dumps(kvm_parameter_dict.get('use-tap', False)) }}
config-virtual-hard-drive-url = {{ dumps(kvm_parameter_dict.get('virtual-hard-drive-url', '')) }}
config-virtual-hard-drive-md5sum = {{ dumps(kvm_parameter_dict.get('virtual-hard-drive-md5sum', '')) }}
......@@ -43,8 +50,59 @@ config-virtual-hard-drive-gzipped = {{ dumps(kvm_parameter_dict.get('virtual-har
return =
backend-url
url
{% if use_nat -%}
{% for port in nat_rules_list -%}
{{ ' ' }}nat-rule-url-{{ port }}
{% endfor -%}
{% endif -%}
{% do publish_dict.__setitem__(instance_name ~ '-backend-url', '${' ~ section ~ ':connection-backend-url}') -%}
{% do publish_dict.__setitem__(instance_name ~ '-url', '${' ~ section ~ ':connection-url}') -%}
{% do kvm_instance_dict.__setitem__(instance_name, (kvm_parameter_dict.get('use-nat', True), nat_rules_list)) -%}
{% endfor %}
#request custom kvm frontend
{% for frontend_name, frontend_parameter_dict in slave_frontend_dict.get('slave-frontend-dict', {}).items() -%}
{% set name = frontend_name -%}
{% set url = frontend_parameter_dict.get('url', '') -%}
{% set error = '' -%}
{% if frontend_parameter_dict.get('kvm-partition-name', '') != '' -%}
{% set kvm_name = frontend_parameter_dict['kvm-partition-name'] -%}
{% set service_port = frontend_parameter_dict['service-port'] -%}
{% if kvm_name in kvm_instance_dict.keys() and not kvm_instance_dict[kvm_name][0] -%}
{% set error = "You should set parameter use-nat to 'true' for '" ~ kvm_name ~ "', or provide url to use for frontend." -%}
{% elif kvm_name in kvm_instance_dict.keys() and service_port in kvm_instance_dict[kvm_name][1] -%}
{% set url = '${request-' ~ kvm_name ~ ':connection-nat-rule-url-' ~ service_port ~ '}' -%}
{% set url = frontend_parameter_dict.get('url-scheme', 'http') ~ '://' ~ url -%}
{% else -%}
{% set error = kvm_name ~ " and/or port " ~ service_port ~ " doesn't match any KVM name and/or related nat-rules in your request parameters." -%}
{% endif -%}
{% endif -%}
{% set section = 'request-' ~ name ~ '-slave-frontend' -%}
[{{ section }}]
<= request-common
recipe = slapos.cookbook:request
software-url = {{ slave_frontend_sr }}
name = Frontend {{ name }}
software-type = {{ slave_frontend_stype }}
slave = true
config-url = {{ url }}
config-domain = {{ dumps(frontend_parameter_dict.get('domain', '')) }}
config-enable_cache = {{ dumps(frontend_parameter_dict.get('enable-cache', False)) }}
config-https-only = {{ dumps(frontend_parameter_dict.get('https-only', False)) }}
{% if frontend_parameter_dict.get('type', '') -%}
config-type = {{ dumps(frontend_parameter_dict['type']) }}
{% if frontend_parameter_dict.get('path', '') -%}
config-path = {{ dumps(frontend_parameter_dict['path']) }}
{% endif -%}
{% endif -%}
return =
site_url
sla-instance_guid = {{ slave_frontend_iguid }}
{% do publish_dict.__setitem__(name ~ '-url', '${' ~ section ~ ':connection-site_url}') -%}
{% if error != '' -%}
{% do publish_dict.__setitem__('1_error', error) -%}
{% endif -%}
{% endfor %}
[publish]
......
......@@ -227,15 +227,21 @@ curl_path = {{ curl_executable_location }}
[publish-connection-information]
recipe = slapos.cookbook:publish
ipv6 = ${slap-network-information:global-ipv6}
backend-url = https://[${novnc-instance:ip}]:${novnc-instance:port}/vnc_auto.html?host=[${novnc-instance:ip}]&port=${novnc-instance:port}&encrypt=1&password=${kvm-instance:vnc-passwd}
url = ${request-slave-frontend:connection-url}/vnc_auto.html?host=${request-slave-frontend:connection-domainname}&port=${request-slave-frontend:connection-port}&encrypt=1&path=${request-slave-frontend:connection-resource}&password=${kvm-instance:vnc-passwd}
{% if slapparameter_dict.get('use-nat', 'True') == 'True' -%}
# Publish NAT port mapping status
# XXX: hardcoded value from [slap-parameter]
{% set nat_rule_list = slapparameter_dict.get('nat-rules', '22 80 443') %}
{% for port in nat_rule_list.split(' ') -%}
{% set external_port = 10000 + port|int() -%}
nat-rule-port-{{port}} = ${slap-network-information:global-ipv6} : {{external_port}}
{% set external_port = 10000 + port|int() -%}
nat-rule-port-{{port}} = ${slap-network-information:global-ipv6} : {{external_port}}
{% if slapparameter_dict.get('publish-nat-url', False) -%}
nat-rule-url-{{port}} = [${slap-network-information:global-ipv6}]:{{external_port}}
{% endif -%}
{% endfor -%}
{% endif -%}
[slap-parameter]
......
......@@ -2,6 +2,9 @@
extends = common.cfg
[versions]
# XXX - use websockify = 0.5.1 for compatibility with kvm frontend
websockify = 0.5.1
PyRSS2Gen = 1.1
apache-libcloud = 0.16.0
cns.recipe.symlink = 0.2.3
......@@ -15,7 +18,6 @@ slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.6
slapos.toolbox = 0.46.1
smmap = 0.9.0
websockify = 0.6.0
z3c.recipe.scripts = 1.0.1
# Required by:
......@@ -35,7 +37,7 @@ feedparser = 5.1.3
lockfile = 0.10.2
# Required by:
# websockify==0.6.0
# websockify==0.5.1
numpy = 1.9.1
# Required by:
......
......@@ -44,3 +44,7 @@ lockfile = 0.10.2
# Required by:
# slapos.toolbox==0.47.3
paramiko = 1.15.2
# Required by:
# slapos.toolbox==0.47.3
rpdb = 0.1.5
......@@ -310,7 +310,7 @@ md5sum = 0b50370b706f5073e5e63312d0e6dbc5
[template-zeo]
< = download-base
filename = instance-zeo.cfg.in
md5sum = cc91f5a4778153dc1d34398b9a80150d
md5sum = 9670cf63099e2c520017a23defff51a4
[template-zope]
< = download-base
......@@ -669,15 +669,15 @@ PyXML = 0.8.5
Pympler = 0.4
StructuredText = 2.11.1
WSGIUtils = 0.7
apache-libcloud = 0.16.0
astroid = 1.3.4
apache-libcloud = 0.17.0
astroid = 1.3.6
chardet = 2.3.0
collective.recipe.template = 1.11
csp-eventlet = 0.7.0
ecdsa = 0.13
elementtree = 1.2.6.post20050316
erp5diff = 0.8.1.5
eventlet = 0.16.1
eventlet = 0.17.1
five.formlib = 1.0.4
five.localsitemanager = 2.0.5
gitdb = 0.6.4
......@@ -687,9 +687,9 @@ httplib2 = 0.9
huBarcode = 1.0.0
interval = 1.0.0
ipdb = 0.8
ipython = 2.3.1
ipython = 3.0.0
logilab-common = 0.63.2
numpy = 1.9.1
numpy = 1.9.2
plone.recipe.command = 1.1
ply = 3.4
polib = 1.0.6
......@@ -697,7 +697,7 @@ pprofile = 1.7.2
pycountry = 1.10
pycrypto = 2.6.1
pyflakes = 0.8.1
pylint = 1.4.1
pylint = 1.4.3
python-ldap = 2.4.19
python-magic = 0.4.6
python-memcached = 1.53
......@@ -705,7 +705,7 @@ qrcode = 5.1
restkit = 4.2.2
rtjp-eventlet = 0.3.2
slapos.recipe.template = 2.6
slapos.toolbox = 0.47.1
slapos.toolbox = 0.47.3
smmap = 0.9.0
socketpool = 0.5.3
spyne = 2.11.0
......@@ -718,7 +718,7 @@ validictory = 1.0.0
xupdate-processor = 0.4
# Required by:
# slapos.toolbox==0.47.1
# slapos.toolbox==0.47.3
GitPython = 0.3.6
# Required by:
......@@ -726,11 +726,15 @@ GitPython = 0.3.6
Products.ZSQLMethods = 2.13.4
# Required by:
# slapos.toolbox==0.47.1
# slapos.toolbox==0.47.3
atomize = 0.2.0
# Required by:
# slapos.toolbox==0.47.1
# apache-libcloud==0.17.0
backports.ssl-match-hostname = 3.4.0.2
# Required by:
# slapos.toolbox==0.47.3
feedparser = 5.1.3
# Required by:
......@@ -738,13 +742,17 @@ feedparser = 5.1.3
fpconst = 0.7.2
# Required by:
# slapos.toolbox==0.47.1
# slapos.toolbox==0.47.3
lockfile = 0.10.2
# Required by:
# slapos.toolbox==0.47.1
# slapos.toolbox==0.47.3
paramiko = 1.15.2
# Required by:
# slapos.toolbox==0.47.3
rpdb = 0.1.5
# Required by:
# zope.app.testing==3.8.1
zope.app.debug = 3.4.1
......
{% set next_port = slapparameter_dict['tcpv4-port'] -%}
{% set ipv4 = (ipv4_set | list)[0] -%}
{% set backup_periodicity = slapparameter_dict.get('backup-periodicity', 'daily') -%}
{% set default_tidstorage_timestamp_path = slapparameter_dict.get('tidstorage-timestamp-path', buildout_directory ~ '/srv/backup/tidstorage') -%}
{% set part_list = [] -%}
{% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%}
{% set storage_dict = {} -%}
......@@ -69,6 +68,7 @@ path = ${directory:promises}/zeo-{{ family }}
{% if backup_periodicity == 'never' -%}
{% set known_tid_storage_identifier_dict = () %}
{% set tidstorage_repozo_path = '' -%}
{% else -%}
[tidstorage]
recipe = slapos.cookbook:tidstorage
......@@ -76,11 +76,13 @@ known-tid-storage-identifier-dict = {{ dumps(known_tid_storage_identifier_dict)
configuration-path = ${directory:etc}/tidstorage.py
ip = {{ ipv4 }}
port = {{ tidstorage_port }}
timestamp-file-path = {{ dumps(slapparameter_dict.get('tidstorage-timestamp-path', '%(backup)s/repozo_tidstorage_timestamp.log') % {'backup': default_tidstorage_timestamp_path}) }}
{% set tidstorage_repozo_path = slapparameter_dict.get('tidstorage-repozo-path', buildout_directory ~ '/srv/backup/tidstorage') -%}
timestamp-file-path = {{ tidstorage_repozo_path ~ '/repozo_tidstorage_timestamp.log' }}
{# BBB: recipe requires logfile-name for nothing because tidstorage runs in foreground mode -#}
logfile-name =
pidfile-name = ${directory:run}/tidstorage.pid
status-file = ${directory:tidstorage}/tidstorage.tid
{# TODO: Add support for backup status file, so that the status file can be close to the ZODB (rather than close to the backup files). And do it efficiently, to not copy the whole status file every time. -#}
status-file = {{ tidstorage_repozo_path ~ '/tidstorage.tid' }}
tidstorage-repozo-binary = {{ bin_directory }}/tidstorage_repozo
tidstoraged-binary = {{ bin_directory }}/tidstoraged
repozo-binary = {{ bin_directory }}/repozo
......@@ -181,7 +183,7 @@ log = ${:var}/log
run = ${:var}/run
backup-zodb = {{ default_backup_path }}
zodb = {{ default_zodb_path }}
tidstorage = {{ default_tidstorage_timestamp_path }}
tidstorage = {{ tidstorage_repozo_path }}
[buildout]
extends = {{ logrotate_cfg }}
......
......@@ -113,31 +113,32 @@ Jinja2 = 2.7.3
MarkupSafe = 0.23
Werkzeug = 0.10.1
buildout-versions = 1.7
cffi = 0.8.6
cffi = 0.9.2
collective.recipe.template = 1.11
cmd2 = 0.6.8
cryptography = 0.7.2
cryptography = 0.8
inotifyx = 0.2.2
itsdangerous = 0.24
lxml = 3.4.1
lxml = 3.4.2
meld3 = 1.0.0
mr.developer = 1.31
netaddr = 0.7.13
pbr = 0.10.7
pbr = 0.10.8
prettytable = 0.7.2
psutil = 2.2.1
pyOpenSSL = 0.14
pyparsing = 2.0.3
pytz = 2014.10
requests = 2.5.1
requests = 2.6.0
setuptools = 12.0.4
simplejson = 3.6.5
six = 1.9.0
slapos.cookbook = 0.95
slapos.core = 1.3.8
slapos.libnetworkcache = 0.14.2
slapos.recipe.build = 0.18
slapos.recipe.build = 0.20
slapos.recipe.cmmi = 0.2
stevedore = 1.2.0
stevedore = 1.3.0
xml-marshaller = 0.9.7
# Required by:
......@@ -145,16 +146,16 @@ xml-marshaller = 0.9.7
Flask = 0.10.1
# Required by:
# cliff==1.9.0
# stevedore==1.2.0
# cliff==1.10.1
# stevedore==1.3.0
argparse = 1.3.0
# Required by:
# slapos.core==1.3.8
cliff = 1.9.0
cliff = 1.10.1
# Required by:
# cryptography==0.7.2
# cryptography==0.8
enum34 = 1.0.4
# Required by:
......@@ -170,15 +171,15 @@ lock-file = 2.0
netifaces = 0.10.4
# Required by:
# pbr==0.10.7
# pbr==0.10.8
pip = 6.0.8
# Required by:
# cryptography==0.7.2
# cryptography==0.8
pyasn1 = 0.1.7
# Required by:
# cffi==0.8.6
# cffi==0.9.2
pycparser = 2.10
# Required by:
......
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