8000 Adding Subscription Management to Controller Admin (#3385) by ianf77 · Pull Request #3404 · ansible/aap-docs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Adding Subscription Management to Controller Admin (#3385) #3404

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

Merged
merged 1 commit into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion downstream/assemblies/platform/assembly-aap-activate.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ ifdef::context[:parent-context: {context}]

ifndef::operationG[]
include::platform/proc-aap-activate-with-credentials.adoc[leveloffset=+1]

include::platform/proc-aap-activate-with-manifest.adoc[leveloffset=+1]
endif::operationG[]

ifdef::operationG[]
To activate {PlatformNameShort} using credentials, see link:{URLCentralAuth}/assembly-gateway-licensing#proc-aap-activate-with-credentials[Activate with credentials].


To activate {PlatformNameShort} with a manifest file, see link:{URLCentralAuth}/assembly-gateway-licensing#proc-aap-activate-with-manifest[Activate with a manifest file].
endif::operationG[]

ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
ifdef::context[:parent-context: {context}]

:context: subscription-management
:_mod-docs-content-type: <ASSEMBLY>

[id="assembly-controller-subscription-management"]

= Subscription management in {PlatformNameShort} and {ControllerName}

{PlatformNameShort} provides capabilities to monitor usage, activate subscriptions, and maintain compliance with Red Hat subscription requirements.

include::platform/con-host-metrics-subscriptions.adoc[leveloffset=+1]

include::platform/con-host-metrics-dashboard.adoc[leveloffset=+2]

include::platform/con-soft-deletion.adoc[leveloffset=+3]

include::assembly-aap-activate.adoc[leveloffset=+1]

//include::assembly-aap-manifest-files.adoc[leveloffset=+1]

include::platform/con-controller-keep-subscription-in-compliance.adoc[leveloffset=+1]

include::platform/con-view-hosts-in-ui.adoc[leveloffset=+2]

include::platform/con-view-hosts-in-CLI.adoc[leveloffset=+2]

include::platform/proc-controller-awx-manage-utility.adoc[leveloffset=+3]

include::platform/ref-delete-hosts-api-endpoint.adoc[leveloffset=+2]


ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[id="controller-keep-subscription-in-compliance"]
[id="controller-keep-subscription-in-compliance_{context}"]

= Troubleshooting: Keep your subscription in compliance
= Keeping your subscription in compliance

Your subscription has two possible statuses:

* *Compliant*: Indicates that your subscription is appropriate for the number of hosts that you have automated within your subscription count.
* *Out of compliance*: Indicates that you have exceeded the number of hosts in your subscription.
//image::gs-controller-license-non-compliant.png[Subscription out of compliance]

ifdef::controller-UG,controller-AG[]
Compliance is computed as follows:

[literal, options="nowrap" subs="+attributes"]
Expand All @@ -23,39 +22,15 @@ Where:

Other important information displayed are:

* *Hosts automated*: Host count automated by the job, which consumes the license count.
* *Hosts imported*: Host count considering unique host names across all inventory sources. This number does not impact hosts remaining.
* *Hosts remaining*: Total host count minus hosts automated.
* *Hosts deleted*: Hosts that were deleted, freeing the license capacity.
* *Active hosts previously deleted*: Number of hosts now active that were previously deleted.
* *Hosts automated*: The number of hosts automated by the job, which consumes the license count.
* *Hosts imported*: The number of hosts considering unique host names across all inventory sources. This number does not impact hosts remaining.
* *Hosts remaining*: The number of hosts minus the number of hosts automated.
* *Hosts deleted*: The number of hosts that were deleted, freeing the license capacity.
* *Active hosts previously deleted*: The number of hosts now active that were previously deleted.

For example, if you have a subscription capacity of 10 hosts:

* Starting with 9 hosts, 2 hosts were added and 3 hosts were deleted, you now have 8 hosts (compliant).
* 3 hosts were automated again, now you have 11 hosts, which puts you over the subscription limit of 10 (non-compliant).
* If you delete hosts, refresh the subscription details to see the change in count and status.

= Viewing the host activity

.Procedure
//[ddacosta] I don't see a Host Metrics menu selection off the standalone navigation panel. Should it be Resources > Hosts? If so, add replace with {MenuInfrastructureHosts}
//[ddacosta] For 2.5 Host Metrics is off the Analytics menu. Use {MenuAAHostMetrics}
. In the navigation panel, select menu:Host Metrics[] to view the activity associated with hosts, such as those that have been automated and deleted.
+
Each unique hostname is listed and sorted by the user's preference.
+
image::ug-host-metrics.png[Host metrics]
+
[NOTE]
====
A scheduled task automatically updates these values on a weekly basis and deletes jobs with hosts that were last automated more than a year ago.
====

. Delete unnecessary hosts directly from the Host Metrics view by selecting the desired hosts and clicking btn:[Delete].
+
These are soft-deleted, meaning their records are not removed, but are not being used and thereby not counted towards your subscription.
endif::controller-UG,controller-AG[]

ifdef::controller-GS,controller-AG[]
For more information, see link:{BaseURL}/red_hat_ansible_automation_platform/{PlatformVers}/html-single/automation_controller_user_guide/index#controller-keep-subscription-in-compliance[Troubleshooting: Keeping your subscription in compliance] in _{ControllerUG}_.
endif::controller-GS,controller-AG[]
16 changes: 16 additions & 0 deletions downstream/modules/platform/con-host-metrics-dashboard.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[id="con-host-metrics-dashboard_{context}"]

= Host Metrics dashboard

To view your host metrics, in the navigation pane, select {MenuAAHostMetrics}.

The Host Metrics dashboard provides high level automation run details per managed host, including:

* The first and last time a host was automated.
* The number of times automation has been run or attempted to be run against a host.
* The number of times a managed host has been deleted.

The ability to view the number of times automation has been run on hosts enables you to:

* View your most commonly automated hosts.
* More accurately reflect the scope of your automation landscape.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[id="con-host-metrics-subscriptions_{context}"]

= Host metrics and subscription

Host metrics can be used to accurately count node usage and ensure subscription compliance. For example, if a host is no longer in use or otherwise should not be counted towards the subscription total, it can be soft-deleted.
14 changes: 14 additions & 0 deletions downstream/modules/platform/con-soft-deletion.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[id="con-soft-deletion_{context}"]

= Soft deletion

Soft deletion enables the removal of decommissioned hosts from the Host Metrics view and excludes them from any potential managed node counting.
Additionally, the following host types can also be deleted:

* Ephemeral, uniquely provisioned hosts, such as those used for CI-CD, or testing only.
* Bench provisioning or temporary hosts.
* Older hosts that have been decommissioned and are never automated against.

Soft deletion is intended for legitimate use case scenarios only.
It must not be used to violate subscription counting, for example, for the purposes of node recycling.
For more information, see link:https://access.redhat.com/articles/3331481[How are "managed nodes" defined as part of the {PlatformName} offering]?
6 changes: 6 additions & 0 deletions downstream/modules/platform/con-view-hosts-in-CLI.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[id="con-view-hosts-in-CLI_{context}"]

= Viewing Hosts automated in the CLI

{ControllerNameStart} provides a way to generate a CSV output of the host metric data and host metric summary through the _Command Line Interface_ (CLI).
You can also soft delete hosts in bulk through the API.
23 changes: 23 additions & 0 deletions downstream/modules/platform/con-view-hosts-in-ui.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[id="con-view-hosts-in-ui_{context}"]

= Viewing hosts automated in the user interface

.Procedure
//[ddacosta] I don't see a Host Metrics menu selection off the standalone navigation panel. Should it be Resources > Hosts? If so, add replace with {MenuInfrastructureHosts}
//[ddacosta] For 2.5 Host Metrics is off the Analytics menu. Use {MenuAAHostMetrics}
. In the navigation panel, select {MenuAAHostMetrics} to view the activity associated with hosts, such as those that have been automated and deleted.
+
Each unique hostname is listed and sorted by the user's preference.
//+
image::ug-host-metrics.png[Host metrics]
+
[NOTE]
====
A scheduled task automatically updates these values on a weekly basis and deletes jobs with hosts that were last automated more than a year ago.
====

. Delete unnecessary hosts directly from the Host Metrics view by selecting the desired hosts and clicking btn:[Delete].
+
These are soft-deleted, meaning their records are not removed, but are not being used and thereby not counted towards your subscription.

For more information, see link:{LinkControllerAdminGuide}/index#controller-keep-subscription-in-compliance[Keeping your subscription in compliance].
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ You are opted in for {Analytics} by default when you activate the platform on fi
. Click btn:[Save].
====

ifndef::controller-AG[]
.Prerequisites
You must have a Red Hat Subscription Manifest file exported from the Red Hat Customer Portal. For more information, see xref:assembly-aap-obtain-manifest-files[Obtaining a manifest file].

Expand Down Expand Up @@ -43,3 +44,4 @@ Hosts remaining:: Total host count minus hosts automated
.Next steps
* You can return to the license screen by selecting {MenuSetSubscription} from the navigation panel and clicking btn:[Edit subscription].

endif::controller-AG[]
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ To specify the number of rows (`<n>`) to output to each file:
awx-manage host_metric --tarball --rows_per_file <n>
----

The following is an example of a configuration file:
//The following is an example of a configuration file:

image:ug-host-metrics-awx-manage-config.png[Configuration file]
//image:ug-host-metrics-awx-manage-config.png[Configuration file]

{Analytics} receives and uses the JSON file.
{Analytics} receives and uses the JSON file.

For more information on using `metrics-utility` CLI, see link:{LinkControllerAdminGuide}/assembly-controller-metrics[Usage reporting with metrics-utility]
11 changes: 11 additions & 0 deletions downstream/modules/platform/ref-delete-hosts-api-endpoint.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[id="ref-delete-hosts-api-endpoint_{context}"]

= Deleting Hosts automated using API endpoint

The API lists only non-deleted records and are sortable by last_automation and used_in_inventories columns.

You can use the host metric API endpoint, `api/v2/host_metric` to soft delete hosts, using:

`api/v2/host_metric <n> DELETE`

A monthly scheduled task automatically deletes jobs that uses hosts from the Host Metric table that were last automated more than a year ago.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ include::platform/assembly-controller-log-files.adoc[leveloffset=+1]
//Lizzi's work: Logging removed at 2.5-next
include::platform/assembly-controller-logging-aggregation.adoc[leveloffset=+1]
include::platform/assembly-controller-metrics.adoc[leveloffset=+1]
include::platform/assembly-controller-subscription-management.adoc[leveloffset=+1]
include::platform/assembly-metrics-utility.adoc[leveloffset=+1]
include::platform/assembly-controller-secret-management.adoc[leveloffset=+1]
include::platform/assembly-ag-controller-secret-handling.adoc[leveloffset=+1]
Expand Down
0