Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
slapos
Commits
15bbe841
Commit
15bbe841
authored
Nov 08, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into erp5-component
parents
f6abc27c
f5c3f092
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
92 additions
and
62 deletions
+92
-62
software/kvm/common.cfg
software/kvm/common.cfg
+15
-29
software/kvm/instance-kvm-export.cfg.jinja2
software/kvm/instance-kvm-export.cfg.jinja2
+7
-6
software/kvm/instance-kvm-resilient-test.cfg.jinja2
software/kvm/instance-kvm-resilient-test.cfg.jinja2
+1
-1
software/kvm/instance-kvm-resilient.cfg.jinja2
software/kvm/instance-kvm-resilient.cfg.jinja2
+2
-2
software/kvm/instance-kvm.cfg.jinja2
software/kvm/instance-kvm.cfg.jinja2
+7
-1
software/kvm/instance.cfg.in
software/kvm/instance.cfg.in
+41
-3
software/kvm/software.cfg
software/kvm/software.cfg
+8
-8
stack/resilient/buildout.cfg
stack/resilient/buildout.cfg
+5
-6
stack/resilient/parameter-schema.json
stack/resilient/parameter-schema.json
+2
-2
stack/resilient/pbsready-export.cfg.in
stack/resilient/pbsready-export.cfg.in
+3
-3
stack/resilient/template-replicated.cfg.in
stack/resilient/template-replicated.cfg.in
+1
-1
No files found.
software/kvm/common.cfg
View file @
15bbe841
...
...
@@ -80,43 +80,30 @@ command =
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
md5sum =
24090ade9336a12a8fd30c5225a16267
md5sum =
bc5a986c7208d02d3284a897ea90b39d
output = ${buildout:directory}/template.cfg
mode = 0644
[template-kvm]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
md5sum = 03550e647e07af99dcd2af8f4869ecbe
rendered = ${buildout:directory}/template-kvm.cfg
output = ${:rendered}
context =
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
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
md5sum = e16c15f72fdeb92ce1854bc25daf5ad7
download-only = true
on-update = true
[template-kvm-resilient]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm-resilient.cfg.jinja2
mode = 644
md5sum =
038c338e3ce545a73393ceee38a9ac7d
md5sum =
a07c96b53fe9145278cd64a3b27a459a
download-only = true
on-update = true
[template-kvm-resilient-test]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm-resilient-test.cfg.jinja2
md5sum =
4057e7662ac36a4f591c17fc48e1603e
md5sum =
b4894680283d3912df4e9740f3e7848b
mode = 0644
download-only = true
on-update = true
...
...
@@ -137,11 +124,12 @@ download-only = true
mode = 0755
[template-kvm-export]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm-export.cfg.in
md5sum = 2f5fdf1e88e6e3454f877b80074bed05
output = ${buildout:directory}/template-kvm-export.cfg
mode = 0644
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm-export.cfg.jinja2
mode = 644
md5sum = 900f416956903fa4858e67e93b5169a1
download-only = true
on-update = true
[template-kvm-export-script]
recipe = hexagonit.recipe.download
...
...
@@ -164,5 +152,3 @@ url = ${:_profile_base_location_}/instance-frontend.cfg.in
md5sum = cdb690495e9eb007d2b7d2f8e12f5c59
output = ${buildout:directory}/template-frontend.cfg
mode = 0644
software/kvm/instance-kvm-export.cfg.
in
→
software/kvm/instance-kvm-export.cfg.
jinja2
View file @
15bbe841
[buildout]
extends = ${template-kvm:output}
${pbsready-export:output}
extends =
{{ kvm_template }}
{{ pbsready_export_template }}
parts +=
cron-entry-backup
...
...
@@ -17,12 +18,12 @@ parts +=
# Create the exporter executable, which is a simple shell script
[exporter]
recipe = slapos.recipe.template
url =
${template-kvm-export-script:location}/${template-kvm-export-script:filename
}
output = $
${directory:bin}/$
${slap-parameter:namebase}-exporter
url =
{{ template_kvm_export }
}
output = $
{directory:bin}/
${slap-parameter:namebase}-exporter
mode = 0755
backup-disk-path = $
$
{directory:backup}/virtual.qcow2
backup-disk-path = ${directory:backup}/virtual.qcow2
# Resilient stack wants a "wrapper" parameter
wrapper = $
$
{:output}
wrapper = ${:output}
# Extends publish section with resilient parameters
[publish-connection-information]
...
...
software/kvm/instance-kvm-resilient-test.cfg.jinja2
View file @
15bbe841
...
...
@@ -49,7 +49,7 @@ config-{{ key }} = {{ dumps(value) }}
{% endfor -%}
config-virtual-hard-drive-url = ${slap-parameter:virtual-hard-drive-url}
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?
sla = computer_guid
sla-computer_guid = ${slap-connection:computer-id}
...
...
software/kvm/instance-kvm-resilient.cfg.jinja2
View file @
15bbe841
...
...
@@ -29,13 +29,13 @@ return =
# Resilient related parameters
url ssh-public-key ssh-url notification-id ip
# KVM related parameters
backend-url url ipv6
# XXX: return ALL parameters (like nat rules), through jinja
backend-url url
[publish-connection-informations]
recipe = slapos.cookbook:publish
backend-url = ${request-kvm:connection-backend-url}
url = ${request-kvm:connection-url}
ipv6 = ${request-kvm:connection-ipv6}
[kvm-frontend-url-promise]
# Check that url parameter is complete
...
...
software/kvm/instance-kvm.cfg.jinja2
View file @
15bbe841
...
...
@@ -215,7 +215,13 @@ curl_path = {{ curl_executable_location }}
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}
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]
...
...
software/kvm/instance.cfg.in
View file @
15bbe841
...
...
@@ -7,14 +7,14 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = $
{template-kvm:output
}
kvm = $
{template-kvm:output
}
default = $
${:kvm
}
kvm = $
${dynamic-template-kvm:rendered
}
nbd = ${template-nbd:output}
frontend = ${template-frontend:output}
kvm-resilient = $${dynamic-template-kvm-resilient:rendered}
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.
test = $${dynamic-template-kvm-resilient-test:rendered}
...
...
@@ -30,6 +30,31 @@ url = $${slap-connection:server-url}
key = $${slap-connection:key-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]
recipe = slapos.recipe.template:jinja2
template = ${template-kvm-resilient:location}/instance-kvm-resilient.cfg.jinja2
...
...
@@ -46,6 +71,19 @@ import-list = file parts :template-parts-destination
file replicated :template-replicated-destination
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]
recipe = slapos.recipe.template:jinja2
template = ${template-kvm-resilient-test:location}/instance-kvm-resilient-test.cfg.jinja2
...
...
software/kvm/software.cfg
View file @
15bbe841
...
...
@@ -135,22 +135,22 @@ rdiff-backup = 1.0.5
slapos.cookbook = 0.84.2
slapos.recipe.cmmi = 0.2
slapos.recipe.download = 1.0.dev-r4053
slapos.toolbox = 0.37.
3
slapos.toolbox = 0.37.
4
smmap = 0.8.2
websockify = 0.5.1
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.35.1
# slapos.toolbox==0.37.
3
# slapos.toolbox==0.37.
4
Flask = 0.10.1
# Required by:
# slapos.toolbox==0.37.
3
# slapos.toolbox==0.37.
4
GitPython = 0.3.2.RC1
# Required by:
# slapos.toolbox==0.37.
3
# slapos.toolbox==0.37.
4
atomize = 0.1.1
# Required by:
...
...
@@ -158,7 +158,7 @@ atomize = 0.1.1
ecdsa = 0.9
# Required by:
# slapos.toolbox==0.37.
3
# slapos.toolbox==0.37.
4
feedparser = 5.1.3
# Required by:
...
...
@@ -182,7 +182,7 @@ netifaces = 0.8-1
numpy = 1.7.1
# Required by:
# slapos.toolbox==0.37.
3
# slapos.toolbox==0.37.
4
paramiko = 1.12.0
# Required by:
...
...
@@ -195,7 +195,7 @@ pytz = 2013.7
# Required by:
# slapos.cookbook==0.84.2
# slapos.toolbox==0.37.
3
# slapos.toolbox==0.37.
4
slapos.core = 0.35.1
# Required by:
...
...
@@ -208,7 +208,7 @@ unittest2 = 0.5.1
# Required by:
# slapos.cookbook==0.84.2
# slapos.toolbox==0.37.
3
# slapos.toolbox==0.37.
4
xml-marshaller = 0.9.7
# Required by:
...
...
stack/resilient/buildout.cfg
View file @
15bbe841
...
...
@@ -37,7 +37,7 @@ eggs = collective.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready.cfg.in
output = ${buildout:directory}/pbsready.cfg
#md5sum = fcb6d12fc34e7b34bb97786ef4f85f01
md5sum = 02a5f1741d6b732519c06b522dbe0d66
mode = 0644
[pbsready-import]
...
...
@@ -46,7 +46,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-import.cfg.in
output = ${buildout:directory}/pbsready-import.cfg
#md5sum = cb562bd954b9e809c8748d0f96de4116
md5sum = 0f953067aac3e0132f72fc7e1ed38bd4
mode = 0644
[pbsready-export]
...
...
@@ -55,7 +55,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-export.cfg.in
output = ${buildout:directory}/pbsready-export.cfg
md5sum =
8fb619622a08aff2321497895e04df16
md5sum =
135638b8c513c7723efb51e3d9182ae9
mode = 0644
[template-pull-backup]
...
...
@@ -68,7 +68,7 @@ mode = 0644
[template-replicated]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template-replicated.cfg.in
#md5sum = d2926c3dd292cb1d4fd99dd0e2211666
md5sum = 771e1ab7e7e77b35116c57bbae56ba62
mode = 0644
destination = ${buildout:directory}/template-replicated.cfg.in
...
...
@@ -91,7 +91,7 @@ output = ${buildout:directory}/instance-frozen.cfg
[resilient-web-takeover-cgi-script-download]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/resilient-web-takeover-cgi-script.py.in
#md5sum =
md5sum = e6262c5cf9b1c4d1ea4d959fdcbe3070
mode = 0644
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
# ... And newer s.r.template requires Jinja2 >= 2.7
slapos.recipe.template = 2.4.2
stack/resilient/parameter-schema.json
View file @
15bbe841
...
...
@@ -29,7 +29,7 @@
"title"
:
"Remove backups older than..."
,
"description"
:
"Remove all the backups in PBS that are older than specified value. It should be rdiff-backup-compatible."
,
"type"
:
"string"
,
"default"
:
"
3B
"
"default"
:
"
2W
"
}
}
}
\ No newline at end of file
}
stack/resilient/pbsready-export.cfg.in
View file @
15bbe841
...
...
@@ -53,10 +53,10 @@ pidfile = $${resilient-directory:pid}/$${:name}.pid
<= cron
recipe = slapos.cookbook:cron.d
name = backup
frequency = $${slap-parameter:resiliency-backup-periodicity}
* * * *
frequency = $${slap-parameter:resiliency-backup-periodicity}
command = $${notifier-exporter:wrapper}
[slap-parameter]
#
in minutes, modulo 60, in cron.d format (i.e */15 is
accepted).
resiliency-backup-periodicity = 0
#
In cron.d format (i.e things like */15 * * * * are
accepted).
resiliency-backup-periodicity = 0
0 * * *
stack/resilient/template-replicated.cfg.in
View file @
15bbe841
...
...
@@ -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-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-{{id}}
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
sla = instance_guid
sla-instance_guid = ${request-pbs-{{namebase}}-{{id}}:instance_guid}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment