Bookmark this page

Lab: Provision a Host

Configure Satellite provisioning resources and services, and then provision a new content host.

Outcomes

  • Configure the Capsule Server to provide DNS, DHCP, and TFTP services.

  • Prepare provisioning resources on the Satellite Server.

  • Perform a network-based provision of a new content host.

Important

The comprehensive review labs are related exercises, and you can start with any lab in the sequence. If you reset your lab environment before your first comprehensive review lab, then you do not need to reset again. If you did not reset your lab environment after performing exercises from previous chapters, then you must reset your lab environment before starting any comprehensive review lab.

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 compreview-host

Specifications

  • Prepare the following repositories that are required to install a RHEL 9 content host in the Finance organization and the San Francisco location.

    • Red Hat Enterprise Linux 9 for x86_64 - AppStream Kickstart 9.0

    • Red Hat Enterprise Linux 9 for x86_64 - BaseOS Kickstart 9.0

  • Create, publish, and promote the FinanceServerBase content view to the Build lifecycle environment in the Finance organization.

  • Create the FinanceServers activation key that assigns new clients to the Build lifecycle environment with the FinanceServerBase content view.

  • Synchronize the Build lifecycle with Capsule Server.

  • Enable the DNS, DHCP, and TFTP features on Capsule Server with the following details:

    Table 13.1. Service Parameters

    ParameterValue
    DNS interface eth0
    DNS forwarders 172.25.250.254
    DNS zone sf.lab.example.com
    DNS reverse 250.25.172.in-addr.arpa
    DHCP interface eth0
    DHCP range 172.25.250.70 to 172.25.250.90
    DHCP name servers 172.25.250.220
    DHCP gateway 172.25.250.254

  • Configure the domain and subnet on Satellite Server with the following details:

    Table 13.2. San Francisco Subnet Details

    ParameterValue
    Name San Francisco Data Center
    Network Address 172.25.250.0
    Network Prefix 24
    Primary DNS Server 172.25.250.220
    IPAM DHCP
    Start Of Ip Range 172.25.250.70
    End Of Ip Range 172.25.250.90
    Boot Mode DHCP
    Domains sf.lab.example.com
    Capsules capsule.lab.example.com

  • Create the Finance host group with the following details:

    Table 13.3. Host Group Details

    ParameterValue
    Name Finance
    Lifecycle environment Build
    Content view FinanceServerBase
    Content Source capsule.lab.example.com
    DNS domain sf.lab.example.com
    Subnet San Francisco Data Center
    Operating system RedHat 9.0
    Partition table template Kickstart default
    Activation key FinanceServers

  • Create a host resource for the system to be provisioned:

    Table 13.4. Host Resource Details

    ParameterValue
    Name servere
    Host group Finance
    root password redhat123
    MAC address 52:54:00:00:fa:0e

  • Reboot and provision the servere content host.

  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 Finance. Set the location to San Francisco.

  3. Verify that the following repositories are synchronized and are promoted in the FinanceServerBase content view.

    • Red Hat Enterprise Linux 9 for x86_64 - AppStream Kickstart 9.0

    • Red Hat Enterprise Linux 9 for x86_64 - BaseOS Kickstart 9.0

    1. Click ContentProducts, and then click the Red Hat Enterprise Linux for x86_64 link. Verify that the two repositories display a Success status in the Sync Status column.

    2. Click ContentContent Views, and then click the FinanceServerBase link.

    3. Click Version 1.0. Verify that the content view version contains the Red Hat Enterprise Linux 9 for x86_64 - BaseOS Kickstart 9.0 and Red Hat Enterprise Linux 9 for x86_64 - AppStream Kickstart 9.0 repositories. Verify that the content view version is in the Build lifecycle environment.

  4. Verify that the FinanceServers activation key is configured to assign content hosts to the Build lifecycle environment with the FinanceServerBase content view.

    1. Click ContentActivation Keys, and then click the FinanceServers link. In the Activation Key Content section, verify that the Build lifecycle environment and the FinanceServerBase content view are selected.

  5. Synchronize the Build lifecycle environment from the Satellite Server to the Capsule Server.

    1. Click InfrastructureCapsules. On the capsule.lab.example.com row, click Edit.

    2. Click the Lifecycle Environments tab. In the Available items list, click the Build environment to move it to the Selected items list. Click Submit.

    3. On the Capsules page, click the capsule.lab.example.com link. Click SynchronizeOptimized Sync. Wait for the process to complete.

  6. Enable and configure the DNS, DHCP, and TFTP services on the capsule system.

    1. 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 DNS, DHCP, and TFTP services.

      [root@capsule ~]# satellite-installer --scenario capsule \
      --foreman-proxy-dns true \
      --foreman-proxy-dns-interface eth0 \
      --foreman-proxy-dns-forwarders 172.25.250.254 \
      --foreman-proxy-dns-zone sf.lab.example.com \
      --foreman-proxy-dns-reverse 250.25.172.in-addr.arpa \
      --foreman-proxy-dhcp true \
      --foreman-proxy-dhcp-interface eth0 \
      --foreman-proxy-dhcp-range '172.25.250.70 172.25.250.90' \
      --foreman-proxy-dhcp-nameservers 172.25.250.220 \
      --foreman-proxy-dhcp-gateway 172.25.250.254 \
      --foreman-proxy-tftp true
      ...output omitted...
        Success!
        * Capsule is running at https://capsule.lab.example.com:9090
      
        The full log is at /var/log/foreman-installer/capsule.log
    3. Return to the workstation system as the student user.

      [root@capsule ~]# exit
      logout
      [student@capsule ~]$ exit
      logout
      [student@workstation ~]$
  7. Create and configure the San Francisco location's DNS domain and subnet in the Finance organization.

    1. Log in to the satellite system as the student user and switch to the root user.

      [student@workstation ~]$ ssh student@satellite
      [student@satellite ~]$ sudo -i
      [sudo] password for student: student
      [root@satellite ~]#
    2. Create the sf.lab.example.com DNS domain.

      [root@satellite ~]# hammer domain create \
      --organization Finance \
      --name sf.lab.example.com
      Domain [sf.lab.example.com] created.
    3. Assign the domain parameters to the sf.lab.example.com domain.

      [root@satellite ~]# hammer domain update \
      --organizations Finance \
      --locations "San Francisco" \
      --name sf.lab.example.com \
      --dns capsule.lab.example.com
      Domain [sf.lab.example.com] updated.
    4. Note the Capsule Server ID.

      [root@satellite ~]# hammer capsule list \
      --search capsule.lab.example.com \
      --fields Id,Name
      ---|------------------------
      ID | NAME
      ---|------------------------
      2  | capsule.lab.example.com
      ---|------------------------
    5. Create the San Francisco Data Center subnet by using the Capsule Server ID from the previous command output.

      [root@satellite ~]# hammer subnet create \
      --name "San Francisco Data Center" \
      --organizations Finance \
      --locations "San Francisco" \
      --network 172.25.250.0 \
      --mask 255.255.255.0 \
      --dns-primary 172.25.250.220 \
      --ipam DHCP \
      --from 172.25.250.70 \
      --to 172.25.250.90 \
      --boot-mode DHCP \
      --dns capsule.lab.example.com \
      --dhcp capsule.lab.example.com \
      --tftp capsule.lab.example.com \
      --template-id 2 \
      --domains sf.lab.example.com
      Subnet created.
  8. Create the Finance host group.

    1. Click ConfigureHost Groups, and then click Create Host Group.

    2. Enter the following details. Leave the other fields unmodified. Submit the form only after the other tabs are completed.

      Table 13.5. Host Group Details

      FieldValue
      Name Finance Host Group
      Lifecycle Environment Build
      Content View FinanceServerBase
      Content Source capsule.lab.example.com

    3. Click the Network tab. Select sf.lab.example.com in the Domain field. Select San Francisco Data Center (172.25.250.0/24) in the IPv4 Subnet field.

    4. Click the Operating System tab, and then complete the page with the following details. Leave the other fields unmodified. Submit the form only after the other tabs are completed.

      Table 13.6. 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

    5. Click the Locations tab to verify that the San Francisco location is in the Selected items list.

    6. Click the Organizations tab to verify that the Finance organization is in the Selected items list.

    7. Click the Activation Keys tab, and then select FinanceServers in the Activation Keys field.

    8. Click Submit.

  9. Create a servere host resource.

    1. Click HostsCreate Host. Enter the following details. Leave the other fields unmodified. Submit the form only after the other tabs are completed.

      Table 13.7. New Host Details

      FieldValue
      Name servere
      Organization Finance
      Location San Francisco
      Host Group Finance Host Group

    2. Click the Operating System tab. Enter redhat123 in the Root Password field. Click Resolve to confirm that the system can retrieve the provisioning templates.

    3. Click the Interfaces tab, and then click Edit at the end of the interface row. Enter 52:54:00:00:fa:0e in the MAC Address field. Click Ok. Click Submit.

  10. Access the servere console and initiate a PXE boot.

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

    2. Reboot the server system by using the relevant technique for your classroom environment. The provisioning process starts automatically. If the provision process does not start, then select Kickstart default PXELinux in the Booting into OS installer menu. Wait for the provisioning to complete.

    3. Wait for the installation to complete and for the system to reboot. From the console, log in as root with redhat123 as a password.

      Verify the system name.

      [root@servere ~]# hostname
      servere.sf.lab.example.com
    4. When done, log out from servere and close the console.

      [root@servere ~]# exit
      logout

Evaluation

As the student user on the workstation machine, use the lab command to grade your work. Correct any reported failures and rerun the command until successful.

[student@workstation ~]$ lab grade compreview-host

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 compreview-host

Revision: rh403-6.11-3ad886e