Beaker hostRequires feature
===========================
mrack's Beaker hostRequires feature enables the specification of machine requirements in BeakerHub.
The Beaker transformer performs the translation of basic specifications from the input YAML's `domains` section.
It also handles more advanced specifications, including hardware requirements, by utilizing the `beaker` key in the host requirement section.
These values are later translated to XML accordingly.
This guide provides a demonstration of how requirements are translated and highlights the currently supported options.
Here is an example of Beaker provisioning using the hostRequires feature:
.. code:: yaml
domains:
- hosts:
#########
# Provisioning c9s
#########
- group: client
name: bkr-c9s-latest.eagle.test
os: c9s
provider: beaker
beaker: # use some beaker specific requirements
hostRequires:
and:
- cpu_count:
_value: 1
_op: "="
name: eagle.test
type: linux
This requirement is then translated to XML for the Beaker job, along with other specifics:
.. code:: xml
// from provisioning config
// default
// from provisioning config
// translated `hostRequires` key
// translated `and` key
// translated `cpu_count`, `_value` and `_op` keys
It is also possible to require RAM amount using `memory` key:
.. code:: yaml
domains:
- hosts:
#########
# Provisioning rhel-9.2
#########
- group: ipaserver
name: bkr-rhel-9-2.eagle.test
os: rhel-9.2
provider: beaker
beaker: # use some beaker specific requirements
hostRequires:
and:
- system:
memory:
_value: 4096
_op: "="
name: eagle.test
type: ipa
Which results into:
.. code:: xml
// from provisioning config
// default
// from provisioning config
// translated `hostRequires` key
// translated `and` key
// translated `memory`, `_value` and `_op` keys
Nowadays it is hard to find a machine with exactly one core thus we can use less strict requirement in hostRequires:
.. code:: yaml
domains:
- hosts:
#########
# Provisioning rhel-8.8
#########
- group: ipaserver
name: bkr-rhel-8-8.eagle.test
os: rhel-8.8
provider: beaker
beaker: # use some beaker specific requirements
hostRequires:
and:
- system:
memory:
_value: 2048
_op: ">=" # if there is problem finding system with exactly this amount
- cpu_count:
_value: 2
_op: ">=" # if there is problem finding system with exactly this amount
name: eagle.test
type: ipa
And the result would be following XML:
.. code:: xml
// from provisioning config
// default
// from provisioning config
// translated `hostRequires` key
// translated `and` key
// translated `cpu_count`, `_value` and `_op` keys
// translated `memory`, `_value` and `_op` keys