Chapter 3. Configuring Provisioning Resources

Red Hat Satellite 6 contains provisioning resources that you can use to create a host.

3.1. Creating Operating Systems

An operating system is a collection of resources that define how Satellite 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 > Operating Systems page.

You can also add custom operating systems using the following procedure:

Procedure

  1. In the Satellite web 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. Optional: if you use non-Red Hat content, click the Installation media tab and select the installation media that apply to this operating system. For more information, see Section 3.9, “Using Third Party Installation Media”.
  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. Click Submit to save your provisioning template.

For CLI Users

Create the operating system using the hammer os create command:

# hammer os create --name "MyOS" \
--description "My_custom_operating_system" \
--major 7 --minor 3 --family "Redhat" --architectures "x86_64" \
--partition-tables "My_Partition" --media "Red_Hat" \
--provisioning-templates "My_Provisioning_Template"

3.2. Creating Architectures

An architecture in Satellite represents a logical grouping of hosts and operating systems. Architectures are created by Satellite automatically when hosts check in with Puppet. Basic i386 and x86_64 architectures are already preset in Satellite 6.

Use this procedure to create an architecture in Satellite.

Supported Architectures

Intel x86_64 architecture is supported only for provisioning using PXE, Discovery, and boot disk. For more information, see Red Hat Knowledgebase solution Architectures Supported for Satellite 6 Provisioning.

Procedure

To create an architecture, complete the following steps:

  1. In the Satellite web UI, navigate to Hosts > Architectures, and in the Architectures window, click Create Architecture.
  2. In the Name field, enter a name for the architecture.
  3. From the Operating Systems list, select an operating system. If none are available, you can create and assign them under Hosts > Operating Systems.
  4. Click Submit.

For CLI Users

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

# hammer architecture create --name "Architecture_Name" \
--operatingsystems "os"

3.3. Creating Hardware Models

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

Procedure

To create a hardware model, complete the following steps:

  1. In the Satellite web UI, navigate to Hosts > Hardware Models, and in the Hardware Models window, click Create Model.
  2. In the Name field, enter a name for the hardware model.
  3. Optionally, in the Hardware Model and Vendor Class fields, you can enter corresponding information for your system.
  4. In the Info field, enter a description of the hardware model.
  5. Click Submit to save your hardware model.

For CLI Users

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 --name "model_name" --info "description" \
--hardware-model "hardware_model" --vendor-class "vendor_class"

3.4. Using a Synced Kickstart Repository for a Host’s Operating System

Satellite contains a set of synchronized kickstart repositories that you use to install the provisioned host’s operating system.

To set up a kickstart repository, complete the following steps:

  1. Add the synchronized kickstart repository that you want to use to the existing Content View or create a new Content View and add the kickstart repository.
  2. Publish a new version of the Content View where the kickstart repository is added and promote it to a required lifecycle environment. For more information, see Managing Content Views in the Content Management Guide.
  3. When you create a host, in the Operating System tab, for Media Selection, select the Synced Content check box.

To View the Kickstart Tree

To view the kickstart tree enter the following command:

# hammer medium list --organization "your_organization"

3.5. Creating Partition Tables

A partition table is a set of directives that defines the way Satellite Server configures the disks available on a new host. Red Hat Satellite 6 contains a set of default partition tables to use, including a Kickstart default. You can also edit partition table entries to configure the preferred partitioning scheme, or create a partition table entry and add it to the Red Hat Enterprise Linux operating system entry.

Procedure

To create partition tables, complete the following steps:

  1. In the Satellite web UI, navigate to Hosts > Partition Tables and, in the Partition Tables window, click Create Partition Table.
  2. In the Name field, enter a name to represent the partition table.
  3. Select the Default check box if you want to set the template to automatically associate with new organizations or locations.
  4. Select the Snippet check box if you want to identify the template as a reusable snippet for other partition tables.
  5. From the Operating System Family list, select the distribution or family of the partitioning layout. For example, Red Hat Enterprise Linux, CentOS, and Fedora are in the Red Hat family.
  6. In the Template editor field, enter the layout for the disk partition. For example:

    zerombr
    clearpart --all --initlabel
    autopart

    You can also use the Template file browser to upload a template file.

    The format of the layout must match that for the intended operating system. For example, Red Hat Enterprise Linux 7.2 requires a layout that matches a kickstart file.

  7. In the Audit Comment field, add a summary of changes to the partition layout.
  8. Click the Organizations and Locations tabs to add any other provisioning contexts that you want to associate with the partition table. Satellite adds the partition table to the current provisioning context.
  9. Click Submit to save your partition table.

For CLI Users

Before you create a partition table with the CLI, create a plain text file that contains the partition layout. This example uses the ~/my-partition file. Create the installation medium using the hammer partition-table create command:

# hammer partition-table create --name "My Partition" --snippet false \
--os-family Redhat --file ~/my-partition --organizations "My_Organization" \
--locations "My_Location"

3.6. Creating Provisioning Templates

A provisioning template defines the way Satellite Server installs an operating system on a host.

3.6.1. Types of Provisioning Templates

There are various types of provisioning templates, including:

Provision

The main template for the provisioning process. For example, a kickstart template. For more information about kickstart template syntax, see the Kickstart Syntax Reference in the Red Hat Enterprise Linux 7 Installation Guide.

PXELinux, PXEGrub, PXEGrub2

PXE-based templates that deploy to the template Capsule associated with a subnet to ensure that the host uses the installer with the correct kernel options. For BIOS provisioning, select PXELinux template. For UEFI provisioning, select PXEGrub2.

Finish

Post-configuration scripts to use when the main provisioning process completes. This is completed as an SSH task. You can use Finishing templates only for imaged-based provisioning in virtual environments. Do not confuse an image with a foreman discovery ISO, which is sometimes called a Foreman discovery image. An image in this context is an install image in a virtualized environment for easy deployment.

Bootdisk

Templates for PXE-less boot methods.

Kernel Execution (kexec)

Kernel execution templates for PXE-less boot methods.

Note

Kernel Execution is a Technology Preview feature. Technology Preview features are not fully supported under Red Hat Subscription Service Level Agreements (SLAs), may not be functionally complete, and are not intended for production use. However, these features provide early access to upcoming product innovations, enabling customers to test functionality and provide feedback during the development process.

user_data

Post-configuration scripts for providers that accept user data, such as cloud-init scripts.

Script

An arbitrary script not used by default but useful for custom tasks.

ZTP

Zero Touch Provisioning templates.

POAP

PowerOn Auto Provisioning templates.

iPXE

Templates for iPXE or gPXE environments to use instead of PXELinux.

3.6.2. Template Syntax and Management

Red Hat Satellite includes many template examples. In the Satellite web UI, navigate to Hosts > Provisioning templates to view them. You can create a template or clone a template and edit the clone. For help with templates, navigate to Hosts > Provisioning templates > Create Template > Help.

Templates accept the Embedded Ruby (ERB) syntax. For more information, see Template Writing Reference in Managing Hosts.

You can download provisioning templates. Before you can download the template, you must create a debug certificate. For more information, see Creating an Organization Debug Certificate in the Content Management Guide.

You can synchronize templates between Satellite Server and a Git repository or a local directory. For more information, see Appendix F. Synchronizing Templates with Git in the Content Management guide.

Change logs and history

To view the history of changes applied to a template, navigate to Hosts > Provisioning templates, select one of the templates, and click History. Click Revert to override the editor content with the previous version. It is possible to revert to an earlier change as well. Click Show Diff to see information about a specific change:

  1. Template Diff tab displays changes in the body of a provisioning template.
  2. Details tab displays changes in the template description.
  3. History tab displays the user who made a change to the template and date of the change.

3.6.3. Procedure

To create a template, complete the following step:

  • In the Satellite web UI, navigate to Hosts > Provisioning Templates and, in the Provisioning Templates window, click Create Template.

The Help tab provides information about the template syntax. It details the available functions, variables, and methods that can be called on different types of objects within the template.

Alternatively, to clone a template and add your updates to the clone, complete the following steps:

  1. In the Satellite web UI, navigate to Hosts > Provisioning Templates and search for the template that you want to use.
  2. On the template that you want to use, click Clone to duplicate it.
  3. In the Name field, enter a name for the provisioning template.
  4. Select the Default check box to set the template to associate automatically with new organizations or locations.
  5. In the Template editor field, enter the body of the provisioning template. You can also use the Template file browser to upload a template file.
  6. In the Audit Comment field, enter a summary of changes to the provisioning template for auditing purposes.
  7. Click the Type tab and if your template is a snippet, select the Snippet check box. A snippet is not a standalone provisioning template, but a part of a provisioning template that can be inserted into other provisioning templates.
  8. From the Type list, select the type of the template. For example, Provisioning template.
  9. Click the Association tab and from the Applicable Operating Systems list, select the names of the operating systems that you want to associate with the provisioning template.
  10. Optionally, click Add combination and select a host group from the Host Group list or an environment from the Environment list to associate provisioning template with the host groups and environments.
  11. Click the Organizations and Locations tabs to add any additional contexts to the template.
  12. Click Submit to save your provisioning template.

For CLI Users

Before you create a template with the CLI, create a plain text file that contains the template. This example uses the ~/my-template file. Create the installation medium using the hammer template create command and specify the type with the --type option:

# hammer template create --name "My Provisioning Template" \
--file ~/my-template --type provision --organizations "My_Organization" \
--locations "My_Location"

3.7. Creating Compute Profiles

Compute profiles are used in conjunction with compute resources, such as virtualization infrastructure and cloud providers. Compute profiles allow users to predefine hardware such as CPUs, memory, and storage. A default installation of Red Hat Satellite 6 contains three predefined profiles:

  • 1-Small
  • 2-Medium
  • 3-Large

Procedure

  1. In the Satellite web UI, navigate to Infrastructure > Compute Profiles, and in the Compute Profiles window, click Create Compute Profile.
  2. In the Name field, enter a name for the profile and click Submit.

For CLI Users

The compute profile CLI commands are not yet implemented in Red Hat Satellite 6.4.

3.8. Setting a Default Encrypted Root Password for Hosts

If you do not want to set a plain text default root password for the hosts that you provision, you can use a default encrypted password.

To set a default encrypted password for your hosts, complete the following steps:

  1. Generate an encrypted password. You can use the following command to generate a password:

    # python -c 'import crypt,getpass;pw=getpass.getpass(); print(crypt.crypt(pw)) if (pw==getpass.getpass("Confirm: ")) else exit()'
  2. Copy the password for later use.
  3. In the Satellite web UI, navigate to Administer > Settings.
  4. On the Settings page, select the Provisioning tab.
  5. In the Name column, navigate to Root password, and click Click to edit.
  6. Paste the encrypted password that you generate, and click Save.

3.9. Using Third Party Installation Media

Installation media are sources of files for third parties that Satellite Server uses to install a third-party base operating system on a machine. Installation media must be in the format of an operating system installation tree, and must be accessible to the machine hosting the installer through an HTTP URL. You can view installation media by navigating to Hosts > Installation Media menu.

For other installation media, for example, a locally mounted ISO image, you can add your own custom media paths using the following procedure.

Procedure

To create installation media, complete the following steps:

  1. In the Satellite web UI, navigate to Hosts > Installation Media and click Create Medium.
  2. In the Name field, enter a name to represent the installation media entry.
  3. In the Path enter the URL or NFS share that contains the installation tree. You can use following variables in the path to represent multiple different system architectures and versions:

    • $arch - The system architecture.
    • $version - The operating system version.
    • $major - The operating system major version.
    • $minor - The operating system minor version.

      Example HTTP path:

      http://download.example.com/centos/$version/Server/$arch/os/

      Example NFS path:

      nfs://download.example.com:/centos/$version/Server/$arch/os/

      Synchronized content on Capsule Servers always uses an HTTP path. Capsule Server managed content does not support NFS paths.

  4. From the Operating system family list, select the distribution or family of the installation medium. For example, CentOS, and Fedora are in the Red Hat family.
  5. Click the Organizations and Locations tabs, to change the provisioning context. Satellite Server adds the installation medium to the set provisioning context.
  6. Click Submit to save your installation medium.

For CLI Users

Create the installation medium using the hammer medium create command:

# hammer medium create --name "CustomOS" --os-family "Redhat" \
--path http://download.example.com/centos/$version/Server/$arch/os/ \
--organizations "My_Organization" --locations "My_Location"

3.10. Using noVNC to Access Virtual Machines

You can use your browser to access the VNC console of VMs created by Satellite.

Satellite supports using noVNC on the following virtualization platforms:

  • VMware
  • Libvirt
  • RHV

Use the following procedure to configure your virtualization platform and browser to enable the use of the noVNC console.

Prerequisites

  • You must have a virtual machine created by Satellite.
  • For existing virtual machines, ensure that the Display type in the Compute Resource settings is VNC.
  • You must import the Katello root CA certificate into your Satellite Server. Adding a security exception in the browser is not enough for using noVNC. For more information, see the Installing the Katello Root CA Certificate section in the Administering Red Hat Satellite guide.

Procedure

  1. On the VM host system, configure the firewall to allow VNC service on ports 5900 to 5930:

    • On Red Hat Enterprise Linux 6:

      # iptables -A INPUT -p tcp --dport 5900:5930 -j ACCEPT
      # service iptables save
    • On Red Hat Enterprise Linux 7:

      # firewall-cmd --add-port=5900-5930/tcp
      # firewall-cmd --add-port=5900-5930/tcp --permanent
  2. In the Satellite web UI, navigate to Infrastructure > Compute Resources and select the name of a compute resource.
  3. In the Virtual Machines tab, select the name of a VM host. Ensure the machine is powered on and then select Console.