Commit 15bbe841 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

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

parents f6abc27c f5c3f092
...@@ -80,43 +80,30 @@ command = ...@@ -80,43 +80,30 @@ command =
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
md5sum = 24090ade9336a12a8fd30c5225a16267 md5sum = bc5a986c7208d02d3284a897ea90b39d
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
[template-kvm] [template-kvm]
recipe = slapos.recipe.template:jinja2 recipe = hexagonit.recipe.download
template = ${:_profile_base_location_}/instance-kvm.cfg.jinja2 url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
md5sum = 03550e647e07af99dcd2af8f4869ecbe mode = 644
rendered = ${buildout:directory}/template-kvm.cfg md5sum = e16c15f72fdeb92ce1854bc25daf5ad7
output = ${:rendered} download-only = true
context = on-update = true
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
raw curl_executable_location ${curl:location}/bin/curl
raw dash_executable_location ${dash:location}/bin/dash
raw dcron_executable_location ${dcron:location}/sbin/crond
raw debian_amd64_netinst_location ${debian-amd64-netinst.iso:location}/${debian-amd64-netinst.iso:filename}
raw novnc_location ${noVNC:location}
raw openssl_executable_location ${openssl:location}/bin/openssl
raw qemu_executable_location ${kvm:location}/bin/qemu-system-x86_64
raw qemu_img_executable_location ${kvm:location}/bin/qemu-img
raw sixtunnel_executable_location ${6tunnel:location}/bin/6tunnel
raw websockify_executable_location ${buildout:directory}/bin/websockify
mode = 0644
[template-kvm-resilient] [template-kvm-resilient]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm-resilient.cfg.jinja2 url = ${:_profile_base_location_}/instance-kvm-resilient.cfg.jinja2
mode = 644 mode = 644
md5sum = 038c338e3ce545a73393ceee38a9ac7d md5sum = a07c96b53fe9145278cd64a3b27a459a
download-only = true download-only = true
on-update = true on-update = true
[template-kvm-resilient-test] [template-kvm-resilient-test]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm-resilient-test.cfg.jinja2 url = ${:_profile_base_location_}/instance-kvm-resilient-test.cfg.jinja2
md5sum = 4057e7662ac36a4f591c17fc48e1603e md5sum = b4894680283d3912df4e9740f3e7848b
mode = 0644 mode = 0644
download-only = true download-only = true
on-update = true on-update = true
...@@ -137,11 +124,12 @@ download-only = true ...@@ -137,11 +124,12 @@ download-only = true
mode = 0755 mode = 0755
[template-kvm-export] [template-kvm-export]
recipe = slapos.recipe.template recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm-export.cfg.in url = ${:_profile_base_location_}/instance-kvm-export.cfg.jinja2
md5sum = 2f5fdf1e88e6e3454f877b80074bed05 mode = 644
output = ${buildout:directory}/template-kvm-export.cfg md5sum = 900f416956903fa4858e67e93b5169a1
mode = 0644 download-only = true
on-update = true
[template-kvm-export-script] [template-kvm-export-script]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
...@@ -164,5 +152,3 @@ url = ${:_profile_base_location_}/instance-frontend.cfg.in ...@@ -164,5 +152,3 @@ url = ${:_profile_base_location_}/instance-frontend.cfg.in
md5sum = cdb690495e9eb007d2b7d2f8e12f5c59 md5sum = cdb690495e9eb007d2b7d2f8e12f5c59
output = ${buildout:directory}/template-frontend.cfg output = ${buildout:directory}/template-frontend.cfg
mode = 0644 mode = 0644
[buildout] [buildout]
extends = ${template-kvm:output} extends =
${pbsready-export:output} {{ kvm_template }}
{{ pbsready_export_template }}
parts += parts +=
cron-entry-backup cron-entry-backup
...@@ -17,12 +18,12 @@ parts += ...@@ -17,12 +18,12 @@ parts +=
# Create the exporter executable, which is a simple shell script # Create the exporter executable, which is a simple shell script
[exporter] [exporter]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${template-kvm-export-script:location}/${template-kvm-export-script:filename} url = {{ template_kvm_export }}
output = $${directory:bin}/$${slap-parameter:namebase}-exporter output = ${directory:bin}/${slap-parameter:namebase}-exporter
mode = 0755 mode = 0755
backup-disk-path = $${directory:backup}/virtual.qcow2 backup-disk-path = ${directory:backup}/virtual.qcow2
# Resilient stack wants a "wrapper" parameter # Resilient stack wants a "wrapper" parameter
wrapper = $${:output} wrapper = ${:output}
# Extends publish section with resilient parameters # Extends publish section with resilient parameters
[publish-connection-information] [publish-connection-information]
......
...@@ -49,7 +49,7 @@ config-{{ key }} = {{ dumps(value) }} ...@@ -49,7 +49,7 @@ config-{{ key }} = {{ dumps(value) }}
{% endfor -%} {% endfor -%}
config-virtual-hard-drive-url = ${slap-parameter:virtual-hard-drive-url} config-virtual-hard-drive-url = ${slap-parameter:virtual-hard-drive-url}
config-virtual-hard-drive-md5sum = ${slap-parameter:virtual-hard-drive-md5sum} config-virtual-hard-drive-md5sum = ${slap-parameter:virtual-hard-drive-md5sum}
config-resiliency-backup-periodicity = */5 config-resiliency-backup-periodicity = */5 * * * *
# XXX What to do? # XXX What to do?
sla = computer_guid sla = computer_guid
sla-computer_guid = ${slap-connection:computer-id} sla-computer_guid = ${slap-connection:computer-id}
......
...@@ -29,13 +29,13 @@ return = ...@@ -29,13 +29,13 @@ return =
# Resilient related parameters # Resilient related parameters
url ssh-public-key ssh-url notification-id ip url ssh-public-key ssh-url notification-id ip
# KVM related parameters # KVM related parameters
backend-url url ipv6 # XXX: return ALL parameters (like nat rules), through jinja
backend-url url
[publish-connection-informations] [publish-connection-informations]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
backend-url = ${request-kvm:connection-backend-url} backend-url = ${request-kvm:connection-backend-url}
url = ${request-kvm:connection-url} url = ${request-kvm:connection-url}
ipv6 = ${request-kvm:connection-ipv6}
[kvm-frontend-url-promise] [kvm-frontend-url-promise]
# Check that url parameter is complete # Check that url parameter is complete
......
...@@ -215,7 +215,13 @@ curl_path = {{ curl_executable_location }} ...@@ -215,7 +215,13 @@ curl_path = {{ curl_executable_location }}
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
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} 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} 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}
ipv6 = ${slap-network-information:global-ipv6} # 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 -%}
[slap-parameter] [slap-parameter]
......
...@@ -7,14 +7,14 @@ develop-eggs-directory = ${buildout:develop-eggs-directory} ...@@ -7,14 +7,14 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:softwaretype recipe = slapos.cookbook:softwaretype
default = ${template-kvm:output} default = $${:kvm}
kvm = ${template-kvm:output} kvm = $${dynamic-template-kvm:rendered}
nbd = ${template-nbd:output} nbd = ${template-nbd:output}
frontend = ${template-frontend:output} frontend = ${template-frontend:output}
kvm-resilient = $${dynamic-template-kvm-resilient:rendered} kvm-resilient = $${dynamic-template-kvm-resilient:rendered}
kvm-import = ${template-kvm-import:output} kvm-import = ${template-kvm-import:output}
kvm-export = ${template-kvm-export:output} kvm-export = $${dynamic-template-kvm-export:rendered}
# Used for the test of resiliency. The system wants a "test" software_type. # Used for the test of resiliency. The system wants a "test" software_type.
test = $${dynamic-template-kvm-resilient-test:rendered} test = $${dynamic-template-kvm-resilient-test:rendered}
...@@ -30,6 +30,31 @@ url = $${slap-connection:server-url} ...@@ -30,6 +30,31 @@ url = $${slap-connection:server-url}
key = $${slap-connection:key-file} key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file} cert = $${slap-connection:cert-file}
[dynamic-template-kvm]
recipe = slapos.recipe.template:jinja2
template = ${template-kvm:location}/instance-kvm.cfg.jinja2
rendered = $${buildout:directory}/template-kvm.cfg
extensions = jinja2.ext.do
context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key slapparameter_dict slap-configuration:configuration
raw curl_executable_location ${curl:location}/bin/curl
raw dash_executable_location ${dash:location}/bin/dash
raw dcron_executable_location ${dcron:location}/sbin/crond
raw debian_amd64_netinst_location ${debian-amd64-netinst.iso:location}/${debian-amd64-netinst.iso:filename}
raw novnc_location ${noVNC:location}
raw openssl_executable_location ${openssl:location}/bin/openssl
raw qemu_executable_location ${kvm:location}/bin/qemu-system-x86_64
raw qemu_img_executable_location ${kvm:location}/bin/qemu-img
raw sixtunnel_executable_location ${6tunnel:location}/bin/6tunnel
raw websockify_executable_location ${buildout:directory}/bin/websockify
template-parts-destination = ${template-parts:destination}
template-replicated-destination = ${template-replicated:destination}
import-list = file parts :template-parts-destination
file replicated :template-replicated-destination
mode = 0644
[dynamic-template-kvm-resilient] [dynamic-template-kvm-resilient]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-kvm-resilient:location}/instance-kvm-resilient.cfg.jinja2 template = ${template-kvm-resilient:location}/instance-kvm-resilient.cfg.jinja2
...@@ -46,6 +71,19 @@ import-list = file parts :template-parts-destination ...@@ -46,6 +71,19 @@ import-list = file parts :template-parts-destination
file replicated :template-replicated-destination file replicated :template-replicated-destination
mode = 0644 mode = 0644
[dynamic-template-kvm-export]
recipe = slapos.recipe.template:jinja2
template = ${template-kvm-export:location}/instance-kvm-export.cfg.jinja2
rendered = $${buildout:directory}/template-kvm-export.cfg
extensions = jinja2.ext.do
context =
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
raw kvm_template $${dynamic-template-kvm:rendered}
raw template_kvm_export ${template-kvm-export-script:location}/${template-kvm-export-script:filename}
raw pbsready_export_template ${pbsready-export:output}
mode = 0644
[dynamic-template-kvm-resilient-test] [dynamic-template-kvm-resilient-test]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${template-kvm-resilient-test:location}/instance-kvm-resilient-test.cfg.jinja2 template = ${template-kvm-resilient-test:location}/instance-kvm-resilient-test.cfg.jinja2
......
...@@ -135,22 +135,22 @@ rdiff-backup = 1.0.5 ...@@ -135,22 +135,22 @@ rdiff-backup = 1.0.5
slapos.cookbook = 0.84.2 slapos.cookbook = 0.84.2
slapos.recipe.cmmi = 0.2 slapos.recipe.cmmi = 0.2
slapos.recipe.download = 1.0.dev-r4053 slapos.recipe.download = 1.0.dev-r4053
slapos.toolbox = 0.37.3 slapos.toolbox = 0.37.4
smmap = 0.8.2 smmap = 0.8.2
websockify = 0.5.1 websockify = 0.5.1
z3c.recipe.scripts = 1.0.1 z3c.recipe.scripts = 1.0.1
# Required by: # Required by:
# slapos.core==0.35.1 # slapos.core==0.35.1
# slapos.toolbox==0.37.3 # slapos.toolbox==0.37.4
Flask = 0.10.1 Flask = 0.10.1
# Required by: # Required by:
# slapos.toolbox==0.37.3 # slapos.toolbox==0.37.4
GitPython = 0.3.2.RC1 GitPython = 0.3.2.RC1
# Required by: # Required by:
# slapos.toolbox==0.37.3 # slapos.toolbox==0.37.4
atomize = 0.1.1 atomize = 0.1.1
# Required by: # Required by:
...@@ -158,7 +158,7 @@ atomize = 0.1.1 ...@@ -158,7 +158,7 @@ atomize = 0.1.1
ecdsa = 0.9 ecdsa = 0.9
# Required by: # Required by:
# slapos.toolbox==0.37.3 # slapos.toolbox==0.37.4
feedparser = 5.1.3 feedparser = 5.1.3
# Required by: # Required by:
...@@ -182,7 +182,7 @@ netifaces = 0.8-1 ...@@ -182,7 +182,7 @@ netifaces = 0.8-1
numpy = 1.7.1 numpy = 1.7.1
# Required by: # Required by:
# slapos.toolbox==0.37.3 # slapos.toolbox==0.37.4
paramiko = 1.12.0 paramiko = 1.12.0
# Required by: # Required by:
...@@ -195,7 +195,7 @@ pytz = 2013.7 ...@@ -195,7 +195,7 @@ pytz = 2013.7
# Required by: # Required by:
# slapos.cookbook==0.84.2 # slapos.cookbook==0.84.2
# slapos.toolbox==0.37.3 # slapos.toolbox==0.37.4
slapos.core = 0.35.1 slapos.core = 0.35.1
# Required by: # Required by:
...@@ -208,7 +208,7 @@ unittest2 = 0.5.1 ...@@ -208,7 +208,7 @@ unittest2 = 0.5.1
# Required by: # Required by:
# slapos.cookbook==0.84.2 # slapos.cookbook==0.84.2
# slapos.toolbox==0.37.3 # slapos.toolbox==0.37.4
xml-marshaller = 0.9.7 xml-marshaller = 0.9.7
# Required by: # Required by:
......
...@@ -37,7 +37,7 @@ eggs = collective.recipe.template ...@@ -37,7 +37,7 @@ eggs = collective.recipe.template
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready.cfg.in url = ${:_profile_base_location_}/pbsready.cfg.in
output = ${buildout:directory}/pbsready.cfg output = ${buildout:directory}/pbsready.cfg
#md5sum = fcb6d12fc34e7b34bb97786ef4f85f01 md5sum = 02a5f1741d6b732519c06b522dbe0d66
mode = 0644 mode = 0644
[pbsready-import] [pbsready-import]
...@@ -46,7 +46,7 @@ mode = 0644 ...@@ -46,7 +46,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-import.cfg.in url = ${:_profile_base_location_}/pbsready-import.cfg.in
output = ${buildout:directory}/pbsready-import.cfg output = ${buildout:directory}/pbsready-import.cfg
#md5sum = cb562bd954b9e809c8748d0f96de4116 md5sum = 0f953067aac3e0132f72fc7e1ed38bd4
mode = 0644 mode = 0644
[pbsready-export] [pbsready-export]
...@@ -55,7 +55,7 @@ mode = 0644 ...@@ -55,7 +55,7 @@ mode = 0644
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-export.cfg.in url = ${:_profile_base_location_}/pbsready-export.cfg.in
output = ${buildout:directory}/pbsready-export.cfg output = ${buildout:directory}/pbsready-export.cfg
md5sum = 8fb619622a08aff2321497895e04df16 md5sum = 135638b8c513c7723efb51e3d9182ae9
mode = 0644 mode = 0644
[template-pull-backup] [template-pull-backup]
...@@ -68,7 +68,7 @@ mode = 0644 ...@@ -68,7 +68,7 @@ mode = 0644
[template-replicated] [template-replicated]
recipe = slapos.recipe.download recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template-replicated.cfg.in url = ${:_profile_base_location_}/template-replicated.cfg.in
#md5sum = d2926c3dd292cb1d4fd99dd0e2211666 md5sum = 771e1ab7e7e77b35116c57bbae56ba62
mode = 0644 mode = 0644
destination = ${buildout:directory}/template-replicated.cfg.in destination = ${buildout:directory}/template-replicated.cfg.in
...@@ -91,7 +91,7 @@ output = ${buildout:directory}/instance-frozen.cfg ...@@ -91,7 +91,7 @@ output = ${buildout:directory}/instance-frozen.cfg
[resilient-web-takeover-cgi-script-download] [resilient-web-takeover-cgi-script-download]
recipe = slapos.recipe.download recipe = slapos.recipe.download
url = ${:_profile_base_location_}/resilient-web-takeover-cgi-script.py.in url = ${:_profile_base_location_}/resilient-web-takeover-cgi-script.py.in
#md5sum = md5sum = e6262c5cf9b1c4d1ea4d959fdcbe3070
mode = 0644 mode = 0644
destination = ${buildout:directory}/resilient-web-takeover-cgi-script.py.in destination = ${buildout:directory}/resilient-web-takeover-cgi-script.py.in
...@@ -100,4 +100,3 @@ destination = ${buildout:directory}/resilient-web-takeover-cgi-script.py.in ...@@ -100,4 +100,3 @@ destination = ${buildout:directory}/resilient-web-takeover-cgi-script.py.in
Jinja2 = 2.6 Jinja2 = 2.6
# ... And newer s.r.template requires Jinja2 >= 2.7 # ... And newer s.r.template requires Jinja2 >= 2.7
slapos.recipe.template = 2.4.2 slapos.recipe.template = 2.4.2
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
"title": "Remove backups 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.", "description": "Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible.",
"type": "string", "type": "string",
"default": "3B" "default": "2W"
} }
} }
} }
\ No newline at end of file
...@@ -53,10 +53,10 @@ pidfile = $${resilient-directory:pid}/$${:name}.pid ...@@ -53,10 +53,10 @@ pidfile = $${resilient-directory:pid}/$${:name}.pid
<= cron <= cron
recipe = slapos.cookbook:cron.d recipe = slapos.cookbook:cron.d
name = backup name = backup
frequency = $${slap-parameter:resiliency-backup-periodicity} * * * * frequency = $${slap-parameter:resiliency-backup-periodicity}
command = $${notifier-exporter:wrapper} command = $${notifier-exporter:wrapper}
[slap-parameter] [slap-parameter]
# in minutes, modulo 60, in cron.d format (i.e */15 is accepted). # In cron.d format (i.e things like */15 * * * * are accepted).
resiliency-backup-periodicity = 0 resiliency-backup-periodicity = 0 0 * * *
...@@ -234,7 +234,7 @@ config-notify = ${request-pbs-{{namebase}}-{{id}}:connection-notification-url} ...@@ -234,7 +234,7 @@ config-notify = ${request-pbs-{{namebase}}-{{id}}:connection-notification-url}
config-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-{{id}}-pull config-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-{{id}}-pull
config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-{{id}} config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-{{id}}
config-title = Pulling from {{namebase}} config-title = Pulling from {{namebase}}
config-remove-backup-older-than = {{ slapparameter_dict.get('remove-backup-older-than', '3B') }} config-remove-backup-older-than = {{ slapparameter_dict.get('remove-backup-older-than', '2W') }}
slave = true slave = true
sla = instance_guid sla = instance_guid
sla-instance_guid = ${request-pbs-{{namebase}}-{{id}}:instance_guid} sla-instance_guid = ${request-pbs-{{namebase}}-{{id}}:instance_guid}
......
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