5.4. Data Warehouse と Reports を別のマシンに移行する方法
ovirt_engine_history データベースと接続します。あるいは、オプションで、ovirt_engine_history データベースを新規データベースマシンに移行してから、Data Warehouse サービスを移行します。ovirt_engine_history データベースが Manager でホストされている場合には、Data Warehouse サービスとこのデータベースを移行することで、Manager マシン上でのリソースの競合をさらに軽減することができます。また、Data Warehouse サービスの移行先と同じマシンにデータベースを移行することも、Manager マシンや新規の Data Warehouse サービスマシンとも別のマシンに移行することも可能です。
5.4.1. Data Warehouse の別のマシンへの移行
ovirt_engine_history データベースを移行してから、Data Warehouse サービスを移行します。以下の手順では、データベースのバックアップを作成する pg_dump と、新規データベースマシンでバックアップを復元する psql を使用します。pg_dump コマンドは、データベースをバックアップ/復元するにあたり柔軟なオプションを提供します。お使いのシステムに適したオプションについての情報は、pg_dump のマニュアルページを参照してください。
重要
engine-setup を実行して、プロンプトが表示されたら新規 Data Warehouse のデータベースの詳細を入力し、サービスの再設定を行う必要があります。再設定を行う場合には、Reports サービスは依然として以前のデータベースに接続され、新規データは受信されません。
手順5.9 Data Warehouse の別のマシンへの移行
- 既存のデータベースマシン上で、
ovirt_engine_historyデータベースを SQL スクリプトファイルにダンプします。# pg_dump ovirt_engine_history > ovirt_engine_history.sql
- 既存のデータベースマシンから新規データベースマシンに、このスクリプトファイルをコピーします。
- 新規データベースマシン上で
ovirt_engine_historyデータベースを復元します。# psql -d ovirt_engine_history -f ovirt_engine_history.sql
上記のコマンドは、新規マシン上のデータベースの名前がovirt_engine_historyとの前提で実行されています。
5.4.2. Data Warehouse サービスの別のマシンへの移行
ovirt_engine_history データベース) を移行する方法については、「Data Warehouse の別のマシンへの移行」を参照してください。
- 新規の Data Warehouse マシンを設定します。
- Manager マシンで Data Warehouse サービスを停止します。
- 新規の Data Warehouse マシンを構成します。
- Manager マシンから Data Warehouse パッケージを削除します。
以下の前提条件が満たされていることを確認してください。
- Manager と Data Warehouse は同じマシン上にインストール/設定しておく必要があります。
- 新しい Data Warehouse のマシンを設定するには、以下が必要です。
- Red Hat Enterprise Linux 6.6 または 6.7 をインストール済みの仮想マシンまたは物理マシン
Red Hat Enterprise Linux ServerおよびRed Hat Enterprise Virtualizationのエンタイトルメントプールのサブスクリプション- Manager の
/etc/ovirt-engine/engine.conf.d/10-setup-database.confファイルに記載されているパスワード - Data Warehouse のマシンから Manager データベースのマシンの TCP ポート 5432 へのアクセスの許可
- Manager の
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.confファイルからのovirt_engine_historyデータベースの認証情報。「Data Warehouse の別のマシンへの移行」の手順に従ってovirt_engine_historyデータベースを移行した場合には、そのマシン上でデータベースの設定中に定義した認証情報を取得します。
手順5.10 手順 1: 新規 Data Warehouse マシンの設定
- コンテンツ配信ネットワークにシステムを登録します。プロンプトが表示されたら、カスタマーポータルのユーザー名とパスワードを入力します。
# subscription-manager register
Red Hat Enterprise Linux ServerおよびRed Hat Enterprise Virtualizationのサブスクリプションプールを見つけて、プール ID を書き留めておきます。# subscription-manager list --available
- 上記のステップで特定したプール ID を使用して、エンタイトルメントをシステムにアタッチします。
# subscription-manager attach --pool=pool_id
- 既存のリポジトリーをすべて無効にします。
# subscription-manager repos --disable=*
- 必要なチャンネルを有効にします。
# subscription-manager repos --enable=rhel-6-server-rpms # subscription-manager repos --enable=rhel-6-server-supplementary-rpms # subscription-manager repos --enable=rhel-6-server-rhevm-3.6-rpms # subscription-manager repos --enable=jb-eap-6-for-rhel-6-server-rpms
- 現在インストールされている全パッケージを最新の状態にします。
# yum update
- rhevm-dwh-setup パッケージをインストールします。
# yum install rhevm-dwh-setup
手順5.11 ステップ 2: Manager マシン上での Data Warehouse の停止
- Data Warehouse サービスを停止します。
# service ovirt-engine-dwhd stop
ovirt_engine_historyデータベース、Manager データベース、または両データベースが Manager マシンでホストされており、以前のバージョン (Red Hat Enterprise Virtualization 3.4 以前) で設定された後にアップグレードされている場合には、新規 Data Warehouse マシンがこれらのデータベースにアクセスできるようにする必要があります。/var/lib/pgsql/data/postgresql.confファイルを編集して、以下のようになるようにlisten_addressesの行を変更します。listen_addresses = '*'
この行が存在しない場合やコメントアウトされている場合には、手動で追加します。1 つまたは両データベースがリモートマシンでホストされている場合には、各マシンでpostgres.confファイルを編集して、上記のようにpostgres.confの行を追加し、手動でアクセスを許可する必要があります。両データベースが Manager マシンでホストされており、Red Hat Enterprise Virtualization Manager 3.5 の新規セットアップで設定された場合には、デフォルトでアクセスが許可されています。- postgresql サービスを再起動します。
# service postgresql restart
手順5.12 手順 3: 新規 Data Warehouse マシンの構成
engine-setupコマンドを実行し、そのマシン上で Data Warehouse の設定を開始します。# engine-setup
- Enter を押して Data Warehouse を設定します。
Configure Data Warehouse on this host (Yes, No) [Yes]:
- Enter を押してファイアウォールを自動設定するか、
Noと入力してから Enter を押して現在の設定を維持します。Setup can automatically configure the firewall on this system. Note: automatic configuration of the firewall may overwrite current settings. Do you want Setup to configure the firewall? (Yes, No) [Yes]:
ファイアウォールの自動設定を選択した場合に、ファイアウォール管理機能がアクティブ化されていなければ、サポートされているオプションのリストから選択するファイアウォール管理機能を指定するように要求されるので、そのファイアウォール管理機能の名前を入力して Enter を押してください。この設定は、オプションが 1 つしかリストされていない場合でも適用されます。 - Enter を押して自動検出されたホスト名を受け入れるか、別のホスト名を入力して Enter を押します。
Host fully qualified DNS name of this server [autodetected host name]:
ovirt_engine_historyデータベースの場所に関する以下の質問に回答します。Where is the DWH database located? (Local, Remote) [Local]: Remote
上記のどちらかのオプションをタイプして Enter を押します。ovirt_engine_historyデータベースのホストの完全修飾ドメイン名とパスワードを入力します。Enter を押して各フィールドのデフォルト値を受け入れます。DWH database host []: dwh-db-fqdn DWH database port [5432]: DWH database secured connection (Yes, No) [No]: DWH database name [ovirt_engine_history]: DWH database user [ovirt_engine_history]: DWH database password: password
- Manager のデータベースマシンの完全修飾ドメイン名とパスワードを入力します。Enter を押して各フィールドのデフォルト値を受け入れます。
Engine database host []: engine-db-fqdn Engine database port [5432]: Engine database secured connection (Yes, No) [No]: Engine database name [engine]: Engine database user [engine]: Engine database password: password
- Enter を押して既存の Data Warehouse データベースのバックアップを作成します。
Would you like to backup the existing database before upgrading it? (Yes, No) [Yes]:
データベースのバックアップに必要な時間と領域は、そのデータベースのサイズにより異なります。完了まで数時間かかる場合もあります。ここでデータベースのバックアップを行わず、何らかの理由でengine-setupが失敗した場合には、データベースまたはその中のデータを復元できません。バックアップファイルの場所は、設定スクリプトの最後に表示されます。 - Manager から既存の Data Warehouse サービスを完全に切断することを確定します。
Do you want to permanently disconnect this DWH from the engine? (Yes, No) [No]:
- インストールの設定を確認します。
Please confirm installation settings (OK, Cancel) [OK]:
手順5.13 手順 4: Manager マシンからの Data Warehouse パッケージの削除
- Data Warehouse パッケージを削除します。
# yum remove rhevm-dwh
この手順は、Data Warehouse サービスが自動的に 1 時間後に再起動を試みないようにします。 - Data Warehouse ファイルを削除します。
# rm -rf /etc/ovirt-engine-dwh /var/lib/ovirt-engine-dwh
5.4.3. 別のマシンへの Reports サービスの移行
ovirt_engine_reports データベース) は移行することができません。そのため、新規マシンで Reports を設定する際には、新しい ovirt_engine_reports データベースを作成する必要があります。保存したアドホックレポートは、Manager マシンから新規の Reports マシンに移行することができます。Manager と Data Warehouse を設定してからでないと、Reports サービスの移行はできません。
- 新規 Reports マシンを設定します。
- 保存してあるレポートを新規 Reports マシンに移行します。
- Manager マシンから Reports サービスを削除します。
以下の前提条件が満たされていることを確認してください。
- Manager と Reports は同じマシン上にインストール/設定しておく必要があります。
- Manager マシンまたは別のマシンで、Data Warehouse のインストール/設定が完了している必要があります。
- 新規の Reports マシンを設定するには、以下が必要です。
- Red Hat Enterprise Linux 6.6 または 6.7 をインストール済みの仮想マシンまたは物理マシン
Red Hat Enterprise Linux ServerおよびRed Hat Enterprise Virtualizationのエンタイトルメントプールのサブスクリプション- Data Warehouse のマシンの
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.confファイルに記載されているパスワード - Reports のマシンから Manager データベースのマシンの TCP ポート 5432 へのアクセスの許可
手順5.14 手順 1: 新規 Reports マシンの構成
- コンテンツ配信ネットワークにシステムを登録します。プロンプトが表示されたら、カスタマーポータルのユーザー名とパスワードを入力します。
# subscription-manager register
Red Hat Enterprise Linux ServerおよびRed Hat Enterprise Virtualizationのサブスクリプションプールを見つけて、プール ID を書き留めておきます。# subscription-manager list --available
- 上記のステップで特定したプール ID を使用して、エンタイトルメントをシステムにアタッチします。
# subscription-manager attach --pool=pool_id
- 既存のリポジトリーをすべて無効にします。
# subscription-manager repos --disable=*
- 必要なチャンネルを有効にします。
# subscription-manager repos --enable=rhel-6-server-rpms # subscription-manager repos --enable=rhel-6-server-supplementary-rpms # subscription-manager repos --enable=rhel-6-server-rhevm-3.6-rpms # subscription-manager repos --enable=jb-eap-6-for-rhel-6-server-rpms
- 現在インストールされている全パッケージを最新の状態にします。
# yum update
- rhevm-reports-setup パッケージをインストールします。
# yum install rhevm-reports-setup
engine-setupコマンドを実行し、そのマシン上で Reports の設定を開始します。# engine-setup
- Enter を押して Reports を設定します。
Configure Reports on this host (Yes, No) [Yes]:
- Enter を押してファイアウォールを自動設定するか、
Noと入力してから Enter を押して現在の設定を維持します。Setup can automatically configure the firewall on this system. Note: automatic configuration of the firewall may overwrite current settings. Do you want Setup to configure the firewall? (Yes, No) [Yes]:
ファイアウォールの自動設定を選択した場合に、ファイアウォール管理機能がアクティブ化されていなければ、サポートされているオプションのリストから選択するファイアウォール管理機能を指定するように要求されるので、そのファイアウォール管理機能の名前を入力して Enter を押してください。この設定は、オプションが 1 つしかリストされていない場合でも適用されます。 - Enter を押して自動検出されたホスト名を受け入れるか、別のホスト名を入力して Enter を押します。
Host fully qualified DNS name of this server [autodetected host name]:
- Manager のマシンの完全修飾ドメイン名を入力して Enter を押します。
Host fully qualified DNS name of the engine server []:
ovirt_engine_reportsデータベースに関する以下の質問に回答します。Enter を押して、セットアップでローカルのデータベースを作成/設定できるようにします。Where is the Reports database located? (Local, Remote) [Local]: Setup can configure the local postgresql server automatically for the Reports to run. This may conflict with existing applications. Would you like Setup to automatically configure postgresql and create Reports database, or prefer to perform that manually? (Automatic, Manual) [Automatic]:
ovirt_engine_historyデータベースのホストの完全修飾ドメイン名とパスワードを入力します。Enter を押して各フィールドのデフォルト値を受け入れます。DWH database host []: dwh-db-fqdn DWH database port [5432]: DWH database secured connection (Yes, No) [No]: DWH database name [ovirt_engine_history]: DWH database user [ovirt_engine_history]: DWH database password: password
- Enter を押して、Manager で SSH を介して Reports と Apache の証明書に署名する設定を許可します。
Setup will need to do some actions on the remote engine server. Either automatically, using ssh as root to access it, or you will be prompted to manually perform each such action. Please choose one of the following: 1 - Access remote engine server using ssh as root 2 - Perform each action manually, use files to copy content around (1, 2) [1]:
- Enter を押してデフォルトの SSH ポートを受け入れるか、別のポート番号を入力して Enter を押します。
ssh port on remote engine server [22]:
- Manager のマシンの root パスワードを入力します。
root password on remote engine server manager-fqdn.com:
- Enter を押して Apache 上での SSL の自動設定を許可します。
Setup can configure apache to use SSL using a certificate issued from the internal CA. Do you wish Setup to configure that, or prefer to perform that manually? (Automatic, Manual) [Automatic]:
- Reports の管理ユーザー (
adminおよびsuperuser) のパスワードを設定します。Reports のシステムは、Manager とは別の独自の認証情報を管理する点に注意してください。Reports power users password:
確認のために、パスワードの再入力を求められます。 - インストールの設定を確認します。
Please confirm installation settings (OK, Cancel) [OK]:
手順5.15 手順 2: 保存済みの Reports を新規 Reports マシンへ移行する手順
- Manager マシンで
ovirt-engine-reports-toolコマンドを実行します。# ovirt-engine-reports-tool
- エクスポートオプションに該当する番号を入力して、Enter を押します。
(2) Export Jasperreports saved reports to a zip file (1, 2, 3) []: 2
- 保存したレポートをエクスポートする ZIP ファイルの絶対パスを入力し、Enter を押します。
/tmp/saved-reports.zip に保存したレポートをエクスポートするファイル名
- zip ファイルを新規 Reports マシンへコピーします。
# scp /tmp/saved-reports.zip reports-machine-fqdn:/tmp/
- Reports のマシンで
ovirt-engine-reports-toolコマンドを実行します。# ovirt-engine-reports-tool
- インポートオプションに該当する番号を入力して、Enter を押します。
(3) Import a saved reports zip file to Jasperreports (1, 2, 3) []: 3
- インポートする ZIP ファイルの絶対パスを入力して、Enter を押します。
/tmp/saved-reports.zip から保存したレポートをインポートするファイル名
手順5.16 手順 3: Manager マシンからの Reports サービスの削除
- Reports サービスを停止します。
# service ovirt-engine-reportsd stop
- Reports パッケージを削除します。
# yum remove rhevm-reports
- Reports ファイルを削除します。
# rm -rf /etc/ovirt-engine-reports /var/lib/ovirt-engine-reports
- Reports のデータベースとユーザーを削除します。両方のデフォルト名は
ovirt_engine_reportsです。# su - postgres $ psql postgres=# drop database ovirt_engine_reports; postgres=# drop user ovirt_engine_reports;
注記
engine-setup を使用して最後に設定された Reports インスタンスとしか、直接接続できず、SSO も利用することができません。つまり、管理ポータルに含まれるのは、最新の Reports のインストールで設定されたダッシュボードだけで、直接リンクされているのは、最新の Reports インストレーションへのリンクのみです。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.