From 5b6f5cda0411ee846439b754b7d40fa7d4f19097 Mon Sep 17 00:00:00 2001 From: Ian Fowler <77341519+ianf77@users.noreply.github.com> Date: Tue, 6 May 2025 14:58:18 +0100 Subject: [PATCH] Adding Subscription Management to Controller Admin (#3385) * Adding Subscription Management to Controller Admin Added assembly and first modules Asciidoc conversion for subscription content in configuring automation execution https://issues.redhat.com/browse/AAP-43840 * Adding Subsciption Managemt to Controller admin Build problem investigation Asciidoc conversion for subscription content in configuring automation execution https://issues.redhat.com/browse/AAP-43840 * Adding Subscription Management to Controller Admin Added remaining modules Asciidoc conversion for subscription content in configuring automation execution https://issues.redhat.com/browse/AAP-43840 * Adding Subscription Manager to Controller Admin Corrections Asciidoc conversion for subscription content in configuring automation execution https://issues.redhat.com/browse/AAP-43840 --- .../platform/assembly-aap-activate.adoc | 3 +- ...ly-controller-subscription-management.adoc | 34 ++++++++++++++++ ...oller-keep-subscription-in-compliance.adoc | 39 ++++--------------- .../platform/con-host-metrics-dashboard.adoc | 16 ++++++++ .../con-host-metrics-subscriptions.adoc | 5 +++ .../modules/platform/con-soft-deletion.adoc | 14 +++++++ .../platform/con-view-hosts-in-CLI.adoc | 6 +++ .../platform/con-view-hosts-in-ui.adoc | 23 +++++++++++ .../proc-aap-activate-with-manifest.adoc | 2 + .../proc-controller-awx-manage-utility.adoc | 8 ++-- .../ref-delete-hosts-api-endpoint.adoc | 11 ++++++ .../controller-admin-guide/master.adoc | 1 + 12 files changed, 126 insertions(+), 36 deletions(-) create mode 100644 downstream/assemblies/platform/assembly-controller-subscription-management.adoc create mode 100644 downstream/modules/platform/con-host-metrics-dashboard.adoc create mode 100644 downstream/modules/platform/con-host-metrics-subscriptions.adoc create mode 100644 downstream/modules/platform/con-soft-deletion.adoc create mode 100644 downstream/modules/platform/con-view-hosts-in-CLI.adoc create mode 100644 downstream/modules/platform/con-view-hosts-in-ui.adoc create mode 100644 downstream/modules/platform/ref-delete-hosts-api-endpoint.adoc diff --git a/downstream/assemblies/platform/assembly-aap-activate.adoc b/downstream/assemblies/platform/assembly-aap-activate.adoc index 99d6e852e6..69daa596db 100644 --- a/downstream/assemblies/platform/assembly-aap-activate.adoc +++ b/downstream/assemblies/platform/assembly-aap-activate.adoc @@ -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:] \ No newline at end of file diff --git a/downstream/assemblies/platform/assembly-controller-subscription-management.adoc b/downstream/assemblies/platform/assembly-controller-subscription-management.adoc new file mode 100644 index 0000000000..87f71ccd4b --- /dev/null +++ b/downstream/assemblies/platform/assembly-controller-subscription-management.adoc @@ -0,0 +1,34 @@ +ifdef::context[:parent-context: {context}] + +:context: subscription-management +:_mod-docs-content-type: + +[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:] diff --git a/downstream/modules/platform/con-controller-keep-subscription-in-compliance.adoc b/downstream/modules/platform/con-controller-keep-subscription-in-compliance.adoc index 52190b0976..71f67880d7 100644 --- a/downstream/modules/platform/con-controller-keep-subscription-in-compliance.adoc +++ b/downstream/modules/platform/con-controller-keep-subscription-in-compliance.adoc @@ -1,6 +1,6 @@ -[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: @@ -8,7 +8,6 @@ Your subscription has two possible statuses: * *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"] @@ -23,11 +22,11 @@ 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: @@ -35,27 +34,3 @@ For example, if you have a subscription capacity of 10 hosts: * 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[] diff --git a/downstream/modules/platform/con-host-metrics-dashboard.adoc b/downstream/modules/platform/con-host-metrics-dashboard.adoc new file mode 100644 index 0000000000..89b8401445 --- /dev/null +++ b/downstream/modules/platform/con-host-metrics-dashboard.adoc @@ -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. diff --git a/downstream/modules/platform/con-host-metrics-subscriptions.adoc b/downstream/modules/platform/con-host-metrics-subscriptions.adoc new file mode 100644 index 0000000000..854953abeb --- /dev/null +++ b/downstream/modules/platform/con-host-metrics-subscriptions.adoc @@ -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. diff --git a/downstream/modules/platform/con-soft-deletion.adoc b/downstream/modules/platform/con-soft-deletion.adoc new file mode 100644 index 0000000000..8c451c3d40 --- /dev/null +++ b/downstream/modules/platform/con-soft-deletion.adoc @@ -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]? diff --git a/downstream/modules/platform/con-view-hosts-in-CLI.adoc b/downstream/modules/platform/con-view-hosts-in-CLI.adoc new file mode 100644 index 0000000000..0811686f5d --- /dev/null +++ b/downstream/modules/platform/con-view-hosts-in-CLI.adoc @@ -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. diff --git a/downstream/modules/platform/con-view-hosts-in-ui.adoc b/downstream/modules/platform/con-view-hosts-in-ui.adoc new file mode 100644 index 0000000000..83298d2356 --- /dev/null +++ b/downstream/modules/platform/con-view-hosts-in-ui.adoc @@ -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]. diff --git a/downstream/modules/platform/proc-aap-activate-with-manifest.adoc b/downstream/modules/platform/proc-aap-activate-with-manifest.adoc index 60d3d79665..2fb71ad8ba 100644 --- a/downstream/modules/platform/proc-aap-activate-with-manifest.adoc +++ b/downstream/modules/platform/proc-aap-activate-with-manifest.adoc @@ -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]. @@ -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[] \ No newline at end of file diff --git a/downstream/modules/platform/proc-controller-awx-manage-utility.adoc b/downstream/modules/platform/proc-controller-awx-manage-utility.adoc index 8198129865..aefa587f25 100644 --- a/downstream/modules/platform/proc-controller-awx-manage-utility.adoc +++ b/downstream/modules/platform/proc-controller-awx-manage-utility.adoc @@ -24,8 +24,10 @@ To specify the number of rows (``) to output to each file: awx-manage host_metric --tarball --rows_per_file ---- -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. \ No newline at end of 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] \ No newline at end of file diff --git a/downstream/modules/platform/ref-delete-hosts-api-endpoint.adoc b/downstream/modules/platform/ref-delete-hosts-api-endpoint.adoc new file mode 100644 index 0000000000..46542a57af --- /dev/null +++ b/downstream/modules/platform/ref-delete-hosts-api-endpoint.adoc @@ -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 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. diff --git a/downstream/titles/controller/controller-admin-guide/master.adoc b/downstream/titles/controller/controller-admin-guide/master.adoc index acd202f15a..c77c1a71ac 100644 --- a/downstream/titles/controller/controller-admin-guide/master.adoc +++ b/downstream/titles/controller/controller-admin-guide/master.adoc @@ -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]