Administering hosts

This chapter describes creating, registering, administering, and removing hosts.

Creating a host in orcharhino

Use this procedure to create a host in orcharhino. To use the CLI instead of the orcharhino management UI, see the CLI procedure.

Procedure
  1. In the orcharhino management UI, click Hosts > Create Host.

  2. On the Host tab, enter the required details.

  3. Click the Ansible Roles tab, and from the Ansible Roles list, select one or more roles that you want to add to the host. Use the arrow icon to manage the roles that you add or remove.

  4. On the Puppet Classes tab, select the Puppet classes you want to include.

  5. On the Interfaces tab:

    1. For each interface, click Edit in the Actions column and configure the following settings as required:

      • Type — For a Bond or BMC interface, use the Type list and select the interface type.

      • MAC address — Enter the MAC address.

      • DNS name — Enter the DNS name that is known to the DNS server. This is used for the host part of the FQDN.

      • Domain — Select the domain name of the provisioning network. This automatically updates the Subnet list with a selection of suitable subnets.

      • IPv4 Subnet — Select an IPv4 subnet for the host from the list.

      • IPv6 Subnet — Select an IPv6 subnet for the host from the list.

      • IPv4 address — If IP address management (IPAM) is enabled for the subnet, the IP address is automatically suggested. Alternatively, you can enter an address. The address can be omitted if provisioning tokens are enabled, if the domain does not mange DNS, if the subnet does not manage reverse DNS, or if the subnet does not manage DHCP reservations.

      • IPv6 address — If IP address management (IPAM) is enabled for the subnet, the IP address is automatically suggested. Alternatively, you can enter an address.

      • Managed — Select this checkbox to configure the interface during provisioning to use the orcharhino Proxy provided DHCP and DNS services.

      • Primary — Select this checkbox to use the DNS name from this interface as the host portion of the FQDN.

      • Provision — Select this checkbox to use this interface for provisioning. This means TFTP boot will take place using this interface, or in case of image based provisioning, the script to complete the provisioning will be executed through this interface. Note that many provisioning tasks, such as downloading packages by the operating system installer or Puppet setup in a %post script, will use the primary interface.

      • Virtual NIC — Select this checkbox if this interface is not a physical device. This setting has two options:

        • Tag — Optionally set a VLAN tag. If unset, the tag will be the VLAN ID of the subnet.

        • Attached to — Enter the device name of the interface this virtual interface is attached to.

    2. Click OK to save the interface configuration.

    3. Optionally, click Add Interface to include an additional network interface. For more information, see Adding Network Interfaces.

    4. Click Submit to apply the changes and exit.

  6. On the Operating System tab, enter the required details. For Red Hat operating systems, select Synced Content for Media Selection. If you want to use non Red Hat operating systems, select All Media, then select the installation media from the Media Selection list. You can select a partition table from the list or enter a custom partition table in the Custom partition table field. You cannot specify both.

  7. On the Parameters tab, click Add Parameter to add any parameter variables that you want to pass to job templates at run time. This includes all Puppet Class, Ansible playbook parameters and host parameters that you want to associate with the host. To use a parameter variable with an Ansible job template, you must add a Host Parameter.

    If you want to create a host with pull mode for remote job execution, add the enable-remote-execution-pull parameter with type boolean set to true. For more information, see transport modes for remote execution.

  8. On the Additional Information tab, enter additional information about the host.

  9. Click Submit to complete your provisioning request.

CLI procedure
  • To create a host associated to a host group, enter the following command:

    # hammer host create \
    --ask-root-password yes \
    --hostgroup "My_Host_Group" \
    --interface="primary=true, \
                provision=true, \
                mac=My_MAC_Address, \
                ip=My_IP_Address" \
    --location "My_Location" \
    --name "My_Host_Name" \
    --organization "My_Organization"

    This command prompts you to specify the root password. It is required to specify the host’s IP and MAC address. Other properties of the primary network interface can be inherited from the host group or set using the --subnet, and --domain parameters. You can set additional interfaces using the --interface option, which accepts a list of key-value pairs. For the list of available interface settings, enter the hammer host create --help command.

During host provisioning, you have to set a Content Source, a Lifecycle Environment, and a Content View to ensure that your host has access to orcharhino Client for Red Hat Enterprise Linux repositories. Note that you cannot solely set Content Source because provisioning templates expect either no Content Source or values for all three fields.

Cloning hosts

You can clone existing hosts.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. In the Actions menu, click Clone.

  3. On the Host tab, ensure to provide a Name different from the original host.

  4. On the Interfaces tab, ensure to provide a different IP address.

  5. Click Submit to clone the host.

For more information, see Creating a Host.

Changing a module stream for a host

If you have a host running Red Hat Enterprise Linux 8, you can modify the module stream for the repositories you install.

You can enable, disable, install, update, and remove module streams from your host in the orcharhino management UI.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Click the name of the host you want to modify.

  3. Click the Content tab, then click the Module streams tab.

  4. Click the vertical ellipsis next to the module and select the action you want to perform. You get a REX job notification once the remote execution job is complete.

Creating a host group

Create a host group to be able to apply host settings to multiple hosts.

To use the CLI instead of the orcharhino management UI, see the CLI procedure.

Procedure
  1. In the orcharhino management UI, navigate to Configure > Host Groups and click Create Host Group.

  2. If you have an existing host group that you want to inherit attributes from, you can select a host group from the Parent list. If you do not, leave this field blank.

  3. Enter a Name for the new host group.

  4. Enter any further information that you want future hosts to inherit.

  5. Click the Ansible Roles tab, and from the Ansible Roles list, select one or more roles that you want to add to the host. Use the arrow icon to manage the roles that you add or remove.

  6. Click the additional tabs and add any details that you want to attribute to the host group.

    Puppet fails to retrieve the Puppet CA certificate while registering a host with a host group associated with a Puppet environment created inside a Production environment.

    To create a suitable Puppet environment to be associated with a host group, manually create a directory:

    # mkdir /etc/puppetlabs/code/environments/example_environment
  7. Click Submit to save the host group.

CLI procedure
  • Create the host group with the hammer hostgroup create command. For example:

    # hammer hostgroup create --name "Base" \
    --architecture "My_Architecture" \
    --content-source-id _My_Content_Source_ID_ \
    --content-view "_My_Content_View_" \
    --domain "_My_Domain_" \
    --lifecycle-environment "_My_Lifecycle_Environment_" \
    --locations "_My_Location_" \
    --medium-id _My_Installation_Medium_ID_ \
    --operatingsystem "_My_Operating_System_" \
    --organizations "_My_Organization_" \
    --partition-table "_My_Partition_Table_" \
    --puppet-ca-proxy-id _My_Puppet_CA_Proxy_ID_ \
    --puppet-environment "_My_Puppet_Environment_" \
    --puppet-proxy-id _My_Puppet_Proxy_ID_ \
    --root-pass "My_Password" \
    --subnet "_My_Subnet_"

Creating a host group for each lifecycle environment

Use this procedure to create a host group for the Library lifecycle environment and add nested host groups for other lifecycle environments.

Procedure

To create a host group for each lifecycle environment, run the following Bash script:

MAJOR="My_Major_OS_Version"
ARCH="My_Architecture"
ORG="My_Organization"
LOCATIONS="My_Location"
PTABLE_NAME="My_Partition_Table"
DOMAIN="My_Domain"

hammer --output csv --no-headers lifecycle-environment list --organization "${ORG}" | cut -d ',' -f 2 | while read LC_ENV; do
  [[ ${LC_ENV} == "Library" ]] && continue

  hammer hostgroup create --name "rhel-${MAJOR}server-${ARCH}-${LC_ENV}" \
    --architecture "${ARCH}" \
    --partition-table "${PTABLE_NAME}" \
    --domain "${DOMAIN}" \
    --organizations "${ORG}" \
    --query-organization "${ORG}" \
    --locations "${LOCATIONS}" \
    --lifecycle-environment "${LC_ENV}"
done

Changing the host group of a host

Use this procedure to change the Host Group of a host.

If you reprovision a host after changing the host group, the fresh values that the host inherits from the host group will be applied.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Click the name of the host you want to modify.

  3. Click Edit.

  4. Select the new host group from the Host Group list.

  5. Click Submit.

Verification
  • The Details card under the Overview tab now shows the host group your host belongs to.

Changing the environment of a host

Use this procedure to change the environment of a host.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Click the name of the host you want to modify.

  3. Click the vertical ellipsis in the Content view details card and select Edit content view assignment.

  4. Select the environment.

  5. Select the content view.

  6. Click Save.

Changing the managed status of a host

Hosts provisioned by orcharhino are Managed by default. When a host is set to Managed, you can configure additional host parameters from orcharhino Server. These additional parameters are listed on the Operating System tab. If you change any settings on the Operating System tab, they will not take effect until you set the host to build and reboot it.

If you need to obtain reports about configuration management on systems using an operating system not supported by orcharhino, set the host to Unmanaged.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Click the name of the host you want to modify.

  3. Click Edit.

  4. Click Manage host or Unmanage host to change the host’s status.

  5. Click Submit.

Assigning a host to a specific organization

Use this procedure to assign a host to a specific organization. For general information about organizations and how to configure them, see Managing Organizations in Managing Organizations and Locations.

If your host is already registered with a different organization, you must first unregister the host before assigning it to a new organization. To unregister the host, run subscription-manager unregister on the host. After you assign the host to a new organization, you can re-register the host.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Select the checkbox of the host you want to change.

  3. From the Select Action list, select Assign Organization. A new option window opens.

  4. From the Select Organization list, select the organization that you want to assign your host to. Select the checkbox Fix Organization on Mismatch.

    A mismatch happens if there is a resource associated with a host, such as a domain or subnet, and at the same time not associated with the organization you want to assign the host to. The option Fix Organization on Mismatch will add such a resource to the organization, and is therefore the recommended choice. The option Fail on Mismatch will always result in an error message. For example, reassigning a host from one organization to another will fail, even if there is no actual mismatch in settings.

  5. Click Submit.

Assigning a host to a specific location

Use this procedure to assign a host to a specific location. For general information about locations and how to configure them, see Creating a Location in Managing Content.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Select the checkbox of the host you want to change.

  3. From the Select Action list, select Assign Location. A new option window opens.

  4. Navigate to the Select Location list and choose the location that you want for your host. Select the checkbox Fix Location on Mismatch.

    A mismatch happens if there is a resource associated with a host, such as a domain or subnet, and at the same time not associated with the location you want to assign the host to. The option Fix Location on Mismatch will add such a resource to the location, and is therefore the recommended choice. The option Fail on Mismatch will always result in an error message. For example, reassigning a host from one location to another will fail, even if there is no actual mismatch in settings.

  5. Click Submit.

Removing a host from orcharhino

Use this procedure to remove a host from orcharhino. To use the CLI instead of the orcharhino management UI, see the CLI procedure.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts or Hosts > Content Hosts. Note that there is no difference from what page you remove a host, from All Hosts or Content Hosts. In both cases, orcharhino removes a host completely.

  2. Select the hosts that you want to remove.

  3. From the Select Action list, select Delete Hosts.

  4. Click Submit to remove the host from orcharhino permanently.

By default, the Destroy associated VM on host delete setting is set to no. If a host record that is associated with a virtual machine is deleted, the virtual machine will remain on the compute resource.

To delete a virtual machine on the compute resource, navigate to Administer > Settings and select the Provisioning tab. Setting Destroy associated VM on host delete to yes deletes the virtual machine if the host record that is associated with the virtual machine is deleted. To avoid deleting the virtual machine in this situation, disassociate the virtual machine from orcharhino without removing it from the compute resource or change the setting.

CLI procedure
  • Delete your host from orcharhino:

    $ hammer host delete \
    --id My_Host_ID \
    --location-id My_Location_ID \
    --organization-id My_Organization_ID

    Alternatively, you can use --name My_Host_Name instead of --id My_Host_ID.

Disassociating a virtual machine from orcharhino without removing it from a hypervisor

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Select the checkbox to the left of the hosts that you want to disassociate.

  3. From the Select Action list, click Disassociate Hosts.

  4. Optional: Select the checkbox to keep the hosts for future action.

  5. Click Submit.

Installing the Snapshot Management plug-in

Perform the following step to install the Snapshot Management plug-in on your orcharhino.

Procedure
  • Install the Snapshot Management plug-in on your orcharhino Server:

    # orcharhino-installer --enable-foreman-plugin-snapshot-management

Creating snapshots of a host

You can use the Snapshot Management plug-in to create snapshots of hosts.

Prerequisites
Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts and select a host.

  2. In the Snapshots card, click Create Snapshot.

  3. Enter a Name.

  4. Optional: Enter a Description.

  5. Optional: In the Snapshot Mode field, select Memory if you want to include the RAM in your snapshot or Quiecse if you want to ensure the full state of the VM is written to disk before creating the snapshot.

  6. Click Submit to create a snapshot.

Keeping more than three snapshots per host slows down the creation and rollback process. Consider deleting older snapshots when creating new ones.

Lifecycle status of RHEL hosts

orcharhino provides multiple mechanisms to display information about upcoming End of Support (EOS) events for your Red Hat Enterprise Linux hosts:

  • Notification banner

  • A column on the Hosts index page

  • Alert on the Hosts index page for each host that runs Red Hat Enterprise Linux with an upcoming EOS event in a year as well as when support has ended

  • Ability to Search for hosts by EOS on the Hosts index page

  • Host status card on the host details page

For any hosts that are not running Red Hat Enterprise Linux, orcharhino displays Unknown in the RHEL Lifecycle status and Last report columns.

EOS notification banner

When either the end of maintenance support or the end of extended lifecycle support approaches in a year, you will see a notification banner in the orcharhino management UI if you have hosts with that Red Hat Enterprise Linux version. The notification provides information about the Red Hat Enterprise Linux version, the number of hosts running that version in your environment, the lifecycle support, and the expiration date. Along with other information, the Red Hat Enterprise Linux lifecycle column is visible in the notification.

Displaying RHEL lifecycle status

You can display the status of the end of support (EOS) for your Red Hat Enterprise Linux hosts in the table on the Hosts index page.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > All Hosts.

  2. Click Manage columns.

  3. Select the Content column to expand it.

  4. Select RHEL Lifecycle status.

  5. Click Save to generate a new column that displays the Red Hat Enterprise Linux lifecycle status.

Host search by RHEL lifecycle status

You can use the Search field to search hosts by rhel_lifecycle_status. It can have one of the following values:

  • full_support

  • maintenance_support

  • approaching_end_of_maintenance

  • extended_support

  • approaching_end_of_support

  • support_ended

Virt-who Configurations

You can access the Virt-who configurations page through the infrastructure menu:

Infrastructure > Virt-who configurations

The Virt-who configurations plugin connects to KVM, RHV, and VMware vSphere hypervisors to count RHEL instances for the purpose of RHEL subscription management.

The Virt-who configurations page is a part of the Virt-who configurations plugin and only exists if this plugin is installed on your orcharhino.

Viewing a List of Existing Virt-Who Configurations

Procedure
  1. Navigate to Infrastructure > Virt-who configurations to view a list of existing Virt-who configurations.

  2. Click the Create Config button to create a new Virt-who configuration.

  3. Click the Help button to view in inbuilt help.

  4. The table lists existing Virt-who configurations.

  5. The Actions menu, you can edit an existing Virt-who configuration and delete an existing Virt-who configuration.

Viewing a Virt-Who Configuration

Procedure
  1. Navigate to Infrastructure > Virt-who configurations and select an existing Virt-who configuration:

  2. Click the Edit button to edit the selected Virt-who configuration.

  3. Click the Delete button to delete the selected Virt-who configuration.

  4. The table displays the status and settings of the selected Virt-who configurations.

  5. Click the Deploy tab to see how to deploy this configuration.

Creating a Virt-Who Configuration

Procedure
  1. Navigate to Infrastructure > Virt-who configurations and click the Create Config button to create a Virt-who configuration:

  2. Enter the name of the Virt-who configuration in the Name field.

  3. Select the type of the hypervisor in the Hypervisor Type drop down menu.

  4. Enter the FQDN of the server in the Hypervisor Server field.

  5. Enter the user name in the Hypervisor Username field.

  6. Enter the corresponding password in the Hypervisor Password field.

  7. Define how often to check the hypervisor for changes in the Interval drop down menu. .

  8. Enter the orcharhino FQDN in the orcharhino server FQDN field.

  9. Select the type of identification from the Hypervisor ID drop down menu. You may choose between its host name, UUID, and HWUUID.

  10. You may optionally choose to filter the access rights of virt-who hypervisors to hosts using the Filtering drop down menu. You can choose to allow or block lists of hosts.

  11. The Enable debugging output checkbox allows you to activate debugging output.

  12. You may optionally enter an HTTP proxy using the HTTP proxy field to connect to the hypervisor.

  13. You may optionally exclude hosts from using the HTTP proxy using the Ignore proxy field.

  14. Click Submit to save your changes to orcharhino.

The text and illustrations on this page are licensed by ATIX AG under a Creative Commons Attribution–Share Alike 3.0 Unported ("CC-BY-SA") license. This page also contains text from the official Foreman documentation which uses the same license ("CC-BY-SA").