1.3. Migrating Data Warehouse to a Separate Machine
ovirt_engine_historydatabase, or optionally migrate the
ovirt_engine_historydatabase to a new database machine before migrating the Data Warehouse service. If the
ovirt_engine_historydatabase is hosted on the Manager, migrating the database in addition to the Data Warehouse service further reduces the competition for resources on the Manager machine. You can migrate the database to the same machine onto which you will migrate the Data Warehouse service, or to a machine that is separate from both the Manager machine and the new Data Warehouse service machine.
1.3.1. Migrating the Data Warehouse Database to a Separate Machine
ovirt_engine_historydatabase before you migrate the Data Warehouse service. Use
engine-backupto create a database backup and restore it on the new database machine. For more information on
Procedure 1.2. Migrating the Data Warehouse Database to a Separate Machine
- Create a backup of the Data Warehouse database and configuration files:
# engine-backup --mode=backup --scope=dwhdb --scope=files --file=file_name --log=log_file_name
- Copy the backup file from the Manager to the new machine:
# scp /tmp/file_name firstname.lastname@example.org:/tmp
engine-backupon the new machine:
# yum install ovirt-engine-tools-backup
- Restore the Data Warehouse database on the new machine. file_name is the backup file copied from the Manager.
# engine-backup --mode=restore --scope=files --scope=dwhdb --file=file_name --log=log_file_name --provision-dwh-db --no-restore-permissions
1.3.2. Migrating the Data Warehouse Service to a Separate Machine
ovirt_engine_historydatabase) prior to migrating the Data Warehouse service, see Section 1.3.1, “Migrating the Data Warehouse Database to a Separate Machine”.
Ensure that you have completed the following prerequisites:
- You must have installed and configured the Manager and Data Warehouse on the same machine.
- To set up the new Data Warehouse machine, you must have the following:
- A virtual or physical machine with Red Hat Enterprise Linux 7 installed.
- A subscription to the
Red Hat Enterprise Linux Serverand
Red Hat Virtualizationentitlement pools.
- The password from the Manager's
- Allowed access from the Data Warehouse machine to the Manager database machine's TCP port 5432.
ovirt_engine_historydatabase credentials from the Manager's
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conffile. If you migrated the
ovirt_engine_historydatabase using Section 1.3.1, “Migrating the Data Warehouse Database to a Separate Machine”, retrieve the credentials you defined during the database setup on that machine.
- Set up the new Data Warehouse machine: Procedure 1.3. Setting up the New Data Warehouse Machine
- Stop the Data Warehouse service on the Manager machine: Procedure 1.4. Stopping the Data Warehouse Service on the Manager Machine
- Configure the new Data Warehouse machine: Procedure 1.5. Configuring the New Data Warehouse Machine
- Disable the Data Warehouse service on the Manager machine: Procedure 1.6. Disabling the Data Warehouse Service on the Manager Machine
Procedure 1.3. Setting up the New Data Warehouse Machine
- Subscribe your system to the required entitlements. See Subscribing to the Required Entitlements in the Installation Guide for more information.
- Ensure that all packages currently installed are up to date:
# yum update
- Install the ovirt-engine-dwh-setup package:
# yum install ovirt-engine-dwh-setup
Procedure 1.4. Stopping the Data Warehouse Service on the Manager Machine
- Stop the Data Warehouse service:
# systemctl stop ovirt-engine-dwhd.service
- If the database is hosted on a remote machine, you must manually grant access by editing the postgres.conf file. Edit the
/var/lib/pgsql/data/postgresql.conffile and modify the listen_addresses line so that it matches the following:
listen_addresses = '*'If the line does not exist or has been commented out, add it manually.If the database is hosted on the Manager machine and was configured during a clean setup of the Red Hat Virtualization Manager, access is granted by default.See Section 1.3.1, “Migrating the Data Warehouse Database to a Separate Machine” for more information on how to configure and migrate the Data Warehouse database.
- Restart the postgresql service:
# systemctl restart postgresql.service
Procedure 1.5. Configuring the New Data Warehouse Machine
ovirt_engine_historydatabase to one machine and Data Warehouse service to a different machine. The order of the questions may differ depending on your environment.
- If you are migrating both the
ovirt_engine_historydatabase and the Data Warehouse service to the same machine, run the following, otherwise proceed to the next step.
# sed -i '/^ENGINE_DB_/d' \ /etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf # sed -i \ -e 's;^\(OVESETUP_ENGINE_CORE/enable=bool\):True;\1:False;' \ -e '/^OVESETUP_CONFIG\/fqdn/d' \ /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf
- Run the
engine-setupcommand to begin configuration of Data Warehouse on the machine:
- Press Enter to configure Data Warehouse:
Configure Data Warehouse on this host (Yes, No) [Yes]:
- Press Enter to accept the automatically detected hostname, or enter an alternative hostname and press Enter:
Host fully qualified DNS name of this server [autodetected host name]:
- Press Enter to automatically configure the firewall, or type
Noand press Enter to maintain existing settings:
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]:If you choose to automatically configure the firewall, and no firewall managers are active, you are prompted to select your chosen firewall manager from a list of supported options. Type the name of the firewall manager and press Enter. This applies even in cases where only one option is listed.
- Enter the fully qualified domain name and password for the Manager. Press Enter to accept the default values in each other field:
Host fully qualified DNS name of the engine server : engine-fqdn 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) : ssh port on remote engine server : root password on remote engine server engine-fqdn: password
- Answer the following question about the location of the
Where is the DWH database located? (Local, Remote) [Local]: RemoteType the alternative option as shown above then press Enter.
- Enter the fully qualified domain name and password for your
ovirt_engine_historyhost. Press Enter to accept the default values in each other field:
DWH database host : dwh-db-fqdn DWH database port : DWH database secured connection (Yes, No) [No]: DWH database name [ovirt_engine_history]: DWH database user [ovirt_engine_history]: DWH database password: passwordSee Section 1.3.1, “Migrating the Data Warehouse Database to a Separate Machine” for more information on how to configure and migrate the Data Warehouse database.
- Enter the fully qualified domain name and password for the Manager database machine. Press Enter to accept the default values in each other field:
Engine database host : engine-db-fqdn Engine database port : Engine database secured connection (Yes, No) [No]: Engine database name [engine]: Engine database user [engine]: Engine database password: password
- Choose how long Data Warehouse will retain collected data:
Please choose Data Warehouse sampling scale: (1) Basic (2) Full (1, 2):
Fulluses the default values for the data storage settings listed in Section 2.4, “Application Settings for the Data Warehouse service in ovirt-engine-dwhd.conf” (recommended when Data Warehouse is installed on a remote host).
NoteIf you migrate from
Full, initially only the existing basic data will be available.
Basicreduces the values of
0, easing the load on the Manager machine but with a less detailed history.
- Confirm that you want to permanently disconnect the existing Data Warehouse service from the Manager:
Do you want to permanently disconnect this DWH from the engine? (Yes, No) [Yes]:
- Confirm your installation settings:
Please confirm installation settings (OK, Cancel) [OK]:
Procedure 1.6. Disabling the Data Warehouse Service on the Manager Machine
- On the Manager machine, restart the Manager:
# service ovirt-engine restartThis step is required for the Dashboard to function.
- Disable the Data Warehouse service:
# systemctl disable ovirt-engine-dwhd.service
- Remove the Data Warehouse files:
# rm -f /etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/*.conf /var/lib/ovirt-engine-dwh/backups/*