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

Document foreman_resource_quota plugin #3460

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maximiliankolb
Copy link
Contributor

What changes are you introducing?

basic usage docs for https://github.com/ATIX-AG/foreman_resource_quota/

Why are you introducing these changes? (Explanation, links to references, issues, etc.)

new plugin -> new docs 🎉

Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)

  • installation via foreman-installer is not yet implemented
  • Hammer CLI is still missing to my knowledge

Checklists

  • I am okay with my commits getting squashed when you merge this PR.
  • I am familiar with the contributing guidelines.

Please cherry-pick my commits into:

  • Foreman 3.13/Katello 4.15 (Satellite 6.17)
  • Foreman 3.12/Katello 4.14 (Satellite 6.16)
  • Foreman 3.11/Katello 4.13 (orcharhino 6.11 on EL8 only)
  • Foreman 3.10/Katello 4.12
  • Foreman 3.9/Katello 4.11 (Satellite 6.15; orcharhino 6.8/6.9/6.10)
  • Foreman 3.8/Katello 4.10
  • Foreman 3.7/Katello 4.9 (Satellite 6.14)
  • Foreman 3.6/Katello 4.8
  • Foreman 3.5/Katello 4.7 (Satellite 6.13; orcharhino 6.6/6.7)
  • We do not accept PRs for Foreman older than 3.5.

* VMware
* libvirt

Configuration options::
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I move this towards a "Configuring resource quotas plugin" module?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That depends.
Are these configuration options determined as arguments to the foreman-installer? Or are they global settings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are global settings that are not exposed via foreman-installer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd make make them into a separate module with a heading like "Resource Quota Settings", add navigation information where the user can find these settings and put the list of these settings there. Perhaps the first module under Managing resource quotas? Or even a higher-level heading after Installing the plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved it to a "ref_" file at the end of the assembly. Is that too far away? Assuming we have sensible default values, users should not need to configure the plugin before typical usage.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer after the installation step. The further text is talking about the settings which have not been introduced before and it feels a bit confusing to me. You can also mention the default values of the settings, if that is something which is commonly done in docs.

@@ -60,6 +60,8 @@ include::common/assembly_logging-and-reporting-problems.adoc[leveloffset=+1]

include::common/assembly_monitoring-resources.adoc[leveloffset=+1]

include::common/assembly_limiting-resources.adoc[leveloffset=+1]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugin is pretty cool, all downstream products should deliver it :) If that's not yet the case, please let me now and I can limit the visibility here. 🙃

guides/common/modules/con_managing-resource-quotas.adoc Outdated Show resolved Hide resolved
Copy link

@bastian-src bastian-src left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the per-user assignment and when it is optional: LGTM!

Thanks @maximiliankolb, looking great! Technical approval.

Copy link
Contributor Author

@maximiliankolb maximiliankolb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased to "master" and applied both suggestions to guides/common/modules/con_assigning-resource-quotas-to-users.adoc. Please re-review.

@maximiliankolb maximiliankolb marked this pull request as ready for review November 22, 2024 13:58
@maximiliankolb maximiliankolb added tech review done No issues from the technical perspective Needs style review Requires a review from docs style/grammar perspective labels Nov 22, 2024
Copy link
Contributor

@Lennonka Lennonka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My initial suggestions.

I'm unsure if talking about CPU cores, memory and disk space as "resources" is a good term here because it might get confused with "compute resources". We should try to come up with another term.
How about something like "compute capacity" or "compute allocation" or "compute units"? Or something else...

[id="limiting-resources"]
= Limiting resources

You can use the Resource Quota plugin to limit users' access to resources.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can use the Resource Quota plugin to limit users' access to resources.
You can use the Resource Quota plugin to limit users' access to compute resources.

I'm missing the following information:

  • What resources exactly? Is it limited to compute resources?
  • In what use cases does the admin want to limit resource usage for users?
  • How will it affect usage of compute profiles?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Resources" refers to the list of resources defined by the plugin: CPU, memory, and disk. It does not affect compute profiles which are merely a blueprint for the "size" of new hosts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A typical use case is to limit resource consumption for a user/a group of users, for example, when multiple departments rely on "one" infrastructure managed by one Foreman+Katello instance. ACK @bastian-src ?

Copy link

@bastian-src bastian-src Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly! Thanks @maximiliankolb and @Lennonka.
In short, the plugin enables administrators to limit the amount of resources users/usergroups can consume when provisioning hosts.

I see how the term "resource" is a little difficult since it is already used by compute resources. However, a resource quota relates to host resources as CPU cores, memory, and disk space - they are not directly related to a certain compute resource, but to users/usergroups and hosts.

EDIT:

Other terms like "compute capacity" or "compute allocation" or "compute units" might not fit so well too, since the Resource Quota plugin can also be used for bare metal hosts which are independent of any compute resource AFAIK. Internally, I've also been using the term "host resources" - what about that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Host resources" might work. Let's go with that.

@maximiliankolb Do you think you could extend the introduction by summarizing what was written in this thread?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have summarized it and rephrased it to "limiting host resources".

* VMware
* libvirt

Configuration options::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That depends.
Are these configuration options determined as arguments to the foreman-installer? Or are they global settings?

guides/common/modules/con_limiting-resources.adoc Outdated Show resolved Hide resolved
@pr-processor pr-processor bot added the Waiting on contributor Requires an action from the author label Nov 25, 2024
@Lennonka
Copy link
Contributor

Lennonka commented Nov 25, 2024

@maximiliankolb Can you also please link the PR where it's developed to the description of this PR? Nevermind, you linked the ATIX plugin repo.

I'm wondering, should it be included in the Foreman organization in order to be counted as a Foreman plugin that could eventually be used in other downstreams? Not sure what the policy is here. :)

@pr-processor pr-processor bot added Needs re-review and removed Waiting on contributor Requires an action from the author labels Nov 26, 2024
Copy link
Contributor Author

@maximiliankolb maximiliankolb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied all suggestions by Lena and Avital.

[id="limiting-resources"]
= Limiting resources

You can use the Resource Quota plugin to limit users' access to resources.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Resources" refers to the list of resources defined by the plugin: CPU, memory, and disk. It does not affect compute profiles which are merely a blueprint for the "size" of new hosts.

guides/common/modules/con_limiting-resources.adoc Outdated Show resolved Hide resolved
* VMware
* libvirt

Configuration options::
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are global settings that are not exposed via foreman-installer.

guides/common/modules/proc_creating-a-resource-quota.adoc Outdated Show resolved Hide resolved
[id="limiting-resources"]
= Limiting resources

You can use the Resource Quota plugin to limit users' access to resources.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Host resources" might work. Let's go with that.

@maximiliankolb Do you think you could extend the introduction by summarizing what was written in this thread?

* VMware
* libvirt

Configuration options::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd make make them into a separate module with a heading like "Resource Quota Settings", add navigation information where the user can find these settings and put the list of these settings there. Perhaps the first module under Managing resource quotas? Or even a higher-level heading after Installing the plugin.

@pr-processor pr-processor bot added the Waiting on contributor Requires an action from the author label Nov 26, 2024
@pr-processor pr-processor bot added Needs re-review and removed Waiting on contributor Requires an action from the author labels Nov 27, 2024
Copy link
Contributor Author

@maximiliankolb maximiliankolb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased to "master" and applied Lena's and Bastian's feedback. Ready for re-review.

* VMware
* libvirt

Configuration options::
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved it to a "ref_" file at the end of the assembly. Is that too far away? Assuming we have sensible default values, users should not need to configure the plugin before typical usage.

[id="limiting-resources"]
= Limiting resources

You can use the Resource Quota plugin to limit users' access to resources.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have summarized it and rephrased it to "limiting host resources".

Comment on lines +10 to +13
Supported resource types::
* CPU cores {endash} limit the number of CPU cores
* Memory {endash} limit the amount of memory
* Disk space {endash} limit the amount of disk space

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I'm late to the party :) But this part seems kind of repetitive to me.

Suggested change
Supported resource types::
* CPU cores {endash} limit the number of CPU cores
* Memory {endash} limit the amount of memory
* Disk space {endash} limit the amount of disk space
It is supported to limit the following resource types::
* CPU cores
* Memory
* Disk space

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs style review Requires a review from docs style/grammar perspective tech review done No issues from the technical perspective
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants