9.5. Migrating the Reports Service to a Separate Machine

Migrate a Reports service that was installed and configured on the Red Hat Enterprise Virtualization Manager to a dedicated host machine. Hosting the Reports service on a separate machine helps to reduce the load on the Manager machine. Note that this procedure migrates the Reports service only. The Reports database (also known as the ovirt_engine_reports database) cannot be migrated; you must create a new ovirt_engine_reports database when you configure Reports on the new machine. Saved ad hoc reports can be migrated from the Manager machine to the new Reports machine. Migrate the Reports service only after the Manager and Data Warehouse have been configured.
Installing this scenario involves three key steps:
  1. Configure the new Reports machine.
  2. Migrate any saved reports to the new Reports machine.
  3. Remove the Reports service from the Manager machine.
Prerequisites

Ensure that you have completed the following prerequisites:

  1. You must have installed and configured the Manager and Reports on the same machine.
  2. You must have installed and configured Data Warehouse, either on the Manager machine or on a separate machine.
  3. To set up the new Reports machine, you must have the following:
    • A virtual or physical machine with Red Hat Enterprise Linux 6.6 or later versions of Red Hat Enterprise Linux 6 installed
    • A subscription to the Red Hat Enterprise Linux Server and Red Hat Enterprise Virtualization entitlement pools
    • The password from the Data Warehouse machine's /etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf file
    • Allowed access from the Reports machine to the Manager database machine's TCP port 5432

Procedure 9.8. Step 1: Configuring the New Reports Machine

  1. Register your system with the Content Delivery Network, entering your Customer Portal user name and password when prompted:
    # subscription-manager register
  2. Find the Red Hat Enterprise Linux Server and Red Hat Enterprise Virtualization subscription pools and note down the pool IDs.
    # subscription-manager list --available
  3. Use the pool IDs located in the previous step to attach the entitlements to the system:
    # subscription-manager attach --pool=pool_id
  4. Disable all existing repositories:
    # subscription-manager repos --disable=*
  5. Enable the required channels:
    # 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
  6. Ensure that all packages currently installed are up to date:
    # yum update
  7. Install the rhevm-reports-setup package:
    # yum install rhevm-reports-setup
  8. Run the engine-setup command to begin configuration of Reports on the machine:
    # engine-setup
  9. Press Enter to configure Reports:
    Configure Reports on this host (Yes, No) [Yes]:
    
  10. Press Enter to automatically configure the firewall, or type No and 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.
  11. 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]:
  12. Enter the fully qualified domain name of the Manager machine, and then press Enter:
    Host fully qualified DNS name of the engine server []:
  13. Answer the following questions about the ovirt_engine_reports database. Press Enter to allow setup to create and configure a local database:
    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]:
    
  14. Enter the fully qualified domain name and password for your ovirt_engine_history database host. Press Enter to accept the default values in each other field:
    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
  15. Press Enter to allow setup to sign the Reports certificate and Apache certificate on the Manager via SSH:
    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]:
  16. Press Enter to accept the default SSH port, or enter an alternative port number and then press Enter:
    ssh port on remote engine server [22]:
  17. Enter the root password for the Manager machine:
    root password on remote engine server manager-fqdn.com:
  18. Press Enter to allow automatic configuration of SSL on Apache:
    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]:
    
  19. Set a password for the Reports administrative users (admin and superuser). Note that the reports system maintains its own set of credentials that are separate to those used for the Manager:
    Reports power users password:
    You are prompted to enter the password a second time to confirm it.
  20. Confirm your installation settings:
    Please confirm installation settings (OK, Cancel) [OK]:

Procedure 9.9. Step 2: Migrating Saved Reports to the New Reports Machine

  1. On the Manager machine, run the ovirt-engine-reports-tool command:
    # ovirt-engine-reports-tool
    
  2. Enter the number that corresponds to the export option, and press Enter:
    (2) Export Jasperreports saved reports to a zip file
    (1, 2, 3) []: 2
    
  3. Enter the absolute path for the zip file to export saved reports to, and press Enter:
    Filename to export saved reports to: /tmp/saved-reports.zip
  4. Copy the zip file to the new Reports machine:
    # scp /tmp/saved-reports.zip reports-machine-fqdn:/tmp/
  5. On the new Reports machine, run the ovirt-engine-reports-tool command:
    # ovirt-engine-reports-tool
    
  6. Enter the number that corresponds to the import option, and press Enter:
    (3) Import a saved reports zip file to Jasperreports
    (1, 2, 3) []: 3
  7. Enter the absolute path of the zip file from which to import, and press Enter:
    Filename to import saved reports from: /tmp/saved-reports.zip
When the command completes, the saved reports are visible in the Reports Portal of the new Reports machine.

Procedure 9.10. Step 3: Removing the Reports Service from the Manager Machine

  1. Stop the Reports service:
    # service ovirt-engine-reportsd stop
  2. Remove the Reports package:
    # yum remove rhevm-reports
  3. Remove the Reports files:
    # rm -rf /etc/ovirt-engine-reports /var/lib/ovirt-engine-reports
  4. Remove the Reports database and user. The default name for both is ovirt_engine_reports:
    # su - postgres
    $ psql
    postgres=# drop database ovirt_engine_reports;
    postgres=# drop user ovirt_engine_reports;
    

Note

You can configure more than one working Reports instance, and continue to log in and view reports from an older instance; however, the Manager will directly connect to and have SSO with only the last Reports instance that was configured using engine-setup. This means that the Administration Portal includes dashboards from and direct links to only the most recent Reports installation.