Commit c4e21a4f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Merge remote-tracking branch 'origin/master' into erp5-cluster

parents 855cbfa4 0475eef9
[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
......
......@@ -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
BLAS = ${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
......@@ -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
......@@ -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
......
......@@ -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}}
{% endfor -%}
{% 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}}
{% 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
......@@ -654,7 +654,7 @@ PyXML = 0.8.5
Pympler = 0.4
StructuredText = 2.11.1
WSGIUtils = 0.7
apache-libcloud = 0.16.0
apache-libcloud = 0.17.0
astroid = 1.3.4
chardet = 2.3.0
collective.recipe.template = 1.11
......@@ -662,7 +662,7 @@ 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
......@@ -672,9 +672,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
......@@ -690,7 +690,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
......@@ -703,7 +703,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:
......@@ -711,11 +711,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:
......@@ -723,13 +727,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
......
......@@ -135,7 +135,7 @@ 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
xml-marshaller = 0.9.7
......
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