Share Feedback to help us keep improving.
1.2. 安装自动化仪表板
安装 Automation Dashboard,以收集和分析与 Ansible Automation Platform 部署中的作业执行、效率和自动化节省相关的关键指标。
先决条件
以下测试配置之一:
- 基于 RHEL 9 x86 或 ARM 的物理主机。
使用外部数据库:PostgreSQL v15 数据库。
重要不要试图在与 Ansible Automation Platform 相同的主机上安装 Automation Dashboard。
Automation Dashboard 安装已使用以下配置进行测试:
- 80 GB 硬盘驱动器(取决于数据增长)
- 4 个 vCPU x 16 GB RAM
- Disk IOPS - 3000
- 处理最多 10,000 个作业/月和 47M 摘要/月
- 连接到同一版本的三个 Ansible Automation Platform 部署
- 访问 RHEL 9 主机的 baseos 和 Ansible Automation Platformstream 软件仓库软件包。
RHEL 9 主机的非 root 登录帐户进行安装。
-
这要求对 root 进行免密码
sudo访问。 -
默认情况下,我们使用用户帐户的
$HOMEDIR。
-
这要求对 root 进行免密码
- 用于访问 Ansible Automation Platform 实例的 URL 详情。
- Ansible Automation Platform OAuth2 令牌,用于 Ansible Automation Platform 实例和 Automation Dashboard 之间的通信。
- 访问下载提供 Automation Dashboard 的安装组件的安装捆绑包。
打开防火墙访问,以允许 AAP 实例和 Automation Dashboard 之间的双向通信。
- 这包括 HTTPS/443 (或 Ansible Automation Platform 配置的端口)从仪表板到 Ansible Automation Platform 实例。
- 端口 8447 是 Automation Dashboard 的默认入口端口。此端口可在安装过程中配置。
- 可能阻止 5432 到 PostgreSQL 的 RHEL 防火墙端口。
-
在支持的 RHEL 版本上安装的一个支持的
ansible-core版本。
流程
- 从 access.redhat.com 下载最新的安装程序 tar 文件。导航到 Downloads > Red Hat Ansible Automation Platform Product Software。
- 将安装源文件复制到 RHEL 9 主机中。
提取安装源。这将需要 ~500Mb。在这个示例中,我们将使用 ec2-user 主目录:
/home/<username>。tar -xzvf ansible-automation-dashboard-containerized-setup-bundle-0.1-x86_64.tar.gz cd ansible-automation-dashboard-containerized-setup/运行以下命令验证所需软件安装:
cd ansible-automation-dashboard-containerized-setup sudo dnf install ansible-core ansible-galaxy collection install -r requirements.yml在 Ansible Automation Platform 实例中创建一个应用程序
client_id/client_secret:使用以下步骤创建 OAuth2 应用程序:
对于 Ansible 2.4 :
对于 Ansible 2.5 和 2.6 :
添加以下信息:
- 名称 : automation-dashboard-sso
- 授权授权类型 : authorization-code
- Organization: Default
- 重定向 URI: https://AUTOMATION_DASHBOARD_FQDN/auth-callback
客户端类型 :机密
注意Ansible Automation Platform 的 Name、Organization 和 HTTPS 端口号的值是可配置的。本文档中提供的示例假定使用端口 443。
-
将
client_id和client_secret 信息输入保存到清单文件中。 创建 Ansible Automation Platform 访问令牌:
进入 https://AAP_GATEWAY_FQDN/#/users/<id>/tokens,并使用以下信息创建令牌:
- OAuth 应用程序: automation-dashboard-sso
- Scope: read
-
存储此访问令牌值。
clusters.yaml使用此访问令牌。
复制示例清单并在运行安装程序前修改它。
cp -i inventory.example inventory vi inventory重要- 这是一个示例测试的清单,其中包含 Ansible Automation Platform 2.4、2.5 和 2.6 的默认值。
您必须更改以下值,以便在您的环境中使用此清单配置:
-
将 RHEL 9 主机从
host.example.com改为 FQDN 主机 -
更改短语
TODO,使其与您所有_admin_password或_pg_password值中的密码匹配。
-
将 RHEL 9 主机从
- 如需更多信息,请参阅本文档的 清单变量 部分。
# This is our Automation Dashboard front-end application [automationdashboard] host.example.com ansible_connection=local # These are required vars for the installation and should not be removed [automationdashboard:vars] # Configure AAP OAuth2 authentication. # aap_auth_provider_name - name as shown on login page. aap_auth_provider_name=Ansible Automation Platform # aap_auth_provider_protocol - http or https aap_auth_provider_protocol=https # AAP version - 2.4, 2.5 or 2.6 aap_auth_provider_aap_version=2.5 # aap_auth_provider_host - AAP IP or DNS name, with optional port aap_auth_provider_host=my-aap.example.com # aap_auth_provider_check_ssl - enforce TLS check or not. aap_auth_provider_check_ssl=true # aap_auth_provider_client_id and aap_auth_provider_client_secret - # they are obtained from AAP when OAuth2 application is created in AAP. aap_auth_provider_client_id=TODO aap_auth_provider_client_secret=TODO # Specify amount of old data to synchronoize after installation. # The initial_sync_days=N requests N days of old data, counting from "today". # The initial_sync_since requests data from the specified data until "today". # If both are specified, the initial_sync_since will be used. initial_sync_days=1 # initial_sync_since=2025-08-08 # Hide warnings when insecure https request are made. # Use this if your AAP uses self-signed TLS certificate. # show_urllib3_insecure_request_warning=False # Force clean install-like # dashboard_update_secret=true # HTTP/HTTPS settings # nginx_disable_https=true # Change nginx_http_port or nginx_https_port if you want to access dashboard on a different TCP port. # nginx_http_port=8083 # nginx_https_port=8447 # TLS certificate configuration # The dashboard_tls_cert needs: # - contain server certificate, intermediate CA certificates and root CA certificate. # - the server certificate must be the first one in the file. # dashboard_tls_cert=/path/to/tls/dashboard.crt # dashboard_tls_key=/path/to/tls/dashboard.key # Enable Django DEBUG. # django_debug=True [database] host.example.com ansible_connection=local [all:vars] postgresql_admin_username=postgres postgresql_admin_password=TODO # AAP Dashboard - mandatory # -------------------------- dashboard_pg_containerized=True dashboard_admin_password=TODO dashboard_pg_host=host.example.com dashboard_pg_username=aapdashboard dashboard_pg_password=TODO dashboard_pg_database=aapdashboard # bundle_install=true # <full path to the bundle directory> bundle_dir='{{ lookup("ansible.builtin.env", "PWD") }}/bundle'运行安装程序。
ansible-playbook -i inventory ansible.containerized_installer.dashboard_install
验证
请参考以下示例输出:
PLAY RECAP *********************************************************************************************************************************************
ec2-54-147-26-173.compute-1.amazonaws.com : ok=126 changed=51 unreachable=0 failed=0 skipped=42 rescued=0 ignored=0
localhost : ok=12 changed=0 unreachable=0 failed=0 skipped=9 rescued=0 ignored=0
可能会进行其他配置(例如,自动化仪表板的数据库可以在不同的主机上设置)。这需要对清单文件中的变量进行额外的更改。如需可用的变量,请参阅本文档的 清单变量 部分。