@@ -4,9 +4,9 @@ This is a Test Kitchen driver for use in cases, where you have an
44existing machine, such as a physical server which you want
55to use for your tests.
66
7- The static driver is directly derived from TK's "proxy" driver,
8- which is relying on legacy plugin infrastructure - making it directly incompatible
9- with Windows platforms.
7+ The static driver is directly derived from TK's "proxy" driver,
8+ which is relying on legacy plugin infrastructure - making it directly
9+ incompatible with Windows platforms.
1010
1111## Usage
1212
@@ -19,19 +19,88 @@ driver:
1919# now the rest of your kitchen.yml follows
2020```
2121
22- The ` host ` configuration setting, which specifies the hostname/IP you want tests to run against.
22+ The ` host ` configuration setting, which specifies the hostname/IP you want tests
23+ to run against.
2324
24- If you have more than one server, for example when testing specific
25- hardware drivers, just add a suite for each and override the
26- ` host ` value in its section
25+ If you have more than one server, for example when testing specific hardware
26+ drivers, just add a suite for each and override the ` host ` value in its
27+ section
2728
2829## Supported Platforms
2930
30- As this is a pure driver which does not interact with the
31- instances/VMs, it supports all platforms. Specifically Linux
32- and Windows work.
31+ As this is a pure driver which does not interact with the instances/VMs, it
32+ supports all platforms. Specifically Linux and Windows are known to work.
3333
34- ## <a name =" license " ></a > License
34+ ## Queueing Feature
35+
36+ As physical machines are a limited resource and are rarely bought or thrown
37+ away in a TestKitchen context, some sort of queueing mechanism is needed in
38+ bigger environments.
39+
40+ To enable this feature, set ` queueing ` to ` true ` (default: ` false ` )
41+
42+ ``` yaml
43+ driver :
44+ name : static
45+ queueing : true
46+ request :
47+ execute : /usr/local/bin/get-host.sh
48+ release :
49+ execute : /usr/local/bin/release-host.sh $STATIC_HOSTNAME
50+ ...
51+ ` ` `
52+
53+ Queueing knows two Actions:
54+
55+ * ` request` to obtain the hostname or IP of the machine to use
56+ * `release` to return this host into the pool
57+
58+ If you are using non-ephemeral test systems, like physical machines, you will
59+ need to trigger some procedure to reset them back to the defined default. Otherwise,
60+ every test will modify the system further until results get unpredictable.
61+
62+ There currently is just one handler for queueing scenarios :
63+
64+ * the `script` handler, which executes a local script
65+
66+ # # Driver Options
67+
68+ | Name | Default | Description |
69+ | ------------------- | --------- | --------------------------------------------- |
70+ | `queueing` | false | If to invoke external actions to get hostname |
71+ | `queueing_timeout` | 3600 | Timeout for queueing operations in seconds. |
72+ | `queueing_handlers` | - | Glob to load external queueing handlers |
73+
74+ # # Queueing Handler `static`
75+
76+ This handler only executes local commands. These could query remote databases or
77+ even issue more complex programs to obtain/release machines.
78+
79+ # ## Parameters for `request`
80+
81+ | Name | Default | Description |
82+ | ---------------- | --------- | ---------------------------------------------------------- |
83+ | `type` | `script` | |
84+ | `execute` | - | Command to execute |
85+ | `match_hostname` | `^(.*)$` | Regex to specify what to grab from output. Default : All |
86+ | `match_banner` | - | Regex to specify optional banner to grab. Default : Nothing |
87+
88+ If a banner is grabbed, it's contents are displaed after the message reporting the
89+ hostname. This field can be used for warnings or additional information like access
90+ to management interfaces (ILO, BMC, ...).
91+
92+ # ## Parameters for `release`
93+
94+ | Name | Default | Description |
95+ | ---------- | --------- | ------------------------------------------------------- |
96+ | `type` | `script` | |
97+ | `execute` | - | Command to execute |
98+
99+ The executed script gets the following environment variables :
100+
101+ * `STATIC_HOSTNAME`: Hostname or IP of the host to be released
102+
103+ # # License
35104
36105Apache 2.0 (see [LICENSE][license])
37106
0 commit comments