5 Private Automation Hubのアップグレード
この章では、Private Automation Hubのアップグレードについて説明します。
2.1から2.2へのアップグレード
Private Automation Hubを2.1から2.2にアップグレードするには、次を実行します:
- OSバックアップの実行を検討します。 システムのバックアップは、アップグレードが失敗した場合にシステムを以前の状態にリストアできるようにすることをお勧めします。
-
Private Automation Hubのバックアップを作成します。 詳細については、「Private Automation Hubのバックアップとリストア」を参照してください。
- Private Automation Hubを実行しているシステムで、すべてのPrivate Automation Hubサービスを停止します:
sudo systemctl stop pulpcore
- ステータスをチェックして、すべてのサービスが停止していることを確認します:
sudo systemctl status pulpcore* -all
- ローカルまたはリモートのデータベース・ホストで、データベースを制御するユーザー・アカウントにログインします。
sudo su - postgres
- 実行中の
postgresql
のバージョンを確認します。rpm -q postgresql
たとえば、次のレスポンスはpostgresql
バージョン10を示しています:postgresql-10.23-4.0.1.module+el8.9.0+90164+87901204.x86_64
- 次のいずれかの操作を行います。
- バージョン13がインストールされている場合は、ステップ17に進みます。
- バージョン10、11、または12がインストールされている場合は、次のステップに進みます。
- データベースをエクスポートします。 データベースをエクスポートすると、データベースをリストアするために必要なすべてのSQLコマンドと入力データを含むスクリプト・ファイルが作成されます。 たとえば、このコマンドは、データベース・ホーム・ディレクトリに
hub.dump
ファイルを作成します:pg_dumpall > hub.dump
- データベース・ユーザー・アカウントを終了します:
exit
- データベース・サーバーを停止します:
sudo systemctl stop postgresql
- 既存のデータベース・データ・ディレクトリを削除(およびオプションでバックアップ)します。 たとえば、次のコマンドは、ホーム・ディレクトリ内のバックアップ・ファイルを削除して作成します:
sudo mv /var/lib/pgsql/data/ ~/data.old
- データベースの現在のバージョンを削除します:
sudo dnf remove postgresql
- 「リモート・データベースの設定」の説明に従ってデータベースを再インストールし、データベースを再起動してこのステップに戻るステップを含む手順に従いますが、これらのオブジェクトがすでにダンプ・ファイルに存在するため、ステップ9から11のユーザーおよびデータベース・パルプの作成は無視します。
- 更新が完了したら、
hub.dump
ファイルをインポートしてデータベースを設定します。 次のコマンドを実行します。sudo su - postgres psql -d postgres -f hub.dump exit
- Private Automation Hubサーバーで、プライベート自動化ハブ・サービスおよびNGINXプロセスを再起動します:
sudo systemctl start pulpcore* -all sudo systemctl start nginx
- Private Automation Hub機能をテストし、すべてが期待どおりに機能していることを確認します。
- Private Automation Hubサーバーで、次のコマンドを実行します:
sudo dnf install oraclelinux-automation-manager-release-el8-2.2 sudo dnf config-manager --disable ol_automation2
- Private Automation Hubデプロイメント・サーバーで、次のコマンドを実行します:
sudo dnf install oraclelinux-automation-manager-release-el8-2.2 sudo mv /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo.OLD sudo mv /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo.rpmnew /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo
- Private Automation Hubサーバーおよびデプロイメント・サーバーのOSを更新します:
sudo dnf update -y --refresh
- Private Automation Hubサーバーで、collect staticコマンドを実行します:
sudo PULP_SETTINGS=/etc/pulp/settings.py /usr/bin/pulpcore-manager collectstatic --clear --noinput
- デプロイメント・ホストで、Private Automation Hubのインストールに使用したユーザー・アカウントと同じユーザー・アカウントで、Private Automation Hubのインストーラを実行します。
ansible-playbook -i hosts single-node-install.yml -e "olpah_admin_password=<admin_password> olpah_db_password=<db_password>"
ノート:
サーバーを最初に作成したときにパラメータ・ファイルを使用した場合は、このコマンドの実行時に再度使用する必要があります。 たとえば、コマンドライン-e "@single-node-vars.yml"
の末尾に次を追加します。
ビルダー・ユーティリティ2.1から2.2へのアップグレード
Private Automation Hub Builderユーティリティを2.1から2.2にアップグレードするには、次を実行します:
- 以前のバージョンのビルダー・ユーティリティをインストールしたホストで、次のコマンドを実行します:
sudo dnf install oraclelinux-automation-manager-release-el8-2.2 sudo mv /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo.OLD sudo mv /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo.rpmnew /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo sudo dnf update python39-ansible-builder
execution-environment.yml
ファイルをolam-ee
およびolam-builder
の2.2イメージに更新します。 たとえば、次のエントリを検索します:base_image: name: container-registry.oracle.com/oracle_linux_automation_manager/olam-ee:latest builder_image: name: container-registry.oracle.com/oracle_linux_automation_manager/olam-builder:latest
latest
を2.2
に変更します:images: base_image: name: container-registry.oracle.com/oracle_linux_automation_manager/olam-ee:2.2 builder_image: name: container-registry.oracle.com/oracle_linux_automation_manager/olam-builder:2.2
- Private Automation Hubを使用して
olam-ee
またはolam-builder
イメージを格納する場合は、イメージを2.2
に更新し、execution-environment.yml
内のイメージを新しい2.2
イメージにポイントします。 -
2.2で使用することを意図した以前のリリースで作成された実行環境が、依存関係の変更について評価されていることを確認します。 たとえば、以前の実行環境が古いバージョンの
ansible-core
を使用して作成された場合、これらの古い実行環境で使用されているコレクションまたはモジュールが、Oracle Linux Automation Manager 2.2ノードで実行されている新しいバージョンのansible-core
で引き続き機能することを確認します。