Bookmark this page

Guided Exercise: Configure and Provision a Content Host

Configure the discovery service, and then detect and provision a content host by using the discovery method.

Outcomes

  • Create required provisioning resources.

  • Configure the discovery service on the Capsule Server.

  • Discover a host on the organization's network and provision the content host.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

This command prepares your environment and ensures that all required resources are available.

[student@workstation ~]$ lab start provision-host

Instructions

Important

You provision the servere system in multiple exercises in this chapter. Before each exercise, the lab start script deletes the servere host resource record to simulate that you are provisioning a previously unused system.

  1. Log in to the Satellite Server web UI, https://satellite.lab.example.com, as the admin user with redhat as the password.

  2. In the upper-left corner of the web page, set the organization to Operations. Set the location to Boston.

  3. To manage repetitive new host provisioning in the Operations organization and the Boston location, create an Operations Provisioning host group. This group contains the default settings for creating content hosts in the Operations organization.

    1. Click ConfigureHost Groups, and then click Create Host Group. Enter the details from the following table. Leave all other fields unchanged. Submit the form only after you entered data for all of the tabs.

      Table 9.1. Host Group Details

      FieldValue
      Name Operations Provisioning
      Lifecycle Environment Development
      Content View OperationsServerBase
      Content Source capsule.lab.example.com

    2. Click the Network tab, and then select boston.lab.example.com in the Domain field. Select Boston Data Center (172.25.250.0/24) in the IPv4 Subnet field.

    3. Click the Operating System tab. Enter the details from the following table. Leave all other fields unchanged. Submit the host group form only after you entered data for all of the required tabs.

      Table 9.2. Host Group Operating System Details

      FieldValue
      Architecture x86_64
      Operating system RedHat 9.0
      Media Selection Synced Content
      Partition Table Kickstart default
      PXE loader PXELinux BIOS

    4. In the Locations tab, verify that the Boston location is in the Selected items list.

    5. In the Organizations tab, verify that the Operations organization is in the Selected items list.

    6. In the Activation Keys tab, select OperationsServers in the Activation Keys field.

    7. Click Submit.

  4. Install and enable the Discovery feature on the Capsule Server. Install the Discovery boot image and the proxy for the Discovery feature.

    1. On workstation, log in to the capsule system as the student user and switch to the root user.

      [student@workstation ~]$ ssh student@capsule
      [student@capsule ~]$ sudo -i
      [sudo] password for student: student
      [root@capsule ~]#
    2. Enable the Discovery plug-in. Wait for the process to complete.

      [root@capsule ~]# satellite-installer --scenario capsule \
      --enable-foreman-proxy-plugin-discovery
      ...output omitted...
    3. Install the foreman-discovery-image and rubygem-smart_proxy_discovery packages.

      [root@capsule ~]# dnf install foreman-discovery-image \
      rubygem-smart_proxy_discovery
      ...output omitted...
      Is this ok [y/d/N]: y
      ...output omitted...
      Complete!
    4. Restart the Capsule Server services.

      [root@capsule ~]# satellite-maintain service restart
      Running Restart Services
      ================================================================================
      Check if command is run as root user:                                 [OK]
      --------------------------------------------------------------------------------
      Restart applicable services:
      ...output omitted...
      \ All services started                                                [OK]
      --------------------------------------------------------------------------------
    5. Return to the workstation system as the student user.

      [root@capsule ~]# exit
      logout
      [student@capsule ~]$ exit
      logout
      Connection to capsule closed.
      [student@workstation ~]$
    6. Verify that the Discovery feature is active on the Capsule Server. In the Satellite web UI, click InfrastructureCapsules, and then click the capsule.lab.example.com link. Verify that the Active features section includes the Discovery registration feature. If necessary, click Refresh features to include newly added features.

  5. Configure the Boston Data Center subnet as the discovery network.

    1. Click InfrastructureSubnets, and then click the Boston Data Center link.

    2. In the Capsules tab, select capsule.lab.example.com in the Discovery Capsule field. Click Submit.

  6. Clone the following provisioning templates. Configure the clones to use the discovery image from the Capsule Server.

    Table 9.3. Provisioning Templates to Clone

    Provisioning template nameClone name
    PXELinux global default Operations PXELinux global default
    pxelinux_discovery Operations PXELinux discovery

    1. Click HostsProvisioning Templates. Enter kind = PXELinux in the filter field, and then click Search. In the PXELinux global default row, click Clone. Enter Operations PXELinux global default in the Name field.

    2. In the Editor tool, modify the cloned template. Change the text reference from snippet "pxelinux_discovery" to snippet "Operations PXELinux discovery".

      Note the reference to the default_pxe_item_global global setting. In a later exercise step, you edit this global setting in AdministerSettings.

      The result should look like the following text. Submit the template form only after you entered data for all of the required tabs.

      ...output omitted...
      MENU TITLE Booting unknown host (ESC to stop)
      TIMEOUT 200
      ONTIMEOUT <%= global_setting("default_pxe_item_global", "local") %>
      DEFAULT <%= global_setting("default_pxe_item_global", "local") %>
      
      <%= snippet "pxelinux_chainload" %>
      
      <%= snippet "Operations PXELinux discovery" %>
      
      <% unless @profiles.nil? -%>
      ...output omitted...
    3. In the Locations tab, select Boston to move the location to the Selected items list.

    4. In the Organizations tab, select Operations to move the organization to the Selected items list. Click Submit.

    5. On the Provisioning Templates page, Enter pxelinux_discovery in the filter field, and then click Search. In the pxelinux_discovery row, click Clone. Enter Operations PXELinux discovery in the Name field.

    6. In the Editor tool, modify the cloned template. Modify the proxy.url variable to https://capsule.lab.example.com:9090. Modify the proxy.type variable to proxy.

      Note that the LABEL setting in this snippet is discovery. In a later exercise step, you refer to this snippet by using the LABEL value.

      The result should look like the following text. Submit the template form only after you entered data for all of the required tabs.

      ...output omitted...
        MENU LABEL Foreman Discovery Image
        KERNEL boot/fdi-image/vmlinuz0
        APPEND initrd=boot/fdi-image/initrd0.img rootflags=loop root=live:/fdi.iso rootfstype=auto ro rd.live.image acpi=force rd.luks=0 rd.md=0 rd.dm=0 rd.lvm=0 rd.bootif=0 rd.neednet=0 nokaslr nomodeset proxy.url=https://capsule.lab.example.com:9090 proxy.type=proxy
        IPAPPEND 2
      ...output omitted...
    7. In the Locations tab, select Boston to move the location to the Selected items list.

    8. In the Organizations tab, select Operations to move the organization to the Selected items list. Click Submit.

  7. Modify the Satellite Server settings for provisioning defaults. Set Operations PXELinux global default as the provisioning template for discovery. Set discovery as the default PXE entry. Set the defaults for discovered hosts to the Operations organization and the Boston location.

    1. Click AdministerSettings, and then click the Provisioning tab. Select Operations PXELinux global default in the Global default PXELinux template field. Enter discovery as the value for the Default PXE global template entry setting.

    2. Click the Discovered tab. Select Operations in the Discovery organization field. Select Boston in the Discovery location field.

  8. Build and deploy the Operations PXELinux global default provisioning template to the Capsule Server.

    1. Click HostsProvisioning Templates, and then click Build PXE Default.

    2. Click Confirm to change the default PXE menu on all configured TFTP servers.

  9. Access the servere system console, and initiate a PXE boot and a Foreman discovery.

    1. Locate your servere system console, as appropriate for your classroom environment. Open the console.

    2. Reboot the servere system by using the relevant technique for your classroom environment.

    3. Select Foreman Discovery Image from the Booting unknown host menu.

    4. At the Welcome to Foreman Discovery screen, let the timeout expire. Do not interrupt that timeout. Wait for the Discovery status screen to display, and continue with the exercise steps without exiting the servere screen.

  10. In the Satellite Server web UI, create a servere host resource for the discovered system. Use the Operations Provisioning host group. Set the root password to redhat123.

    Important

    As soon as you submit your request to create the servere host resource, Satellite reboots the servere system. To enable quick interruption of the default boot process, leave the servere console open and accessible.

    1. Click HostsDiscovered Hosts. The discovered servere system is identified in the list with the system's Ethernet address. On the discovered system's row, click Provision.

    2. Select Operations Provisioning in the Host Group field. Select Operations in the Organization field. Select Boston in the Location field. Click Create Host.

    3. On the Operating System tab, enter redhat123 in the Root Password field. Click Resolve to confirm that the system can correctly retrieve the templates for provisioning.

    4. Click the Host tab, and enter servere to replace the default value in the Name field. Select Development in the Lifecycle Environment field. Select OperationsServerBase in the Content View field.

    5. Click Submit.

  11. Access the servere console and initiate a PXE boot. Wait for the provisioning process to complete.

    1. The servere host should reboot automatically. If the host does not reboot, then enter Ctrl+Alt+Del from the servere console.

    2. Select Kickstart default PXELinux from the Booting into OS installer menu. Wait for the provisioning to complete.

    3. Wait for the servere system to reboot. On the servere console, log in as the root user with redhat123 as the password.

      Use the hostname command to verify the system name.

      servere login root
      Password: redhat123
      [root@servere ~]# hostname
      servere.boston.lab.example.com
    4. Exit the servere system and close the console.

      [root@servere ~]# exit
      servere login:

Finish

On the workstation machine, change to the student user home directory and use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish provision-host

Revision: rh403-6.11-3ad886e