Closed1

AAP2.4環境構築録

koma77koma77

参照先

(あんまり親切ではないけど、無いよりはマシ)
https://docs.redhat.com/ja/documentation/red_hat_ansible_automation_platform/2.4/html/containerized_ansible_automation_platform_installation_guide/aap-containerized-installation#system_requirements

VM作成

IP払い出し

IP Hostname OS Role
10.1.1.77 rhel9-aac24 RHEL9.3 ControlPlane
10.1.1.78 rhel9-aae24 RHEL9.3 ExecutionNode#1
10.1.1.79 rhel9-aae24-2 RHEL9.3 ExecutionNode#2
10.1.1.80 rhel9-postgresql RHEL9.3 PostgreSQL
  • 全ホストで「testuserA:P@ssw0rd」というユーザを作成しておく
  • visudoを実施し、testuserAがパスワードなしでsudo実行可能な状態にしておく

PostgreSQLをインストール

(インストールの過程でいれるので不要)

[testuserA@rhel9-postgresql ~]$ sudo dnf install postgresql-server
[testuserA@rhel9-postgresql ~]$ sudo postgresql-setup initdb
[testuserA@rhel9-postgresql ~]$ sudo vi /var/lib/pgsql/data/postgresql.conf
~~~
listen_addresses = '*'
~~~
[testuserA@rhel9-postgresql ~]$ sudo vi /var/lib/pgsql/data/pg_hba.conf
~~~
host  all   all   10.1.1.0/24   md5

[testuserA@rhel9-postgresql ~]$ sudo systemctl enable --now postgresql
[testuserA@rhel9-postgresql ~]$ sudo firewall-cmd --add-service=postgresql
[testuserA@rhel9-postgresql ~]$ sudo firewall-cmd --runtime-to-permanent
[testuserA@rhel9-postgresql ~]$ sudo su - postgres -c psql
postgres=#CREATE USER "awx" WITH PASSWORD 'awx';
postgres=#CREATE DATABASE awx OWNER awx;
postgres=#\q

ansible-coreをインストール

「rhel9-aac24」にインストール

[testuserA@rhel9-aac24 ~]$ sudo dnf install -y ansible-core wget git rsync

AAPダウンロード

資材配置

下記リンクアクセス→「Ansible Automation Platform 2.4 Setup」「Download Now」ボタンのリンクをコピー

https://access.redhat.com/downloads/content/480/ver=2.4/rhel---9/2.4/x86_64/product-software

[testuserA@rhel9-aac24 ~]$ curl -o ansible-automation-platform-setup-2.4-13.tar.gz -L "Download Nowのリンク"

(オフライン環境なら「Ansible Automation Platform 2.4 Setup Bundle」をダウンロードし、「rhel9-aac24」に配置)

展開

[testuserA@rhel9-aac24 ~]$ tar xzvf ansible-automation-platform-setup-2.4-13.tar.gz

AAPインストール

インベントリファイルの準備

[testuserA@rhel9-aac24 ~]$ sudo vi /etc/hosts
~~~
10.1.1.77  rhel9-aac24 rhel9-aac24.local

[testuserA@rhel9-aac24 ~]$ sudo vi /etc/ansible/ansible.cfg
[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null

[testuserA@rhel9-aac24 ~]$ cd ansible-automation-platform-setup-2.4-13
[testuserA@rhel9-aac24 ansible-automation-platform-setup-2.4-13]$ cp inventory inventory_org
[testuserA@rhel9-aac24 ansible-automation-platform-setup-2.4-13]$ vi inventory
[automationcontroller]
rhel9-aac24.local ansible_connection=local
[automationcontroller:vars]
peers=execution_nodes
[automationhub]
rhel9-aac24.local ansible_connection=local
[execution_nodes]
10.1.1.78
10.1.1.79
[database]
10.1.1.80

[all:vars]
ansible_ssh_user=testuserA
ansible_ssh_pass=P@ssw0rd
ansible_become=yes
controller_hostname=rhel9-aac24.local
hub_hostname=rhel9-aac24.local
admin_password='P@ssw0rd'
pg_host='10.1.1.80'
pg_port='5432'
pg_database='awx'
pg_username='awx'
pg_password='awx'
registry_url='registry.redhat.io'
registry_username='[RedHatアカウントのユーザ名]'
registry_password='[RedHatアカウントのパスワード]'

(あくまでも上記のインベントリファイルは検証環境用、実際はこんなパスワードだとおわり)

インストール実行

[testuserA@rhel9-aac24 ansible-automation-platform-setup-2.4-13]$ sh setup.sh

適宜エラーが出るのでのんびり解決

このスクラップは23日前にクローズされました