Documentation

4. Import a Subscription

Available subscriptions or a subscription manifest authorize the use of the automation controller. To obtain your automation controller subscription, you can either:

  1. Provide your Red Hat or Satellite username and password on the license page.

  2. Obtain a subscriptions manifest from your Subscription Allocations page on the customer portal. See Obtaining a subscriptions manifest in the Automation Controller User Guide for more detail.

If you have a Red Hat Ansible Automation Platform subscription, use your Red Hat customer credentials when you launch the controller to access your subscription information (see instructions below).

If you do not have a Red Hat Ansible Automation Platform subscription, you can request a trial subscription here or click Request Subscription and follow the instructions to request one.

Disconnected environments with Satellite will be able to use the login flow on vm-based installations if they have configured subscription manager on the controller instance to connect to their Satellite instance. Recommended workarounds for disconnected environments without Satellite include [1] downloading a manifest from access.redhat.com in a connected environment, then uploading it to the disconnected controller instance, or [2] connecting to the Internet through a proxy server.

참고

In order to use a disconnected environment, it is necessary to have a valid automation controller entitlement attached to your Satellite organization’s manifest. This can be confirmed by using hammer subscription list \--organization <org_name>.

To understand what is supported with your subscription, see Red Hat Ansible Automation Platform Controller Licensing, Updates, and Support for more information. If you have issues with the subscription you have received, please contact your Sales Account Manager or Red Hat Customer Service at https://access.redhat.com/support/contact/customerService/.

When the controller launches for the first time, the Subscription screen automatically displays.

no license

  1. By default, the option to retrieve and import your subscription is to upload a subscription manifest you generate from https://access.redhat.com/management/subscription_allocations. See Obtaining a subscriptions manifest for more detail. Once you have a subscription manifest, you can upload it by browsing to the location where the file is saved (the subscription manifest is the complete .zip file, not its component parts).

참고

If the Browse button in the subscription manifest option is grayed-out, clear the username and password fields to enable the Browse button.

Alternatively, you can choose the option to enter your Red Hat customer credentials using your username and password. Use your Satellite username/password if your controller cluster nodes are registered to Satellite via Subscription Manager. Once you entered your credentials, click Get Subscriptions.

  1. The subscription metadata is then retrieved from the RHSM/Satellite API, or from the manifest provided.

  • If it is a subscription manifest, and multiple subscription counts were applied in a single installation, the controller will combine the counts but use the earliest expiration date as the expiry (at which point you will need to refresh your subscription).

  • If you entered your credential information (username/password), the controller retrieves your configured subscription service. Then it prompts you to choose the subscription you want to run (the example below shows multiple subscriptions) and entitles the controller with that metadata. You can log in over time and retrieve new subscriptions if you have renewed.

참고

When your subscription expires (you can check this in the Subscription details of the Subscription settings window), you will need to renew it in the controller by one of these two methods.

_images/license-password-entered.png

If you encounter the following error message, you will need the proper permissions required for the Satellite user with which the controller admin uses to apply a subscription.

_images/tower-license-error-satellite-user.png

The Satellite username/password is used to query the Satellite API for existing subscriptions. From the Satellite API, the automation controller gets back some metadata about those subscriptions, then filter through to find valid subscriptions that you could apply, which are then displayed as valid subscription options in the UI.

The following Satellite roles grant proper access:

  • Custom with view_subscriptions and view_organizations filter

  • Viewer

  • Administrator

  • Organization Admin

  • Manager

As the Custom role is the most restrictive of these, this is the recommend role to use for your controller integration. Refer to the Satellite documentation on managing users and roles for more detail.

참고

The System Administrator role is not equivalent to the Administrator user checkbox, and will not provide sufficient permissions to access the subscriptions API page.

  1. Click Next to proceed to Tracking and Insights. Tracking and insights collect data to help Red Hat improve the product by delivering you a much better user experience. For more information about data collection, refer to Usability Analytics and Data Collection. This option is checked by default, but you may opt out of any of the following:

  • User analytics collects data from the controller User Interface.

  • Insights Analytics provides a high level analysis of your automation with automation controller, which is used to help you identify trends and anomalous use of the controller. For opt-in of Automation Analytics to have any effect, your instance of automation controller must be running on Red Hat Enterprise Linux. See instructions described in the Automation Analytics section. If you select to opt-in for this option, the screen expands and prompts for a username and password to enable Insights, if applicable.

참고

You may change your analytics data collection preferences at any time, as described in the Usability Analytics and Data Collection section.

  1. After you have specified your tracking and insights preferences, click Next to proceed to the End User Agreement.

  2. Review and check the I agree to the End User License Agreement checkbox and click Submit.

Once your subscription has been accepted, the controller briefly displays the subscription details and navigates you to the Dashboard of the automation controller interface. For later reference, you can return to this screen by clicking Settings from the left navigation bar and select Subscription settings from the Subscription option.

license accepted

4.1. Subscription compliance

Using Ansible in environments where node counts are frequently changing (CI environments, public cloud environments, etc) can be a challenge to keep track, so Ansible Automation Platform automatically keeps count of node usage properly to ensure they are counted accurately, not double-counted, or only count nodes that were automated first, etc. Often, these instances are thought of as ephemeral, meaning they exist for some unit of time, e.g. an hour or so, then are deleted. Refer to the blog, Subscription and Host Metric Changes in Ansible Automation Platform 2.4 for details of this concept.

The above blog explains situations on why you would want to delete hosts, (e.g., ephemeral), and walks through what is and is not a deleted host that reappears. This allows you to search on keywords like decommissioned as well as, how do I “decommission” a host? The blog also describes what is 《going out of compliance》 and 《going back into compliance》 《means to your subscription allowance.

In the automation controller UI, status of compliant indicates your subscription is in compliance with the number of hosts you have automated within your subscription count. Otherwise, your status will show an Out of Compliance status, indicating you have exceeded the number of hosts in your subscription.

_images/qs-license-non-compliant.png

Even if a host is automated in multiple inventories, it will count against your subscription’s alloted host count.

Compliance is computed as such:

managed > manifest_limit        =>      non-compliant
managed =< manifest_limit       =>      compliant

Where managed is unique managed hosts without deletions. And manifest_limit is the number of managed hosts in the subscription manifest.

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 (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

For demonstration purposes, suppose 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 were to delete host(s), be sure to refresh the subscription details to see the change in count and status

Click Host Metrics from the left navigation menu 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.

_images/ug-host-metrics.png

참고

A scheduled task automatically updates these values on a weekly basis and deletes jobs with hosts that were last automated more than year ago.

You can delete directly from the Host Metrics view the hosts you no longer want to use by selecting the desired host(s) and clicking Delete. These are soft-deleted, meaning their records are not removed, but are not being used and thereby not counted towards your subscription usage.

_images/ug-host-metrics-delete.png

4.2. Host metrics utilities

The controller provides a way to generate a CSV output of the host metric data and host metric summary through the Command Line Interface (CLI) and to soft delete hosts in bulk through the API.

4.2.1. awx-manage utility

The existing awx-manage utility is expanded to support the following options:

awx-manage host_metric --csv

This command produces host metric data, a host metrics summary file, and a cluster info file. To package all the files into a single tarball for ease of distribution and sharing:

awx-manage host_metric --tarball

To specify the number of rows (<n>) to output to each file:

awx-manage host_metric --tarball --rows_per_file <n>
_images/ug-host-metrics-awx-manage.png

This example specifies 5 rows per file and produces a tarball that contains a config file, the reports, and a host metrics summary file. You can access the tarball and extract it from your local file folder directory.

_images/ug-host-metrics-awx-manage-files.png

Below is an example of a report produced with 5 rows a file:

_images/ug-host-metrics-awx-manage-file-example.png

Below is an example of a config file:

_images/ug-host-metrics-awx-manage-config.png

This JSON file is what gets sent to and consumed by Automation Analytics.

The host metrics summary file is blank and is only used as a placeholder for this release.

4.2.2. API endpoint functions

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

Alternative to the UI, you can use the host metric API endpoint, api/v2/host_metric to soft-delete hosts:

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 year ago.

4.3. Obtaining a subscriptions manifest

In order to upload a subscriptions manifest, first set up your subscription allocations:

  1. Go to https://access.redhat.com/management/subscription_allocations.

The Subscriptions Allocations page contains no subscriptions until you create one.

_images/subscription-allocations-empty.png
  1. Click the Create New subscription allocation button to create a new subscription allocation.

참고

If this button is not present or disabled, you do not have the proper permissions to create subscription allocations. To create a subscription allocation, you must either be an Administrator on the Customer Portal, or have the Manage Your Subscriptions role. Contact an access.redhat.com administrator or organization administrator who will be able to grant you permission to manage subscriptions.

  1. Enter a name for your subscription and select Satellite 6.8 from the Type drop-down menu.

_images/subscription-allocations-create.png
  1. Click Create.

  2. Once your subscriptions manifest is successfully created, it displays various information including subscription information at the bottom of the Details tab. The number indicated next to Entitlements indicates the number of entitlements associated with your subscription.

_images/subscription-allocations-details-bottom.png

In order to obtain a subscriptions manifest, you must add an entitlement to your subscriptions though the Subscriptions tab.

  1. Click the Subscriptions tab.

_images/subscription-allocations-details.png
  1. In the Subscriptions tab, there are no subscriptions to display, click the Add Subscriptions button.

_images/subscription-allocations-subscriptions.png

The next screen allows you to select and add entitlements to put in the manifest file. You may select multiple Ansible Automation Platform subscriptions (with the same SKU) in your subscription allocation. Valid Ansible Automation Platform subscriptions commonly go by the name 《Red Hat Ansible Automation…》.

  1. Specify the number of entitlements/managed nodes to put in the manifest file. This allows you to split up a subscription (for example: 400 nodes on a development cluster and 600 nodes for the production cluster, out of a 1000 node subscription).

_images/aap-subscriptions.png

참고

You can apply multiple subscriptions to a single installation by adding multiple subscriptions of the same type to a manifest file and uploading them. Similarly, a subset of a subscription can be applied by only allocating a portion of the subscription when creating the manifest.

  1. Click Submit.

The allocations you specified, once successfully added, are displayed in the Subscriptions tab.

  1. Click the Details tab to access the subscription manifest file.

  2. At the bottom of the details window under Entitlements, click the Export Manifest button to export the manifest file for this subscription.

_images/subscription-allocations-details-export.png

A folder pre-pended with manifest_ in the name is downloaded to your local drive. Multiple subscriptions with the same SKU will be aggregated.

  1. Now that you have a subscription manifest, proceed to the Subscription screen. Upload the entire manifest file (.zip) by clicking Browse and navigate to the location where the file is saved. Do not open it or upload individual parts of it.

4.4. Adding a subscription manually

If you are unable to apply or update the subscription info using the user interface, you can upload the subscriptions manifest manually in an Ansible playbook using the license module in the ansible.controller collection:

- name: Set the license using a file
  license:
  manifest: "/tmp/my_manifest.zip"

See the Ansible tower_license module for more information.