1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

オンプレミスIBM Power S1014 の 仮想マシン RHEL ppc64le に Ansible Automation Platform 2.5.9 を導入 (コンテナ・バージョン)

Last updated at Posted at 2025-02-16

はじめに

Ansible Automation Platform (AAP) 2.5 コンテナ版 を RHEL9.4 ppc64le に導入した記録です。

ご参考:コンテナー・トポロジー


環境

・HW: IBM Power10 S1014
・仮想環境
 VIOS: 3.1.4
 仮想マシン:
  OS: RHEL 9.4 ppc64le
  (システム要件 CPU 4, Memory 16 GBですが、PU Desired 0.2, PU Max 4, Memory 16GB で設定)
・Ansible Automation Platform 2.5.9 (コンテナは同一ノード構成)



モジュール解凍

Ansible Automation Platform の ppc64le 版をダウンロードして対象マシンに配置し解凍します。

# ls
ansible-automation-platform-containerized-setup-bundle-2.5-9-ppc64le.tar.gz
# tar xfvz ansible-automation-platform-containerized-setup-bundle-2.5-9-ppc64le.tar.gz
ansible-automation-platform-containerized-setup-bundle-2.5-9-ppc64le/
ansible-automation-platform-containerized-setup-bundle-2.5-9-ppc64le/collections/


~ かなり長いです。省略 ~


ansible-automation-platform-containerized-setup-bundle-2.5-9-ppc64le/bundle/images/redis-6.tar.gz
ansible-automation-platform-containerized-setup-bundle-2.5-9-ppc64le/bundle/images/pcp.tar.gz
#

展開ディレクトリに移動

# ls
ansible-automation-platform-containerized-setup-bundle-2.5-9-ppc64le 
ansible-automation-platform-containerized-setup-bundle-2.5-9-ppc64le.tar.gz

確認

# cd ansible-automation-platform-containerized-setup-bundle-2.5-9-ppc64le
# ls -l
合計 48
-rw-r--r-- 1 root root 35491  1月 29 08:44 README.md
-rw-r--r-- 1 root root    97  1月 29 08:44 ansible.cfg
drwxr-xr-x 4 root root    39  1月 29 08:44 bundle
drwxr-xr-x 3 root root    33  1月 29 08:44 collections
-rw-r--r-- 1 root root  3473  1月 29 08:44 inventory
-rw-r--r-- 1 root root  3414  1月 29 08:44 inventory-growth

ホストの準備

サブスクリプション・マネージャーを登録するように記載がありますが、オフラインのため ベースメディアの iso ファイルから dnf リポジトリを設定します。

  • マウント先ディレクトリ作成と iso のマウント
# mkdir -p /media/rhel94/
# mount -t iso9660 -o loop /work/iso/rhel-9.4-ppc64le-dvd.iso /media/rhel94/
  • /etc/dnf/dnf.conf の設定
# cat /etc/dnf/dnf.conf
[RHEL_BaseOS]
name=RHEL94_BaseOS
baseurl=file:///media/rhel94/BaseOS/
enabled=1
gpgcheck=1
gpgkey=file:///media/rhel94/RPM-GPG-KEY-redhat-release

[RHEL_AppStream]
name=RHEL94_AppStream
baseurl=file:///media/rhel94/AppStream/
enabled=1
gpgcheck=1
gpgkey=file:///media/rhel94/RPM-GPG-KEY-redhat-release

前提モジュールの導入

  • ansible-core を導入します。
# dnf -y install ansible-core ログ(折りたたんでいます、押すと展開します)
# dnf -y install ansible-core
Updating Subscription Management repositories.
Red Hat Enterprise Linux 9 for Power, little endian - BaseOS (RPMs)                                                                                    51 MB/s |  28 MB     00:00
Red Hat Enterprise Linux 9 for Power, little endian - AppStream (RPMs)                                                                                 77 MB/s |  43 MB     00:00
Package ansible-core-1:2.14.14-1.el9.ppc64le is already installed.
Dependencies resolved.
======================================================================================================================================================================================
 Package                                Architecture                      Version                                   Repository                                                   Size
======================================================================================================================================================================================
Upgrading:
 ansible-core                           ppc64le                           1:2.14.17-1.el9                           rhel-9-for-ppc64le-appstream-rpms                           2.6 M

Transaction Summary
======================================================================================================================================================================================
Upgrade  1 Package

Total download size: 2.6 M
Downloading Packages:
ansible-core-2.14.17-1.el9.ppc64le.rpm                                                                                                                 26 MB/s | 2.6 MB     00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                  26 MB/s | 2.6 MB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                              1/1
  Upgrading        : ansible-core-1:2.14.17-1.el9.ppc64le                                                                                                                         1/2
  Cleanup          : ansible-core-1:2.14.14-1.el9.ppc64le                                                                                                                         2/2
  Running scriptlet: ansible-core-1:2.14.14-1.el9.ppc64le                                                                                                                         2/2
  Verifying        : ansible-core-1:2.14.17-1.el9.ppc64le                                                                                                                         1/2
  Verifying        : ansible-core-1:2.14.14-1.el9.ppc64le                                                                                                                         2/2
Installed products updated.

Upgraded:
  ansible-core-1:2.14.17-1.el9.ppc64le

Complete!

  • wget、git-core、rsync、vim を導入します。
# dnf install -y wget git-core rsync vim (折りたたんでいます、押すと展開します。)
# dnf install -y wget git-core rsync vim
Updating Subscription Management repositories.
Last metadata expiration check: 0:01:01 ago on Sun Feb  9 03:21:25 2025.
Package git-core-2.43.5-1.el9_4.ppc64le is already installed.
Package rsync-3.2.3-19.el9.ppc64le is already installed.
Dependencies resolved.
======================================================================================================================================================================================
 Package                                 Architecture                     Version                                    Repository                                                  Size
======================================================================================================================================================================================
Installing:
 vim-enhanced                            ppc64le                          2:8.2.2637-21.el9                          rhel-9-for-ppc64le-appstream-rpms                          1.9 M
 wget                                    ppc64le                          1.21.1-8.el9_4                             rhel-9-for-ppc64le-appstream-rpms                          814 k
Upgrading:
 git-core                                ppc64le                          2.43.5-2.el9_5                             rhel-9-for-ppc64le-appstream-rpms                          4.8 M
 rsync                                   ppc64le                          3.2.3-20.el9_5.1                           rhel-9-for-ppc64le-baseos-rpms                             427 k
Installing dependencies:
 gpm-libs                                ppc64le                          1.20.7-29.el9                              rhel-9-for-ppc64le-appstream-rpms                           24 k
 vim-common                              ppc64le                          2:8.2.2637-21.el9                          rhel-9-for-ppc64le-appstream-rpms                          7.0 M
 vim-filesystem                          noarch                           2:8.2.2637-21.el9                          rhel-9-for-ppc64le-baseos-rpms                              17 k

Transaction Summary
======================================================================================================================================================================================
Install  5 Packages
Upgrade  2 Packages

Total download size: 15 M
Downloading Packages:
(1/7): vim-filesystem-8.2.2637-21.el9.noarch.rpm                                                                                                      172 kB/s |  17 kB     00:00
(2/7): vim-common-8.2.2637-21.el9.ppc64le.rpm                                                                                                          37 MB/s | 7.0 MB     00:00
(3/7): wget-1.21.1-8.el9_4.ppc64le.rpm                                                                                                                7.6 MB/s | 814 kB     00:00
(4/7): gpm-libs-1.20.7-29.el9.ppc64le.rpm                                                                                                              77 kB/s |  24 kB     00:00
(5/7): rsync-3.2.3-20.el9_5.1.ppc64le.rpm                                                                                                             2.5 MB/s | 427 kB     00:00
(6/7): git-core-2.43.5-2.el9_5.ppc64le.rpm                                                                                                             40 MB/s | 4.8 MB     00:00
(7/7): vim-enhanced-8.2.2637-21.el9.ppc64le.rpm                                                                                                       6.9 MB/s | 1.9 MB     00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                  32 MB/s |  15 MB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                              1/1
  Installing       : gpm-libs-1.20.7-29.el9.ppc64le                                                                                                                               1/9
  Installing       : vim-filesystem-2:8.2.2637-21.el9.noarch                                                                                                                      2/9
  Installing       : vim-common-2:8.2.2637-21.el9.ppc64le                                                                                                                         3/9
  Installing       : vim-enhanced-2:8.2.2637-21.el9.ppc64le                                                                                                                       4/9
  Upgrading        : git-core-2.43.5-2.el9_5.ppc64le                                                                                                                              5/9
  Upgrading        : rsync-3.2.3-20.el9_5.1.ppc64le                                                                                                                               6/9
  Installing       : wget-1.21.1-8.el9_4.ppc64le                                                                                                                                  7/9
  Cleanup          : git-core-2.43.5-1.el9_4.ppc64le                                                                                                                              8/9
  Cleanup          : rsync-3.2.3-19.el9.ppc64le                                                                                                                                   9/9
  Running scriptlet: rsync-3.2.3-19.el9.ppc64le                                                                                                                                   9/9
  Verifying        : vim-filesystem-2:8.2.2637-21.el9.noarch                                                                                                                      1/9
  Verifying        : gpm-libs-1.20.7-29.el9.ppc64le                                                                                                                               2/9
  Verifying        : vim-common-2:8.2.2637-21.el9.ppc64le                                                                                                                         3/9
  Verifying        : wget-1.21.1-8.el9_4.ppc64le                                                                                                                                  4/9
  Verifying        : vim-enhanced-2:8.2.2637-21.el9.ppc64le                                                                                                                       5/9
  Verifying        : rsync-3.2.3-20.el9_5.1.ppc64le                                                                                                                               6/9
  Verifying        : rsync-3.2.3-19.el9.ppc64le                                                                                                                                   7/9
  Verifying        : git-core-2.43.5-2.el9_5.ppc64le                                                                                                                              8/9
  Verifying        : git-core-2.43.5-1.el9_4.ppc64le                                                                                                                              9/9
Installed products updated.

Upgraded:
  git-core-2.43.5-2.el9_5.ppc64le                                                            rsync-3.2.3-20.el9_5.1.ppc64le
Installed:
  gpm-libs-1.20.7-29.el9.ppc64le  vim-common-2:8.2.2637-21.el9.ppc64le  vim-enhanced-2:8.2.2637-21.el9.ppc64le  vim-filesystem-2:8.2.2637-21.el9.noarch  wget-1.21.1-8.el9_4.ppc64le

Complete!

ansible 用ユーザーの作成と設定

root 以外で実行する必要があるため実行用ユーザーを作成します。

sudo または Ansible でサポートされているその他の権限昇格 (sudo を推奨) を持つ、Red Hat Enterprise Linux ホストの非 root ユーザー。このユーザーは、コンテナー化された Ansible Automation Platform のインストールを実行します

  • ansible というユーザーを作成
# useradd -m ansible -s /bin/bash
  • wheel グループの追加
# usermod -aG wheel ansible
# id ansible
uid=1002(ansible) gid=1002(ansible) groups=1002(ansible),10(wheel)

パスワードなしで sudo できるように設定します。

# visudo 

%wheel  ALL=(ALL)       NOPASSWD: ALL  #< コメントアウトを外す。

ansible ユーザーでログインし直しました。
パスワードなしで sudo が実行できるかどうかを確認します。

$ whoami
ansible
$ sudo whoami
root

パスワードなしで whoami の結果が root で返ってきました。


インベントリー確認

$ ls -l
合計 52
-rw-r--r-- 1 root root 35491  1月 29 08:44 README.md
-rw-r--r-- 1 root root    97  1月 29 08:44 ansible.cfg
drwxr-xr-x 4 root root    39  1月 29 08:44 bundle
drwxr-xr-x 3 root root    33  1月 29 08:44 collections
-rw-r--r-- 1 root root  3473  1月 29 08:44 inventory
-rw-r--r-- 1 root root  3414  1月 29 08:44 inventory-growth
-rw-r--r-- 1 root root   660  2月 15 10:01 inventory_test  #<=作成したインベントリ

インベントリの内容

automationgateway、automationcontroller、database、automationhub 、automationedaはすべて1ノードの構成とします。

# This section is for your AAP Gateway host(s)
# -----------------------------------------------------
[automationgateway]
xxx.xx.xxx.xx

# This section is for your AAP Controller host(s)
# -----------------------------------------------------
[automationcontroller]
xxx.xx.xxx.xx

# This section is for your AAP Automation Hub host(s)
# -----------------------------------------------------
[automationhub]
xxx.xx.xxx.xx

# This section is for your AAP EDA Controller host(s)
# -----------------------------------------------------
[automationeda]
xxx.xx.xxx.xx


# This section is for the AAP database
# -----------------------------------------------------
[database]
xxx.xx.xxx.xx

[all:vars]
# Ansible
ansible_connection=local

# Common variables
# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html/containerized_installation/appendix-inventory-files-vars#ref-general-inventory-variables
# -----------------------------------------------------
postgresql_admin_username=postgres
postgresql_admin_password=xxxxxxxx


bundle_install=true
# The bundle directory must include /bundle in the path
bundle_dir='{{ lookup("ansible.builtin.env", "PWD") }}/bundle'

registry_username=test
registry_password=test

redis_mode=standalone

# AAP Gateway
# -----------------------------------------------------
gateway_admin_password=xxxxxxxx
gateway_pg_host=xxx.xx.xxx.xx
gateway_pg_password=xxxxxxxx

# AAP Controller
# -----------------------------------------------------
controller_admin_password=xxxxxxxx
controller_pg_host=xxx.xx.xxx.xx
controller_pg_password=xxxxxxxx

# AAP Automation Hub
# -----------------------------------------------------
hub_admin_password=xxxxxxxx
hub_pg_host=xxx.xx.xxx.xx
hub_pg_password=xxxxxxxx
hub_seed_collections=false

# AAP EDA Controller
# -----------------------------------------------------
eda_admin_password=xxxxxxxx
eda_pg_host=xxx.xx.xxx.xx
eda_pg_password=xxxxxxxx

AAP インストール

ansible ユーザーで実行します。

どのくらい rpm が入るのかを確認するため、導入前に rpm の数を確認しておきます。

$ rpm -qa | wc -l
1212

上で作成したインベントリを使用して "ansible-playbook -i inventory_test ansible.containerized_installer.install" で導入実行します。

$ time ansible-playbook -i inventory_test ansible.containerized_installer.install
[WARNING]: log file at /work/ansible-automation-platform-containerized-setup-bundle-2.5-9-ppc64le/aap_install.log is not writeable and we cannot create it, aborting

[WARNING]: running playbook inside collection ansible.containerized_installer

PLAY [Preflight checks] ********************************************************************************************************************************

TASK [Gather facts] ************************************************************************************************************************************
ok: [localhost]

TASK [ansible.containerized_installer.common : Test for ostree-based OS] *******************************************************************************
ok: [localhost]


~ 長いため省略 ~ 



TASK [Delete the ansible base shared secret] ***********************************************************************************************************
ok: [xxx.xx.xxx.xx]

PLAY RECAP *********************************************************************************************************************************************
xxx.xx.xxx.xx              : ok=412  changed=147  unreachable=0    failed=0    skipped=188  rescued=0    ignored=0
localhost                  : ok=23   changed=0    unreachable=0    failed=0    skipped=26   rescued=0    ignored=0


real	8m13.498s
user	4m16.360s
sys	1m2.228s

所要時間は 10 分弱でした。

  • rpm の数を確認します。
$ rpm -qa | wc -l
1214

AAP 導入で追加された rpm は 2 つでした。


  • コンテナの稼働を確認します。

9つの Pod が稼働しています。

 podman ps
CONTAINER ID  IMAGE                                                                         COMMAND               CREATED         STATUS         PORTS       NAMES
f738f518ea10  registry.redhat.io/rhel8/postgresql-15:latest                                 run-postgresql        10 minutes ago  Up 10 minutes              postgresql
7f2a81f48d30  registry.redhat.io/rhel8/redis-6:latest                                       run-redis             10 minutes ago  Up 10 minutes              redis-unix
374915b3a5d2  registry.redhat.io/rhel8/redis-6:latest                                       run-redis             10 minutes ago  Up 7 minutes               redis-tcp
fa94b11938dc  registry.redhat.io/ansible-automation-platform-25/gateway-proxy-rhel8:latest  /usr/bin/envoy --...  7 minutes ago   Up 6 minutes               automation-gateway-proxy
4941a4efd891  registry.redhat.io/ansible-automation-platform-25/gateway-rhel8:latest        /usr/bin/supervis...  7 minutes ago   Up 6 minutes               automation-gateway
ecaae0bbb7cd  registry.redhat.io/ansible-automation-platform-25/receptor-rhel8:latest       /usr/bin/receptor...  5 minutes ago   Up 5 minutes               receptor
ba2abef0aa5b  registry.redhat.io/ansible-automation-platform-25/controller-rhel8:latest     /usr/bin/launch_a...  5 minutes ago   Up 2 minutes               automation-controller-rsyslog
f7e06a058ad7  registry.redhat.io/ansible-automation-platform-25/controller-rhel8:latest     /usr/bin/launch_a...  5 minutes ago   Up 2 minutes               automation-controller-task
c4029a850dbd  registry.redhat.io/ansible-automation-platform-25/controller-rhel8:latest     /usr/bin/launch_a...  5 minutes ago   Up 2 minutes               automation-controller-web

GUI ログイン

プラットフォーム管理者として使い始める

admin ユーザー、インベントリーで指定したパスワードでログインします。

スクリーンショット 2025-02-16 0.49.36.png

サブスクリプション割り当てのページが表示されました。

スクリーンショット 2025-02-14 11.18.30.png

オフラインのため、マニフェストを作成してサブスクリプション割り当てています。

  • Red Hat Customer Portal でサブスクリプション割り当てを作成し、マニフェストをエクスポート

図1.png

  • エクスポートしたマニフェストをアップロード

スクリーンショット 2025-02-16 0.59.31.png

次へ

スクリーンショット 2025-02-14 11.19.45.png

  • レビュー -> Finish

スクリーンショット 2025-02-16 1.00.26.png

RedHat Ansible Automation Platform 画面に辿り着きました!

スクリーンショット 2025-02-14 11.19.56.png


おわりに

・ppc64le 版ですが特に問題なく導入できました。

・CPU は 0.2 Desired 割り当て Max 4 Core で実施していますが導入はできました。稼働に影響があるかどうかは今後要確認です。

1
1
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?