Red Hat Training

A Red Hat training course is available for Red Hat OpenStack Platform

Chapter 3. Installing and Configuring Red Hat CloudForms

Red Hat CloudForms can be installed on a number of virtualization platforms, such as VMware vSphere, and Red Hat Enterprise Virtualization. This chapter describes how to install and configure Red Hat CloudForms on Red Hat OpenStack Platform.

3.1. Obtaining and Installing the Red Hat CloudForms Appliance

First, download the appliance from the Red Hat Customer Portal:

  1. Go to access.redhat.com and log in to the Red Hat Customer Portal using your customer account details.
  2. Click Downloads in the menu bar.
  3. Click A-Z to sort the product downloads alphabetically.
  4. Click Red Hat CloudForms to access the product download page. The latest version of each download displays by default.
  5. From the list of installers and images under Product Software, choose OpenStack Virtual Appliance option with the latest version and click Download Now.

Afterwards, upload or install the appliance image as a virtual machine or instance on a supported virtualization environment or cloud provider. See the Installation and Upgrade section for information on different supported Red Hat CloudForms deployment methods.

Whichever deployment method you choose, ensure that Red Hat CloudForms is configured with connectivity to the OpenStack management network.

Tip

See Uploading the Appliance on OpenStack for instructions on deploying Red Hat CloudForms as an instance on the overcloud.

3.2. Configuring Red Hat CloudForms

After deploying the appliance, log in with the root password smartvm. If you deployed the appliance as a virtual machine, you can log in through virsh:

[root@kvm-host ~]# virsh console my-cfme
Connected to domain my-cfme
...
Welcome to the CFME Virtual Appliance.

You can browse to http://localhost.localdomain/

Red Hat Enterprise Linux Server 7.2 (Maipo)
Kernel 3.10.0-327.36.1.el7.x86_64 on an x86_64
localhost login: root
Password:
Last login: Thu Oct 13 23:03:53 on tty2
Welcome to the Appliance Console

For a menu, please type: appliance_console
[root@localhost ~]#

3.3. Configuring General Appliance Settings

After logging in, you can use the following menu items for advanced configuration of the appliance:

  • Use Set DHCP Network Configuration to use DHCP to obtain the IP address and network configuration for your Red Hat CloudForms appliance. The appliance is initially configured as a DHCP client with bridged networking.
  • Use Set Static Network Configuration if you have a specific IP address and network settings you need to use for the Red Hat CloudForms appliance.
  • Use Test Network Configuration to check that name resolution is working correctly.
  • Use Set Hostname to specify a hostname for the Red Hat CloudForms appliance.

    Important

    A valid fully qualified hostname for the Red Hat CloudForms appliance is required for SmartState analysis to work correctly,

  • Use Set Timezone to configure the time zone for the Red Hat CloudForms appliance.
  • Use Set Date and Time to configure the date and time for the Red Hat CloudForms appliance.
  • Use Restore Database from Backup to restore the Virtual Management Database (VMDB) from a previous backup.
  • Use Setup Database Region to create regions for VMDB replication.
  • Use Configure Database to configure the VMDB. Use this option to configure the database for the appliance after installing and running it for the first time.
  • Use Configure Database Replication to configure a primary or standby server for VMDB replication.
  • Use Configure Database Maintenance to configure the VMDB maintenance schedule.
  • Use Configure Application Database Failover Monitor to start or stop VMDB failover monitoring.
  • Use Extend Temporary Storage to add temporary storage to the appliance. The appliance formats an unpartitioned disk attached to the appliance host and mounts it at /var/www/miq_tmp. The appliance uses this temporary storage directory to perform certain image download functions.
  • Use Configure External Authentication (httpd) to configure authentication through an IPA server.
  • Use Generate Custom Encryption Key to regenerate the encryption key used to encode plain text password.
  • Use Harden Appliance Using SCAP Configuration to apply Security Content Automation Protocol (SCAP) standards to the appliance. You can view these SCAP rules in the /var/www/miq/lib/appliance_console/config/scap_rules.yml file.
  • Use Stop EVM Server Processes to stop all server processes. You may need to do this to perform maintenance.
  • Use Start EVM Server Processes to start the server. You may need to do this after performing maintenance.
  • Use Restart Appliance to restart the Red Hat CloudForms appliance. You can either restart the appliance and clear the logs or just restart the appliance.
  • Use Shut Down Appliance to power down the appliance and exit all processes.
  • Use Summary Information to go back to the network summary screen for the Red Hat CloudForms appliance.
  • Use Quit to leave the Red Hat CloudForms appliance console.

3.4. Configuring a Database for Red Hat CloudForms

Red Hat CloudForms supports the use of an internal or external database. The following instructions are suitable for configuring an internal database. For instructions on how to configure an external database instead, see Configuring an External Database.

Important

Before installing an internal database, add a disk to the infrastructure hosting your appliance. See the documentation specific to your infrastructure for instructions for adding a disk. As a storage disk usually cannot be added while a virtual machine is running, Red Hat recommends adding the disk before starting the appliance. Red Hat CloudForms only supports installing of an internal VMDB on blank disks; installation will fail if the disks are not blank.

  1. Start the appliance and open a terminal console.
  2. Enter the appliance_console command. The Red Hat CloudForms appliance summary screen displays.
  3. Press Enter to manually configure settings.
  4. Select 5) Configure Database from the menu.
  5. You are prompted to create or fetch an encryption key.

    • If this is the first Red Hat CloudForms appliance, choose 1) Create key.
    • If this is not the first Red Hat CloudForms appliance, choose 2) Fetch key from remote machine to fetch the key from the first appliance. For worker and multi-region setups, use this option to copy key from another appliance.

      Note

      All CloudForms appliances in a multi-region deployment must use the same key.

  6. Choose 1) Create Internal Database for the database location.
  7. Choose a disk for the database. This can be either a disk you attached previously, or a partition on the current disk.

    Important

    Red Hat recommends using a separate disk for the database.

    If there is an unpartitioned disk attached to the virtual machine, the dialog will show options similar to the following:

    1) /dev/vdb: 20480
    2) Don't partition the disk
    • Enter 1 to choose /dev/vdb for the database location. This option creates a logical volume using this device and mounts the volume to the appliance in a location appropriate for storing the database. The default location is /var/opt/rh/rh-postgresql95/lib/pgsql, which can be found in the environment variable $APPLIANCE_PG_MOUNT_POINT.
    • Enter 2 to continue without partitioning the disk. A second prompt will confirm this choice. Selecting this option results in using the root filesystem for the data directory (not advised in most cases).
  8. Enter Y or N for Should this appliance run as a standalone database server?

    • Select Y to configure the appliance as a database-only appliance. As a result, the appliance is configured as a basic PostgreSQL server, without a user interface.
    • Select N to configure the appliance with the full administrative user interface.
  9. When prompted, enter a unique number to create a new region.

    Important

    Creating a new region destroys any existing data on the chosen database.

  10. Create and confirm a password for the database.

Red Hat CloudForms then configures the internal database. This takes a few minutes. After the database is created and initialized, you can log in to CloudForms.

3.5. Configuring General Red Hat CloudForms Settings

After configuring the general settings for the appliance and creating a database for it, you can now launch Red Hat CloudForms. To do this, use the Start EVM Server Processes option from the appliance console (Section 3.3, “Configuring General Appliance Settings”). Once you launch Red Hat CloudForms, note the Hostname and IP Address displayed on the appliance console screen.

Open the Red Hat CloudForms web-based user interface by accessing either Hostname and IP Address on a web browser. At the login screen, use the following credentials:

  • Username: admin
  • Password: smartvm
Note

You can also change the password of the admin account from the login screen. To do so, click the Update Password link.

You can access and configure most Red Hat CloudForms settings through the Configuration menu. You can access this menu through Administrator | EVM > Configuration.

The options under the Configuration menu allow you to configure global options for your Red Hat CloudForms environment, view diagnostic information, and view analytics on the servers in the environment. The menu displays the Red Hat CloudForms environment at the enterprise, zone, and server levels.

There are four main areas:

  • Settings

    This menu allows you to configure global settings for your Red Hat CloudForms infrastructure. You can also create analysis profiles and schedules for these profiles.

  • Access Control

    This menu contains options for configuring users, groups, roles, and tenants.

  • Diagnostics

    This menu displays the status of your servers and their roles and provides access to logs.

  • Database

    specify the location of your Virtual Machine Database (VMDB) and its login credentials.

3.6. Registering Your Appliance

Before you can access and apply package updates, you must register and subscribe the Red Hat CloudForms appliance to either Red Hat Content Delivery Network (CDN) or to a Red Hat Satellite server.

You need the following to register your appliance:

  • Your Red Hat account login or Red Hat Network Satellite login
  • A Red Hat subscription that covers your product

To register your appliance with Red Hat Subscription Management or Red Hat Satellite 6, first configure the region with your registration details. These settings will apply to all appliances in this region.

To configure registration for a region:

  1. Log in to the appliance as the admin user.
  2. From the settings menu, select Configuration.
  3. Select Region in the accordion menu and click the Red Hat Updates tab.
  4. Click Edit Registration.
  5. Configure registration details for the Red Hat CloudForms appliance using one of two available options:

    1. To register with Red Hat Subscription Management:

      1. In Register to, select Red Hat Subscription Management.
      2. Enter the Red Hat Subscription Management Address. The default is subscription.rhn.redhat.com.
      3. Enter the Repository Name(s). The default is cf-me-5.8-for-rhel-7-rpms rhel-server-rhscl-7-rpms, which are the Red Hat CloudForms repository and the Red Hat Software Collections repository.
      4. To use a HTTP proxy, select Use HTTP Proxy and enter your proxy details.
      5. Enter your Red Hat account information and click Validate.
      6. After your credentials are validated, click Save.
    2. To register with Red Hat Satellite 6:

      1. In Register to, select Red Hat Satellite 6.
      2. Enter the Red Hat Satellite 6 Address. The default is subscription.rhn.redhat.com.
      3. Enter the Repository Name(s). The default is cf-me-5.8-for-rhel-7-rpms rhel-server-rhscl-7-rpms, which are the Red Hat CloudForms repository and the Red Hat Software Collections repository.
      4. To use a HTTP proxy, select Use HTTP Proxy and enter your proxy details.
      5. Enter your Red Hat Satellite account information and click Validate.
      6. After your credentials are validated, click Save.

Your appliance now appears in the Appliance Updates list as Not registered.

To register your appliance:

  1. Select the appliance from the Appliance Updates list.
  2. Click Register to subscribe the appliance and attach subscriptions.

Registering and attaching subscriptions takes a few minutes. The subscription process is complete when the appliance reports that it is Subscribed under Update Status, and Registered under Last Message.

You can now apply updates to your appliance.

Note

To update your appliances, see Updating Red Hat CloudForms in Migrating to Red Hat CloudForms 4.5.

3.7. Configuring CloudForms Metrics for SmartState Analysis

You can also configure CloudForms to perform a SmartState Analysis. This type of analysis collects details such as accounts, drivers, network information, hardware, and security patches on assets managed by the OpenStack provider. Enabling SmartState Analysis involves two steps:

These steps are required to allow CloudForms to collect metrics from OpenStack and use them to perform a SmartState analysis. You can choose different servers to perform either function; the following sections assume that you will.

3.7.1. Configuring CloudForms Capacity and Utilization

For metrics collection to work properly, you also need to configure Red Hat CloudForms to allow for all three Capacity & Utilization server roles, which are available from the settings menu under ConfigurationServerServer Control. For more information on capacity and utilization collection, see Assigning the Capacity and Utilization Server Roles in the Deployment Planning Guide.

To enable these server roles:

  1. From the settings menu, select Configuration, then select the server to configure from SettingsZone in the accordion menu on the left.
  2. Navigate to the Server Roles list in the ServerServer Control section. From there, set the required capacity and utilization roles to ON, namely:

    1. Capacity & Utilization Coordinator
    2. Capacity & Utilization Data Collector
    3. Capacity & Utilization Data Processor
  3. Click Save.

Data collection is enabled immediately. However, the first collection begins 5 minutes after the server is started, and every 10 minutes after that. Therefore, the longest the collection takes after enabling the Capacity & Utilization Collector role is 10 minutes. The first collection from a particular provider may take a few minutes since Red Hat CloudForms is gathering data points going one month back in time.

For more information, see Capacity and Utilization Collection from the Deployment Planning Guide.

3.7.2. Enabling SmartState Analysis

After enabling the required server roles, enable SmartState analysis. See Smart State Analysis Support from the Support Matrix and Running a SmartState Analysis in Managing Providers for more information.

Enabling SmartState analysis is similar to Section 3.7.1, “Configuring CloudForms Capacity and Utilization”, in that the procedure also involves enabling server roles on a specific server. To do so:

  1. From the settings menu, select Configuration.
  2. Select the server to configure from SettingsZone in the left pane of the appliance.
  3. Navigate to the Server Roles list in the ServerServer Control section. From there, set the appropriate SmartState roles to ON. Namely:

    1. SmartProxy
    2. SmartState Analysis
  4. Click Save.