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

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

parts =
  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 26
recipe = slapos.cookbook:wrapper
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}
27 28
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=runner root_instance_name='${request-resilient-instance:name}'
command-line = {{ bin_directory }}/runResiliencyScalabilityTestNode ${:testnode-parameters} ${:test-parameters}
29
wrapper-path = ${directory:scripts}/runResiliencyTestSuite
30

31 32 33 34 35 36 37 38 39
[deploy-unit-test]
recipe = collective.recipe.template
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=runner root_instance_name='${request-resilient-instance:name}'
input = inline:
  #!/bin/sh
  exec {{ bin_directory }}/runResiliencyUnitTestTestNode $@ ${:test-parameters}
output = ${directory:bin}/runTestSuite
mode = 755

40 41 42 43 44 45
[request-resilient-instance]
<= slap-connection
recipe = slapos.cookbook:request
software-url = ${slap-connection:software-release-url}
software-type = resilient
name = Resilient Instance (Root Instance)
46
{% for key, value in slapparameter_dict.get('cluster', {}).iteritems() -%}
47 48
config-{{ key }} = {{ dumps(value) }}
{% endfor -%}
49
config-resiliency-backup-periodicity = */10 * * * *
50
config-resilient-clone-number = 1
51
config-ignore-known-hosts-file = false
52
config-cpu-usage-ratio = 1
53 54 55 56
# Use one external folder (same of erp5testnode for build the software
# This is a way to preserve the latest software release build speeding up
# the tests.)
config-software-root = ${buildout:directory}/../../soft
57
config-buildout-shared-folder = ${buildout:directory}/../../shared
58
config-no-ipv4-frontend = true
59 60 61 62 63 64

# Use same repository / branch for the software installed in slaprunner
# than the tested slaprunner itself.
config-slapos-repository = {{ slapos_repository_url }}
config-slapos-reference = {{ slapos_repository_branch }}

65 66
# XXX Hack to deploy Root Instance on the same computer as the type-test Instance
sla-computer_guid = ${slap-connection:computer-id}
67
return = backend-url
68 69

[slap-parameter]