quads icon indicating copy to clipboard operation
quads copied to clipboard

[RFE] Standardize host naming convention

Open grafuls opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. In Quads core functionalities, the code heavily relies on the hosts naming convention that we utilize where the template is <rack>-h<u-location>-[<blade>-]<model>-<domain>. This is only mentioned on the docs once and it's not heavily enforced for Quads usage and could be error prone.

Describe the solution you'd like Include additional optional arguments for --define-host cmd for --rack, --model, --uloc and --blade and have --hostname be optional if none of the other are passed, then have quads pick the domain from the config file and construct the hostname. Additionally if we require enough metadata at host definition we can have Quads leverage the foreman.py library to automatically do the foreman host definition.

Describe alternatives you've considered Make the --define-host input optionally (when no args passed) interactive. Display a prompt for each argument with a default value.

$ quads --define-host
Rack<f21>: f22
U-Location<01>:
Blade<000> :
Model<R640>: R650
Default Cloud<cloud01>: 
Type<Baremetal>:
...

grafuls avatar Jun 28 '23 10:06 grafuls

Great suggestion +1

sadsfae avatar Jun 28 '23 10:06 sadsfae

Can we have some logic that if none of those new params are defined then it just defaults to the old behavior? (which can also be accomplished via CNAME anyway in DNS so people have never needed to rename their servers). This way people wouldn't have to make DNS records if they didn't want to greenfield or rename their systems too if they didn't want to use those params.

sadsfae avatar Jun 28 '23 10:06 sadsfae

I think this will be addressed in: https://github.com/redhat-performance/quads/issues/448

sadsfae avatar Sep 13 '23 08:09 sadsfae