| |
@@ -21,15 +21,58 @@
|
| |
|
| |
# Standard Inventory scripts
|
| |
|
| |
- The inventory scripts are about taking the subjects produced by a CI system
|
| |
- and transforming them into something testable. That includes launching
|
| |
- a QCow2 image into a virtual machine, or installing an RPM.
|
| |
+ The inventory scripts are about taking the subjects produced by a CI system and
|
| |
+ transforming them into something testable. That includes launching a QCow2
|
| |
+ image into a virtual machine, or installing an RPM.
|
| |
|
| |
Tests are not required to use these scripts but they provide useful, usable
|
| |
defaults for this task.
|
| |
|
| |
+ ## Flexible Metadata Format for default provisioner(s)
|
| |
|
| |
- ## `standard-inventory-qcow2`
|
| |
+ You can find information for FMF [here][1], and for supported FMF attributes
|
| |
+ [here][2].
|
| |
+
|
| |
+ ### Initialize a new metadata tree
|
| |
+
|
| |
+ To add desired parameters for default provisioners first of all make sure that
|
| |
+ your `/tests` directory has initialized metadata tree. Directory `.fmf` must be
|
| |
+ present. If it is not, run next command:
|
| |
+
|
| |
+ ```
|
| |
+ fmf init
|
| |
+ ```
|
| |
+
|
| |
+ ### Usage
|
| |
+
|
| |
+ Put in `/tests` a file with name `provision.fmf`:
|
| |
+
|
| |
+ ```yaml
|
| |
+ ---
|
| |
+
|
| |
+ standard-inventory-qcow2:
|
| |
+ qemu:
|
| |
+ m: 3G
|
| |
+ net_nic:
|
| |
+ model: e1000
|
| |
+
|
| |
+ standard-inventory-docker:
|
| |
+ dumb_option: dumb_parameter
|
| |
+ ```
|
| |
+
|
| |
+ ### Supported parameters
|
| |
+
|
| |
+ #### standard-inventory-qcow2
|
| |
+
|
| |
+ * `qemu.m` - RAM size in megabytes. Optionally, a suffix of `M` or `G`.
|
| |
+ * `qemu.net_nic.model` - Use `qemu-system-x86_64 -net nic,model=help` for a list
|
| |
+ of available devices.
|
| |
+
|
| |
+ You can open a RFE ticket to extend supported parameters according to
|
| |
+ https://qemu.weilnetz.de/doc/qemu-doc.html
|
| |
+
|
| |
+
|
| |
+ ## LOCK_ON_FILE for standard-inventory-qcow2
|
| |
|
| |
This inventory script launches a virtual machine via qemu. The VM image should
|
| |
be specified via command line or an environment variable `TEST_SUBJECTS`.
|
| |
@@ -78,3 +121,7 @@
|
| |
ansible_user: "{{ inventory_data.ansible_user }}"
|
| |
ansible_python_interpreter: "{% if vm_python_interpreter != '' %}{{ vm_python_interpreter }}{% else %}/usr/bin/python2{% endif %}"
|
| |
```
|
| |
+
|
| |
+
|
| |
+ [1]: https://fedoraproject.org/wiki/CI/Metadata
|
| |
+ [2]: http://fmf.readthedocs.io/
|
| |
Signed-off-by: Andrei Stepanov astepano@redhat.com