3 Oracle Linux Automation Managerのインストール
この章では、Oracle Linux Automation Managerデプロイメントで使用する新しいホストを準備する方法について説明します。 ホストを準備する場合は、Oracle Linux Automation Managerソフトウェア・パッケージとともにインストールする必要があります。
この章では、ホストを設定し、Oracle Linux Automation Managerソフトウェアをインストールする方法について説明します。
Oracle Linux Automation Managerのインストール
この項では、Oracle Linux Automation Managerのインストールについて説明します。
ホストを設定するには:
-
ol_automation
をインストールして、Oracle Linux Automation Managerをインストールします。sudo dnf install ol-automation-manager
ノート:
次のエラー・メッセージは障害を示すものではなく、無視して問題ありません。
ValueError: File context for /var/run/tower(/.*)? already defined
[/usr/lib/tmpfiles.d/*.conf:1] Line references path below legacy directory
-
次の行が含まれるように
/etc/redis.conf
ファイルを編集します。unixsocket /var/run/redis/redis.sock unixsocketperm 775
-
次のスクリプトを実行して、データベースを起動および設定します。
sudo /var/lib/ol-automation-manager/ol-automation-manager-DB-init.sh
-
awxユーザーとしてOracle Linux Automation Managerデプロイメントを準備します。 次を実行します。
-
次のコマンドを実行します:
sudo su -l awx -s /bin/bash awx-manage migrate awx-manage createsuperuser --username admin --email email
前述の例で、emailは管理ユーザーの電子メール・アドレスです。
-
管理ユーザーのパスワードを入力し、もう一度入力します。
Password: Password (again):
-
次のコマンドを実行します。
awx-manage create_preload_data awx-manage provision_instance --hostname=hostname or ip address awx-manage register_queue --queuename=tower --hostnames=hostname or ip address awx-manage setup_managed_credential_types
前述の例で、hostname or ip addressはOracle Linux Automation Managerを実行しているシステムのホスト名またはIPアドレスです。 ホスト名を使用する場合は、ホストが解決可能である必要があります。
-
awxシェル環境を終了します。
exit
-
-
NGINXのSSL証明書を生成します。
ノート:
次の手順では、Oracle Linux Automation Managerの一部としてNGINXで使用する自己署名証明書を作成する方法について説明します。 本番システムでは、この目的にはCA署名証明書を使用することをお薦めします。 SSL証明書の操作の詳細は、「Oracle Linux: 証明書と公開キー・インフラストラクチャの管理」を参照してください。
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/tower/tower.key -out /etc/tower/tower.crt
-
NGINXのデフォルト構成をすべて削除します。
/etc/nginx/nginx.conf
を編集して、次の構成を含めます。user nginx; worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid; # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic. include /usr/share/nginx/modules/*.conf; events { worker_connections 1024; } http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; include /etc/nginx/mime.types; default_type application/octet-stream; # Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include /etc/nginx/conf.d/*.conf; }
ノート:
拡張NGINXユーザーの場合、Oracle Linux Automation Manager NGINX構成ファイルは
/etc/nginx/conf.d/ol-automation-manager-nginx.conf
にあります。 カスタマイズされた既存のNGINX設定がある場合は、必ずol-automation-manager-nginx.conf
設定も適用してください。 -
/etc/tower/settings.py
ファイルを編集し、CLUSTER_HOST_ID
パラメータを次のように設定します。CLUSTER_HOST_ID = "hostname or ip address"
-
サービスを起動します。
sudo systemctl enable --now ol-automation-manager.service
Oracle Linux Automation Manager CLIのインストール
Oracle Linux Automation Manager CLIは、Oracle Linux Automation Managerサーバーをインストールしたものと同じマシン、または別のOracle Linux 8マシンにインストールできます。 Oracle Linux Automation Manager CLIのインストールの詳細は、「Oracle Linux Automation Manager 1.0: CLIおよびAPIリファレンス・ガイド」を参照してください。