-
Notifications
You must be signed in to change notification settings - Fork 2
UnobtrusiveAutomation
This is a follow-up to HelloWorld. Prepare that first and then come back here.
cpanm Task::Tapper::Hello::World::AutomationYou need two automation daemons running, e.g. in several terminals/screen/tmux.
- Automation - Master control program
tapper-mcp- Automation - event queue
tapper-mcp-messagereceiver(There is also always a default 'AdHoc' queue.)
tapper queue-new --name x86 --priority=100 --active
tapper queue-new --name arm --priority=100 --activetapper host-new --active --queue x86 --name einstein
tapper host-new --active --queue x86 --name hawking
tapper host-new --active --queue x86 --name newton
tapper host-new --active --queue arm --name ali
tapper host-new --active --queue arm --name hug
tapper host-new --active --queue arm --name dekkersWe should now have a small pool organized in 2 queues:
tapper host-list -v
ID | Name | Features | Active | Testrun ID | Comment | Queues
===========================================================================
4 | ali | | active | free | | arm
6 | dekkers | | active | free | | arm
1 | einstein | | active | free | | x86
2 | hawking | | active | free | | x86
5 | hug | | active | free | | arm
3 | newton | | active | free | | x86Testplans are usually a complex but targeted config over multiple machines and tests.
- View self documentation of a testplan:
tapper testplan-new --file ~/.tapper/testplans/topic/helloworld/example01 -g- Enqueue the testplan:
tapper testplan-new --file ~/.tapper/testplans/topic/helloworld/example01- Enqueue another testplan
tapper testplan-new --file ~/.tapper/testplans/topic/helloworld/example02The above test plans fan out into multiple test runs potentially running on different machines, different programs, etc. What single test runs are now scheduled, or running or finished can be viewed with:
tapper testrun-list --schedule --verbose
tapper testrun-list --running --verbose
tapper testrun-list --finished --verboseor at http://localhost:3000/tapper/testruns
To queue in a single test run with a program on some queue or host, you can use testrun-new:
tapper testrun-new --topic HelloWorld --queue x86 --requested_host einstein --macroprecond ~/.tapper/hello-world/macropreconditions/run-hello-world-tests.mpcNote that it's a macro precondition, allowing you to write dynamic precondition templates parameterized with -Dkey=value very similar to the test plans above. The difference is that test runs are the actual scheduling unit running on one particular host and usually running a single test program. A testplan is an organizational structure to wrap multiple tests into a common, well, plan.
Test runs can be used for continuous execution, just append --auto_rerun:
tapper testrun-new --topic HelloWorld --queue x86 --requested_host einstein --macroprecond ~/.tapper/hello-world/macropreconditions/run-hello-world-tests.mpc --auto_rerunThis means that when this test run actually gets started (state switches from "schedule" into "running"), a copy of the original testrun preconditions is put into the same queue on top again (again with the auto_rerun flag). When that copy testrun is scheduled depends on the other testruns in that queue, other queues, host availability, etc.
Please note, that the macro expansion has already happened during creation of the first such testrun, so the rerun preconditions will be the very same as the first testrun. If you need dynamic preconditions evaluated when the test gets scheduled you need "precondition producers", as described in the Tapper manual section 6.17 "Precondition Producers", pg 46ff.
at
- http://localhost:3000/tapper/reports
- http://localhost:3000/tapper/testruns
- http://localhost:3000/tapper/testplan
- http://localhost:3000/tapper/continuoustestruns
That was an easy introduction to the automation. Here we started our testruns locally.
Tapper can also set up machines from scratch by letting them boot via NFS and TFTP, let them self-install, reboot and execute its tests. Tapper provides several approaches: a built-in image-based installer, autoyast/kickstart/debinstall integration, and via Cobbler. However, this requires some configuration on your network infrastructure.
To deploy such a full heavy weight automation to run a server pool for Linux kernel and virtualization, you should discuss your use-case at IRC irc.freenode.net/#tapper and have a look at Deployment.
Before you start filling the database with serious data, remember to early switch to MySQL.
- About
- Deployment
- Hello World - easiest start