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
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.
Log in to the Satellite Server web UI, https://satellite.lab.example.com, as the admin user with redhat as the password.
In the upper-left corner of the web page, set the organization to Operations.
Set the location to Boston.
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.
Click → , and then click . 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
| Field | Value |
|---|---|
Operations Provisioning
| |
Development
| |
OperationsServerBase
| |
capsule.lab.example.com
|
Click the tab, and then select boston.lab.example.com in the field.
Select Boston Data Center (172.25.250.0/24) in the field.
Click the 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
| Field | Value |
|---|---|
x86_64
| |
RedHat 9.0
| |
Synced Content
| |
Kickstart default
| |
PXELinux BIOS
|
In the tab, verify that the location is in the list.
In the tab, verify that the organization is in the list.
In the tab, select OperationsServers in the field.
Click .
Install and enable the Discovery feature on the Capsule Server.
Install the Discovery boot image and the proxy for the Discovery feature.
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 ~]#
Enable the Discovery plug-in. Wait for the process to complete.
[root@capsule ~]# satellite-installer --scenario capsule \
--enable-foreman-proxy-plugin-discovery
...output omitted...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!
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]
--------------------------------------------------------------------------------Return to the workstation system as the student user.
[root@capsule ~]#exitlogout [student@capsule ~]$exitlogout Connection to capsule closed. [student@workstation ~]$
Verify that the Discovery feature is active on the Capsule Server.
In the Satellite web UI, click → , and then click the link.
Verify that the section includes the Discovery registration feature.
If necessary, click to include newly added features.
Configure the Boston Data Center subnet as the discovery network.
Click → , and then click the link.
In the tab, select capsule.lab.example.com in the field.
Click .
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 name | Clone name |
|---|---|
PXELinux global default
|
Operations PXELinux global default
|
pxelinux_discovery
|
Operations PXELinux discovery
|
Click → .
Enter kind = PXELinux in the filter field, and then click .
In the PXELinux global default row, click .
Enter Operations PXELinux global default in the field.
In the 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 → .
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...
In the tab, select Boston to move the location to the list.
In the tab, select Operations to move the organization to the list.
Click .
On the page, Enter pxelinux_discovery in the filter field, and then click .
In the pxelinux_discovery row, click .
Enter Operations PXELinux discovery in the field.
In the 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:9090proxy.type=proxyIPAPPEND 2 ...output omitted...
In the tab, select Boston to move the location to the list.
In the tab, select Operations to move the organization to the list.
Click .
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.
Click → , and then click the tab.
Select Operations PXELinux global default in the field.
Enter discovery as the value for the setting.
Click the tab.
Select Operations in the field.
Select Boston in the field.
Build and deploy the Operations PXELinux global default provisioning template to the Capsule Server.
Click → , and then click .
Click to change the default PXE menu on all configured TFTP servers.
Access the servere system console, and initiate a PXE boot and a Foreman discovery.
Locate your servere system console, as appropriate for your classroom environment.
Open the console.
Reboot the servere system by using the relevant technique for your classroom environment.
Select from the menu.
At the screen, let the timeout expire.
Do not interrupt that timeout.
Wait for the screen to display, and continue with the exercise steps without exiting the servere screen.
In the Satellite Server web UI, create a servere host resource for the discovered system.
Use the host group.
Set the root password to redhat123.
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.
Click → .
The discovered servere system is identified in the list with the system's Ethernet address.
On the discovered system's row, click .
Select Operations Provisioning in the field.
Select Operations in the field.
Select Boston in the field.
Click .
On the tab, enter redhat123 in the field.
Click to confirm that the system can correctly retrieve the templates for provisioning.
Click the tab, and enter servere to replace the default value in the field.
Select Development in the field.
Select OperationsServerBase in the field.
Click .
Access the servere console and initiate a PXE boot.
Wait for the provisioning process to complete.
The servere host should reboot automatically.
If the host does not reboot, then enter Ctrl+Alt+Del from the servere console.
Select from the menu. Wait for the provisioning to complete.
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 loginrootPassword:redhat123[root@servere ~]#hostnameservere.boston.lab.example.com
Exit the servere system and close the console.
[root@servere ~]# exit
servere login: