Chapter 2. Installing the Appliances

This chapter outlines the steps for installing and configuring the Red Hat CloudForms components needed for high availability: a database cluster comprised of primary and standby database-only appliances, and two (at minimum) CloudForms appliances.

2.1. Installing the Primary Database-Only Appliance

The primary database-only appliance functions as an external database to the CloudForms appliances.

  1. Deploy a CloudForms appliance with an extra partition for the database at a size appropriate for your deployment. For recommendations on disk space, see Database Requirements in the Deployment Planning Guide.
  2. Configure time synchronization on the appliance:

    1. Edit /etc/chronyd.conf with valid NTP server information.
    2. Re-synchronize time information across the appliances:

      # systemctl enable chronyd.service
      # systemctl start chronyd.service
  3. SSH into the CloudForms appliance to enter the appliance console.
  4. Configure the hostname by selecting Set Hostname.
  5. Configure networking as desired by selecting the Set DHCP Network Configuration or Set Static Network Configuration option.
  6. Select Configure Database.
  7. Select Create key to create the encryption key. You can create a new key, or use an existing key on your system by selecting Fetch key from remote machine and following the prompts.
  8. Select Create Internal Database.
  9. Select the database disk. CloudForms then activates the configuration.
  10. For Should this appliance run as a standalone database server?, select Y. Selecting this option configures this appliance as a database-only appliance, and therefore the CFME application and evmserverd processes will not run. This is required in highly available database deployments.

    Warning

    This configuration is not reversible.

  11. Create the database password.
Note

Do not create a region at this stage in the procedure.

You can check the configuration on the appliance console details screen. If configured successfully, Local Database Server shows as running (primary).

2.2. Installing a CloudForms Appliance

Install and configure a CloudForms appliance to point to the primary database server. This appliance does not serve as a database server.

From this appliance, you can then create a database region and configure the primary database.

Note

After installing and configuring an empty database-only appliance in Section 2.1, “Installing the Primary Database-Only Appliance”, the steps in this section create the database schema used by CloudForms on the primary database-only appliance, and prepare the initial data. Region metadata is required to configure the primary database-only appliance as a primary node in the replication cluster.

This must be configured from the CloudForms appliance before the primary and secondary database-only appliances can be configured.

  1. Deploy a CloudForms appliance with an extra partition for the database at a size appropriate for your deployment. For recommendations on disk space, see Database Requirements in the Deployment Planning Guide.
  2. Configure time synchronization on the appliance:

    1. Edit /etc/chronyd.conf with valid NTP server information.
    2. Re-synchronize time information across the appliances:

      # systemctl enable chronyd.service
      # systemctl start chronyd.service
  3. SSH into the CloudForms appliance to enter the appliance console.
  4. Configure the hostname by selecting Set Hostname.
  5. Configure networking as desired by selecting the Set DHCP Network Configuration or Set Static Network Configuration option.
  6. Select Configure Database.
  7. Configure this appliance to use the encryption key from the primary database-only appliance:

    1. For Encryption Key, select Fetch key from remote machine.
    2. Enter the hostname for the primary database-only appliance you previously configured containing the encryption key.
    3. Enter the primary database-only appliance’s username.
    4. Enter the primary database-only appliance’s password.
    5. Enter the path of the remote encryption key. (For example, /var/www/miq/vmdb/certs/v2_key.)
  8. Configure the database:

    1. Select Create Region in External Database, since the database is external to the appliances.

      Important

      Creating a database region will destroy any existing data and cannot be undone.

    2. Provide the primary database-only appliance as the remote key location and its credentials.
    3. Assign a unique database region number. Note that creating a database region will destroy any existing data and cannot be undone.
    4. For Are you sure you want to continue? Select y.
  9. Enter the primary database-only appliance’s name and access details:

    1. Enter the hostname for the primary database-only appliance.
    2. Enter a name to identify the database.
    3. Enter the primary database-only appliance’s username.
    4. Enter a password for the database and confirm the password.

You can check the configuration on the appliance console details screen. When configured successfully, CFME Server will show as running, and CFME Database will show the name of the primary database-only appliance.

2.3. Configuring the Primary Database-Only Appliance

On the primary database-only appliance, initialize the nodes in the database cluster to configure the database replication:

  1. In the appliance console menu, select Configure Database Replication.
  2. Select Configure Server as Primary.
  3. Set an unique identifier number for the server and enter the database name and credentials:

    1. Select a number to uniquely identify the node in the replication cluster.
    2. Enter the cluster database name.
    3. Enter the cluster database username.
    4. Enter the cluster database password and confirm the password.
    5. Enter the primary database-only appliance hostname or IP address.

      Note

      The hostname must be visible to all appliances that communicate with this database, including the CloudForms appliances and any global region databases.

    6. Confirm that the replication server configuration details are correct, and select y to apply the configuration.

2.4. Installing the Standby Database-Only Appliance

The standby database-only appliance is a copy of the primary database-only appliance and takes over the role of primary database in case of failure.

  1. Deploy a CloudForms appliance with an extra partition for the database that is the same size as the primary database-only appliance, as it will contain the same data. For recommendations on disk space, see Database Requirements in the Deployment Planning Guide.
  2. Configure time synchronization on the appliance:

    1. Edit /etc/chronyd.conf with valid NTP server information.
    2. Re-synchronize time information across the appliances:

      # systemctl enable chronyd.service
      # systemctl start chronyd.service
  3. SSH into the CloudForms appliance to enter the appliance console.
  4. Configure the hostname by selecting Set Hostname.
  5. Configure networking as desired by selecting the Set DHCP Network Configuration or Set Static Network Configuration option.

2.5. Configuring the Standby Database-Only Appliance

The steps to configure the standby database-only appliance are similar to that of the primary database-only appliance, in that they prepare the appliance to be database-only, but as the standby.

On the standby database-only appliance, configure the following:

  1. In the appliance console menu, select Configure Database Replication.
  2. Select Configure Server as Standby.
  3. Set an unique identifier number for the standby server and enter the database name and credentials:

    1. Select a number to uniquely identify the node in the replication cluster.
    2. Enter the cluster database name.
    3. Enter the cluster database username.
    4. Enter the cluster database password.
    5. Enter the primary database-only appliance hostname or IP address.
    6. Enter the standby database-only appliance hostname or IP address.

      Note

      The hostname must be visible to all appliances that communicate with this database, including the engine appliances and any global region databases.

    7. Select y to configure the replication manager for automatic failover.
    8. Confirm that the replication standby server configuration details are correct, and select y to apply the configuration.

The standby server will then run an initial synchronization with the primary database, and start locally in standby mode.

Verify the configuration on the appliance console details screen for the standby server. When configured successfully, Local Database Server shows as running (standby).

2.6. Installing Additional CloudForms Appliances

Install a second virtual machine with a CloudForms appliance and any additional appliances in the region using the following steps:

  1. Deploy a CloudForms appliance with an extra partition for the database at a size appropriate for your deployment. For recommendations on disk space, see Database Requirements in the Deployment Planning Guide.
  2. Configure time synchronization on the appliance:

    1. Edit /etc/chronyd.conf with valid NTP server information.
    2. Re-synchronize time information across the appliances:

      # systemctl enable chronyd.service
      # systemctl start chronyd.service
  3. SSH into the CloudForms appliance to enter the appliance console.
  4. Configure the hostname by selecting Set Hostname.
  5. Configure networking as desired by selecting the Set DHCP Network Configuration or Set Static Network Configuration option.
  6. Select Configure Database.
  7. Configure this appliance to use the encryption key from the primary database-only appliance:

    1. For Encryption Key, select Fetch key from remote machine.
    2. Enter the hostname for the primary database-only appliance you previously configured containing the encryption key.
    3. Enter the primary database-only appliance’s username.
    4. Enter the primary database-only appliance’s password.
    5. Enter the path of the remote encryption key. (For example, /var/www/miq/vmdb/certs/v2_key.)
    6. Select Join Region in External Database from the appliance console menu.
  8. Enter the primary database-only appliance’s name and access details:

    1. Enter the hostname for the primary database-only appliance.
    2. Enter a name to identify the database.
    3. Enter the primary database-only appliance’s username.
    4. Enter a password for the database and confirm the password.