Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFE]: Enhancements to quads-cli and foreman.py to choose future OS for cloud deployment #318

Closed
sadsfae opened this issue Mar 5, 2020 · 2 comments

Comments

@sadsfae
Copy link
Member

sadsfae commented Mar 5, 2020

In /opt/quads/conf/quads.yml we have a value that defines what OS gets deployed to future systems when they are scheduled:

foreman_default_os: "RHEL 7"

This RFE covers first letting us set another OS other than the default for a future cloud and also listing available options via quads-cli but should also coincide with passing/retaining this request from our internal request process into our scheduling workflow.

Below covers the technical implementation for QUADS.

Proposal and Approach

There are three new argparse cli options to be added, both reliant on functionality added to foreman.py`

Additionally, changes to /opt/quads/quads/tools/move_and_rebuild_hosts.py is required to enforce these if set and the /opt/quads/quads/tools/foreman.py changes to enact them.

Argparse Changes

  1. An additional argparse parameter to --define-cloud like quads-cli --define-cloud cloud02 --os "RHEL 8".
  • optional parameter that defaults to whatever to the value of foreman_default_os
  • consults Foreman library to query Foreman when input is given, and sanitize/accept input if it matches one of the available operating systems.
  • Once a cloud is defined with --os this is saved to the cloud object
  1. An additional argparse argument to quads-cli like --ls-os which calls the Foreman library to return a list of available operating systems (like hammer os list).
  • returns the hammer os list title as it appears from Foreman
  • we don't want to store this in Mongo as it can change in Foreman
  1. Argparse for quads-cli --ls-cloud-os to list what OS each cloud is set to, if none is set the default for foreman_default_os is returned which would be stored in MongoDB.

Supporting Provisioning Changes

  1. Change to move_and_rebuild_hosts.py so that if --define-cloud is passed the new option of --os $OS_LIST_CHOICE then it will perform an additional call to foreman.py to update all hosts to use that choice instead when mark to build is run.

https://github.com/redhat-performance/quads/blob/master/quads/tools/move_and_rebuild_hosts.py#L177

@sadsfae sadsfae added this to the 1.2 Series milestone Mar 5, 2020
@sadsfae sadsfae changed the title RFE: Argparse enhancements to quads-cli to choose future os for deployment [RFE]: Enhancements to quads-cli and foreman.py to choose future OS for cloud deployment Mar 5, 2020
@sadsfae
Copy link
Member Author

sadsfae commented Jun 26, 2024

Related-to: #474 and may be a duplicate

@sadsfae
Copy link
Member Author

sadsfae commented Jun 26, 2024

duped by #474

@sadsfae sadsfae closed this as completed Jun 26, 2024
@github-project-automation github-project-automation bot moved this from To do to Done in QUADS 2.0 Series Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant