Documentation

2. 下载 Ansible Automation Platform 安装程序

从 Ansible Tower 3.8 开始,Automation Hub 将充当 Ansible Tower 的内容供应商,它需要 Ansible Tower 部署和 Automation Hub 部署一起运行。Tower 和 Automation Hub 可在 RHEL 7 或 8 上运行,但 OpenShift Container Platform(OCP)上只支持 Tower(不支持 Automation Hub)。在获取 Automation Hub 安装程序前,请确定要如何安装您的环境。

两个安装程序都有 Ansible Tower 和 Automation Hub,并提供完全相同的功能组。

root@localhost:~$ tar xvzf ansible-tower-setup-latest.tar.gz
root@localhost:~$ cd ansible-tower-setup-<tower_version>

在具有互联网访问的环境中进行安装时会检索最新的软件仓库、软件包和依赖项。您必须有一个有效的订阅才能激活 Ansible Automation Platform。

在安装或升级后,首先编辑 ansible-tower-setup-<tower_version> 目录中的清单(inventory)文件,使用版本号(例如 3.8.0)替换 <tower_version>

  • 在**没有**互联网的环境中安装。下载 bundled installer。当您无法直接访问在线存储库,或者您的环境需要使用代理时,使用此方法。

注解

要获取 Ansible Tower 的试用版本,请访问: http://www.ansible.com/tower-trial

如需了解定价信息,请访问: http://www.ansible.com/pricing

对于 OpenShift 安装程序,请访问 http://releases.ansible.com/ansible-tower/setup_openshift

2.1. 使用捆绑的 Ansible Automation Platform 安装程序

捆绑的 Ansible Automation Platform 安装程序适用于无法访问互联网的环境或者不想从在线仓库安装独立组件(及其相依软件包)的用户。这仍然需要访问 Red Hat Enterprise Linux 或 CentOS 软件仓库。所有其他依赖项都包含在 tar 归档中。

  1. https://access.redhat.com/downloads/content/480 直接访问捆绑 Ansible Automation Platform 安装程序的最新版本(您需要有一个红帽用户帐户才能下载)。

注解

Ansible Automation Platform 安装程序只支持 Red Hat Enterprise Linux 和 CentOS。

  1. 接下来,选择要下载的最新安装程序。.tar.gz 可用于 RHEL 7 和 RHEL 8 发行版本:

ansible-tower-setup-bundle-latest.tar.gz

注解

在 Red Hat Enterprise Linux 7 中,Ansible Tower 3.8.0 需要 Python 3 Software Collection。如果您要离线安装 Tower,您需要通过本地镜像(mirror)来提供 CentOS-SCL 或 RH-SCL 软件仓库:

  • Red Hat Subscription Manager: rhel-server-rhscl-7-rpms

  • Red Hat UI: rhui-rhel-server-rhui-rhscl-7-rpms

  • CentOS:centos-release-scl

来自于 Red Hat Enterprise Linux 软件仓库的依赖软件包列表包括在设置捆绑包中的 bundle/base_packages.txt 文件中。取决于运行的 Red Hat Enterprise Linux 的次版本,在这个文件中列出的版本可能与您配置的软件仓库中的版本稍有不同。

  1. 在您选择的机器中,解压安装/升级工具:

root@localhost:~$ tar xvzf ansible-tower-setup-latest.tar.gz
root@localhost:~$ cd ansible-tower-setup-<tower_version>
  1. 在安装或升级时,首先编辑 ansible-tower-setup-<tower_version> 目录中的清单(inventory)文件,使用版本号(例如 3.8.0)替换 <tower_version>