root/README @ cb437b7c75dd2108abf4ee94a07ba0cfa7c81ab9

Revision cb437b7c75dd2108abf4ee94a07ba0cfa7c81ab9, 3.5 kB (checked in by Frederic Lepied <frederic.lepied@…>, 19 months ago)

documented test system

  • Property mode set to 100644
Line 
1-*- outline -*-
2
3* PXE Manager
4
5The idea is to build an automaton to control when to boot from the
6local drives and when to boot from the network.
7
8The systems can be used to run automated tests. You can also use this
9system only to provision on demand systems or backup your partitions
10using partimage or anything you want to do with an automated PXE
11system...
12
13The systems must be configured to always boot over PXE.
14
15** Install
16
17- edit the database and PXE config in the settings.py according to
18  your local setup.
19
20- you need python-django installed.
21
22- run ./manage.py syncdb to create the needed sql tables.
23
24- create the PXE profiles in pxelinux.cfg/profiles/ ending in
25  .prof. The local.prof is mandatory and must point to a local boot
26  config. The user running the scripts must have the right to write in
27  pxelinux.cfg. I usually create a group and put it under control of
28  the files under pxelinux.cfg.
29
30- export these 2 environment variables:
31  DJANGO_SETTINGS_MODULE=settings and PYTHONPATH=$PWD.
32
33- run pxemngr syncbootnames to add the names of the PXE profiles in the
34  database.
35
36- add the systems that you want to control by this system like this:
37
38pxemngr addsystem <name> <mac address> [<mac address 2>...]
39
40- set which profile you want your system to PXE boot:
41
42pxemngr nextboot <name> <profile name>
43
44- run ./manage.py runserver <ip addr>:<port> to have a web server
45  waiting for requests to boot locally. You can also configure django
46  to use apache instead of the little embedded server.
47
48- then your PXE scripts must access the following web page
49  http://<ipaddr>:<port>/localboot/ to request a local boot
50  before rebooting else the PXE boot will continue to loop on the same
51  install.
52
53** Advanced
54
55- in your auto-install scripts, you can access the current profile by
56  accessing the following url: http://<ipaddr>:<port>/profile/
57
58** Test system
59
60*** Description
61
62The test system allows to provide test scripts to running systems
63declared in the PXE manager database.
64
65The target system can request a test by using this url:
66http://<ipaddr>:<port>/nexttest/
67
68The tests are usually shell scripts that are built using Django
69templating system. By convention, the tests are usinf a suffix of
70.test. They are stored in the directory set in settings.py under the
71TESTS_DIR variable. A wait.test must exist and will be send by the
72server to the target system when no test are available. This wait.test
73must wait for some time and then exit to let the system send a new
74test if needed or send back a new wait.test.
75
76After the execution of a test script, the result is sent back to the
77server using the following url: http://<ipaddr>:<port>/upload/. I
78usualy run the following curl command to upload the result:
79
80curl --retry 0 -s -f -F "file=@$output" http://<ipaddr>:<port>/upload/
81
82These uploaded files are stored under the directory set by the
83TEST_UPLOAD_DIR variable in settings.py.
84
85The system uses a simple convention in these files to lookup
86information. It parses the lines to store informations, warnings and
87errors lines if they begin by 'I: ', 'W: ' and 'E: '. The system also
88tries to find the version of the system by looking for a line starting
89by 'V: '.
90
91You can then navigate on web pages displaying these parsed
92informations under: http://<ipaddr>:<port>/.
93
94*** Control
95
96To instruct the system about which tests are available, use the
97following command:
98
99pxemngr synctestnames
100
101To assign a test to a target system, use the following command:
102
103pxemngr nexttest <system name> <test name>
104
105To display all the tests ran or scheduled for a system, use:
106
107pxemngr dpytest <system name>
Note: See TracBrowser for help on using the browser.