README.txt 4.33 KB
Newer Older
1 2 3 4 5 6
This module is used to test resiliency stack for different Software Releases.
To be specific, it tests:
 * The replication mechanism between main instance, pbs and clone and
the specific behavior of the resilient Software Release.
 * The takeover mechanism.

7 8 9 10 11
This module is supposed to be launched from the "test" instance of a resilient
service (usually deployed using "test" software type).

One entry point, if the service has been deployed
from a "scalability" test node, so with special parameters, will automatically
communicate when the instance is started to an ERP5 TestNode Master, and start the test.

14 15 16 17 18
The other entry point, "bin/runStandaloneTest", is supposed to be run manually from a simple "test"
instance without special parameter (just request an instance of your software
release using the dedicated test software-type made for the occasion).
This is quite useful if you simply want to run the resiliency tests without having the whole
dedicated test infrastructure.

20 21
The third entry point, "bin/runUnitTestTestNode" is basically the same as the first one, but used to be run inside of
a classical, "Unit Test"-style erp5testnode.
22 23 24 25

This module contains:
 * The code to start the test from a testnode / manually
 * A Resiliency Test Suite framework (in suites/, used to easily write new
   test suites
 * A list of test suites (in suites/)
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

 * Check that each partition is in different slapos node.
 * Test for bang calls
 * Be able to configure from ERP5 Master (i.e from instance parameters): count of PBS/clones, then test several possibilities (so called "count" in test suite)
 * Use Nexedi ERP5, when in production.
 * Put the KVM disk image in a safe place.


For reference: How-to deploy the whole test system
1/ Deploy a SlapOS Master
2/ Deploy an ERP5, install erp5_test_result BT with scalability feature (current in scalability-master2 branch of erp5.git) (currently, had to change a few lines in the scalability extension of the portal_class, should be commited)
3/ Configure 3 nodes in the new SlapOS Master, deploy in each a testnode with scalability feature (erp5testnode-scalability branch of slapos.git) with parameters like:
<?xml version="1.0" encoding="utf-8"?>
  <parameter id="test-node-title">COMP-0-Testnode</parameter>
<parameter id="test-suite-master-url"></parameter>
3bis/ Supply and request on a public node (so that vnc frontends are ok). "domain" parameter should be [ipv6] of partition. ipv4:4443 should be 6tunnelled to ipv6:4443 (Note: here, instead, I just hacked kvm_frontend to listen on ipv6).
3ter/ Supply and request, with any "domain" (it won't be used), on a public node (so that web frontends are ok)
4/ On the ERP5 instance, create a project, a Task Distribution (in portal_task_distribution, type Scalability Task Distribution)
5/ On the ERP5 instance, create a Test Suite, validate it

Note: the slapos nodes are currently deployed using slapos-in-partition.
Note: you have to manually kill -10 the erp5testnode process to start deployment of test because it doesn't know when SR installation is finished.
Note: you have to manually run slapos-node-software --all on the slapos nodes if you are developping the SR you are testing.
58 59 60 61 62 63 64 65 66 67 68 69 70 71


Here is an example on how to deploy standalone tests on the webrunner, which means without using erp5.

1/ Deploy a SlapRunner software instance using the type test.
2/ In, you should tell on which server you want to deploy your instances. You can adapt to your case the parameter.xml above. For the first time, you can deploy all the instances on the same node, it will run the tests faster, and it will be easier to debug :
	<?xml version='1.0' encoding='utf-8'?>
	  <parameter id="_">{"cluster": {"-sla-0-computer_guid": "COMP-XXXX", "-sla-1-computer_guid": "COMP-XXXX", "-sla-2-computer_guid": "COMP-XXXX"}}</parameter>
3/ Then go to the root instance folder : it is the one who has only "runStandaloneResiliencyTestSuite" in its bin folder.
4/ Run ./bin/runStandaloneResiliencyTestSuite and wait :) it would return "success" or "failure"