コンテナー化された Ansible Automation Platform のインストールガイド
コンテナー化された Ansible Automation Platform のインストールガイド
概要
Red Hat ドキュメントへのフィードバック (英語のみ) リンクのコピーリンクがクリップボードにコピーされました!
このドキュメントの改善に関するご意見がある場合や、エラーを発見した場合は、https://access.redhat.com から Technical Support チームに連絡してください。
第1章 Ansible Automation Platform のコンテナー化されたインストール リンクのコピーリンクがクリップボードにコピーされました!
Ansible Automation Platform は、Ansible を装備した環境に、制御、ナレッジ、委譲の機能を追加して、チームが複雑かつ複数層のデプロイメントを管理できるように支援する商用サービスです。
このガイドは、Ansible Automation Platform の新しいコンテナー化されたバージョンのインストール要件とプロセスを理解するのに役立ちます。この初期バージョンは Ansible Automation Platform 2.4 に基づいており、テクニカルプレビューとしてリリースされています。テクニカルプレビューの内容を理解するには、テクノロジプレビュー機能のサポート範囲 を参照してください。
前提条件
- RHEL 9.2 ベースのホスト。最小限の OS ベースのインストールを推奨します。
- sudo または他の Ansible でサポートされる権限昇格 (sudo を推奨) のある RHEL ホストの非 root ユーザー。このユーザーは、コンテナー化された Ansible Automation Platform のインストールを実行します。
- 非 root ユーザーには、SSH 公開キー認証 をセットアップすることを推奨しています。非 root ユーザーの SSH 公開キー認証のセットアップに関するガイドラインについては、How to configure SSH public key authentication for passwordless login を参照してください。
- SSH キーは、リモートホストにインストールする場合にのみ必要です。自己完結型のローカル VM ベースのインストールを行う場合は、例のように SSH を必要としない ansible_connection: local を使用できます。
- デフォルトのオンラインインストール方法を使用する場合は、RHEL ホストからのインターネットアクセスが必要です。
1.1. システム要件 リンクのコピーリンクがクリップボードにコピーされました!
コンテナー化された Red Hat Ansible Automation Platform をインストールして実行するには、お使いのシステムが以下の最小システム要件を満たしている必要があります。
| メモリー | 16Gb RAM |
| CPU | 4 CPU |
| ディスク領域 | 40 GB |
| ディスク IOP | 1500 |
1.2. コンテナー化されたインストールのための RHEL ホストの準備 リンクのコピーリンクがクリップボードにコピーされました!
手順
コンテナー化された Ansible Automation Platform は、RHEL ホスト上でコンポーネントサービスを Podman ベースのコンテナーとして実行します。基盤となるホストの準備が完了すると、インストーラーがこれを処理します。以下の手順に従ってください。
- RHEL ホストに非 root ユーザーとしてログインします。
dnf repolist を実行して、BaseOS と appstream リポジトリーのみがホスト上でセットアップされ、有効になっていることを検証します。
dnf repolist Updating Subscription Management repositories. repo id repo name rhel-9-for-x86_64-appstream-rpms Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs) rhel-9-for-x86_64-baseos-rpms Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs)
$ dnf repolist Updating Subscription Management repositories. repo id repo name rhel-9-for-x86_64-appstream-rpms Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs) rhel-9-for-x86_64-baseos-rpms Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs)Copy to Clipboard Copied! Toggle word wrap Toggle overflow - これらのリポジトリーのみがホスト OS で利用可能であることを確認してください。確認方法の詳細は、第 10 章 カスタムソフトウェアリポジトリーの管理 を参照してください。
- ホストに DNS が設定されており、完全修飾ドメイン名 (FQDN) を使用してホスト名と IP を解決できることを確認してください。これは、サービスが相互に通信できるようにするために不可欠です。
unbound DNS の使用
unbound DNS を設定するには、第 2 章 unbound DNS サーバー Red Hat Enterprise Linux 9 のセットアップ を参照してください。
BIND DNS の使用
BIND を使用して DNS を設定するには、第 1 章 BIND DNS サーバー Red Hat Enterprise Linux 9 のセットアップおよび設定 を参照してください。
任意
インストーラーが Ansible Automation Platform サブスクリプションのマニフェストライセンスを自動的に取得して適用できるようにするには、インストーラー用にダウンロードできるマニフェストファイルを生成します。詳細は、第 2 章 マニフェストファイル Red Hat Ansible Automation Platform 2 の取得 を参照してください。
1.3. ansible-core のインストール リンクのコピーリンクがクリップボードにコピーされました!
手順
ansible-core およびその他のツールをインストールします。
sudo dnf install -y ansible-core wget git rsync
sudo dnf install -y ansible-core wget git rsyncCopy to Clipboard Copied! Toggle word wrap Toggle overflow 完全修飾ホスト名を設定します。
sudo hostnamectl set-hostname your-FQDN-hostname
sudo hostnamectl set-hostname your-FQDN-hostnameCopy to Clipboard Copied! Toggle word wrap Toggle overflow
1.4. Ansible Automation Platform のダウンロード リンクのコピーリンクがクリップボードにコピーされました!
手順
- 最新のインストーラー tarball を access.redhat.com からダウンロードします。これは RHEL ホスト内で直接実行できるため、時間を節約できます。
tarball とオプションのマニフェスト zip ファイルをラップトップにダウンロードした場合は、それらを RHEL ホストにコピーします。
インストーラーをファイルシステム上のどこに配置するかを決定します。インストール関連のファイルはこの場所に作成され、初回インストールには少なくとも 10GB が必要です。
インストーラーの tarball をインストールディレクトリーに展開し、展開されたディレクトリーに移動します。
オンラインインストーラー
tar xfvz ansible-automation-platform-containerized-setup-2.4-2.tar.gz
$ tar xfvz ansible-automation-platform-containerized-setup-2.4-2.tar.gzCopy to Clipboard Copied! Toggle word wrap Toggle overflow バンドルのインストーラー
tar xfvz ansible-automation-platform-containerized-setup-bundle-2.4-2-<arch name>.tar.gz
$ tar xfvz ansible-automation-platform-containerized-setup-bundle-2.4-2-<arch name>.tar.gzCopy to Clipboard Copied! Toggle word wrap Toggle overflow
1.5. コンテナー化された Ansible Automation Platform のポストインストール機能の使用 リンクのコピーリンクがクリップボードにコピーされました!
コンテナー化された Ansible Automation Platform の実験的なポストインストーラー機能を使用して、初回インストール中に設定を定義してロードします。これは configuration-as-code アプローチを使用しており、この場合、単純な YAML ファイルとしてロードされるように設定を定義するだけになります。
このオプション機能を使用するには、インベントリーファイル内にある以下の vars のコメントを解除する必要があります。
controller_postinstall=true
controller_postinstall=trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow デフォルトは false であるため、ポストインストーラーをアクティブ化するにはこれを有効にする必要があります。この機能を使用するには Ansible Automation Platform ライセンスが必要です。このライセンスは、自動的にロードできるようにローカルファイルシステム上に配置する必要があります。
controller_license_file=/full_path_to/manifest_file.zip
controller_license_file=/full_path_to/manifest_file.zipCopy to Clipboard Copied! Toggle word wrap Toggle overflow Git ベースのリポジトリーから、configuration-as-code をプルできます。これを行うには、次の変数を設定して、コンテンツの取得元と、Ansible Automation Platform コントローラーにアップロードするためにコンテンツを保存する場所を指定します。
controller_postinstall_repo_url=https://your_cac_scm_repo controller_postinstall_dir=/full_path_to_where_you_want_the pulled_content_to_reside
controller_postinstall_repo_url=https://your_cac_scm_repo controller_postinstall_dir=/full_path_to_where_you_want_the pulled_content_to_resideCopy to Clipboard Copied! Toggle word wrap Toggle overflow controller_postinstall_repo_url 変数を使用すると、認証情報を含める必要がある postinstall リポジトリーの URL を定義できます。
http(s)://<host>/<repo>.git (public repository without http(s) authentication) http(s)://<user>:<password>@<host>:<repo>.git (private repository with http(s) authentication) git@<host>:<repo>.git (public/private repository with ssh authentication)
http(s)://<host>/<repo>.git (public repository without http(s) authentication) http(s)://<user>:<password>@<host>:<repo>.git (private repository with http(s) authentication) git@<host>:<repo>.git (public/private repository with ssh authentication)Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注記ssh ベースの認証を使用する場合、インストーラーは何も設定しないため、インストーラーノードですべてを設定する必要があります。
定義ファイルは infra 認定コレクション を使用します。controller_configuration コレクションは、インストールの一部としてプレインストールされており、インベントリーファイルで指定されたインストールコントローラーの認証情報を使用して Ansible Automation Platform コントローラーにアクセスします。ユーザーは YAML 設定ファイルを指定するだけで済みます。
認証情報、LDAP 設定、ユーザーとチーム、組織、プロジェクト、インベントリーとホスト、ジョブとワークフローテンプレートなどの Ansible Automation Platform 設定属性をセットアップできます。
以下の例は、コントローラージョブテンプレートを定義およびロードするサンプルの your-config.yml ファイルを示しています。この例は、Ansible Automation Platform インストールで提供される事前にロードされたデモの例に対して加えられた簡単な変更を示しています。
/full_path_to_your_configuration_as_code/
├── controller
└── job_templates.yml
/full_path_to_your_configuration_as_code/
├── controller
└── job_templates.yml
1.6. コンテナー化された Ansible Automation Platform のインストール リンクのコピーリンクがクリップボードにコピーされました!
Ansible Automation Platform のインストールは、インベントリーファイルによって制御されます。インベントリーファイルは、使用および作成されるホストとコンテナー、コンポーネントの変数、およびインストールのカスタマイズに必要なその他の情報を定義します。
便宜上、サンプルのインベントリーファイルが提供されており、コピーおよび変更してすぐに使い始めることができます。
インベントリーファイルには、デフォルトのデータベースはありません。インベントリーファイルの指示に従って、内部で提供される postgres を選択するか、外部で管理およびサポートされる独自のデータベースオプションを指定するかを適切に選択する必要があります。
< > プレースホルダーを特定の変数に置き換え、ニーズに応じて行のコメントを解除して、インベントリーファイルを編集します。
以下のコマンドを使用して、コンテナー化された Ansible Automation Platform をインストールします。
ansible-playbook -i inventory ansible.containerized_installer.install
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.
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) まで詳細度を上げて、インストールプロセスの詳細を表示できます。
これによりインストール時間が大幅に長くなる可能性があるため、必要な場合または Red Hat サポートからリクエストされた場合にのみ使用することを推奨します。
1.7. Automation Controller、Automation Hub、Event-Driven Ansible Controller へのアクセス リンクのコピーリンクがクリップボードにコピーされました!
インストールが完了すると、以下がデフォルトのプロトコルとポートとして使用されます。
- HTTP/https プロトコル
- Automation Controller 用のポート 8080/8443
- Automation Hub 用のポート 8081/8444
- Event-Driven Ansible Controller 用のポート 8082/8445
これらは変更可能です。詳細は、README.md を参照してください。ポートの競合またはその他の要因によりデフォルトを変更する必要がない限り、デフォルトのままにすることを推奨します。
Automation Controller UI へのアクセス
Automation Controller UI は、デフォルトで以下の場所から利用できます。
https://<your_rhel_host>:8443
https://<your_rhel_host>:8443
controller_admin_password 用に作成したパスワードを使用して、管理者ユーザーとしてログインします。
インストールの一部としてライセンスマニフェストを指定した場合は、Ansible Automation Platform ダッシュボードが表示されます。ライセンスファイルを指定しなかった場合は、サブスクリプション 画面が表示されるので、ライセンスの詳細を指定する必要があります。詳細は、第 1 章Red Hat Ansible Automation Platform のアクティブ化 を参照してください。
Automation Hub UI へのアクセス
Automation Hub UI は、デフォルトで以下の場所から利用できます。
https://<hub node>:8444
https://<hub node>:8444
hub_admin_password 用に作成したパスワードを使用して、管理者ユーザーとしてログインします。
Event-Driven Ansible UI へのアクセス
Event-Driven Ansible UI は、デフォルトで以下の場所から入手できます。
https://<eda node>:8445
https://<eda node>:8445
eda_admin_password 用に作成したパスワードを使用して、管理者ユーザーとしてログインします。
1.8. カスタム TLS 証明書の使用 リンクのコピーリンクがクリップボードにコピーされました!
デフォルトでは、インストーラーはカスタム認証局 (CA) によって署名されたすべてのサービスの TLS 証明書とキーを生成します。サービスごとにカスタム TLS 証明書/キーを指定できます。その証明書がカスタム CA によって署名されている場合は、CA TLS 証明書とキーを指定する必要があります。
- 認証局
ca_tls_cert=/full/path/to/tls/certificate ca_tls_key=/full/path/to/tls/key
ca_tls_cert=/full/path/to/tls/certificate
ca_tls_key=/full/path/to/tls/key
- Automation Controller
controller_tls_cert=/full/path/to/tls/certificate controller_tls_key=/full/path/to/tls/key
controller_tls_cert=/full/path/to/tls/certificate
controller_tls_key=/full/path/to/tls/key
- Automation Hub
hub_tls_cert=/full/path/to/tls/certificate hub_tls_key=/full/path/to/tls/key
hub_tls_cert=/full/path/to/tls/certificate
hub_tls_key=/full/path/to/tls/key
- Automation EDA
eda_tls_cert=/full/path/to/tls/certificate eda_tls_key=/full/path/to/tls/key
eda_tls_cert=/full/path/to/tls/certificate
eda_tls_key=/full/path/to/tls/key
- Postgresql
postgresql_tls_cert=/full/path/to/tls/certificate postgresql_tls_key=/full/path/to/tls/key
postgresql_tls_cert=/full/path/to/tls/certificate
postgresql_tls_key=/full/path/to/tls/key
- receptor
receptor_tls_cert=/full/path/to/tls/certificate receptor_tls_key=/full/path/to/tls/key
receptor_tls_cert=/full/path/to/tls/certificate
receptor_tls_key=/full/path/to/tls/key
1.9. カスタム Receptor 署名キーの使用 リンクのコピーリンクがクリップボードにコピーされました!
ceptor_disable_signing=true が設定されていない限り、receptor 署名がデフォルトで有効になり、RSA キーペア (パブリック/プライベート) がインストーラーによって生成されます。ただし、path 変数を設定することで、カスタムの RSA 公開鍵/秘密鍵を指定できます。
receptor_signing_private_key=/full/path/to/private/key receptor_signing_public_key=/full/path/to/public/key
receptor_signing_private_key=/full/path/to/private/key
receptor_signing_public_key=/full/path/to/public/key
1.10. Automation Hub コレクションとコンテナー署名の有効化 リンクのコピーリンクがクリップボードにコピーされました!
Automation Hub を使用すると、ansible コレクションとコンテナーイメージに署名できます。この機能はデフォルトでは有効になっていないため、GPG キーを指定する必要があります。
hub_collection_signing=true hub_collection_signing_key=/full/path/to/collections/gpg/key hub_container_signing=true hub_container_signing_key=/full/path/to/containers/gpg/key
hub_collection_signing=true
hub_collection_signing_key=/full/path/to/collections/gpg/key
hub_container_signing=true
hub_container_signing_key=/full/path/to/containers/gpg/key
GPG キーがパスフレーズで保護されている場合は、パスフレーズを指定する必要があります。
hub_collection_signing_pass=<collections gpg key passphrase> hub_container_signing_pass=<containers gpg key passphrase>
hub_collection_signing_pass=<collections gpg key passphrase>
hub_container_signing_pass=<containers gpg key passphrase>
1.11. 実行ノードの追加 リンクのコピーリンクがクリップボードにコピーされました!
コンテナー化されたインストーラーは、リモート実行ノードをデプロイできます。これは、ansible インベントリーファイルの execution_nodes グループによって処理されます。
[execution_nodes] fqdn_of_your_execution_host
[execution_nodes]
fqdn_of_your_execution_host
実行ノードは、デフォルトでは、ポート 27199 (TCP) で実行される実行タイプとして設定されます。これは、以下の変数で変更できます。
- receptor_port=27199
- receptor_protocol=tcp
- receptor_type=hop
receptor タイプの値は、プロトコルが TCP または UDP のいずれかですが、実行またはホップのいずれかになります。デフォルトでは、execution_nodes グループのノードはコントローラーノードのピアとして追加されます。ただし、receptor_peers 変数を使用してピア設定を変更できます。
[execution_nodes] fqdn_of_your_execution_host fqdn_of_your_hop_host receptor_type=hop receptor_peers=’[“fqdn_of_your_execution_host”]’
[execution_nodes]
fqdn_of_your_execution_host
fqdn_of_your_hop_host receptor_type=hop receptor_peers=’[“fqdn_of_your_execution_host”]’
1.12. コンテナー化された Ansible Automation Platform のアンインストール リンクのコピーリンクがクリップボードにコピーされました!
コンテナー化されたデプロイメントをアンインストールするには、uninstall.yml Playbook を実行します。
ansible-playbook -i inventory ansible.containerized_installer.uninstall
$ ansible-playbook -i inventory ansible.containerized_installer.uninstall
これにより、すべての systemd ユニットとコンテナーが停止され、コンテナー化されたインストーラーが使用する以下のようなリソースがすべて削除されます。
- config およびデータのディレクトリー/ファイル
- systemd ユニットファイル
- podman のコンテナーとイメージ
- RPM パッケージ
コンテナーイメージを保持するには、container_keep_images 変数を true に設定します。
ansible-playbook -i inventory ansible.containerized_installer.uninstall -e container_keep_images=true
$ ansible-playbook -i inventory ansible.containerized_installer.uninstall -e container_keep_images=true
postgresql データベースを保持するには、postgresql_keep_databases 変数を true に設定します。
ansible-playbook -i </path/to/inventory> ansible.containerized_installer.uninstall -e postgresql_keep_databases=true
$ ansible-playbook -i </path/to/inventory> ansible.containerized_installer.uninstall -e postgresql_keep_databases=true
自動生成されるものではなく、同じ django 秘密鍵値を使用する必要があります。
付録A コンテナー化された Ansible Automation Platform のトラブルシューティング リンクのコピーリンクがクリップボードにコピーされました!
この情報を使用して、コンテナー化された Ansible Automation Platform のインストールのトラブルシューティングを行います。
A.1. コンテナー化された Ansible Automation Platform のインストールのトラブルシューティング リンクのコピーリンクがクリップボードにコピーされました!
インストールに時間がかかったり、エラーが発生したりする場合は、何を確認すればよいですか?
- システムがインストールガイドに記載されている最小要件を満たしていることを確認してください。不適切なストレージの選択や、多数のホストに分散する際の高レイテンシーなどの項目はすべて、大きな影響を及ぼします。
-
ローカルインストーラー
ansible.cfg内で特に変更されていない限り、デフォルトで./aap_install.logに配置されているインストールログファイルを確認します。 -
タスクプロファイリングコールバックをアドホックベースで有効にして、インストールプログラムが最も多くの時間を費やしている場所の概要を示します。これを行うには、ローカルの
ansible.cfgファイルを使用します。[defaults]セクションの下に次のようなコールバック行を追加します。
cat ansible.cfg [defaults] callbacks_enabled = ansible.posix.profile_tasks
$ cat ansible.cfg
[defaults]
callbacks_enabled = ansible.posix.profile_tasks
Automation Controller が 413 エラーを返します。
このエラーは、manifest.zip ライセンスファイルが nginx_client_max_body_size 設定より大きいために発生します。このエラーが発生した場合は、インストールインベントリーファイルを変更して次の変数を含める必要があります。
nginx_disable_hsts: false nginx_http_port: 8081 nginx_https_port: 8444 nginx_client_max_body_size: 20m nginx_user_headers: []
nginx_disable_hsts: false
nginx_http_port: 8081
nginx_https_port: 8444
nginx_client_max_body_size: 20m
nginx_user_headers: []
現在のデフォルト設定である 20m でこの問題を回避できるはずです。
コントローラー UI に移動すると、“502 Bad Gateway” というエラーメッセージが表示され、インストールが失敗しました。
このようなエラーが発生する可能性があり、インストールアプリケーションの出力には、以下のように表示されます。
TASK [ansible.containerized_installer.automationcontroller : Wait for the Controller API to te ready] ******************************************************
fatal: [daap1.lan]: FAILED! => {"changed": false, "connection": "close", "content_length": "150", "content_type": "text/html", "date": "Fri, 29 Sep 2023 09:42:32 GMT", "elapsed": 0, "msg": "Status code was 502 and not [200]: HTTP Error 502: Bad Gateway", "redirected": false, "server": "nginx", "status": 502, "url": "https://daap1.lan:443/api/v2/ping/"}
TASK [ansible.containerized_installer.automationcontroller : Wait for the Controller API to te ready] ******************************************************
fatal: [daap1.lan]: FAILED! => {"changed": false, "connection": "close", "content_length": "150", "content_type": "text/html", "date": "Fri, 29 Sep 2023 09:42:32 GMT", "elapsed": 0, "msg": "Status code was 502 and not [200]: HTTP Error 502: Bad Gateway", "redirected": false, "server": "nginx", "status": 502, "url": "https://daap1.lan:443/api/v2/ping/"}
-
実行中の
automation-controller-webコンテナーと systemd サービスがあるか確認します。
これは、システム全体のレベルではなく、通常の権限のないユーザーで使用されます。su を使用してコンテナーを実行しているユーザーに切り替えた場合は、ユーザーの systemctl ユニットと対話できるように、XDG_RUNTIME_DIR 環境変数を正しい値に設定する必要があります。
export XDG_RUNTIME_DIR="/run/user/$UID"
export XDG_RUNTIME_DIR="/run/user/$UID"
podman ps | grep web systemctl --user | grep web
podman ps | grep web
systemctl --user | grep web
出力がない場合は、問題があることを示しています。
automation-controller-webサービスを再起動してみてください。systemctl start automation-controller-web.service --user systemctl --user | grep web systemctl status automation-controller-web.service --user
systemctl start automation-controller-web.service --user systemctl --user | grep web systemctl status automation-controller-web.service --userCopy to Clipboard Copied! Toggle word wrap Toggle overflow Sep 29 10:55:16 daap1.lan automation-controller-web[29875]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use) Sep 29 10:55:16 daap1.lan automation-controller-web[29875]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Sep 29 10:55:16 daap1.lan automation-controller-web[29875]: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use) Sep 29 10:55:16 daap1.lan automation-controller-web[29875]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)Copy to Clipboard Copied! Toggle word wrap Toggle overflow 出力は、ポートがすでに別のサービスによって使用されているか、引き続き使用されていることを示します。この場合は
nginxを使用します。以下を実行します。
sudo pkill nginx
sudo pkill nginxCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Web サービスを再起動してステータスを再度確認します。
通常のサービス出力は次のようになり、引き続き実行されているはずです。
インストールプログラムを再度実行して、すべてが期待どおりにインストールされることを確認できます。
Amazon Web Services にコンテナー化された Ansible Automation Platform をインストールしようとすると、デバイスに空き容量がないという出力が表示されます。
TASK [ansible.containerized_installer.automationcontroller : Create the receptor container] ***************************************************
fatal: [ec2-13-48-25-168.eu-north-1.compute.amazonaws.com]: FAILED! => {"changed": false, "msg": "Can't create container receptor", "stderr": "Error: creating container storage: creating an ID-mapped copy of layer \"98955f43cc908bd50ff43585fec2c7dd9445eaf05eecd1e3144f93ffc00ed4ba\": error during chown: storage-chown-by-maps: lchown usr/local/lib/python3.9/site-packages/azure/mgmt/network/v2019_11_01/operations/__pycache__/_available_service_aliases_operations.cpython-39.pyc: no space left on device: exit status 1\n", "stderr_lines": ["Error: creating container storage: creating an ID-mapped copy of layer \"98955f43cc908bd50ff43585fec2c7dd9445eaf05eecd1e3144f93ffc00ed4ba\": error during chown: storage-chown-by-maps: lchown usr/local/lib/python3.9/site-packages/azure/mgmt/network/v2019_11_01/operations/__pycache__/_available_service_aliases_operations.cpython-39.pyc: no space left on device: exit status 1"], "stdout": "", "stdout_lines": []}
TASK [ansible.containerized_installer.automationcontroller : Create the receptor container] ***************************************************
fatal: [ec2-13-48-25-168.eu-north-1.compute.amazonaws.com]: FAILED! => {"changed": false, "msg": "Can't create container receptor", "stderr": "Error: creating container storage: creating an ID-mapped copy of layer \"98955f43cc908bd50ff43585fec2c7dd9445eaf05eecd1e3144f93ffc00ed4ba\": error during chown: storage-chown-by-maps: lchown usr/local/lib/python3.9/site-packages/azure/mgmt/network/v2019_11_01/operations/__pycache__/_available_service_aliases_operations.cpython-39.pyc: no space left on device: exit status 1\n", "stderr_lines": ["Error: creating container storage: creating an ID-mapped copy of layer \"98955f43cc908bd50ff43585fec2c7dd9445eaf05eecd1e3144f93ffc00ed4ba\": error during chown: storage-chown-by-maps: lchown usr/local/lib/python3.9/site-packages/azure/mgmt/network/v2019_11_01/operations/__pycache__/_available_service_aliases_operations.cpython-39.pyc: no space left on device: exit status 1"], "stdout": "", "stdout_lines": []}
/home ファイルシステムをデフォルトの Amazon Web Services マーケットプレイスの RHEL インスタンスにインストールする場合、/home は root / ファイルシステムの一部であるため、サイズが小さすぎる可能性があります。より多くのスペースを確保する必要があります。ドキュメントでは、コンテナー化された Ansible Automation Platform のシングルノードデプロイメントに最低 40 GB を指定しています。
A.2. コンテナー化された Ansible Automation Platform の設定のトラブルシューティング リンクのコピーリンクがクリップボードにコピーされました!
Ansible Automation Platform コンテンツをシードするためのインストール後にエラーが発生することがあります。これは次のような出力として現れる可能性があります。
TASK [infra.controller_configuration.projects : Configure Controller Projects | Wait for finish the projects creation] ***************************************
Friday 29 September 2023 11:02:32 +0100 (0:00:00.443) 0:00:53.521 ******
FAILED - RETRYING: [daap1.lan]: Configure Controller Projects | Wait for finish the projects creation (1 retries left).
failed: [daap1.lan] (item={'failed': 0, 'started': 1, 'finished': 0, 'ansible_job_id': '536962174348.33944', 'results_file': '/home/aap/.ansible_async/536962174348.33944', 'changed': False, '__controller_project_item': {'name': 'AAP Config-As-Code Examples', 'organization': 'Default', 'scm_branch': 'main', 'scm_clean': 'no', 'scm_delete_on_update': 'no', 'scm_type': 'git', 'scm_update_on_launch': 'no', 'scm_url': 'https://github.com/user/repo.git'}, 'ansible_loop_var': '__controller_project_item'}) => {"__projects_job_async_results_item": {"__controller_project_item": {"name": "AAP Config-As-Code Examples", "organization": "Default", "scm_branch": "main", "scm_clean": "no", "scm_delete_on_update": "no", "scm_type": "git", "scm_update_on_launch": "no", "scm_url": "https://github.com/user/repo.git"}, "ansible_job_id": "536962174348.33944", "ansible_loop_var": "__controller_project_item", "changed": false, "failed": 0, "finished": 0, "results_file": "/home/aap/.ansible_async/536962174348.33944", "started": 1}, "ansible_job_id": "536962174348.33944", "ansible_loop_var": "__projects_job_async_results_item", "attempts": 30, "changed": false, "finished": 0, "results_file": "/home/aap/.ansible_async/536962174348.33944", "started": 1, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
TASK [infra.controller_configuration.projects : Configure Controller Projects | Wait for finish the projects creation] ***************************************
Friday 29 September 2023 11:02:32 +0100 (0:00:00.443) 0:00:53.521 ******
FAILED - RETRYING: [daap1.lan]: Configure Controller Projects | Wait for finish the projects creation (1 retries left).
failed: [daap1.lan] (item={'failed': 0, 'started': 1, 'finished': 0, 'ansible_job_id': '536962174348.33944', 'results_file': '/home/aap/.ansible_async/536962174348.33944', 'changed': False, '__controller_project_item': {'name': 'AAP Config-As-Code Examples', 'organization': 'Default', 'scm_branch': 'main', 'scm_clean': 'no', 'scm_delete_on_update': 'no', 'scm_type': 'git', 'scm_update_on_launch': 'no', 'scm_url': 'https://github.com/user/repo.git'}, 'ansible_loop_var': '__controller_project_item'}) => {"__projects_job_async_results_item": {"__controller_project_item": {"name": "AAP Config-As-Code Examples", "organization": "Default", "scm_branch": "main", "scm_clean": "no", "scm_delete_on_update": "no", "scm_type": "git", "scm_update_on_launch": "no", "scm_url": "https://github.com/user/repo.git"}, "ansible_job_id": "536962174348.33944", "ansible_loop_var": "__controller_project_item", "changed": false, "failed": 0, "finished": 0, "results_file": "/home/aap/.ansible_async/536962174348.33944", "started": 1}, "ansible_job_id": "536962174348.33944", "ansible_loop_var": "__projects_job_async_results_item", "attempts": 30, "changed": false, "finished": 0, "results_file": "/home/aap/.ansible_async/536962174348.33944", "started": 1, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
infra.controller_configuration.dispatch ロールは、各設定タイプを適用するために 30 回の再試行を伴う非同期ループを使用し、再試行間のデフォルトの遅延は 1 秒です。設定が大きい場合、最後の再試行が発生する前にすべてを適用するには時間が足りない可能性があります。
controller_configuration_async_delay 変数を 1 秒以外の値に設定して、再試行の遅延時間を増やします。たとえば、2 秒に設定すると、再試行時間が 2 倍になります。これを行う場所は、コントローラー設定が定義されているリポジトリー内になります。インストールプログラムインベントリーファイルの [all:vars] セクションに追加することもできます。
いくつかの例では、追加の変更は必要なく、インストールプログラムを再実行すると機能することが示されています。
A.3. コンテナー化された Ansible Automation Platform のリファレンス リンクのコピーリンクがクリップボードにコピーされました!
Ansible Automation Platform のコンテナー化設計のアーキテクチャーの詳細を教えていただけますか?
Red Hat では、基盤となるネイティブ RHEL テクノロジーを可能な限り多用しています。コンテナーのランタイムとサービスの管理には Podman を使用します。ソリューションを表示および調査するために、多くの Podman サービスとコマンドが使用されます。
たとえば、podman ps と podman images を使用して、基礎部分と実行部分の一部を確認します。
コンテナー化された Ansible Automation Platform は、セキュリティーを最大限に高めてすぐに使用できるように、ルートレスコンテナーとして実行されます。つまり、ローカルの権限のないユーザーアカウントを使用して、コンテナー化された Ansible Automation Platform をインストールできます。権限の昇格は、特定の root レベルのタスクにのみ必要であり、デフォルトでは root を直接使用する場合には必要ありません。
インストールが完了すると、インストールプログラムが実行されるファイルシステム (基盤となる RHEL ホスト) に特定の項目が取り込まれていることを確認できます。
Podman ボリュームなどを利用するその他のコンテナー化されたサービスは、使用されるインストール root ディレクトリーの下に存在します。詳細な参照情報として、以下にいくつかの例を示します。
コンテナーディレクトリーには、実行プレーンに使用およびインストールされる Podman の詳細の一部が含まれています。
コントローラーディレクトリーには、インストールされた設定とランタイムデータポイントの一部が含まれています。
レセプターディレクトリーには、自動化メッシュ設定があります。
インストール後、ローカルユーザーのホームディレクトリーに、.cache ディレクトリーなどの他の部分も見つかります。
.cache/
├── containers
│ └── short-name-aliases.conf.lock
└── rhsm
└── rhsm.log
.cache/
├── containers
│ └── short-name-aliases.conf.lock
└── rhsm
└── rhsm.log
デフォルトでは、ルートレス Podman などの最も安全な方法で実行されるため、非特権ユーザーとして systemd を実行するなどの他のサービスも使用できます。systemd では、利用可能なコンポーネントサービスコントロールの一部を以下のように確認できます。
以下は、.config ディレクトリーです。
これは Podman に固有のものであり、Open Container Initiative (OCI) 仕様に準拠しています。root ユーザーとして実行される Podman はデフォルトで /var/lib/containers を使用しますが、標準ユーザーの場合は $HOME/.local の下の階層が使用されます。
以下は、.local ディレクトリーです。
実行プレーンをコントロールプレーンのメインサービス (PostgreSQL、Redis、Automation Controller、レセプター、Automation Hub、Event-Driven Ansible) から分離します。
コントロールプレーンサービスは、標準の Podman 設定 (~/.local/share/containers/storage) で実行されます。
実行プレーンサービスは、実行プレーンコンテナーがコントロールプレーンと対話できないように、専用の設定またはストレージ (~/aap/containers/storage) を使用します。
ホストリソースの使用率統計情報を確認するにはどうすればよいですか?
- 以下を実行します。
podman container stats -a
$ podman container stats -a
Dell が販売および提供しているコンテナー化された Ansible Automation Platform ソリューション (DAAP) のインストールにおける前の例では、約 1.8 Gb の RAM を使用しています。
ストレージは、どのくらいの量がどこで使用されていますか?
ルートレス Podman を実行すると、コンテナーボリュームストレージはローカルユーザーの $HOME/.local/share/containers/storage/volumes にあります。
各ボリュームの詳細を表示するには、次のコマンドを実行します。
podman volume ls
$ podman volume lsCopy to Clipboard Copied! Toggle word wrap Toggle overflow 次に、以下を実行します。
podman volume inspect <volume_name>
$ podman volume inspect <volume_name>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
以下に例を示します。
インストールプログラムによって作成されたいくつかのファイルは $HOME/aap/ にあり、実行中のさまざまなコンテナーにバインドマウントされます。
コンテナーに関連付けられたマウントを表示するには、次のコマンドを実行します。
podman ps --format "{{.ID}}\t{{.Command}}\t{{.Names}}"$ podman ps --format "{{.ID}}\t{{.Command}}\t{{.Names}}"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow 次に、以下を実行します。
podman inspect <container_name> | jq -r .[].Mounts[].Source
$ podman inspect <container_name> | jq -r .[].Mounts[].SourceCopy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow jqRPM がインストールされていない場合は、次のコマンドでインストールします。sudo dnf -y install jq
$ sudo dnf -y install jqCopy to Clipboard Copied! Toggle word wrap Toggle overflow