instance-kvm-resilient-test.cfg.jinja2 2.95 KB
Newer Older
1 2 3 4 5 6 7
[buildout]

eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true

parts =
8
  request-resilient-instance
9 10
  deploy-unit-test
  deploy-scalability-test
11 12 13 14 15 16 17 18 19 20 21 22 23

[directory]
recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory}
etc = ${:home}/etc/
var = ${:home}/var/
srv = ${:home}/srv/
bin = ${:home}/bin/
tmp = ${:home}/tmp/
log = ${:var}/log/
services = ${:etc}/service/
scripts = ${:etc}/run/

24
[deploy-scalability-test]
25
recipe = slapos.cookbook:wrapper
26 27
# XXX: put it in etc/run in case of scalability test so that it runs automatically.
wrapper-path = ${directory:bin}/runKVMResiliencyTestSuite
28
testnode-parameters = --test-result-path={{ slapparameter_dict.get('test-result-path') }} --revision={{ slapparameter_dict.get('test-suite-revision') }} --node-title={{ slapparameter_dict.get('scalability-launcher-title') }} --test-suite={{ slapparameter_dict.get('test-suite') }} --test-suite-master-url={{ slapparameter_dict.get('test-suite-master-url') }} --log-path=${directory:log}
29 30
test-parameters = server_url=${slap-connection:server-url} key_file=${slap-connection:key-file} cert_file=${slap-connection:cert-file} computer_id=${slap-connection:computer-id} partition_id=${slap-connection:partition-id} software=${slap-connection:software-release-url} namebase=kvm root_instance_name='${request-resilient-kvm:name}'
command-line = {{ bin_directory }}/runResiliencyScalabilityTestNode ${:testnode-parameters} ${:test-parameters}
31

32 33
[deploy-unit-test]
recipe = collective.recipe.template
34
test-parameters = server_url=${slap-connection:server-url} key_file=${slap-connection:key-file} cert_file=${slap-connection:cert-file} computer_id=${slap-connection:computer-id} partition_id=${slap-connection:partition-id} software=${slap-connection:software-release-url} namebase=kvm root_instance_name='${request-resilient-kvm:name}'
35 36
input = inline:
  #!/bin/sh
37
  exec {{ bin_directory }}/runResiliencyUnitTestTestNode $@ ${:test-parameters}
38 39
output = ${directory:bin}/runTestSuite
mode = 755
40

41
[request-resilient-instance]
42 43 44 45
<= slap-connection
recipe = slapos.cookbook:request
software-url = ${slap-connection:software-release-url}
software-type = kvm-resilient
46
name = Resilient Instance (Root Instance)
47
{% for key, value in slapparameter_dict.get('cluster', {}).iteritems() -%}
48 49
config-{{ key }} = {{ dumps(value) }}
{% endfor -%}
50 51
config-virtual-hard-drive-url = ${slap-parameter:virtual-hard-drive-url}
config-virtual-hard-drive-md5sum = ${slap-parameter:virtual-hard-drive-md5sum}
52
config-virtual-hard-drive-gzipped = ${slap-parameter:virtual-hard-drive-gzipped}
53
config-resiliency-backup-periodicity = */5 * * * *
54
config-resilient-clone-number = 1
55
config-ignore-known-hosts-file = false
56
return = ipv6
57
# XXX What to do?
58
sla-computer_guid = ${slap-connection:computer-id}
59 60

[slap-parameter]
61 62 63
virtual-hard-drive-url = http://www.nexedi.org/static/slapos/kvm_resiliency_test/virtual.qcow2.gz
virtual-hard-drive-md5sum = dd82c771f6f7738fb4b0fc1330ed8236
virtual-hard-drive-gzipped = true