Mentions légales du service

Skip to content

Allow to specify custom host variables when adding machines

Currently, we have no good way to add custom Ansible host variables when declaring machines.

This would help customize the behaviour of nodes in an experiement without resorting to hacks.

A simple way would be to add a variables key:

conf = (
    en.G5kConf.from_settings(walltime="04:00:00", job_name="garage")
    .add_machine(
        roles=["garage", "grenoble"],
        cluster="dahu",
        nodes=1,
        variables={"garage_data_disk": "disk1"},
    )
    .add_machine(
        roles=["garage", "grenoble"],
        cluster="dahu",
        nodes=1,
        variables={"garage_data_disk": "disk2"},
    )
)

This is especially useful for a declarative approach to resources specification, because then all parametrization will be in one place.

In the current codebase, VMonG5K needs to do something similar, and this is currently implemented with a hack (it generates a unique role name for each machine requests, so that it can later determine which VM is hosted on which physical machine)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information