Documentation

17. Tower 配置

您可以在 Settings 页面的以下标签页中配置各种 Tower 设置:

_images/ug-settings-menu-screen.png

每个标签页都包含有**Reset** 按钮,允许把输入的任意值恢复到默认值。Reset All 允许您将 Edit Tower Configuration 中的所有值恢复到其出厂默认值。

Save 应用您所做的更改,但不退出编辑对话框。要返回到 Configure Tower 屏幕,点击左侧导航栏中的 Settings (settings) 图标,或使用当前屏幕顶部的图标。

17.1. 认证

通过 Tower 用户界面,您可以设置不同的身份验证类型以简化登录: GitHub 、Google 、LDAP 、params 和 SAML。创建开发人员应用程序并将其注册到适当的服务后,您可以为其设置授权。因为配置文件现在保存在 Ansible Tower 3.1 的 PostgreSQL 数据库而不是平面文件中,因此推荐使用 Ansible Tower 用户界面来设置授权。

  1. 在左侧导航栏中,把鼠标移到 Settings(settings) 图标上并选择 Authentication,或者从 Settings 界面中点 Authentication 标签页。

  2. 验证窗口会打开。从窗口顶部的标签页行中选择适当的验证类型。

_images/configure-tower-auth.png

不同的验证类型需要输入不同的信息。请确保根据需要提供了所需信息。

注解

有关每种验证类型的详情,请参考管理指南中的 Setting Up Authentication 部分。

  1. 点击 Save 应用设置,或者点 Cancel 取消更改。

17.2. Jobs

Jobs 标签页允许您配置 Tower 的 Ad Hoc 命令功能使用模块类型,设置可以被调度的作业数量,以及与 Tower 作业相关的其他设置。

  1. 在左侧导航栏中,把鼠标移到 Settings (settings) 图标并选择 Jobs,或者点击 Settings 界面中的 Jobs 标签页。

  2. 在提供的项中设置可配置的选项。点每个项旁的 help 图标可以显示相关的信息。有关为隔离的实例组配置持续时间的详情,请参考 隔离实例组 部分。有关配置 Galaxy 的信息,请参阅 Ansible Galaxy 支持

注解

所有超时的值都以秒为单位。

_images/configure-tower-jobs.png
  1. 点击 Save 应用设置,或者点 Cancel 取消更改。

17.3. System

System 标签页允许您定义 Tower 主机的基本 URL,配置警报,启用活动捕获,控制用户的可见性,通过许可证文件启用特定的 Tower 功能,并配置日志聚合选项。

  1. 在左侧导航栏中,把鼠标移到 Settings (settings) 图标并选择 System,或者点击 Settings 界面中的 System 标签页。

  2. 系统窗口将打开。从窗口顶部的标签页行中选择一个选项:

  • Misc. System:定义 Tower 主机的基本 URL,启用 Tower 管理警告,并允许所有用户对机构管理员可见。

  • Activity Stream:启用或禁用活动流。

  • Logging:根据您选择的类型配置日志选项:

    _images/configure-tower-system-logging-types.png

    关于每个日志记录聚合类型的更多信息,请参考 Ansible Tower Administration GuideTower Logging and Aggregation 部分。

  1. 在提供的项中设置可配置的选项。如果需要更多信息,点击字段旁的 help 图标。

_images/configure-tower-system.png

注解

允许外部用户创建 OAuth2 令牌 设置在默认情况下被禁用。这可确保外部用户无法*创建*自己的令牌。如果启用了这个设置并在随后禁用它,则外部用户在此期间创建的令牌仍会存在,它们不会被自动撤销。

  1. 点击 Save 应用设置,或者点 Cancel 取消更改。

17.4. 用户界面

用户界面标签允许您设定 Tower 分析设置,以及配置自定义日志和登录信息。

通过左面导航栏中的 Settings (settings) 图标访问用户界面设置,并选择 User Interface,或者点击 Settings 屏幕中的 User Interface 标签页。

_images/configure-tower-ui.png

17.4.1. 使用情况分析和数据收集

在Tower 包括了一个数据可用性信息的收集工具程序。使用这个软件的目的是为了更好地理解 Tower 用户如何与 Tower 进行交互,以便帮助更好地开发以后的版本,为用户提供更好的使用体验。

只有安装 Tower 测试版或全新安装 Tower 的用户才能选择进行这个数据收集。

如果想改变如何参与这个分析行为,可以使用 Configure Tower 用户界面(通过左面浏览栏中的 Settings (settings) 图标访问)来修改相关的设置。

Ansible Tower 会自动收集用户数据以帮助改进 Tower 产品。您可以通过在设置菜单中的 User Interface 标签中设置您的参与级别来控制 Tower 收集数据的方法。

_images/configure-tower-ui-tracking_state.png
  1. 从 User Tracking State 下拉列表中选择所需的数据收集级别:

  • Off: 禁用数据收集。

  • Anonymous: 启用数据收集功能,但不会收集您的特定用户数据。

  • Detailed:启用数据收集功能,其中包括您的特定用户数据。

  1. 点击 Save 应用设置,或者点 Cancel 取消更改。

如需更多信息,请参阅 https://www.redhat.com/en/about/privacy-policy

17.4.2. 自定义徽标和镜像

Ansible Tower 支持使用自定义徽标。您可以通过上传一个图像文件来添加自定义徽标。通过从 Settings(settings)菜单的 User Interface 设置中提供自定义登录信息。

_images/configure-tower-ui.png

要获得最佳定制徽标效果,请使用透明背景的 .png 文件。GIF 、PNG 和 JPEG 格式被支持。

如果需要,您可以通过在 Custom Login Info 文本字段中添加特定信息(如法律通知或免责声明)来把它加到登录界面的文本框中。

例如,如果您上传了一个特定的徽标,并添加了以下文本:

_images/configure-tower-ui-logo-filled.png

Tower 登录对话框类似如下:

_images/configure-tower-ui-angry-spud-login.png

选择 Revert 时会出现标准的 Ansible Tower 徽标。

_images/login-form-empty.png

17.5. 许可证

Starting with 3.8, Ansible Tower uses available subscriptions or a subscription manifest to authorize the use of Tower. Previously, Tower used a license key and a JSON dictionary of license metadata. Even if you already have valid licenses from previous versions, you must still provide your credentials or a subscriptions manifest again upon upgrading to Tower 3.8. To obtain your Tower subscription, you can either:

  1. 在许可证页面中提供您的红帽或者 Satellite 用户名和密码。

  2. 从客户门户网站的订阅分配页面中获取订阅清单。详情请参阅 获取一个订阅清单

如果您**有**一个 Red Hat Ansible Automation Platform 订阅,在启动 Tower 时使用您的红帽客户凭证访问您的订阅信息(请参阅以下说明)。

如果您还**没有** Red Hat Ansible Automation Platform 订阅,您可以请求一个试用订阅 `here <https://www.redhat.com/en/technologies/management/ansible/try-it>`_或点击 Request Subscription 并按照说明请求订阅。

**带有 Satellite 的断开连接的环境**在配置了 Tower 实例的订阅管理器以连接到其 Satellite 实例的情况下,可以使用基于虚拟机安装上的登录流。对于**没有 Satellite**的断开连接的环境,推荐的临时解决方案包括 [1] 从 access.redhat.com 下载清单,然后将其上传到断开连接的 Tower 实例,或者 [2] 通过一个代理服务器连接到互联网。

注解

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

如果您的订阅有问题,请联络销售人员或者红帽客户服务(https://access.redhat.com/support/contact/customerService/)。

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

no license

Use your Red Hat credentials (username and password) to retrieve and import your subscription, or upload a subscription manifest you generate from https://access.redhat.com/management/subscription_allocations.

  1. Enter your Red Hat customer credentials (username and password) and click Get Subscriptions. Use your Satellite username/password if your Tower cluster nodes are registered to Satellite via Subscription Manager. See Installing Satellite instances on Tower for more information.

Alternatively, if you have a subscriptions manifest, you can upload it by browsing to the location where the file is saved to upload it (the subscription manifest is the complete .zip file, not its component parts). See 获取一个订阅清单 for more detail.

注解

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

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

  • If it is a subscription manifest, Tower will use the first valid subscription included in your manifest file. This is why it is important to only include the subscription you want applied to the Tower installation.

  • If you entered your credential information (username/password), Tower 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 Tower 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 on the License settings in the Configure Tower screen of the UI), you will need to renew it in Tower 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 Tower 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, Tower 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 are:

  • 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 Tower 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. 查看 End User License Agreement

  2. 许可证页面的下半部分涉及分析数据收集。这可以帮助红帽通过提供更好的用户体验来改进产品。如需了解与数据收集相关的更多信息,请参阅 使用情况分析和数据收集。数据收集功能会被默认启用,但您可以取消相关的功能:

  • User analytics 从 Tower 用户界面收集数据。

  • Automation analytics 提供对您使用的 Ansible Tower 的自动化的高级分析,该分析可用来帮助您辨别 Tower 使用的倾向。为了使 Automation Analytics 起作用,您的 Ansible Tower 实例**必须**运行在 Red Hat Enterprise Linux 上。详情请参阅 自动化分析 部分。

注解

目前,当 Ansible Tower 在 OpenShift Container Platform 中运行时,Automation Insights 不被支持。您可以随时更改您的分析数据收集设置,如 使用情况分析和数据收集 部分所述。

  1. 指定跟踪和分析首选项后,请点击 Submit

在您的订阅被接受后,Tower 会显示许可证页面,并进入 Ansible Tower 界面的仪表板。以后,如果需要,可以通过点击左侧导航栏中的 Settings(settings)图标并选择 Settings 界面中的 License 标签页来进入许可证界面。

license accepted