Preparing client platforms

You have to configure the platforms that you will provision. That entails creating a hardware model, CPU architecture, and operating system.

Creating operating systems

An operating system is a collection of resources that define how orcharhino Server installs a base operating system on a host. Operating system entries combine previously defined resources, such as installation media, partition tables, provisioning templates, and others.

Importing operating systems from Red Hat’s CDN creates new entries on the Hosts > Provisioning Setup > Operating Systems page. To import operating systems from Red Hat’s CDN, enable the Red Hat repositories of the operating systems and synchronize the repositories to orcharhino.

You can also add custom operating systems using the following procedure. To use the CLI instead of the orcharhino management UI, see the CLI procedure.

You can use a script to add operating system entries to your orcharhino Server.

On your orcharhino Server, uncomment the operating systems and orcharhino Client for CentOS Stream that you want to add in /etc/orcharhino-ansible/or_operating_systems_vars.yaml, replace the default organization and location names, and run /opt/orcharhino/automation/play_operating_systems.sh. For more information, see /usr/share/orcharhino-ansible/README.md on your orcharhino Server.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > Operating systems and click New Operating system.

  2. In the Name field, enter a name to represent the operating system entry.

  3. In the Major field, enter the number that corresponds to the major version of the operating system.

  4. In the Minor field, enter the number that corresponds to the minor version of the operating system.

  5. In the Description field, enter a description of the operating system.

  6. From the Family list, select the operating system’s family.

  7. From the Root Password Hash list, select the encoding method for the root password.

  8. From the Architectures list, select the architectures that the operating system uses.

  9. Click the Partition table tab and select the possible partition tables that apply to this operating system.

  10. Click the Installation Media tab and enter the information for the installation media source. For more information, see Adding Installation Media to orcharhino.

  11. Click the Templates tab and select a PXELinux template, a Provisioning template, and a Finish template for your operating system to use. You can select other templates, for example an iPXE template, if you plan to use iPXE for provisioning.

  12. On the Parameters tab, add the or_client_repo_url parameter, select the string type, and enter the value http://orcharhino.example.com/pulp/content/_My_Organization_/Library/custom/centos_Client/centos_Client_centos/.

    If you want to provision hosts through orcharhino Proxy Servers, you have to use the or_client_repo_path parameter containing the Published At path of your content on orcharhino Server. orcharhino Proxy Server will add the FQDN of your orcharhino Proxy Server to generate the URL based on the content source setting of your host.

  13. Click Submit to save your provisioning template.

CLI procedure
  • Create the operating system using the hammer os create command:

    $ hammer os create \
    --architectures "x86_64" \
    --description "CentOS Stream 10" \
    --family "Redhat" \
    --major 10 \
    --media "Red Hat" \
    --minor 0 \
    --name "CentOS Stream" \
    --partition-tables "My_Partition_Table" \
    --provisioning-templates "My_Provisioning_Template"

Updating the details of multiple operating systems

Use this procedure to update the details of multiple operating systems. This example shows you how to assign each operating system a partition table called Kickstart default, a configuration template called Kickstart default PXELinux, and a provisioning template called Kickstart Default.

Procedure
  1. On orcharhino Server, run the following Bash script:

    PARTID=$(hammer --csv partition-table list | grep "Kickstart default," | cut -d, -f1)
    PXEID=$(hammer --csv template list --per-page=1000 | grep "Kickstart default PXELinux" | cut -d, -f1)
    ORCHARHINO_ID=$(hammer --csv template list --per-page=1000 | grep "provision" | grep ",Kickstart default" | cut -d, -f1)
    
    for i in $(hammer --no-headers --csv os list | awk -F, {'print $1'})
    do
       hammer partition-table add-operatingsystem --id="${PARTID}" --operatingsystem-id="${i}"
       hammer template add-operatingsystem --id="${PXEID}" --operatingsystem-id="${i}"
       hammer os set-default-template --id="${i}" --config-template-id=${PXEID}
       hammer os add-config-template --id="${i}" --config-template-id=${ORCHARHINO_ID}
       hammer os set-default-template --id="${i}" --config-template-id=${ORCHARHINO_ID}
    done
  2. Display information about the updated operating system to verify that the operating system is updated correctly:

    $ hammer os info --id 1

Creating architectures

An architecture in orcharhino represents a logical grouping of hosts and operating systems. Architectures are created by orcharhino automatically when hosts check in with Puppet. The x86_64 architecture is already preset in orcharhino.

Use this procedure to create an architecture in orcharhino.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > Provisioning Setup > Architectures.

  2. Click Create Architecture.

  3. In the Name field, enter a name for the architecture.

  4. From the Operating Systems list, select an operating system. If none are available, you can create and assign them under Hosts > Provisioning Setup > Operating Systems.

  5. Click Submit.

CLI procedure
  • Enter the hammer architecture create command to create an architecture. Specify its name and operating systems that include this architecture:

    $ hammer architecture create \
    --name "My_Architecture" \
    --operatingsystems "My_Operating_System"

Creating hardware models

Use this procedure to create a hardware model in orcharhino so that you can specify which hardware model a host uses.

Procedure
  1. In the orcharhino management UI, navigate to Hosts > Provisioning Setup > Hardware Models.

  2. Click Create Model.

  3. In the Name field, enter a name for the hardware model.

  4. Optionally, in the Hardware Model and Vendor Class fields, you can enter corresponding information for your system.

  5. In the Info field, enter a description of the hardware model.

  6. Click Submit to save your hardware model.

CLI procedure
  • Create a hardware model using the hammer model create command. The only required parameter is --name. Optionally, enter the hardware model with the --hardware-model option, a vendor class with the --vendor-class option, and a description with the --info option:

    $ hammer model create \
    --hardware-model "My_Hardware_Model" \
    --info "My_Description" \
    --name "My_Hardware_Model_Name" \
    --vendor-class "My_Vendor_Class"

Creating compute profiles

You can use compute profiles to predefine virtual machine hardware details such as CPUs, memory, and storage.

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

A default installation of orcharhino contains three predefined profiles:

  • 1-Small

  • 2-Medium

  • 3-Large

You can apply compute profiles to all supported compute resources:

Procedure
  1. In the orcharhino management UI, navigate to Infrastructure > Compute Profiles and click Create Compute Profile.

  2. In the Name field, enter a name for the profile.

  3. Click Submit. A new window opens with the name of the compute profile.

  4. In the new window, click the name of each compute resource and edit the attributes you want to set for this compute profile.

CLI procedure
  1. Create a new compute profile:

    $ hammer compute-profile create --name "My_Compute_Profile"
  2. Set attributes for the compute profile:

    $ hammer compute-profile values create \
    --compute-attributes "flavor=m1.small,cpus=2,memory=4GB,cpu_mode=default \
    --compute-resource "My_Compute_Resource" \
    --compute-profile "My_Compute_Profile" \
    --volume size=40GB
  3. Optional: To update the attributes of a compute profile, specify the attributes you want to change. For example, to change the number of CPUs and memory size:

    $ hammer compute-profile values update \
    --compute-resource "My_Compute_Resource" \
    --compute-profile "My_Compute_Profile" \
    --attributes "cpus=2,memory=4GB" \
    --interface "type=network,bridge=br1,index=1" \
    --volume "size=40GB"
  4. Optional: To change the name of the compute profile, use the --new-name attribute:

    $ hammer compute-profile update \
    --name "My_Compute_Profile" \
    --new-name "My_New_Compute_Profile"
Additional resources
  • For more information about creating compute profiles by using Hammer, enter hammer compute-profile --help.

Installing katello-host-tools-tracer during Provisioning

The katello-host-tools package is responsible for the connection between managed hosts and content from orcharhino Server and orcharhino Proxies. It uploads currently used repositories and installed packages to orcharhino. The katello-host-tools-tracer package signals orcharhino if services such as nginx have to be restarted or the managed host itself has to be rebooted after updating packages such as the Linux Kernel.

Procedure
  1. In the orcharhino management UI, navigate to the host group you are using to provision your host.

    Note that you can add the parameter to any level in the parameter hierarchy, for example to individual hosts, host groups, or operating systems.

  2. Add a parameter with name redhat_install_host_tracer_tools, type boolean, and value true.

  3. In the orcharhino management UI, navigate to the provisioning template you are using to provision your host.

  4. Ensure to reference the snippet to install katello-host-tools-tracer:

    <%= snippet 'redhat_register' %>

    After the deployment, orcharhino will automatically install both katello-host-tools and katello-host-tools-tracer on your managed host.

Installing katello-host-tools-tracer Manually

The katello-host-tools package is responsible for the connection between managed hosts and content from orcharhino Server and orcharhino Proxies. It uploads currently used repositories and installed packages to orcharhino. The katello-host-tools-tracer package signals orcharhino if services such as nginx have to be restarted or the managed host itself has to be rebooted after updating packages such as the Linux Kernel.

Procedure
  1. In the orcharhino management UI, navigate to Monitor > Jobs.

  2. Click Run Job.

  3. In the Job category drop down menu, select Commands.

  4. In the Job template drop down menu, select Run Command - SSH Default.

  5. In the Search Query field, filter your managed hosts, for example all hosts running CentOS Stream:

    os = CentOS

    Alternatively, you can also filter for specific hosts using name = my-host.example.com.

  6. In the Command field, enter the command to install the katello-host-tools-tracer package:

    $ dnf install -y katello-host-tools-tracer
  7. Click Submit to install the package.

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