安装自动化服务目录 worker

Red Hat Ansible Automation Platform 2.1

使用 Ansible Automation Platform 2.0 设置或 Setup Bundle Installers 扩展您的 Red Hat Ansible Automation Platform 以与 cloud.redhat.com 上的自动化服务目录连接

Red Hat Customer Content Services

摘要

提供反馈:
如果您对本文档有任何改进建议,或发现错误,请联系技术支持 https://access.redhat.com,使用 Docs组件在 Ansible Automation PlatformJIRA 项目中创建一个问题。

前言

您可以使用 Ansible Automation Platform 设置或安装捆绑包安装程序来扩展 Red Hat Ansible Automation Platform 以与 cloud.redhat.com 上的自动服务目录连接。

这是第 2 天的活动,需要设置一个服务帐户,该帐户对自动化控制器中的所有基本资源/对象(组织、用户、项目、作业模板和清单)具有写入权限

Catalog worker 需要分配给 Red Hat Ansible Automation Platform 网络中主机的一组变量。运行 Catalog worker 将创建应用和应用令牌,安装必要的软件包,然后启动服务。

使开源包含更多

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。我们从这四个术语开始:master、slave、黑名单和白名单。由于此项工作十分艰巨,这些更改将在即将推出的几个发行版本中逐步实施。有关更多详情,请参阅我们的首席技术官 Chris Wright 提供的消息

第 1 章 安装自动化服务目录 worker

您可以使用以下说明来扩展红帽 Ansible 自动化平台,以连接到 cloud.redhat.com 上托管的 {Catalog} 服务。

1.1. 先决条件

  • 自动化控制器和与 /inventory 中指定的机构服务帐户关联的任何实例组节点必须在 RHEL 8.4 虚拟机上运行。
  • 已使用 Red Hat Subscription Manager 注册了 RHEL 8.4 虚拟机。安装将生成一个用于通过 cloud.redhat.com 进行身份验证的证书。
  • 您已将 Ansible Automation Platform SKU 附加到 Catalog Worker 节点。
  • 您已在运行自动化服务目录 worker 的 RHEL 8.4 虚拟机上启用了 SSH。
  • 自动化控制器至少配置了一个组织,包括清单、项目和作业模板。
  • 为拥有上述所有对象写入权限的每个组织创建一个服务帐户。应用令牌在安装程序运行时创建,不需要作为前提条件。

1.2. 将主机变量添加到安装程序

安装自动化服务目录 worker 需要在 Red Hat Ansible Automation Platform 安装程序中添加用于安装参数的主机变量。您指定的每个主机的 'host_vars' 文件存储参数信息。有关所有可用参数和所需参数,请参考下面的参数表。

表 1.1. 可用的 host_vars 参数

参数必填

servicescatalog_controller_hostname

 

servicescatalog_controller_name

 

servicescatalog_controller_user

servicescatalog_controller_password

servicescatalog_controller_validate_certs

 

servicescatalog_http_proxy

 

servicescatalog_https_proxy

 

servicescatalog_no_proxy

 

流程

  1. 进入到 Ansible Automation Platform setup 或 setup 捆绑包安装程序目录。

    # cd ansible-automation-platform-setup-<latest>
  2. 创建名为 host_vars 的新目录:

    # mkdir host_vars
  3. 为每个所需主机创建一个文件。下方列出了两个主机的参数示例。

    1. localhost 上的服务帐户:

      # touch finance
      ansible_connection: local
      
      servicescatalog_controller_name: Finance
      
      servicescatalog_controller_user: finance_sa
      servicescatalog_controller_password: <password>
    2. 额外主机上的服务帐户:

      # touch marketing
      ansible_host: IP address
      ansible_user: [User should have sudo access to install packages and write to system-level configuration files]
      ansible_become: true
      
      servicescatalog_controller_name: Marketing
      
      servicescatalog_controller_user: marketing_sa
      servicescatalog_controller_password: password
  4. 保存每个文件。
  5. 打开 Ansible Automation Platform 安装程序中的 inventory 文件 :

    # vi inventory
  6. [servicescatalog_workers] 下为每个主机添加 host_vars

    [servicescatalog_workers]
    finance
    marketing
  7. 保存清单文件。

1.3. 运行安装程序

现在,您可以继续运行安装程序。

  • 运行 Ansible Automation Platform 设置脚本:

    # ./setup.sh

运行自动化服务目录 worker 将创建一个应用程序和一个应用程序令牌,安装必要的软件包,连接到 cloud.redhat.com,并启动该服务。

验证

您可以验证自动化服务目录 worker 是否已安装并连接到您的自动化服务目录,并在自动化控制器上运行在自动化服务目录中运行的作业。

先决条件

您是目录管理员,可以创建产品组合并为其添加产品。

  1. 登录 cloud.redhat.com
  2. 进入到 Ansible Automation PlatformAutomation Services Catalog
  3. Platform
  4. 查找与为您的 host_vars 创建的主机关联的平台。
  5. 单击平台。
  6. 验证包括了来自您的自动化控制器的 inventorytemplates

法律通告

Copyright © 2023 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.