1.6. 安装容器化 Ansible Automation Platform
Ansible Automation Platform 的安装使用清单文件控制。清单文件定义使用和创建的主机和容器、组件的变量以及自定义安装所需的其他信息。
为方便提供示例清单文件,您可以复制和修改以快速启动。
注意
清单文件中未给出默认数据库选择。您必须按照清单文件中的说明,在内部提供的 postgres 之间进行适当的选择,或者提供您自己的外部管理和支持的数据库选项。
通过将 < >
; 占位符替换为您的特定变量并取消注释所有特定于您的需要的行来编辑清单文件。
# This is the AAP installer inventory file # Please consult the docs if you're unsure what to add # For all optional variables please consult the included README.md # This section is for your AAP Controller host(s) # ------------------------------------------------- [automationcontroller] fqdn_of_your_rhel_host ansible_connection=local # This section is for your AAP Automation Hub host(s) # ----------------------------------------------------- [automationhub] fqdn_of_your_rhel_host ansible_connection=local # This section is for your AAP EDA Controller host(s) # ----------------------------------------------------- [automationeda] fqdn_of_your_rhel_host ansible_connection=local # This section is for your AAP Execution host(s) # ------------------------------------------------ #[execution_nodes] #fqdn_of_your_rhel_host # This section is for the AAP database(s) # ----------------------------------------- # Uncomment the lines below and amend appropriately if you want AAP to install and manage the postgres databases # Leave commented out if you intend to use your own external database and just set appropriate _pg_hosts vars # see mandatory sections under each AAP component #[database] #fqdn_of_your_rhel_host ansible_connection=local [all:vars] # Common variables needed for installation # ---------------------------------------- postgresql_admin_username=postgres postgresql_admin_password=<set your own> # If using the online (non-bundled) installer, you need to set RHN registry credentials registry_username=<your RHN username> registry_password=<your RHN password> # If using the bundled installer, you need to alter defaults by using: #bundle_install=true # The bundle directory must include /bundle in the path #bundle_dir=<full path to the bundle directory> # To add more decision environment images you need to set the de_extra_images variable #de_extra_images=[{'name': 'Custom decision environment', 'image': '<registry>/<namespace>/<image>:<tag>'}] # To add more execution environment images you need to set the ee_extra_images variable #ee_extra_images=[{'name': 'Custom execution environment', 'image': '<registry>/<namespace>/<image>:<tag>'}] # To use custom TLS CA certificate/key you need to set these variables #ca_tls_cert=<full path to your TLS CA certificate file> #ca_tls_key=<full path to your TLS CA key file> # AAP Database - optional # -------------------------- # To use custom TLS certificate/key you need to set these variables #postgresql_tls_cert=<full path to your TLS certificate file> #postgresql_tls_key=<full path to your TLS key file> # AAP Controller - mandatory # -------------------------- controller_admin_password=<set your own> controller_pg_host=fqdn_of_your_rhel_host controller_pg_password=<set your own> # AAP Controller - optional # ------------------------- # To use the postinstall feature you need to set these variables #controller_postinstall=true #controller_license_file=<full path to your manifest .zip file> #controller_postinstall_dir=<full path to your config-as-code directory> # When using config-as-code in a git repository #controller_postinstall_repo_url=<url to your config-as-code git repository> #controller_postinstall_repo_ref=main # To use custom TLS certificate/key you need to set these variables #controller_tls_cert=<full path to your TLS certificate file> #controller_tls_key=<full path to your TLS key file> # AAP Automation Hub - mandatory # ------------------------------ hub_admin_password=<set your own> hub_pg_host=fqdn_of_your_rhel_host hub_pg_password=<set your own> # AAP Automation Hub - optional # ----------------------------- # To use the postinstall feature you need to set these variables #hub_postinstall=true #hub_postinstall_dir=<full path to your config-as-code directory> # When using config-as-code in a git repository #hub_postinstall_repo_url=<url to your config-as-code git repository> #hub_postinstall_repo_ref=main # To customize the number of worker containers #hub_workers=2 # To use the collection signing feature you need to set these variables #hub_collection_signing=true #hub_collection_signing_key=<full path to your gpg key file> # To use the container signing feature you need to set these variables #hub_container_signing=true #hub_container_signing_key=<full path to your gpg key file> # To use custom TLS certificate/key you need to set these variables #hub_tls_cert=<full path to your TLS certificate file> #hub_tls_key=<full path to your TLS key file> # AAP EDA Controller - mandatory # ------------------------------ eda_admin_password=<set your own> eda_pg_host=fqdn_of_your_rhel_host eda_pg_password=<set your own> # AAP EDA Controller - optional # ----------------------------- # When using an external controller node unmanaged by the installer. #controller_main_url=https://fqdn_of_your_rhel_host # To customize the number of default/activation worker containers #eda_workers=2 #eda_activation_workers=2 # To use custom TLS certificate/key you need to set these variables #eda_tls_cert=<full path to your TLS certificate file> #eda_tls_key=<full path to your TLS key file> # AAP Execution Nodes - optional # ----------------------------- #receptor_port=27199 #receptor_protocol=tcp # To use custom TLS certificate/key you need to set these variables #receptor_tls_cert=<full path to your TLS certificate file> #receptor_tls_key=<full path to your TLS key file> # To use custom RSA key pair you need to set these variables #receptor_signing_private_key=<full path to your RSA private key file> #receptor_signing_public_key=<full path to your RSA public key file>
使用以下命令安装容器化 Ansible Automation Platform:
ansible-playbook -i inventory ansible.containerized_installer.install
注意
If your privilege escalation requires a password to be entered, append *-K* to the command line. You will then be prompted for the *BECOME* password.
您可以提高输出的详细程度,最多可以使用 4 个 v (-vvvv) 来查看安装过程的详细信息。
注意
这可显著增加安装时间,因此建议您仅在红帽支持需要或要求时才使用它。