Host Configuration Guide
A guide to managing hosts in a Red Hat Satellite 6 environment.
Edition 1.0
Abstract
Chapter 1. Using the Red Hat Satellite Content Dashboard
- Content Host Subscription Status
- An overview of the subscriptions currently consumed by the hosts registered to Satellite. A subscription is a purchased certificate that unlocks access to software, upgrades, and security fixes for hosts. The following table shows the possible states of subscriptions.
Table 1.1. Host Subscription States StateDescriptionIconInvalid Hosts that have products installed, but are not correctly subscribed. These hosts need attention immediately.Partial Hosts that have a subscription and a valid entitlement, but are not using their full entitlements. These hosts should be monitored to ensure they are configured as expected.Valid Hosts that have a valid entitlement and are using their full entitlements.Click the subscription type to view content hosts associated with subscriptions of the selected type. - Latest Events
- A list of messages produced by hosts including administration information, product and subscription changes, and any errors.Monitor this section for global notifications sent to all users and to detect any unusual activity or errors.
- Sync Overview
- An overview of all products or repositories enabled in Satellite and their Synchronization status. All products that are in the queue for synchronization, are unsynchronized or have been previously synchronized are listed in this section. Click a product name to view the synchronization status.
- Host Collections
- A list of all host collections in Satellite and their status, including the number of content hosts in each host collection. Click a host collection name to view that host collection.
- Current Subscription Totals
- An overview of the current subscription totals that shows the number of active subscriptions, the number of subscriptions that expire in the next 120 days, and the number of subscriptions that have recently expired. Click the number to list subscriptions of the selected type.
- Content Views Overview
- A list of all Content Views in Satellite and their publish status.
- Errata Overview
- A list of all errata available for hosts registered to Satellite.
- Task Status
- A summary of all current tasks, grouped by their state and result. Click the number to go to the list of corresponding tasks.
- Latest Warning/Error Tasks
- A list of the latest tasks that have been stopped due to a warning or error. Click a task to see more details.
Note
1.1. Managing Tasks
Procedure 1.1. To Adjust Timeout Settings:
- Navigate to→ .
- Enter %_timeout in the search box and click . The search should return four settings, including a description.
- In the Value column, click the icon next to a number to edit it.
- Enter the desired value in seconds, and click.
Note
There was an issue with the backend service candlepin: Connection refused – connect(2).If the back-end service checking feature turns out to be causing any trouble, it can be disabled as follows.
Procedure 1.2. To Disable Checking for Services:
- Navigate to→ .
- Enter check_services_before_actions in the search box and click .
- In the Value column, click the icon to edit the value.
- From the drop-down menu, select false.
- Click.
Chapter 2. Searching and Bookmarking
2.1. Building Search Queries
2.1.1. Query Syntax
parameter operator value
2.1.2. Operators
Operator | Short Name | Description | Example |
---|---|---|---|
= | EQUALS | Accepts numerical, temporal, or text values. For text, exact case sensitive matches are returned. | hostgroup = RHEL7 |
!= | NOT EQUALS | ||
~ | LIKE | Accepts text or temporal values. Returns case insensitive matches. Accepts the following wildcards: _ for a single character, % or * for any number of characters including zero. If no wildcard is specified, the string is treated as if surrounded by wildcards: %rhel7% | hostgroup ~ rhel% |
!~ | NOT LIKE | ||
> | GREATER THAN | Accepts numerical or temporal values. For temporal values, the operator > is interpreted as "later than", and < as "earlier than". Both operators can be combined with EQUALS: >= <= | registered_at > 10-January-2017
The search will return hosts that have been registered after the given date, that is, between 10th January 2017 and now.
registered_at <= Yesterday
The search will return hosts that have been registered yesterday or earlier.
|
< | LESS THAN | ||
^ | IN | Compares an expression against a list of values, as in SQL. Returns matches that contain or not contain the values, respectively. | release_version !^ 7 |
!^ | NOT IN | ||
HAS | Returns values that are present or not present, respectively. | has hostgroup
On the Puppet Classes page, the search will return classes that are assigned to at least one host group.
not has hostgroup
On the Dashboard with an overview of hosts, the search will return all hosts that have no assigned host group.
| |
NOT HAS |
Operator | Alternative Notations | Example | ||
---|---|---|---|---|
and | & | && | <whitespace> | class = motd AND environment ~ production |
or | | | || | errata_status = errata_needed || errata_status = security_needed | |
not | – | ! | hostgroup ~ rhel7 not status.failed |
2.1.3. Values
- Text Values
- Text containing whitespaces must be enclosed in quotes. A whitespace is otherwise interpreted as the AND operator.Examples:
hostgroup = "Web servers"
The search will return hosts with assigned host group named "Web servers".hostgroup = Web servers
The search will return hosts in the host group Web with any field matching %servers%. - Temporal Values
- Many date and time formats are accepted, including the following:
- "10 January 2017"
- "10 Jan 2017"
- 10-January-2017
- 10/January/2017
- "January 10, 2017"
- Today, Yesterday, and the like.
Warning
Avoid ambiguous date formats, such as 02/10/2017 or 10-02-2017.
2.2. Using Free Text Search
Note
2.3. Bookmarking
Chapter 3. Using Content Views

Figure 3.1. This diagram details the creation of new versions of a Content View. These content view versions are promoted along an environment path during the application life cycle.
3.1. Creating a Content View
Procedure 3.1. To Create a Content View:
- Log in as a Satellite administrator.
- Click→ .
- Click.
- Specify the Name of the content view. The Label field is automatically populated when the Name field is filled out. Optionally, provide a description of the content view.
- Select the Composite Content View check box to combine a series of published content views into one and choose which content view.
Note
If you select Composite Content View it will override any filtering and allow you to choose a group of published content views and bundle those views into a composite one. - Click.
3.2. Adding Repositories to the Content View
RHEL7_Base
, entering RHEL7
will not return any results, instead enter RHEL7*
. Alternatively, *Base*
also retrieves the content view RHEL7_Base
.
Procedure 3.2. To Associate a Repository with a Content View:
- Click→ and choose the Content View to add repositories to.
- Depending on the type of content you want to store:
- To add a Yum repository, click Yum Content and select from the drop-down menu. From the submenu, click . For example, to be able to install Katello agent on your host, you need to enable the
Satellite Tools
repository. - To add a Puppet repository, click Puppet Modules and click .
- To add a Docker repository, click Docker Content and click in the submenu.
- Select the repositories to add and click.
3.3. Filtering Content
3.3.1. Creating a Filter
Procedure 3.3. To Create a Filter:
- Navigate to→ and select the Content View you want to filter.
- Click→ and click .
- In the Name field, specify the name of the new filter and choose a content type from the Content Type drop-down menu. Choose whether the filter includes or excludes the selected content type by selecting the Type drop-down menu. Optionally, insert a description in the Description field.
- Clickto save your new filter.
3.3.2. Adding Content to a Filter
Procedure 3.4. To Add Content to a Filter:
- Navigate to→ and select the Content View you want to filter.
- Click→ and click the name of the filter you want to edit. Depending on the type of filter selected, perform the following actions:
- If the filter is made for packages, specify a package name on the Packages subtab, and select a value from the drop-down menu. Click to add the package to the filter.
- If the filter is made for package groups, click the Add subtab, and choose the desired package group. Click .
- If the filter is made for errata, click the Add subtab. Select the errata type (Security, Enhancement, or Bugfix), and specify a start date and end date. Click .
- If the filter is made for errata - date and type, on the Erratum Date Range subtab, select the errata type (Security, Enhancement, or Bugfix) and specify a start date and end date. Click .
- On the Affected Repositories subtab, choose whether the filter will affect all or a subset of repositories. If you choose a subset of repositories, select the desired repositories and click .
- Click. Insert a comment if desired, then click .
3.3.3. Removing Content from a Filter
Procedure 3.5. To Remove Content from a Filter:
- Navigate to→ and select the Content View you want to filter.
- Click→ and click the name of the filter you want to edit. Depending on the type of filter selected, perform the following actions:
- If the filter is made for packages, click the Packages subtab and select the Package Name check box next to the package to be removed. Click to remove the package from the filter.
- If the filter is made for package groups, click the List/Remove subtab and select the Name check box next to the package group to be removed. Click to remove the package group from the filter.
- If the filter is made for errata, click the List/Remove subtab select the Errata ID check box next to the errata to be removed. Click to remove the errata from the filter.
- If the filter is made for errata - date and type, on the Erratum Date Range subtab, check the errata type (Security, Enhancement, or Bugfix). Specify the start date and end date. Click .
- On the Affected Repositories subtab, choose whether the filter will affect all or a subset of repositories. If you choose a subset of repositories, select the desired repositories and click .
- Click. Insert a comment if desired, and click .
3.3.4. Removing a Filter
Procedure 3.6. To Remove a Filter:
- Navigate to→ and select the Content View you want to filter.
- Click→ and select the check box next to the name of the package filter you want to remove.
- Click.
3.4. Publishing a Content View
Procedure 3.7. To Publish a Content View Definition:
- Click→ .
- Click on the content view to be published.
- Click.
- Fill in a comment.
- Click.
Chapter 4. Viewing and Applying Errata
Important
- Security Advisory describes fixed security issues found in the package. The security impact of the issue can be Low, Moderate, Important, or Critical.
- Bug Fix Advisory describes bug fixes for the package.
- Product Enhancement Advisory describes enhancements and new features added to the package.
Note
- Applicable: erratum applies to one or more content hosts, which means it updates packages present on the content host. Applicable errata are not yet accessible by the content host.
- Installable: erratum applies to one or more content hosts and it has been made available to the content host. Installable errata are present in the content host’s life cycle environment and content view, but are not yet installed. This way, errata can be installed by users who have permissions to manage content hosts, but are not entitled for errata management at higher levels.
4.1. Inspecting Available Errata
Procedure 4.1. To Inspect Available Errata:
- Navigate to→ to view the list of available errata.
- Use the filtering tools at the top of the page to limit the number of displayed errata:
- Select the repository to be inspected from the drop-down list. All Repositories is selected by default.
- The Applicable check box is selected by default to view only errata applicable to the selected repository. Select the Installable check box to view only errata marked as installable.
- To search the table of errata, type the query in the Search field in the form of:
parameter operator value
See Table 4.1, “Parameters Available for Errata Search” for the list of parameters available for search. Find the list of applicable operators in Supported Operators for Granular Search in the Server Administration Guide. Automatic suggestion works as you type. You can also combine queries with the use of and and or operators. For example, to display only security advisories related to the kernel package, type:type = security and package_name = kernel
Press Enter to start the search.
- Click the Errata ID of the erratum you want to inspect:
- The Details tab contains the description of the updated package as well as documentation of important fixes and enhancements provided by the update.
- On the Content Hosts tab, you can apply the erratum to selected content hosts as described in Section 4.2, “Applying Errata to Content Hosts”.
- The Repositories tab lists repositories that already contain the erratum. You can filter repositories by the environment and content view, and search for them by the repository name.
Parameter | Description | Example |
---|---|---|
bug | Search by the Bugzilla number. | bug = 1172165 |
cve | Search by the CVE number. | cve = CVE-2015-0235 |
id | Search by the errata ID. The auto-suggest system displays a list of available IDs as you type. | id = RHBA-2014:2004 |
issued | Search by the issue date. You can specify the exact date, like "Feb16,2015", or use keywords, for example "Yesterday", or "1 hour ago". The time range can be specified with the use of the "<" and ">" operators. | issued < "Jan 12,2015" |
package | Search by the full package build name. The auto-suggest system displays a list of available packages as you type. | package = glib2-2.22.5-6.el6.i686 |
package_name | Search by the package name. The auto-suggest system displays a list of available packages as you type. | package_name = glib2 |
severity | Search by the severity of the issue fixed by the security update. Specify Critical, Important, or Moderate. | severity = Critical |
title | Search by the advisory title. | title ~ openssl |
type | Search by the advisory type. Specify security, bugfix, or enhancement. | type = bugfix |
updated | Search by the date of the last update. You can use the same formats as with the issued parameter. | updated = "6 days ago" |
4.2. Applying Errata to Content Hosts
Procedure 4.2. To Apply a Single Erratum to Content Hosts:
- Navigate to→ to view the list of available errata.
- Click the Errata ID of the erratum you want to apply.
- On the Content Hosts tab, select one or more content hosts to be updated. You can filter the available content hosts by the environment, and search for them by name. If you select the check box at the top of the page, only the content hosts that already have the installable erratum in their life cycle environment are displayed.
- Click.
- If the erratum is applicable, a new minor version of the content view is created. If you select Apply Errata to Content Hosts Immediately after publishing, Satellite will automatically install the erratum on the content host when promoting the updated content view. Otherwise, the erratum will be made available for installation on the content host. Installable errata can be applied later using the same procedure, or manually per content host as described in Procedure 4.4, “To Apply Installable Errata to a Content Host:”.
- If the erratum is installable, which means it is already present in the selected content host's life cycle environment but is not installed yet, no new content view version is created.
- Click.
Procedure 4.3. To Apply Multiple Errata to Content Hosts:
- Navigate to→ to view the list of available errata.
- Select errata you want to apply by selecting the check box to the left of the Errata ID field.
- Clickto apply all selected errata.
- Select one or more content hosts to be updated. You can filter the available content hosts by the environment, and search for them by name. If you select the check box at the top of the page, only content hosts that already have the installable errata in their life cycle environment are displayed.
- Click applicable, a new minor version of the content view is created. If you select Apply Errata to Content Hosts Immediately after publishing, Satellite will automatically install errata on the content host when promoting the updated content view. If only installable errata are selected, they are installed without creating a new content view version.. If some of the selected errata are
Procedure 4.4. To Apply Installable Errata to a Content Host:
- Navigate to→ .
- Click the name of the content host you want to manage.
- On the Errata tab, select errata you want to install.
- Clickto install the selected updates.
4.3. Subscribing to Errata Notifications
Chapter 5. Security Compliance Management
root
account. In Satellite 6, tools provided by the OpenSCAP project are used to implement security compliance auditing. For more information about OpenSCAP see the Red Hat Enterprise Linux 7 Security Guide. The Satellite web UI enables scheduled compliance auditing and reporting on all hosts under management by Red Hat Satellite.
- XCCDF: The Extensible Configuration Checklist Description Format (version 1.2)
- OVAL: Open Vulnerability and Assessment Language (version 5.11)
- Asset Identification (version 1.1)
- ARF: Asset Reporting Format (version 1.1)
- CCE: Common Configuration Enumeration (version 5.0)
- CPE: Common Platform Enumeration (version 2.3)
- CVE: Common Vulnerabilities and Exposures
- CVSS: Common Vulnerability Scoring System (version 2.0)
5.1. What is SCAP
5.1.1. SCAP Content
root
user account. Rules can be grouped into one or more profiles, allowing multiple profiles to share a rule. SCAP content consists of both rules and profiles.
- On Red Hat Enterprise Linux 6, content for Red Hat Enterprise Linux 6 is installed.
- On Red Hat Enterprise Linux 7, content for both Red Hat Enterprise Linux 6 and Red Hat Enterprise Linux 7 is installed.
5.1.2. XCCDF Profile
5.1.3. Compliance Policy
5.2. Installation
5.2.1. Install OpenSCAP Packages
Procedure 5.1. Installing OpenSCAP Packages
- On the Satellite Server, install the OpenSCAP plug-in and content.
# satellite-installer --enable-foreman-plugin-openscap
Successful installation is indicated by a progress indicator, and the wordSuccess!
. The OpenSCAP plugin adds to the Satellite web UI a Compliance section, under the menu, containing the following pages:# yum install puppet-foreman_scap_client
- On all external Capsule Servers, install the OpenSCAP plug-in and content.
Note
If OpenSCAP functionality is to be enabled on a Capsule Server, Puppet must already have been enabled on that server.# satellite-installer --enable-foreman-proxy-plugin-openscap
Successful installation is indicated by a progress indicator, and the wordSuccess!
. This provides the Puppet classes required to set up hosts to perform OpenSCAP scans and creates the Cron jobs for automated compliance scanning. - On external Capsule Servers with the Puppet master role, install the OpenSCAP client.
# yum install puppet-foreman_scap_client
To identify the relevant external Capsule Servers, open the Satellite web UI, navigate to Puppet listed in the Features column.→ and identify those external Capsule Servers with
5.2.2. Loading Default OpenSCAP Content
Procedure 5.2. Load the Default OpenSCAP Content
- Load the OpenSCAP content on the Satellite Server.
# foreman-rake foreman_openscap:bulk_upload:default
5.2.3. Importing OpenSCAP Puppet Modules
Procedure 5.3. Import OpenSCAP Puppet Modules
- OpenSCAP requires a Puppet environment, but by default they are only created for Content Views which contain Puppet modules. To list available Puppet environments, open the Satellite web UI and navigate to→ .If there are no Puppet environments, open a CLI session on the Satellite Server and create a directory for the
production
Puppet environment.# mkdir -p /etc/puppet/environments/production/modules
- Import the OpenSCAP content into selected Puppet environments. Each host which is to be audited with OpenSCAP must be associated with a Puppet environment.
- In the Satellite web UI, select from the context menu Any Organization and Any Location.
- Navigate to→ .
- Click, then .
- For each Puppet environment associated with hosts to be audited using OpenSCAP, select the check box, then click production environment.. If no other Puppet environment exists, select theThe foreman_scap_client Puppet module, amongst others, will be added to the selected environments.
- Verify that the foreman_scap_client Puppet module has been added.Navigate to foreman_scap_client Puppet class is listed.→ , then click in the Puppet environment's row. The procedure has been successful if the
5.2.4. Uploading Extra SCAP Content
Procedure 5.4. Upload Extra SCAP Content
- Log in to the Satellite web UI.
- Navigate to Upload New SCAP Content.→ and click
- Enter a title in the Title text box. For example:
RHEL 7.2 SCAP Content
. - Click, navigate to the location containing the SCAP content file and select .
- Click.
Successfully created RHEL 7.2 SCAP Content
will be shown and the list of SCAP Contents will include the new title.
5.3. Managing Compliance Policies
5.3.1. Creating a Policy
Prerequisites
Procedure 5.5. To Create a Policy:
- In the Satellite web UI, navigate to→ , click and follow the wizard’s steps.
- Enter a name for this policy, a description (optional), then click.
- Select the SCAP Content and XCCDF Profile to be applied, then click.
- Specify the scheduled time when the policy is to be applied, then click.Select Period drop-down list., , or from the
- If you select, also select the desired day of the week from the drop-down list.
- If you select Day of month field., also specify the desired day of the month in the
- If you select Cron line field., enter a valid Cron expression in the
Theoption allows for greater flexibility in the policy's schedule than either the or options. - Select the locations to which the policy is to be applied, then click.
- Select the organizations to which the policy is to be applied, then click.
- Select the host groups to which the policy is to be applied, then click.
- Click.
SCAP Content
tab provides the name of the SCAP content file which will be distributed to the directory /var/lib/openscap/content/
on all target hosts.
5.3.2. Viewing a Policy
Procedure 5.6. To View a Policy:
- In the Satellite web UI, navigate to→ .
- Click.
5.3.3. Editing a Policy
Procedure 5.7. To Edit a Policy:
- In the Satellite web UI, navigate to→ .
- From the drop-down list to the right of the policy's name, select.
- Edit the necessary attributes.
- Click.
5.3.4. Deleting a Policy
- In the Satellite web UI, navigate to→ .
- From the drop-down list to the right of the policy's name, select.
- Clickin the confirmation message.
5.3.5. Adding a Policy to a Host
- In the Satellite web UI, navigate to→ .
- Select the host or hosts to which you want to add the policy.
- Click.
- In the new panel that opens, select the appropriate policy from the list of available policies and click.
5.4. Monitoring Compliance
- Verifying policy compliance.
- Detecting changes in compliance.
5.4.1. Compliance Policy Dashboard
- A ring chart illustrating a high-level view of hosts' compliance with the policy.
- A statistical breakdown of hosts' compliance with the policy, in tabular format.
- Links to the policy's latest report for each host.
Failed
statistic provides a useful metric for prioritizing compliance effort. Those hosts detected as Never audited
should also be a priority, since their status is unknown.

Figure 5.1. Compliance Policy Dashboard
5.4.2. Compliance Reports Overview

Figure 5.2. Compliance Reports Overview
5.4.3. Searching Compliance Reports
and
, not
and has
. Regular expressions are not valid search criteria, however multiple fields can be used in a single search expression.
Logical Operators
not
: Negates an expression.has
: Object must have a specified property.and
: Combines search criteria.
The following search criteria finds all compliance reports for which more than five rules failed.
failed > 5
prod-
. host ~ prod- AND date > "Nov 5, 2015"
rhel7_audit
from an hour ago.
"1 hour ago" AND compliance_policy = date = "1 hour ago" AND compliance_policy = rhel7_audit
You can bookmark a search, allowing you to apply the same search criteria again.
Procedure 5.8. To Bookmark a Search:
- Apply your search criteria.
- From the Search list select Bookmark this search.
- Complete the Name field.If you want the bookmark available to other users of this Satellite instance, select the Public check box.
- Click.
5.4.4. Viewing a Compliance Report
- Introduction
- Evaluation Characteristics
- Compliance and Scoring
- Rule Overview
5.4.4.1. Evaluation Characteristics
Evaluation Characteristics
-
Target machine
- The fully-qualified domain name (FQDN) of the evaluated host. Example:
test-system.example.com
. -
Benchmark URL
- The URL of the SCAP content against which the host was evaluated. Example:
/var/lib/openscap/content/1fbdc87d24db51ca184419a2b6f
. -
Benchmark ID
- The identifier of the benchmark against which the host was evaluated. A benchmark is a set of profiles. Example:
xccdf_org.ssgproject.content_benchmark_RHEL_7
. -
Profile ID
- The identifier of the profile against which the host was evaluated. Example:
xccdf_org.ssgproject_content_profile_rht-ccp
. -
Started at
- The date and time at which the evaluation started, in ISO 8601 format. Example:
2015-09-12T14:40:02
. -
Finished at
- The date and time at which the evaluation finished, in ISO 8601 format. Example:
2015-09-12T14:40:05
. -
Performed by
- The local account name under which the evaluation was performed on the host. Example:
root
.

Figure 5.3. Evaluation Characteristics
5.4.4.2. Compliance and Scoring

Figure 5.4. Compliance and Scoring
5.4.4.3. Rule Overview

Figure 5.5. Rule Overview
5.4.4.4. Examining Rule Results

Figure 5.6. Rule Evaluation Result
Warning
5.4.5. Compliance Email Notifications
- Details of the time period it covers.
- Totals for all hosts by status: changed, compliant, and incompliant.
- A tabular breakdown of each host and the result of its latest policy, including totals of the rules that passed, failed, changed, or where results were unknown.

Chapter 6. Working with Containers
Container
: An application sandbox. Each container is based on an image that holds necessary configuration data. When you launch a container from an image, a writable layer is added on top of this image. Every time you commit a container a new image layer is added to store your changes.Image
: A static snapshot of the container's configuration that is never modified. Any changes made to the container can be saved only by creating a new image layer. Each image depends on one or more parent images.Platform image
: An image that has no parent. Platform images define the runtime environment, packages and utilities necessary for containerized applications to run. The platform image is not writable, so any changes are reflected in the copied images stacked on top of it. For information on how to access Red Hat Enterprise Linux platform images from Red Hat Satellite see Example 6.1, “Creating a Red Hat Enterprise Linux Container in Satellite”.Registry
: A public or private archive that contains images available for download. Some registries allow users to upload images to make them available to others. Red Hat Satellite allows you to import images from local and external registries. Satellite itself can act as an image registry for hosts, however, hosts cannot push changes back to the registry. For more information, see Section 6.1.1, “Creating Containers”Tag
: A mark used to differentiate images in a repository, typically by the version of the application stored in the image. Repositories are used to group similar images in a container registry. Images only have unique alphanumeric identifiers, so naming in form or repository:tag provides a human-readable way of identifying images. For more information, see Section 6.5, “Using Container Tags” and Section 6.2, “Managing Repositories”.
6.1. Managing Containers
Prerequisites
Procedure 6.1. To Prepare a Container Host:
- Prepare a Red Hat Enterprise Linux 7 server for hosting images and enable the
docker
service on this server as described in the Getting Docker in RHEL 7 section of the Get Started with Docker Formatted Container Images on Red Hat Systems guide on the Red Hat Customer Portal[2]. You can deploy the container host either on the same machine as the Satellite Server or independently.Note
Red Hat Enterprise Linux 7 is currently the only supported system for a container host. The docker package is available in the rhel-7-server-extras-rpms repository. Red Hat Enterprise Linux 6 systems are currently not supported to host containers. - Run the following command on the container host to install the Satellite Server's CA certificate:
rpm -Uvh https://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm
Here, satellite.example.com is the fully qualified domain name of your Satellite Server. Skip this step if the container host is already registered as a Satellite host. - Depending on the location of the container host, perform the following tasks:
- If the container host is on the same machine as the Satellite Server:
- Create a docker user group and add the foreman user to it:
# groupadd docker # usermod -aG docker foreman
- Modify the OPTIONS variable in the
/etc/sysconfig/docker
file as follows:OPTIONS='--selinux-enabled -G docker'
- Restart the affected services to apply the changes:
# systemctl restart docker.service # katello-service restart
- If the container host is on a different machine than the Satellite Server:
- Open a port on the container host to communicate with the Satellite Server. To do so, modify the OPTIONS variable in the
/etc/sysconfig/docker
file as follows:OPTIONS='--selinux-enabled -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock'
You can use port2376
if TLS is enabled. - Restart the docker service and verify your settings as follows:
# systemctl restart docker.service # systemctl status docker.service
Procedure 6.2. To Create a Docker Compute Resource:
- Make sure the port 5000 is enabled on the Satellite Server. The container host uses this port to pull images from Content Views on the Satellite Server.
- Create the compute resource as described in Section 9.3.4, “Compute Resources”. Specify the resource URL according to the location of the container host:
- If the container host is on the same machine as the Satellite Server, set unix://var/run/docker.sock as the resource URL.
- If the container host is on a different machine than the Satellite Server, specify the URL in the form of:
http://container_host_fqdn:2375
Here, container_host_fqdn stands for the fully qualified domain name of the container host, and the port number opened on the container host for communication with Satellite can be either2375
or, if using TLS,2376
.
- Clickto test if the container host is available.
- Clickto create the compute resource.
6.1.1. Creating Containers
- Local content: represented by the
Content View
option when creating a container. This option allows you to import an image from a repository that is already present on a Capsule Server in a certain content view and life cycle environment. For more information on how to create and populate a local registry, see Section 6.2, “Managing Repositories”. - Docker Hub: allows you to search the Docker Hub registry and pull images from there. Make sure that you pull only trusted images with verified content.
- External Registry: allows you to import images from a previously created external registry. For more information on creating registries in Red Hat Satellite, see Section 6.3, “Importing External Registries”.
Note
Procedure 6.3. To Create a Container:
- Navigate to→ . Alternatively, navigate to → and click .
- In the Preliminary stage of container creation, configure the following settings:
- On the Compute resource tab, select the compute resource from the Deployed on drop-down menu. For more information on compute resources, see Section 9.3.4, “Compute Resources”.
- On the Locations tab, select the locations where the new container will be available.
- On the Organizations tab, select the organizations where the new container will be available.
Clickto proceed. - In the Image stage of container creation, import an image that will act as a base for your container. This can be a platform image, or a previously created layered image. Select from one of the following options:
- Select the Content View tab to import the image from a life cycle environment. Specify the life cycle environment, content view, repository, tag, and Capsule Server.
- Select the Docker hub tab to import the image from the Docker Hub registry. After you type the image name to the Search field, Satellite automatically searches the compute resource. Click the looking glass icon to search the Docker Hub. Select the image from the list of search results and pick a tag from the drop-down list.
- Select the External registry tab to import the image from an existing registry. Select the registry from the drop-down menu, and search it by the image name. Satellite populates the Tag field with tags available for the selected image name. For more information, see Section 6.3, “Importing External Registries”.
Clickto proceed. - In the Configuration stage of container creation, set the following parameters:
- Provide the container name.
- Specify a command to run inside the container.
- Specify an entrypoint, which is a command that is executed automatically as soon as the container starts. The default entrypoint is
/bin/sh -c
. - Assign CPUs to the container. For example,
0-2,16
represents CPUs 0, 1, 2, and 16. - Define the relative share of CPU time for the container.
- Specify a memory limit for the container. For example,
512m
limits the container memory usage to 512 MB.
Clickto proceed. - In the final stage of container creation named Environment, select if you want to allocate a pseudo-tty, attach STDIN, STDOUT, and STDERR to the container. Click to create a custom environment variable for the container. Select the Run? check box to start the container automatically after it is created.
- Clickto create the container.
Example 6.1. Creating a Red Hat Enterprise Linux Container in Satellite
- Create a custom registry as described in Section 6.3, “Importing External Registries”. Specify registry.access.redhat.com as the registry URL.
- Create a new container as described in Section 6.1.1, “Creating Containers”. In the Image stage of container creation, navigate to the External registry tab and select the registry created in the previous step. Use the search field to find the desired version of the Red Hat Enterprise Linux image. Proceed through the Configuration and Environment stages to finalize the container.
6.1.2. Monitoring Containers
Procedure 6.4. To Investigate a Container:
- Navigate to→ .
- On the Containers page, every Docker compute resource has a dedicated tab. Each of these tabs contains the table of available containers together with selected parameters of each container. Select the tab of the compute resource you want to inspect.
- To view the container metadata, click the name of the container you want to inspect. Satellite displays the table of container properties.
- On the Processes tab, you can view processes that are currently running in the container. Click on the process name to view the metadata of the process.
- If the container is running, you can view its standard output in the Logs tab. If you selected the allocate a pseudo-tty check box when creating a container, the console is interactive. Otherwise, it displays the initial standard output produced when the container started.
6.1.3. Starting, Committing, and Removing Containers
Procedure 6.5. To Start or Stop a Container:
- Navigate to→ to view the list of available containers.
- Clicknext to the container you want to start. After starting the container, the button changes to , which allows for stopping the container. These actions are equivalent to the
docker start
anddocker stop
commands.
Procedure 6.6. To Commit a Container:
- Navigate to→ to view the list of available containers.
- Click the name of the container you want to commit.
- Click. Satellite prompts you to:
- Specify a repository name. This can be a single name or combined with the user name, for example user/my-rhel-image.
- Assign a tag to the image.
- Provide your contact information.
- Provide an informative comment about the image.
- Click.
Note
Procedure 6.7. To Remove a Container:
- Navigate to→ to view the list of available containers.
- Click the name of the container you want to delete.
- Click.
- In the alert box, clickto remove the container.
6.2. Managing Repositories
6.2.1. Creating Repositories
Procedure 6.8. To Create a Docker Repository:
- Navigate to→ . Click , specify the product name and click .
- Select the product you created in the previous step and navigate to the Repositories tab. Click .
- Specify the repository name and select
docker
from the Type drop-down menu. This unlocks additional fields where you specify the URL of the content source you want to synchronize in this registry. Specify which repository you want to pull from the content source in the Upstream Repository Name field.Note
In the previous version of Red Hat Satellite it was possible to upload locally stored container images to the repository. With Red Hat Satellite 6.2, this is no longer possible. - Clickto create the repository. First the URL and repository name is validated, then the repository is created.
6.3. Importing External Registries
Procedure 6.9. To Import an External Registry:
- Navigate to→ . Click .
- On the Registry tab, specify the name and URL of the registry. These settings are required. Optionally, provide a brief description of the registry. Specify a user name and password if required for accessing the registry.
- On the Locations tab, select the locations where the new registry will be available.
- On the Organizations tab, select the organizations where the new registry will be available.
- Clickto create the registry.
6.4. Importing Images to Compute Resources
Procedure 6.10. To Import an Image to a Compute Resource:
- Navigate to→ to view a list of compute resources.
- Select the docker compute resource you want to edit.
- Click.
- Specify the image details including the image name, operating system, architecture, user credentials, and a parent image. Select User data to enable user input for this image.
- Click.
6.5. Using Container Tags
Procedure 6.11. To Search Registries by Tags:
- Navigate to→ .
- Use the search field to filter tags by the image name, tag, or repository name. Automatic suggestion works as you type. For example, the following query searches for tags applied on images from the repository named test_repo:
repository = test_repo
- Click the name of the tag you want to view. Satellite displays a list of images that use this tag.
- Select an image to view its environment and content view version. The Published At field shows the URL that you can use to pull the image from the command line.
centos
to search for all centos tags.
Chapter 7. Configuring Activation Keys
- Associated subscriptions and subscription attach behavior.
- Available products and repositories.
- A life cycle environment and a content view.
- Host collection membership.
7.1. Creating an Activation Key
Procedure 7.1. To Create an Activation Key:
- Click→ .
- Click. Perform the following actions:
- Specify the activation key name. This setting is required.
- Optionally, clear the Unlimited Hosts check box if you want to limit the number of host that can be associated with the activation key. Specify the number in the Limit field. .
- Optionally, enter a suitable description in the Description field. You can also select the Environment and Content View to which this key should apply. For host registration, select a content view that has the
Satellite Tools
repository enabled.
- Clickto create the activation key.
7.2. Defining Subscription Properties of an Activation Key
- Are there any subscriptions associated with the activation key?
- Is the auto-attach option enabled?
- Activation key with no subscriptions specified. With no subscriptions specified and auto-attach enabled, hosts using the activation key search for the best fitting subscription from the ones provided by the Satellite Server. This is akin to running the
subscription-manager --auto-attach
command. - Activation key providing a custom subscription pool for auto-attach. If there are subscriptions specified and auto-attach is enabled, hosts using the activation key select the best fitting subscription from the list specified in the activation key.
- Activation key with the exact set of subscriptions. If there are subscriptions specified and auto-attach is disabled, hosts using the activation key are associated with all subscriptions specified in the activation key.
Note
7.2.1. Adding and Removing Subscriptions
Procedure 7.2. To Add a Subscription to an Activation Key:
- Click→ .
- Click the activation key name you want to edit.
- On the Subscriptions tab, select the Add subtab.
- From the list of available subscriptions, select the subscriptions you want to add.
- Click.
Procedure 7.3. To Remove Subscriptions from an Activation Key:
- Click→ .
- A list of activation keys is displayed. Click the activation key you want to remove subscriptions from.
- Click thetab.
- Under the List/Remove subtab, a list of attached subscriptions is displayed. Select the subscriptions to be removed.
- Click.
7.2.2. Enabling Auto-Attach
Procedure 7.4. To Enable or Disable Auto-Attach on an Activation Key:
- Click→ .
- Click the activation key name that you want to edit.
- Click the Subscriptions tab.
- Click the edit icon next to Auto-Attach.
- Select or deselect the check box to enable or disable auto-attach.
- Click Save.
Note
7.2.3. Setting the Service Level
Procedure 7.5. To Set the Service Level on an Activation Key:
- Click→ .
- Click the activation key name you want to edit.
- Click the Details tab.
- Click the edit icon next to Service Level.
- Select the required service level from the drop-down list. The drop-down list only contains service levels available to the activation key.
- Click Save.
7.3. Editing Activation Keys
7.3.1. Adding and Removing Host Collections
Procedure 7.6. To Add Host Collections to an Activation Key:
- Click→ .
- Click the activation key that you want to add a host collection to.
- On the Host Collections tab click the Add subtab to display the list of available host collections.
- Select the host collections you want to add, and then click.
Procedure 7.7. To Remove Host Collections from the Activation Key:
- Click→ .
- A list of activation keys is displayed. Click the activation key you want to remove host collections from.
- Click thetab.
- Under List/Remove subtab, a list of host collections attached to the activation key is displayed. Select the check box of the host collections you want to remove.
- Clickto remove host collections from the activation key.
7.3.2. Editing Product Content
Procedure 7.8. To Edit Product Content on an Activation Key:
- Click→ .
- Click the activation key name that you want to edit.
- Click the Product Content tab to view the products and repositories associated with the activation key through subscriptions.
- Click the edit icon next to the repository you want to edit.
- From the drop-down menu, select if the repository will be enabled or disabled. Click Save to apply the change.
7.3.3. Setting a Life Cycle Environment and a Content View
Procedure 7.9. To Set a Life Cycle Environment and a Content View for an Activation Key:
- Click→ .
- Click the activation key name that you want to edit.
- Click the check box next to the environment you want to associate with the activation key. Select a content view from the drop-down menu.
- Click.
7.4. Removing an Activation Key
Procedure 7.10. To Remove an Activation Key:
- Click→ .
- Click the activation key name that you want to remove.
- In the upper right of the Activation Key details panel, click .
- In the alert box, clickto confirm that you want to remove the key.
7.5. Automated Host Registration with Activation Keys
subscription-manager
utility during host registration on the Satellite Server. Note that the version of the subscription-manager
utility installed must be 1.10 or higher. Prepare the host as described in Section 10.5.1, “Configuring a Host for Registration”, then follow the steps outlined in Procedure 7.11, “To Automatically Register a Host with an Activation Key:”.
Procedure 7.11. To Automatically Register a Host with an Activation Key:
- Clear any old registration data from the system:
# subscription-manager clean
- Download and install a copy of the CA Certificate for the host from the Satellite Server:
# rpm -Uvh http://satellite.example.com/pub/katello-ca-consumer-latest.noarch.rpm
- Register the system to the required organization on the Satellite Server. Use the --activationkey flag to register the system using the activation key. Enter the user authentication details when prompted.
# subscription-manager register --org "Default_Organization" --activationkey "Test_Key"
- When the system is registered, it gains access to repository content but administrators will not be able perform package and errata management until the Katello agent has been installed on the client system. To do so, execute:
# yum install katello-agent
Combining Multiple Activation Keys for Host Registration
# subscription-manager register --org "ACME" --activationkey "ak-VDC,ak-OpenShift"
- Settings that conflict: Service Level, Release Version, Environment, Content View, and Product Content.
- Settings that do not conflict and the host will get the union of them: Subscriptions and Host Collections.
- Settings that influence the behavior of the key itself and not the host configuration: Content Host Limit and Auto-Attach.
Chapter 8. Configuring GPG Keys
8.1. Creating a GPG Key
Procedure 8.1. To Add a GPG Key to Satellite:
- Click→ and then click .
- In the Name field enter a name for the GPG key.
- Either upload the GPG key file or paste the GPG key contents into the text box.
- Clickto add the GPG key to Satellite.
8.2. Removing a GPG Key
Procedure 8.2. To Remove a GPG Key:
- Click→ .
- Click the GPG key that you want to remove, and then click.
- In the confirmation box, clickto confirm that you want to remove the selected key.
Chapter 9. Configuring the Provisioning Environment
9.1. Creating a Host Group
Procedure 9.1. To Add a Host Group to Satellite:
- Click New Host Group.→ and then click
- Enter the required details for the Host Group, and then click.
The following table describes the attributes that apply to Satellite Host Groups.
Submenu
|
Options
|
Description
|
---|---|---|
Host Group
|
Parent
|
The parent Host Group for the new Host Group.
|
Name
|
The name of the Host Group.
| |
Life Cycle Environment
|
The environment containing this Host Group.
| |
Puppet CA
|
The Red Hat Satellite Capsule Server to use for the Puppet CA server.
| |
Puppet Master
|
The Red Hat Satellite Capsule Server to use as the Puppet Master.
| |
Puppet Classes
|
Included Classes
|
The Puppet Classes included with the Host Group.
|
Available Classes
|
The Puppet Classes available to use with the Host Group.
| |
Network
|
Domain
|
The domain for hosts in the Host Group.
|
Subnet
|
The subnet for hosts in the Host Group.
| |
Operating System
|
Architecture
|
The default architecture for systems in the Host Group.
|
Operating Systems
|
The default operating system for systems in the Host Group.
| |
Media
|
The location of the installation media for the operating system.
| |
Partition Table
|
A file system partition layout for the operating system installation.
| |
Root Password
|
The root password for the operating system.
| |
Parameters
|
Add Parameter
|
Provides a Name and Value pair to set parameters for the Host Group.
|
Organizations
|
Organizations
|
The organizations that own this host group.
|
Activation Keys
|
Content Environment
|
Defines the activation keys made available in templates as
@host.params['kt_activation_keys'] .
|
9.2. Parameters
Types of Parameters
- Simple Parameters
- String parameters that define a relationship between a key and value pair. They cannot be overridden by user configuration, but they are overridden according to Satellite's parameter hierarchy. The following parameters are simple parameters in Red Hat Satellite: Global, organization-level, location-level, domain-level, operating system level, host group, and host parameters.
- Smart Parameters
- Complex parameters that define a value for a key but allow conditional arguments, validation, and overrides for specific object types. Smart parameters enable a Puppet class to get external data. They are used in Puppet Classes called parameterized classes in Puppet terminology. The hierarchy for these parameters can be configured the in the web UI.
- Global Parameters
- Default parameters that apply to every host in Satellite. Configured in→ .
- Organization-level parameters
- Parameters that affect all hosts in a given organization. Organization-level parameters override Global parameters. Configured in→ → → .
- Location-level parameters
- Parameters that affect all hosts in a given location. Location-level parameters override Organization-level and Global parameters. Configured in→ → →
- Domain Parameters
- Parameters that affect all hosts in a given domain. Domain parameters override Location-level and higher parameters. Configured in→ → → .
- Operating System Level Parameters
- Parameters that affect all hosts with a given operating system. Operating system level parameters override Domain and higher parameters. Configured in→ → → .
- Host Group Parameters
- Parameters that affect all hosts in a given Host Group. Host Group parameters override Operating system level and higher parameters. Configured in→ → → .
- Host Parameters
- Parameters that affect a specific host. All previously inherited parameters are visible on the Parameters subtab and can be overridden. Configured in→ → → .
Using Parameters with Puppet Classes
- Smart Variables
- A tool to provide global parameters to the Puppet Master, in key-value form, for classes that do not have Smart parameters. They enable overriding parameter values in a Puppet manifest. They are intended for use when a class does not have Smart parameters or in special cases when a global parameter is desired. They can have multiple possible values, all depending on hierarchical context or various conditions a user can apply. They existed before Puppet had parameterized classes and today are kept either for backward compatibility or for the use of global parameters where you want validations, to use only with specific Puppet classes, and for types other than string (because otherwise you could just use the simple parameters).
- Parameterized Classes
- Puppet classes containing Smart parameters. The classes are imported from the Puppet Master and the name of the parameter, for example
$::name
(preferred) or$name
, is defined by the person who wrote the class and cannot be changed. They enable you to decide the value of the variable for a specific class rather than globally.
/etc/foreman/settings.yaml
configuration file because they are overwritten the next time you run the satellite-installer
command.
Important
Parametrized_Classes_in_ENC
is set to True
.
9.2.1. Creating a Global Simple Parameter
Procedure 9.2. To Create a Global Simple Parameter:
- Click→ .
- Click.
- Type a Name for the parameter's key.
- Enter a Value for the parameter.
- Optionally select if you want the value to be hidden in the web UI.
- Click Submit.
9.2.2. Configuring Smart Variables
Procedure 9.3. To Configure Smart Variables:
- Click→ .
- Select a class from the list.
- Click the Smart Variables tab. This displays a new screen. The left section contains a list of possible parameters the class supports. The right section contains the configuration options for the parameter selected. Click the to add a new parameter. Otherwise, select a parameter from the left-hand list.
- Type a name for the parameter in the Key field.
- Edit the Description text box to add any plain text notes.
- Select the Key type of data to pass. This is most commonly a string, but other data types are supported.
- Enter a Default Value for the parameter to be sent to the Puppet Master if no host match occurs.
- Optionally select Hidden value if the field contains data you do not want to be displayed while you are working.
- Use the Optional Input Validator section to restrict the allowed values for the parameter. Choose a Validator type (either a list of comma separated values or a regular expression, regexp) and input the allowed values or regular expression code in the Validator rule field.
- The Prioritize attribute order section provides options for overriding values for specific hosts based upon conditional arguments. The attribute type and its value is known as a matcher.
- Set the Order of precedence in which the host attributes or Facts are to be evaluated against the matchers by arranging the entries in the list. You can add to the default list. To create a logical AND condition between matchers, arrange them on one line as a comma separated list.
- Click Order list. If no matcher is configured then only the default value can be used for the override feature.to add a conditional argument. The attributes to match against should correspond to the entries in theFor example, if the desired value of the parameter to be supplied to the Puppet Master is
test
for any host with a fully qualified domain name ofserver1.example.com
, then specify the matcher asfqdn=server1.example.com
and the Value astest
.The precedence for matching is as follows:It is recommend to use an attribute that is present in Facter and cannot be confused with a host attribute. Host attributes can be either host parameters or associations to the host, such as host group, domain, and organization. The matcher must only be something the host has one of, for example config group cannot be used because the host can have many config groups but a host only has one location so location is a valid matcher.- If the matcher is a host attribute, use that.
- If there are no attributes with that name, look for a matching host parameter (which is inherited according to the parameter hierarchy).
- If there is still no match, check the host Facts.
Dynamic data is possible by using parameters and Puppet Facts in the Value field in Embedded Ruby (ERB) template syntax. For example, to use a Puppet Fact as part of the value:<%= @host.facts['network_eth0'] %>
To list available Puppet Facts navigate to → .
- Clickto save your changes.
9.2.3. Importing Parameterized Classes from a Puppet Master
Note
Procedure 9.4. To Import Parameterized Classes:
- In the Satellite web UI, select from the context menu Any Organization and Any Location.
- Click→ .
- Click Import from Host Name to import parameterized classes from your Puppet Master.
- The Puppet Classes page displays with the new classes listed.
9.2.4. Configuring Smart Class Parameters
Procedure 9.5. To Configure Smart Class Parameters:
- Click→ .
- Select a class from the list that has parameters as indicated in the Parameters column.
- Click the Smart Class Parameter tab. This displays a new screen. The left section contains a list of possible parameters the class supports. The right section contains the configuration options for the parameter selected.
- Select a parameter from the left-hand list.
- Edit the Description text box to add any plain text notes.
- Select Override to allow Satellite control over this variable. If the check box is not selected, Satellite does not pass the new variable to Puppet.
- Select the Key type of data to pass. This is most commonly a string, but other data types are supported.
- Enter a Default Value for the parameter to be sent to the Puppet Master if no host match occurs.
- Optionally select Use Puppet Default to not send a value to the Puppet Master unless an override match occurs.
- Optionally select Hidden value if the field contains data you do not want to be displayed while you are working.
- Use the Optional input validator section to restrict the allowed values for the parameter. Choose a Validator type (either a list of comma separated values or a regular expression, regexp) and input the allowed values or regular expression code in the Validator rule field.
- The Prioritize attribute order section will appear if the Override option is selected. This provides options for overriding values for specific hosts based upon conditional arguments. The attribute type and its value is known as a matcher.
- Set the Order of precedence in which the host attributes or Facts are to be evaluated against the matchers by arranging the entries in the list. You can add to the default list. To create a logical AND condition between matchers, arrange them on one line as a comma separated list.
- Click Order list. If no matcher is configured then only the default value can be used for the override feature.to add a conditional argument. The attributes to match against should correspond to the entries in theFor example, if the desired value of the parameter to be supplied to the Puppet Master is
test
for any host with a fully qualified domain name ofserver1.example.com
, then specify the matcher asfqdn=server1.example.com
and the Value astest
.The precedence for matching is as follows:It is recommend to use an attribute that is present in Facter and cannot be confused with a host attribute.- If the matcher is a host attribute, use that.
- If there are no attributes with that name, look for a matching host parameter (which is inherited according to the parameter hierarchy).
- If there is still no match, check the host Facts.
Dynamic data is possible by using parameters and Puppet Facts in the Value field in Embedded Ruby (ERB) template syntax. For example, to use a Puppet Fact as part of the value:<%= @host.facts['network_eth0'] %>
To list available Puppet Facts navigate to → .
- Clickto save your changes.
9.3. Configuring Provisioning Settings
9.3.1. Domains
Procedure 9.6. To Create a Domain:
- Click→ .
- Click Domain tab, specify the following settings:. On the
- Specify a Name for the Domain. This is the required DNS domain name.
- Type a Description for the Domain.
- Select a DNS-enabled Capsule Server.
- On the Parameters tab, specify domain parameters.
- On the Locations tab, select locations for the domain.
- On the Organizations tab, select organizations for the domain.
Important
Ensure that the Locations and Organizations are configured as they will help with future debugging. - Click.
9.3.2. Subnets
9.3.2.1. Creating a Subnet
Procedure 9.7. To Create a Subnet:
- Click→ .
- Click New Subnet. On the Subnet tab, specify the following settings:
- Specify a Name, Network address (IP address), and Network mask for the subnet. These settings are required.
- Optionally, specify the Gateway address, Primary DNS server, Secondary DNS server, and VLAN ID. Note that the gateway address and DNS server settings are optional only with IPAM and Boot modes set to DHCP (default). If you decide to change these default modes, you also have to specify gateway and DNS.You can also select the IPAM mode (DHCP, Internal DB, or None) and define the IP assignment range with the Start of IP range and End of IP range fields.
- Select the default Boot mode for the subnet (DHCP or Static).
- On the Domains tab, select the applicable domains for the subnet.
- On the Capsules tab, select the Capsule Servers to be used for hosting the DHCP Proxy, TFTP Proxy, DNS Proxy, and Discovery Proxy services.
- On the Locations tab, select locations for the subnet.
- On the Organizations tab, select organizations for the subnet.
Important
Ensure that the Locations and Organizations are configured as they will help with future debugging. - Click.
9.3.3. Architectures
Procedure 9.8. To Create an Architecture:
- Click New Architecture.→ and then click
- Specify a Name for the architecture.
- Select any Operating Systems that include this architecture. If none are available, you can create and assign them under → .
- Click.
9.3.4. Compute Resources
Procedure 9.9. To Add a Compute Resource:
- Navigate to→ .
- Click New Compute Resource. On the Compute Resource tab, specify the following settings:
- Specify a Name and a Provider type for the Compute Resource. Optionally, insert a Description.
- Depending on the provider type chosen, the next few fields ask for authentication and datacenter details. Refer to the following table for more information about each provider type.
Table 9.2. Provider Settings TypeDescriptionRHEVSuits Red Hat Enterprise Virtualization environments. Requires the URL of the Manager API, a valid Username and Password, and a Datacenter on the system to abstract compute resources. Click Load Datacenters to populate the drop-down menu. Optionally, you can specify a Quota ID and provide one or more certificate authorities in the X509 Certification Authorities field.LibvirtSuits Libvirt-based environments. Requires the URL of the virtual machine. Select the Display type. Click to test if the virtual machine is available. Select Console passwords to set a randomly generated password on the display connection.VMwareSuits VMware-based environments. Requires the host name of the VCenter/Server, a valid VMware Username and Password, and a Datacenter to abstract compute resources. Click Load Datacenters to populate the drop-down menu. You can specify a certificate Fingerprint and select Console passwords to set a randomly generated password on the display connection.RHEL OpenStack PlatformSuits OpenStack-based environments. Requires the URL of the OpenStack server, a valid OpenStack Username and Password, and a Tenant to abstract compute resources. Click Load Tenants to populate the drop-down menu.RackspaceSuits Rackspace public cloud accounts. Requires the URL of the Rackspace API, a valid Rackspace Username and API Key, and a Region to abstract compute resources. Click to make sure your connection to the chosen region is valid.EC2Suits Amazon EC2 public cloud accounts. Requires the Access Key and Secret Key available from any valid Amazon EC2 account. Requires a Region to act as a Datacenter for resource abstraction. Click to populate the selection drop-down menu.GoogleSuits Google Compute Engine public cloud accounts. Requires the Google Project ID, a valid Client Email and a Certificate path to the p12 file. You can also specify a Zone to abstract compute resources. Click to populate the drop-down menu.DockerSuits container registries. Requires the URL of the internal or external compute resource. Optionally, specify a Username, Password, and a contact Email. Click to test if the connection is available.
- On the Locations tab, select desired locations to add them to the Selected Items list.
- On the Organizations tab, select the desired organizations to add them to the Selected Items list.
Important
Ensure that the Locations and Organizations are configured as they will help with future debugging. - Click.
9.3.5. Configuring Libvirt as a Compute Resource
# yum install qemu-kvm libvirt virt-manager
- If the web UI browser is running on separate system to
virt-manager
, proceed to Procedure 9.11, “To Configure SSH Access to Libvirt:”. - If the web UI browser is running on the same system as
virt-manager
, complete the following procedure to add a Libvirt compute resource.
Procedure 9.10. To Add a Libvirt Compute Resource:
- Navigate to→ .
- Click New Compute Resource. On the Compute Resource tab, specify the following settings:
- Specify a Name and from the Provider drop-down menu, select Libvirt as the type for the Compute Resource. Optionally, insert a Description.
- In thefield, enter a string as follows:
qemu:///system
- From thedrop-down menu, select .
- Optionally select thecheck box if this compute resource will only be used for new Libvirt guests. This option cannot be used together with previously configured Libvirt guests.
- Click. If the connection is successful the button turns green.
- Clickto save the configuration.
- Select thetab. Previously configured Libvirt guests will be shown.
Procedure 9.11. To Configure SSH Access to Libvirt:
- Ensure the SSH file permissions and SELinux context for the
foreman
user are correct:#
ls -Zd /usr/share/foreman/.ssh
drwx------. foreman foreman system_u:object_r:ssh_home_t:s0 /usr/share/foreman/.ssh - Create SSH keys for the
foreman
user:#
su - foreman -s /bin/bash
-bash-4.2$ssh-keygen
Generating public/private rsa key pair. Enter file in which to save the key (/usr/share/foreman/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /usr/share/foreman/.ssh/id_rsa. Your public key has been saved in /usr/share/foreman/.ssh/id_rsa.pub. The key fingerprint is: 07:47:a9:23:d2:fe:2f:07:fb:55:75:46:3e:8e:6e:69 foreman@satellite.example.com The key's randomart image is: +--[ RSA 2048]----+ | .. .| | .. o | | . ... .=| | . o oo ooo| | o .S.. ... | | . .. ... | | . o .E | | + ..o | | =o | +-----------------+ - Copy the
SSH
public key to the remote hypervisor system. For example, if your Libvirt host is kvm.example.com:-bash-4.2$
ssh-copy-id root@kvm.example.com
The authenticity of host 'kvm.example.com (192.168.1.2)' can't be established. ECDSA key fingerprint is 78:79:41:d0:b8:40:d5:4a:6d:7f:22:03:bd:cd:a0:dd. Are you sure you want to continue connecting (yes/no)? yes /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys foreman@192.168.1.2's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'root@kvm.example.com'" and check to make sure that only the key(s) you wanted were added. - Make an
SSH
connection to the remote system to confirm that no password prompt appears:-bash-4.2$
ssh root@kvm.example.com
You should not be prompted for the password. The public key can be found in the.ssh/authorized_keys
file on the remote system. Exit after successfully logging in and checking the keys:-bash-4.2$
exit
- In the web UI, navigate to→ and click .
- In thefield enter a suitable name.
- From thedrop-down menu, select .
- In thefield, enter a string in the following format:
qemu+ssh://root@kvm.example.com/system
Where kvm.example.com is the FQDN of your Libvirt host. - From thedrop-down menu, select .
- Optionally select thecheck box if this compute resource will only be used for new Libvirt guests. This option cannot be used together with previously configured Libvirt guests.
- Click. If the connection is successful the button turns green.
- Clickto save the configuration.
- Select thetab. Previously configured Libvirt guests will be shown.
Procedure 9.12. To Configure the noVNC Console:
Prerequisites:
- SSH keys must be configured for the
foreman
user on the Satellite Server's base system (as explained previously). - Existing Libvirt guests must be configured to use VNC server as the display type, the port settings set to
Auto
, and no VNC password selected.
- On the hypervisor host system, configure the firewall to allow
VNC
service on ports5900 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
- In the browser used for the web UI, trust the Satellite Server certificate as follows:
- Visit the public downloads page of the Satellite Server, for example
https://satellite.example.com/pub/
, and click the certificate filekatello-server-ca.crt
. - Select to trust the certificate for identifying websites.
- In the browser used for the web UI, disable HTTP strict transport security (HSTS). HSTS is described in RFC 6797. For example, in Firefox, enter
About:Config
in the browser address bar and set the following boolean toTrue
:network.websocket.allowInsecureFromHTTPS
- Ensure you are using the FQDN in the browser for the web UI. NoVNC will not work if the domain name in the URL does not match the CN value in the certificate, which should be the same as the FQDN. Use a command as follows to check the CN value:
#
openssl x509 -text -noout -in /etc/pki/katello/certs/katello-apache.crt | grep CN
Issuer: C=US, ST=North Carolina, L=Raleigh, O=Katello, OU=SomeOrgUnit, CN=satellite.example.com Subject: C=US, ST=North Carolina, O=Katello, OU=SomeOrgUnit, CN=satellite.example.com output truncated - Navigate to+ . Select the name of a Libvirt resource. On the tab, select the name of a Libvirt guest. Ensure the machine is powered on and then select . The console window appears after the noVNC handshake completes.
9.3.6. Hardware Models
Procedure 9.13. To Create a Hardware Model:
- Click→ .
- Click.
- Specify a Name for the Hardware Model.
- For SPARC builds, insert the CPU Hardware model and Vendor class. Other architectures do not require values in these fields.
- Type a description of the Hardware Model in the Information field.
- Click.
9.3.7. Installation Media
Procedure 9.14. To Add an Installation Medium:
- Click→ .
- Click New Medium. On the Medium tab, specify the following settings:
- Type a Name for the Installation Media. This setting is required.
- Type a Path to the Installation Medium. Options include either a URL or a valid NFS server. This setting is required.
- Select an Operating System Family to define the type of the Installation Medium.
- On the Locations tab, select the desired locations to add them to the Selected Items list.
- On the Organizations tab, select the desired organizations to add them to the Selected Items list.
Important
Ensure that the Locations and Organizations are configured as they will help with future debugging. - Click.
9.3.8. Partition Tables
Procedure 9.15. To Create a Partition Table:
- Click→ .
- Click.
- Type a Name for the partition table.
- Optionally select Default. This check box defines if the partition is automatically associated with new organizations or locations.
- Optionally select Snippet. This check box defines if the partition is a reusable snippet for other partition table layouts.
- Select the operating system from the Operating system family drop-down list.
- Specify the Layout of the partition table. You can enter the layout in the text area under Template editor or click Choose File to upload a template file.
Note
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. - Use the Audit Comment field to add a summary of changes to the partition layout.
- Click.
9.3.9. Provisioning Templates
Procedure 9.16. To Create a Provisioning Template:
- Click→ .
- Click New Template. On the Provisioning Template tab, specify the following settings:
- Specify a Name for the template.
- Insert your template in the Template editor field. Alternatively, click to upload the template. This replaces the content in the Template editor field with the content of your chosen file.
- Optionally, type a comment in the Audit Comment field. Satellite adds the comment to the template history to track changes. View the template history under the History tab.
- On the Type tab, select Snippet to store the template code without defining it as particular script or template type, or select the type from the Type drop-down menu.
- On the Association tab, select host groups, environments and operating systems to be associated with the template. Select the operating systems from the Applicable Operating Systems list. Click and select a Hostgroup and Environment to limit the template's use. Note that associations are not available for templates of type snippet.
- On the Association tab, you can view the history of existing templates. No history is available when creating a new template.
- On the Locations tab, select locations for the template.
- On the Organizations tab, select organizations for the template.
Important
Ensure that the Locations and Organizations are configured as they will help with future debugging. - Click.
9.3.10. Configuring gPXE to Reduce Provisioning Times
HTTP
to reduce download time. To make use of gPXE, proceed as follows:
- On systems configured to be a
TFTP
server, copy/usr/share/syslinux/gpxelinuxk.0
to/var/lib/tftpboot
. - In the
PXE Handoff
section of/etc/dhcp/dhcpd.conf
, change theDHCP
filename
option frompxelinux.0
togpxelinuxk.0
. - Create provisioning templates as follows and then assign them, together with the default template, to the operating systems.
Procedure 9.17. To Configure a gPXE Provisioning Template:
- Click→ .
- Find the templateand select .
- Enter a name, for example,
Kickstart default gPXELinux
. - In the Template editor, search and replace
@initrd
with@host.url_for_boot(:initrd)
- In the Template editor, search and replace
@kernel
with@host.url_for_boot(:kernel)
- Select thetab. From the drop-down menu, select .
- On the Association tab, select host groups, environments and operating systems to be associated with the template. Select the operating systems from the Applicable Operating Systems list. Click and select a Hostgroup and Environment to limit the template's use.
- Click.
9.3.11. Operating Systems
RedHat
family. Families allow Satellite to change certain behaviors when provisioning hosts.
Procedure 9.18. To Add an Operating System:
- Click→ .
- Click New Operating system. On the Operating System tab, specify the following settings:
- Type the Name of the Operating System and its Major Version. These settings are required.
- Optionally, define the Minor Version, select the OS Family, and add a Description of the operating system.
- Select a Root password hash (MD5, SHA256, of SHA512).
- Select the Architectures from the list of available Architectures. If none are available, create and assign them under → as described in Section 9.3.3, “Architectures”.
- On the Partition tables tab, select the applicable file system layouts from the list. For more information on creating partition tables, see Section 9.3.8, “Partition Tables”.
- On the Installation Media tab, select the applicable installation media from the list. For more information on adding installation media, see Section 9.3.7, “Installation Media”.
- On the Templates tab, you can assign provisioning templates when editing an existing operating system. This option is not available when creating a new operating system. For more information on creating provisioning templates, see Section 9.3.9, “Provisioning Templates”.
- On the Parameters tab, you can add parameters for the operating system.
- Click.
9.4. Storing and Maintaining Host Information
- Foreman: Provides for the provisioning and life cycle management of physical and virtual systems. Foreman automatically configures these systems using various methods, including kickstart and Puppet modules.
- Puppet: A client/server architecture for configuring hosts, consisting of the Puppet Master (server) and the Puppet Agent (client).
- Facter: Puppet's system inventory tool. Facter gathers basic information (facts) about hosts such as hardware details, network settings, OS type and version, IP addresses, MAC addresses, SSH keys, and more. These facts are then made available in Puppet manifests as variables.
9.4.1. The Puppet Architecture
- It compiles a catalog
- It applies that catalog to the appropriate host
--noop
parameter had been used, to the Puppet Master, which in turn sends the results to Foreman. This catalog describes the desired state for one specific host. It lists the resources to manage on that host, including any dependencies between those resources. The agent applies the catalog to the host.
/etc/puppet/puppet.conf
file using the runinterval
parameter. You can also run puppet agent apply
to initiate communication manually.
9.4.2. Using Facter and Facts
httpd
service should always be running and Puppet knows how to handle that. If you are managing different operating systems, you can use the osfamily
fact to create conditional expressions to tell Puppet which service to watch or which package to install. You can use the operatingsystemmajrelease
and versioncmp
parameters to create conditional expressions based on different versions of the same operating system. See Example 9.1, “Using Conditional Expressions with Facts” for an example of using conditional expressions.
Example 9.1. Using Conditional Expressions with Facts
if $:: osfamily == 'RedHat' { if $::operatingsystemmajrelease == '6' { $ntp_service_name = 'ntpd' } elseif versioncmp($::operatingsystemmajrelease, '7') >= 0 { $ntp_service_name = 'chrony' } }
Note
9.4.2.1. Displaying Facts for a Particular Host
facter -p
) and also from the web UI ( → ). You can browse the list of facts or use the Search box to search for specific facts. For example, type "facts.
" to display a list of available facts.
Note
Procedure 9.19. To View Facts for a Particular Host:
- On the main menu, click→ and then click the name of the host that you want to inspect.
- In the Details pane, click to display all known facts about the host.
Note
- For any fact listed on this page, you can clickto display a chart of the distribution of this fact name over all managed hosts.
- You can bookmark a search to make it easier to use in the future. When you have refined your search, click the drop-down arrow next to thebutton, and click . Bookmarked searches appear in the drop-down list, and also under → on the main menu.
9.4.2.2. Searching for Hosts based on Facts
facts.architecture = x86_64
.
Procedure 9.20. To Search for Hosts Based on Facts:
- On the main menu, click Fact Values page.→ to display the
- In the Search field, start typing the name of the fact that you want to filter by. You can search by specific name, name/value pairs, and so on.
- Clickto retrieve the list of matching hosts.
9.4.2.3. Custom Fact Reporting
- The manifest
pkginventory
is obtained from Puppet Forge and saved to the base system. - The Puppet module is added to a content view and then this is promoted to a system and deployed to that system.
- The facts for the system are then queried using a package name. In this example, for a host called hostname and using a Satellite user with credentials username and password, the following API query would return the facts that matched the search string "bash":
curl -u username:password -X GET http://localhost/api/hosts/:hostname/facts?search=bash {"hostname":{"pkg_bash":"4.2.45-5.el7_0.4"}}
The search returns the package version. This could then be used to populate an external database.
Adding the pkginventory Puppet Module
pkginventory
Puppet module to the Red Hat Satellite Server application, download the module from https://forge.puppetlabs.com/ody/pkginventory to the base system where the Satellite Server application is installed and then follow the procedures below.
Procedure 9.21. To Upload a Puppet Module to a Repository:
- Download the Puppet module to the base system. Modules that are downloaded will have a
.tar.gz
extension. - Click Name field associated with the Puppet module repository. For example, Custom Products.→ and then click the product name in the
- On the Repositories tab, select the Puppet Modules repository you want to modify. For example, Puppet Modules.
- In the Upload Puppet Module section, click , and navigate to the module that you downloaded.
- Click.
Procedure 9.22. To Add a Module to a Content View:
- Click→ and then select a content view from the menu.
- On the Puppet Modules tab, click . A list of installed modules appears.
- From the Actions column, click to select the module you want to add. A table of available versions appears.
- Clicknext to the version of the module that you want to add.
- Clickto create the new Content View.
- Optionally add a description and click.
Chapter 10. Configuring Hosts
10.1. Browsing Hosts
- All Hosts - a list of all hosts recognized by the Satellite Server.
- Discovered Hosts - a list of bare-metal hosts detected on the provisioning network by the Discovery plug-in.
- Content Hosts - a list of hosts which manage tasks related to content and subscriptions.
- Host Collections - a list of user-defined collections of hosts used for bulk actions such as Errata Installation.
dev-node.example.com
, click the Content Hosts page, type dev-node*
in the Search field. Alternatively, *node*
will also find the content host dev-node.example.com.
10.2. Host Status Types
Icon | Status | Description |
---|---|---|
![]() | Error | An error has been detected on the host. If you hover the mouse over the error icon, a tooltip showing the actual reason of the error will appear. You can see a more detailed report of issues by clicking on the host. |
![]() | Warning | The host has been configured, but no reports have been collected for that host over the last reporting interval. |
![]() | OK | There are no pending actions on the host, no pending changes, and no errors over the last reporting interval. |
10.3. Host Overview
Details
- Audits: a page containing audit entries for the current host.
- Facts: a page containing a list of facts for the current host. This button is only available after the installer has collected facts from the host.
- Reports: a page containing a list of reports for the current host. This button is only available after the installer has collected reports from the host.
- YAML: a page containing details about the host in YAML format, such as its IP address, MAC address, name, and values of parameters that have been applied to the host.
- Properties: a list of general details about the host, such as its IP address, MAC address, and the operating system entry that has been applied to the host.
- Metrics: a table showing a summary of all events reported for the host.
- Templates: a list of all provisioning templates currently accessible by the host. The provisioning templates include in this list are automatically configured in accordance with the operating system entry applied to the host.
- NICs: a table showing detailed information on NICs configured for the host.
Host Actions
- Run Job: allows running jobs on the host. For more information on running jobs see Chapter 12, Running Jobs on Satellite Hosts.
- Boot disk: a menu that allows you to select the boot disk for the host. For more information on creating a boot ISO for a host see Creating New Hosts with PXE-less Provisioning in the Red Hat Satellite Provisioning Guide.
- Edit: opens the host details page which allows you to configure settings for the host. Note that the installer configures all the settings automatically and normally no manual configurations are required.
- Build: flags the host to be provisioned on the next host boot. Note that the installer manages all aspects of the provisioning process and normally there is no need to provision hosts manually.
- Delete: deletes the host from the user interface.
Host Graphs
- Runtime: tracks two data points: Config Retrieval and Runtime. The Config Retrieval data point represents the amount of time taken to collect information about the host during a given Puppet run, and the Runtime data point represents the amount of time required to execute the Puppet run. Both data points are measured in seconds.
- Resources: tracks the number of actions performed on the host during a Puppet run. The categories displayed in this graph are identical to those displayed in the Reports page, and are measured using the number of actions in each category.
10.4. Creating a Host
Procedure 10.1. To Create a Host:
- Click→ .
- On the Host tab, enter the required details.
- On the Puppet Classes tab, select the Puppet classes you want to include.
- On the Interfaces tab:
- For each interface, click Actions column and configure the following settings as required:in the
- Type — For a Bond or BMC interface, use the Type list and select the interface type.
- MAC address — Enter the MAC address.
- Identifier — Enter the device name as a device identifier.
- DNS name — Enter the DNS name that is known to the DNS server. This is used for the host part of the FQDN.
- Domain — Select the domain name of the provisioning network. This automatically updates the Subnet list with a selection of suitable subnets.
- Subnet — Select the subnet for the host from the list.
- IP address — If there is a DHCP-enabled Capsule Server on the selected subnet, the IP address is automatically suggested. If required, click Suggest new to generate a different address. Alternatively, you can enter an IP address. The address can be omitted if provisioning tokens are enabled, if the domain does not mange DNS, if the subnet does not manage reverse DNS, or if the subnet does not manage DHCP reservations.
- Managed — Select this check box to configure the interface during provisioning to use the Capsule provided DHCP and DNS services.
- Primary — Select this check box to use the DNS name from this interface as the host portion of the FQDN.
- Provision — Select this check box to use this interface for provisioning. This means TFTP boot will take place using this interface, or in case of image based provisioning, the script to complete the provisioning will be executed through this interface. Note that many provisioning tasks, such as downloading RPMs by anaconda, Puppet setup in a
%post
script, will use the primary interface. - Virtual NIC — Select this check box if this interface is not a physical device. This setting has two options:
- Tag — Optionally set a VLAN tag. If unset, the tag will be the VLAN ID of the subnet.
- Attached to — Enter the device name of the interface this virtual interface is attached to.
- Clickto save the interface configuration.
- Optionally, click Section 10.11, “Configuring an Additional Network Interface” for details.to include an additional network interface. See
- Pressto apply the changes and exit.
- On the Operating System tab, enter the required details. You can select a partition table from the drop-down list or enter a custom partition table in the Custom partition table field. You cannot specify both.
- On the Parameters tab, click Add Parameter to add any required parameters. This includes all Puppet Class Parameters and Host Parameters associated with the host.
- On the Additional Information tab, enter additional information about the host.
- Click Submit to complete your provisioning request.
10.5. Registration
- Download and install the consumer RPM (server.example.com/pub/katello-ca-consumer-latest.noarch.rpm) and then run subscription manager. This method is suited for freshly installed hosts. See Section 10.5.1, “Configuring a Host for Registration” and Section 10.5.2, “Registering a Host” for more information.
- Download and run the bootstrap script (server.example.com/pub/bootstrap.py). This method is suited for both freshly installed hosts and hosts that have been previously registered, for example, to Satellite 5 or another Satellite 6. See Section 10.5.5, “Registering Hosts to Satellite 6 Using The Bootstrap Script” for more information.
10.5.1. Configuring a Host for Registration
Prerequisites
- Hosts must be using the following Red Hat Enterprise Linux version:
- 5.7 or later
- 6.4 or later
- 7.0 or later
- All architectures of Red Hat Enterprise Linux are supported (i386, x86_64, s390x, ppc_64).
- Ensure that the Satellite Servers, any Capsule Servers, and all hosts are synchronized with the same NTP server.
- Ensure that a time synchronization tool is up and running on the Satellite Servers, any Capsule Servers, and the hosts.
- For Red Hat Enterprise Linux 6:
# chkconfig ntpd on; service ntpd start
- For Red Hat Enterprise Linux 7:
# systemctl start chronyd; systemctl enable chronyd
- Ensure that the daemon
rhsmcertd
is running on the hosts.- For Red Hat Enterprise Linux 6:
# service rhsmcertd start
- For Red Hat Enterprise Linux 7:
# systemctl start rhsmcertd
Procedure 10.2. To Configure a Host for Registration:
- Take note of the fully qualified domain name (FQDN) of the Satellite Server or Capsule Server, for example server.example.com.
- On the host, open a terminal and log in as root.
- Install the consumer RPM from the Satellite Server or Capsule Server to which the host is to be registered. The consumer RPM updates the content source location of the host and allows the host to download content from the content source specified in Red Hat Satellite.
# rpm -Uvh http://server.example.com/pub/katello-ca-consumer-latest.noarch.rpm
Important
Any running Docker Daemons will be restarted.Note
katello-ca-consumer-hostname-1.0-1.noarch.rpm is an additional katello-ca-consumer RPM available that contains the server's host name. The katello-ca-consumer-latest.noarch.rpm rpm will always reflect the most updated version. Both serve the same purpose.
10.5.2. Registering a Host
Prerequisites
- Complete all steps in Section 10.5.1, “Configuring a Host for Registration”.
- Ensure that an activation key associated with the appropriate content view and environment exists for the host. If not, see Chapter 7, Configuring Activation Keys for more information. By default, an activation key has the auto-attach function enabled. The feature is commonly used with hosts used as hypervisors.
- Ensure that the version of the
subscription-manager
utility installed is 1.10 or higher. The package is available in the standard Red Hat Enterprise Linux repository.
Procedure 10.3. To Register Hosts:
- On the host, open a terminal and log in as root.
- Clear any old host data related to Red Hat Subscription Manager (RHSM):
# subscription-manager clean
- Register the host using RHSM:
# subscription-manager register --org your_org_name --activationkey your_activation_key
Example 10.1. Command Output after Registration:
# subscription-manager register --org MyOrg --activationkey TestKey-1 The system has been registered with id: 62edc0f8-855b-4184-b1b8-72a9dc793b96
Note
--environment
option to override the content view and life cycle environment defined by the activation key. For example, to register a host to the content view "MyView" in a "Development" life cycle environment:
# subscription-manager register --org your_org_name --environment Development/MyView --activationkey your_activation_key
Note
Procedure 10.4. To Point Red Hat Enterprise Linux 6.3 to the Repository:
- On Red Hat Satellite, select→ .
- Click the name of the host that needs to be changed.
- In the Content Host Content section click the edit icon to the right of Release Version.
- Select "6.3" from thedrop-down menu.
- Click.
10.5.3. Installing the Katello Agent
goferd
service. This service must be enabled so that the Red Hat Satellite Server or Capsule Server can provide information about errata that are applicable for content hosts.
Prerequisites
Satellite Tools
repository. The Red Hat Common
repositories are no longer used and are not compatible with Satellite version 6.1 and later.
Satellite Tools
repository must be enabled, synchronized to the Red Hat Satellite Server and made available to your hosts as it provides the required packages.
Procedure 10.5. To Verify the Satellite Tools Repository is Enabled:
- Open the Satellite web UI, navigate to RPMs tab.→ and click on the
- Find and expand the Red Hat Enterprise Linux Server item.
- Find and expand the Red Hat Satellite Tools 6.2 (for RHEL VERSION Server) (RPMs) item.If the Red Hat Satellite Tools 6.2 items are not visible, it may be because they are not included in the subscription manifest obtained from the Customer Portal. To correct that, log in to the Customer Portal, add these repositories, download the subscription manifest and import it into Satellite.
- Ensure the Enabled check box beside the repository's name is selected. If not, select it.
Satellite Tools
repository for every supported major version of Red Hat Enterprise Linux running on your hosts.
Procedure 10.6. To Install Katello Agent:
- On the host, verify that the
satellite-tools
repository is enabled. If you registered the host using an activation key with auto-attache enabled, the repository is enabled automatically already.# yum repolist enabled | grep -i satellite-tools
If thesatellite-tools
is not enabled, enable it using the following command:# subscription-manager repos --enable=rhel-version-server-satellite-tools-6.2-rpms
- Install the
katello-agent
RPM package using the following command:# yum install katello-agent
- Ensure the
goferd
service is running.- On Red Hat Enterprise Linux 6, enter the following command:
# service goferd start
- On Red Hat Enterprise Linux 7, enter the following command:
# systemctl start goferd
10.5.4. Installing and Configuring the Puppet Agent
Prerequisites
Satellite Tools
repository must be enabled, synchronized to the Red Hat Satellite Server and made available to your hosts as it provides the required packages.
Procedure 10.7. To Verify the Satellite Tools Repository is Enabled:
- Open the Satellite web UI, navigate to RPMs tab.→ and click on the
- Find and expand the Red Hat Enterprise Linux Server item.
- Find and expand the Red Hat Satellite Tools 6.2 (for RHEL VERSION Server) (RPMs) item.If the Red Hat Satellite Tools 6.2 items are not visible, it may be because they are not included in the subscription manifest obtained from the Customer Portal. To correct that, log in to the Customer Portal, add these repositories, download the subscription manifest and import it into Satellite.
- Ensure the Enabled check box beside the repository's name is selected. If not, select it.
Procedure 10.8. To Install and Enable the Puppet Agent:
- On the host, open a terminal console and log in as the
root
user. - Verify that the
satellite-tools
repository is enabled, using the following command:# yum repolist enabled | grep -i satellite-tools
If thesatellite-tools
is not enabled, enable it using the following command:# subscription-manager repos --enable=rhel-version-server-satellite-tools-6.2-rpms
- Install the Puppet agent RPM package using the following command:
# yum install puppet
- Configure the puppet agent to start at boot:
- On Red Hat Enterprise Linux 6:
# chkconfig puppet on
- On Red Hat Enterprise Linux 7:
# systemctl enable puppet
The following conditions must be met before configuring the Puppet Agent:
- The host must be registered to the Red Hat Satellite Server.
- The Satellite Tools repository must be enabled.
- Puppet packages must be installed on the host.
Procedure 10.9. To Configure the Puppet Agent:
- Configure the Puppet agent by specifying the server and environment settings in the
/etc/puppet/puppet.conf
file:# vi /etc/puppet/puppet.conf
[main] # The Puppet log directory. # The default value is '$vardir/log'. logdir = /var/log/puppet # Where Puppet PID files are kept. # The default value is '$vardir/run'. rundir = /var/run/puppet # Where SSL certificates are kept. # The default value is '$confdir/ssl'. ssldir = /var/lib/puppet/ssl ... [agent] # The file in which puppetd stores a list of the classes # associated with the retrieved configuratiion. Can be loaded in # the separate ``puppet`` executable using the ``--loadclasses`` # option. # The default value is '$confdir/classes.txt'. classfile = $vardir/classes.txt pluginsync = true report = true ignoreschedules = true daemon = false ca_server = satellite.example.com server = satellite.example.com environment = KT_Example_Org_Library_RHEL6Server_3 # Where puppetd caches the local configuration. An # extension indicating the cache format is added automatically. # The default value is '$confdir/localconfig'. localconfig = $vardir/localconfig ...
Important
Set theenvironment
parameter to the name of the Puppet environment to which the host belongs. A Puppet environment is a collection of Puppet modules that can be associated with a host or a host group.- To find the host's Puppet environment, navigate to Environment column in the host table.→ and inspect the
- To assign a Puppet environment to a host, navigate to→ and click next to the selected host.
- To list Puppet environments enabled on the Satellite Server, navigate to→ . You can also inspect the
/etc/puppet/environments/
directory on the Satellite Server to find what Puppet modules and manifests are associated with Puppet environments.
For more information see the Red Hat Satellite Puppet Guide. - Run the Puppet agent on the host:
# puppet agent -t --server satellite.example.com
- Sign the SSL certificate for the Puppet client through the Satellite Server web UI:
- Log in to the Satellite Server through the web UI.
- Select→ .
- Selectfrom the drop-down menu to the right of the required Capsule.
- Clickto the right of the required host.
- Enter the
puppet agent
command again:# puppet agent -t --server satellite.example.com
Note
10.5.5. Registering Hosts to Satellite 6 Using The Bootstrap Script
/var/www/html/pub/
directory to make it available to hosts. It can be accessed using a URL in the following form: satellite6.example.com/pub/bootstrap.py
$ less /usr/share/doc/katello-client-bootstrap-version/README.md
Procedure 10.10. Installing the Bootstrap Script on the Host:
root
user, you can place it in /root
and remove it after use, or place it in /usr/local/sbin
. This example will use /root
.
root
, install the bootstrap script on the host as follows:
- Ensure you are in the correct directory. For example, to change to
/root
:# cd
- Download the script:
# wget http://satellite6.example.com/pub/bootstrap.py
This will install the script to the current directory. - Make the script executable:
# chmod +x bootstrap.py
- To confirm that the script can now be run, view the usage statement as follows:
# ./bootstrap.py -h
- Optionally, when the transition process is complete, remove the script:
# cd # rm bootstrap.py
Procedure 10.11. Running the Bootstrap Script
Prerequisites
- The bootstrap script is installed as described previously.
- You have an activation key for your desired hosts. For configuring activation keys, see Chapter 7, Configuring Activation Keys.
- You have created a host group. For creating host groups, see Section 9.1, “Creating a Host Group”.
- Enter the bootstrap command as follows with values suitable for your environment.For the
--server
option, specify the FQDN name of Satellite Server or Capsule Server. For--location
,--organization
, and--hostgroup
options, use quoted names, not labels, as arguments to the options. See Section 10.5.6, “Advanced Bootstrap Script Configuration” for advanced use cases.# bootstrap.py --login=admin \ --server satellite6.example.com \ --location="Example Location" \ --organization="Example Organization" \ --hostgroup="Example Host Group" \ --activationkey=activation_key
The script will prompt you for the password corresponding to the Satellite user name you entered with the--login
option. - The script will run and send notices of progress to
stdout
. Watch for output prompting you to approve the certificate. For example:[NOTIFICATION], [2016-04-26 10:16:00], [Visit the UI and approve this certificate via Infrastructure->Capsules] [NOTIFICATION], [2016-04-26 10:16:00], [if auto-signing is disabled] [RUNNING], [2016-04-26 10:16:00], [/usr/bin/puppet agent --test --noop --tags no_such_tag --waitforcert 10]
The host will wait indefinitely until an administrator approves the Puppet certificate.- In the web UI, navigate to→ .
- Selectto the right of the name of the Capsule corresponding to the FQDN given with
--server
option. - In thecolumn select to approve the host's Puppet certificate.
- Return to the host to see the remainder of the bootstrap process completing.
- In the web UI, navigate to→ and ensure that the host is connected to the correct host group.
10.5.6. Advanced Bootstrap Script Configuration
- Migrating a host from one Satellite 6 to another Satellite 6.
- Use the script with
--force
, and the script will remove the katello-ca-consumer-* packages from the old Satellite and install the katello-ca-consumer-* packages from the new Satellite. For example:# bootstrap.py --login=admin \ --server satellite6.example.com \ --location="Example Location" \ --organization="Example Organization" \ --hostgroup="Example Host Group" \ --activationkey=activation_key \ --force
- Migrating a host from Red Hat Network (RHN) or Satellite 5 to Satellite 6.
- The bootstrap script detects the presence of
/etc/syconfig/rhn/systemid
and a valid connection to RHN as an indicator that the system is registered to a legacy platform. The script then callsrhn-classic-migrate-to-rhsm
to migrate the system from RHN. By default, the script does not delete the system's legacy profile due to auditing reasons. To remove the legacy profile, use--legacy-purge
and use--legacy-login
to supply an user account that has appropriate permissions to remove a profile. Enter the user account password when prompted. For example:# bootstrap.py --login=admin \ --server satellite6.example.com \ --location="Example Location" \ --organization="Example Organization" \ --hostgroup="Example Host Group" \ --activationkey=activation_key \ --legacy-purge \ --legacy-login rhn-user
- Registering a host to Satellite 6, omitting Puppet setup.
- By default, the bootstrap script configures the host for content management and configuration management. If you have an existing configuration management system and do not want to install puppet on the host, use
--skip-puppet
. For example:# bootstrap.py --login=admin \ --server satellite6.example.com \ --location="Example Location" \ --organization="Example Organization" \ --hostgroup="Example Host Group" \ --activationkey=activation_key \ --skip-puppet
- Registering a host to Satellite 6 for content management only.
- To register a system as a content host, and leave out the provisioning and configuration management functions, use
--skip-foreman
. For example:# bootstrap.py --server satellite6.example.com \ --organization="Example Organization" \ --activationkey=activation_key \ --skip-foreman
- Changing the method the bootstrap script uses to download the consumer RPM.
- By default, the bootstrap script uses HTTP to download the consumer RPM (server.example.com/pub/katello-ca-consumer-latest.noarch.rpm). In some environments, it is desired to only allow HTTPS between the host and Satellite. Use
--download-method
to change the download method from HTTP to HTTPS. For example:# bootstrap.py --login=admin \ --server satellite6.example.com \ --location="Example Location" \ --organization="Example Organization" \ --hostgroup="Example Host Group" \ --activationkey=activation_key \ --download-method https
- Providing the host's IP address to Satellite
- On hosts with multiple interfaces or multiple IP addresses on one interface, you may need to override the auto-detection of the IP address and provide a specific IP address to Satellite. Use
--ip
. For example:# bootstrap.py --login=admin \ --server satellite6.example.com \ --location="Example Location" \ --organization="Example Organization" \ --hostgroup="Example Host Group" \ --activationkey=activation_key \ --ip 192.x.x.x
- Enabling Remote Execution on the host.
- Use
--rex
and--rex-user
to enable remote execution and add the required SSH keys for the specified user. For example:# bootstrap.py --login=admin \ --server satellite6.example.com \ --location="Example Location" \ --organization="Example Organization" \ --hostgroup="Example Host Group" \ --activationkey=activation_key \ --rex \ --rex-user root
- Creating a domain for a host at registration time.
- To create a host record, the DNS domain of a host needs to exist in Satellite prior to running script. If the domain does not exist, add it using
--add-domain
. For example:# bootstrap.py --login=admin \ --server satellite6.example.com \ --location="Example Location" \ --organization="Example Organization" \ --hostgroup="Example Host Group" \ --activationkey=activation_key \ --add-domain
- Providing an arbitrary Fully Qualified Domain Name (FQDN) for the host.
- If the host's host name is not an FQDN, or is not RFC compliant (containing a character such as an underscore), the script will fail at the host name validation stage. Use
--fqdn
to specify the FQDN that will be reported to Satellite. To do so, you will need to setcreate_new_host_when_facts_are_uploaded
andcreate_new_host_when_report_is_uploaded
to false usinghammer
. For example,# hammer settings set \ --name create_new_host_when_facts_are_uploaded \ --value false # hammer settings set \ --name create_new_host_when_report_is_uploaded \ --value false
# bootstrap.py --login=admin \ --server satellite6.example.com \ --location="Example Location" \ --organization="Example Organization" \ --hostgroup="Example Host Group" \ --activationkey=activation_key \ --fqdn node100.example.com
10.6. Changing the Group of a Host
- Navigate to→ .
- Select the check box of the host you want to change.
- From the Select Action menu at the upper right of the screen, select Change Group. A new option window will open.
- From the Select Action menu, select the desired group for your host.
- Click Submit.
10.7. Changing the Environment of a Host
- Navigate to→ .
- Select the check box of the host you want to change.
- From the Select Action menu at the upper right of the screen, select Change Environment. A new option window will open.
- From the Select Action menu, select the desired environment for your host.
- Click Submit.
10.8. Managing Hosts
- Navigate to→ .
- Select the host.
- Click Edit.
- Click Manage host or Unmanage host to change the host's status.
- Click Submit to save the changes.
Note
10.9. Assigning a Host to a Specific Organization
- Navigate to→ .
- Select the check box of the host you want to change.
- From the Select Action menu at the upper right of the screen, select Assign Organization. A new option window will open.
- Navigate to the Select Organization menu and choose the desired organization for your host. Select the check box Fix Organization on Mismatch.
Note
A mismatch happens if there is a resource associated with a host, such as a domain or subnet, and at the same time not associated with the organization you want to assign the host to. The option Fix Organization on Mismatch will add such a resource to the organization, and is therefore the recommended choice. The option Fail on Mismatch, on the other hand, will always result in an error message. For example, reassigning a host from one organization to another will fail, even if there is no actual mismatch in settings. - Click Submit.
10.10. Assigning a Host to a Specific Location
- Navigate to→ .
- Select the check box of the host you want to change.
- From the Select Action menu at the upper right of the screen, select Assign Location. A new option window will open.
- Navigate to the Select Location menu and choose the desired location for your host. Select the check box Fix Location on Mismatch.
Note
A mismatch happens if there is a resource associated with a host, such as a domain or subnet, and at the same time not associated with the organization you want to assign the host to. The option Fix Organization on Mismatch will add such a resource to the organization, and is therefore the recommended choice. The option Fail on Mismatch, on the other hand, will always result in an error message. For example, reassigning a host from one organization to another will fail, even if there is no actual mismatch in settings. - Click Submit to complete the assigning of the location to your host.
10.11. Configuring an Additional Network Interface
- VLAN when the host needs to communicate with several (virtual) networks using a single interface, while these networks are not accessible to each other. Another type of virtual interface is alias, which is an additional IP address attached to an existing interface. See Section 10.11.2, “Adding a Virtual Interface”, or Section 10.11.1, “Adding a Physical Interface” for details.: Allows you to specify an additional physical or virtual interface. There are two types of virtual interfaces you can create. Use
- Section 10.11.3, “Adding a Bonded Interface” for details.: Creates a bonded interface. NIC bonding is a way to bind multiple network interfaces together into a single interface that appears as a single device and has a single MAC address. This enables two or more network interfaces to act as one, simultaneously increasing the bandwidth and providing redundancy. See
- Enabling Power Management on Managed Hosts in the Red Hat Satellite Installation Guide for more information on BMC, and Section 10.11.4, “Adding a Baseboard Management Controller (BMC) Interface” for details on configuring a BMC interface.: Baseboard Management Controller (BMC) allows you to remotely monitor and manage physical state of machines. See
Note
/etc/sysconfig/network-scripts/ifcfg-$interface_id
.
Note
10.11.1. Adding a Physical Interface
Procedure 10.12. To Add a Physical Interface:
- Navigate to→ to view available hosts.
- Clicknext to the host you want to edit.
- On the Network tab, click .
- Keep the Interface option selected in the menu.
- Specify a MAC address of the additional interface. This setting is required.
- Specify the device Identifier, for example eth0 or eth1.1. Identifier is used for bonded interfaces (in the Attached devices field, see Procedure 10.14, “To Add a Bonded Interface:”), VLANs and aliases (in the Attached to field, see Procedure 10.13, “To Add a Virtual Interface:”).
- Specify the DNS name associated with the host's IP address. Satellite saves this name in the Capsule Server associated with the selected domain (the "DNS A" field) and the Capsule Server associated with the selected subnet (the "DNS PTR" field). A single host can therefore have several DNS entries.
- Select a domain from the Domain drop-down menu. To create and manage domains, navigate to → .
- Select a subnet from the Subnet drop-down menu. To create and manage subnets, navigate to → .
- Specify the interface IP address. Managed interfaces with assigned DHCP Capsule Server require this setting for creating a DHCP lease. DHCP-enabled managed interfaces provide an automatic suggestion of IP address.
- Decide if the interface will be managed. If the Managed check box is selected, the interface configuration is pulled from the associated Capsule Server during provisioning, and DNS and DHCP entries are created. If using kickstart provisioning, a configuration file is automatically created for the interface.
- Select the Virtual NIC check box to create a virtual interface. See Section 10.11.2, “Adding a Virtual Interface” for details.
- Clickto save the interface configuration, and then click to apply the changes to the host.
10.11.2. Adding a Virtual Interface
- An alias interface automatically inherits a MAC address from the interface it is attached to, therefore you can create an alias without specifying a MAC address.
- The interface must be specified in a subnet with boot mode set to
static
.
Procedure 10.13. To Add a Virtual Interface:
- Navigate to→ to view available hosts.
- Clicknext to the host you want to edit.
- On the Network tab, click .
- Keep the Interface option selected in the menu.
- Specify the general interface settings. The applicable configuration options are the same as for the physical interfaces described in Section 10.11.1, “Adding a Physical Interface”.Specify MAC address for managed virtual interfaces so that the configuration files for provisioning are generated correctly. However, MAC address is not required for virtual interfaces that are not managed.If creating a VLAN, specify ID in the form of eth1.10 in the Identifier field. If creating an alias, use ID in the form of eth1:10.
- Select the Virtual NIC check box. Additional configuration options specific to virtual interfaces are appended to the form:
- Tag: You can specify tags per interface to provide a higher-level segmentation of the network. If left blank, managed interfaces inherit the tag form the VLAN ID of the associated subnet, given that this subnet has the VLAN ID specified. User-specified entries from this field are not applied on alias interfaces.
- Attached to: Specify the identifier of the physical interface to which the virtual interface belongs, for example eth1. This setting is required.
- Clickto save the interface configuration. Then click to apply the changes to the host.
10.11.3. Adding a Bonded Interface
Procedure 10.14. To Add a Bonded Interface:
- Navigate to→ to view available hosts.
- Clicknext to the host you want to edit.
- On the Network tab, click .
- Select Bond from the menu. Additional type-specific configuration options are appended to the form.
- Specify the general interface settings. The applicable configuration options are the same as for the physical interfaces described in Section 10.11.1, “Adding a Physical Interface”. Bonded interfaces use IDs in the form of bond0 in the Identifier field. It is sufficient if you specify a single MAC address in the MAC address field.
- Specify the configuration options specific to bonded interfaces:
- Mode: Select the bonding mode that defines a policy for fault tolerance and load balancing. See Table 10.2, “Bonding Modes Available in Red Hat Satellite” for a brief description of individual bonding modes.
- Attached devices: Specify a comma separated list of identifiers of attached devices. These can be physical interfaces or VLANs.
- Bond options: Specify a space separated list of configuration options, for example miimon=100. There are several configuration options you can specify for the bonded interface, see Red Hat Enterprise Linux 7 Networking Guide for details.
- Clickto save the interface configuration. Then click to apply the changes to the host.
Bonding Mode | Description |
---|---|
balance-rr | Transmissions are received and sent out sequentially on each bonded interface. |
active-backup | Transmissions are received and sent out via the first available bonded interface. Another bonded interface is only used if the active bonded interface fails. |
balance-xor | Transmissions are based on the selected hash policy. In this mode, traffic destined for specific peers will always be sent over the same interface. |
broadcast | All transmissions are sent on all bonded interfaces. |
802.a3 | Creates aggregation groups that share the same settings. Transmits and receives on all interfaces in the active group. |
balance-tlb | The outgoing traffic is distributed according to the current load on each bonded interface. |
balance-alb | Receive load balancing is achieved through Address Resolution Protocol (ARP) negotiation. |
10.11.4. Adding a Baseboard Management Controller (BMC) Interface
Ensure the following prerequisites are satisfied before proceeding:
- BMC is enabled on the Capsule Server. If required, see Procedure 10.15, “To Enable BMC Power Management on an Existing Capsule Server:”.
- The ipmitool package is installed.
- You know the MAC address, IP address, and other details of the BMC interface on the host, and the appropriate credentials for that interface.
Note
You only need the MAC address for the BMC interface if the BMC interface is managed. This is so that it can create a DHCP reservation.
Procedure 10.15. To Enable BMC Power Management on an Existing Capsule Server:
- Use the satellite-installer routine to configure BMC power management on the Capsule Server by running the following command with the following options:
#
satellite-installer --foreman-proxy-bmc=true --foreman-proxy-bmc-default-provider=ipmitool
- Refresh the features for the Capsule Server.
- Log in to the Satellite web UI, and navigate to→ .
- Identify the Capsule Sever whose features you need to refresh. In the drop-down list on the right, click Refresh features. The list of features in the Features column should now include BMC.
Procedure 10.16. To Add a BMC Interface:
- Navigate to→ to view available hosts.
- Clicknext to the host you want to edit.
- On the Network tab, click .
- Select BMC from the menu. Type-specific configuration options are appended to the form.
- Specify the general interface settings. The applicable configuration options are the same as for the physical interfaces described in Section 10.11.1, “Adding a Physical Interface”.
- Specify the configuration options specific to BMC interfaces:
- Username, Password: Specify any authentication credentials required by BMC.
- Provider: Specify the BMC provider.
- Clickto save the interface configuration, and then click to apply the changes to the host.
10.12. Removing a Host
Procedure 10.17. To Remove a Host:
- Click→ or → .
- Choose the hosts to be removed.
- Click Delete Hosts from the drop-down menu.and choose
- A confirmation pop-up box will appear. Selectto remove the host from Red Hat Satellite permanently.
Warning
Procedure 10.18. To Disassociate A Virtual Machine from Satellite without Removing it from a Hypervisor
- In the Satellite web UI, navigate to→ and select the check box to the left of the hosts to be disassociated.
- In the confirmation window:
- Optionally, select the check box to keep the hosts for future action.
- Clickto save your changes.
Chapter 11. Discovering Bare-metal Hosts on Satellite
Satellite Server (Satellite Server Discovery plug-in) <--> Satellite Capsule (Satellite Capsule Discovery plug-in) <--> Discovered Host (Satellite Discovery image)
- The Satellite Server Discovery plug-in
- This runs on the Satellite Server and provides API and UI functionality for working with discovered hosts. The tfm-rubygem-foreman_discovery package contains this plug-in.
- The Satellite Capsule Server Discovery plug-in
- This is a communication proxy between discovered hosts on a provisioning network and the Satellite Server. The rubygem-smart_proxy_discovery package contains this plug-in.
- The Satellite Discovery image
- This is the minimal operating system based on Red Hat Enterprise Linux that is PXE-booted on hosts to acquire initial hardware information and to check in to the Satellite Server. Discovered hosts keep running the Satellite Discovery image until they are rebooted into Anaconda, which then initiates the provisioning process. The foreman-discovery-image package contains this image. It must be installed on the Satellite Capsule Server that provides TFTP services.
11.1. Configuring the Satellite Discovery Plug-in
11.1.1. Deploying the Satellite Discovery Image
# yum install foreman-discovery-image
$ rpm -ql foreman-discovery-image /usr/share/foreman-discovery-image /usr/share/foreman-discovery-image/fdi-image-rhel_7-2.1.0-20150212.1.iso
$ find /var/lib/tftpboot/boot /var/lib/tftpboot/boot /var/lib/tftpboot/boot/fdi-image-rhel_7-2.1.0-20150212.1-img /var/lib/tftpboot/boot/fdi-image-rhel_7-2.1.0-20150212.1-vmlinuz /var/lib/tftpboot/boot/fdi-image-rhel_7-img /var/lib/tftpboot/boot/fdi-image-rhel_7-vmlinuz
Note
11.1.2. Configuring PXE-booting
- The KERNEL and APPEND lines in the template use symbolic links, created when installing the foreman-discovery-image package (see Section 11.1.1, “Deploying the Satellite Discovery Image”). The URLs are relative to the
/var/lib/tftpboot/
directory. Ensure theAPPEND
parameters are specified on a single line. - The
proxy.type
variable can be set to eitherproxy
(recommended) orforeman
. When the variable is set toproxy
, all communication goes through the Satellite Capsule Server. When the variable is set toforeman
, the communication goes directly to Satellite Server. Examples in this chapter assumeproxy.type
is set toproxy
. - The
proxy.url
variable specifies the URL of the Satellite Capsule Server or Satellite Server, depending on theproxy.type
setting. BothHTTP
andHTTPS
schemes are supported. The default port is 9090 for accessing the Satellite Capsule Server (proxy.type=proxy
), and 80 for for direct communication with the Satellite Server (proxy.type=foreman
). - The
IPAPPEND 2
setting detects interfaces connected to the provisioning network. The image will not boot correctly if this option is removed or modified.
Procedure 11.1. To Configure PXE-booting:
- In the Satellite web UI, navigate to→ .
- Edit the PXELinux global default template. Add the following menu entry to the template:
LABEL discovery MENU LABEL Foreman Discovery MENU DEFAULT KERNEL boot/fdi-image-rhel_7-vmlinuz APPEND initrd=boot/fdi-image-rhel_7-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 nomodeset proxy.url=https://SATELLITE_CAPSULE_URL:9090 proxy.type=proxy IPAPPEND 2
- Set the new menu entry to be the default by modifying the
ONTIMEOUT
variable:ONTIMEOUT discovery
- Click Provisioning Templates page. This instructs the TFTP proxy to rewrite theat the top of the
pxelinux.cfg/default
file. Repeat this step every time a change is made to the default template to ensure that the changes are deployed on the TFTP Satellite Capsule Server.
proxy.url
variable from the PXE-boot template. In this case, the Discovery image searches the DNS configuration file for an SRV record named x-foreman.tcp
. The proxy.url
variable must be set to proxy
in this case. The DNS server must also be suitably configured. For example, the following configuration statement specifies the Capsule Server to be used with HTTPS:
_x-foreman._tcp SRV 0 5 9090 capsule
Note
Important
BOOTIF
variable. BOOTIF
is set automatically by the IPAPPEND
variable in the PXE template. This means that when a system has multiple NICs, DNS will only work for the interface that it was booted from.
11.1.3. Reviewing Global Discovery Settings
discovery_organization
,discovery_location
- These variables specify where to place the discovered hosts. By default, the discovered hosts are automatically placed under the first organization and location created.
discovery_fact
- This variable specifies which incoming fact to use to determine the MAC address of the discovered host. By default, the PXELinux BOOTIF kernel command line option is used.
discovery_auto
- This variable enables automatic provisioning according to specified rules. Set to false by default. Red Hat recommends that you test the configuration with manual provisioning before enabling
discovery_auto
. See Section 11.3, “Provisioning Discovered Hosts” for more information. discovery_fact_column
- This variable allows you to add any fact reported by Facter as an additional column in the list of discovered hosts.
11.2. Configuring the Satellite Capsule Server Discovery Plug-in
foreman_url
setting exists in the Satellite Capsule Server configuration file. The setting can appear as follows:
# grep foreman_url /etc/foreman-proxy/settings.yml :foreman_url: https://satellite.example.com
satellite-installer
command configures this variable automatically, but Red Hat recommends that you check that the host responds correctly and there are no firewall rules blocking communication.
11.2.1. Configuring Discovery Subnets
11.2.2. Using Hammer with the Discovery Plug-in
hammer
command with the Discovery plug-in, you need to enable the Discovery plug-in in /etc/hammer/cli.modules.d/foreman_discovery.yml
as follows:
:foreman_discovery: :enable_module: true
hammer
uses.
11.2.3. Reviewing User Permissions
Discovery
. You can assign this role to non-administrative users to allow them to use the Discovery plug-in. Alternatively, assign the perform_discovery
permission to an existing role. For more information on roles and permissions, see Creating and Managing Users in the Server Administration Guide.
11.3. Provisioning Discovered Hosts
11.3.1. Manually Provisioning Hosts
Procedure 11.2. To Manually Provision a Discovered Host:
- Navigate to→ .
- Select the host you want to provision and click.
- On the host's Edit page, complete the necessary details, and then click .
11.3.2. Decommissioning Discovered Hosts
Procedure 11.3. To Decommission a Discovered Host:
- Shut down the host.
- Navigate to→ .
- In the Name column find the host you want to decommission and then select from the corresponding drop-down menu.
11.3.3. Automatically Provisioning Hosts
Procedure 11.4. To Create a Provisioning Rule:
- Navigate to→ .
- Click. Specify the following parameters of the provisioning rule:
- Name is the name of the rule displayed in the list of rules. This name must not contain spaces or non-alphanumeric characters.
- Search is the search statement used to match discovered hosts for the particular rule. You can use scoped search syntax to define it. See Section 11.3.4, “Scoped Search Syntax” for examples of using scoped search.
- Host Group is the host group to be assigned to a matching host before starting the provisioning process. Make sure that the selected host group has all the required parameters set; required parameters are marked with an asterisk (*).
- Hostname defines a pattern for assigning human-readable host names to the matching hosts. When left blank, the host name is assigned in the format "macMACADDRESS" by default. The same syntax used for provisioning templates is used in this instance. See Section 11.3.5, “Host Name Patterns” for more information and examples.
- Hosts limit is the maximum number of provisioned hosts per rule. If the limit is reached, the rule will not take effect until one or more hosts are deleted. Typical use cases are rules per server rack or row when it is necessary to change provisioning parameters such as host name or host group per entry. You can set this value to zero (0) to specify no limit.
- Priority specifies the order of execution of rules. The value must be greater than or equal to zero. A lower value indicates a higher priority. If two rules have the same priority, the first rule encountered is applied.
- Enabled provides the option to temporarily enable or disable rules.
- Clickto save the rule.
discovery_auto
variable to provide automatic provisioning according to specified rules.
Procedure 11.5. To Enable Automatic Provisioning:
- Navigate to→ → in the Satellite web UI.
- Locate
discovery_auto
in the Name column, and set its value totrue
. - Click.
11.3.4. Scoped Search Syntax
- facts.architecture = x86_64
- facts.bios_vendor ~ 'Dell*'
- facts.macaddress = "aa:bb:cc:dd:ee:ff"
- facts.macaddress_eth0 = "aa:bb:cc:dd:ee:ff"
- facts.ipaddress_eth1 ~ "192.168.*"
- facts.architecture ^ (x86_64,i386)
Note
Search Parameter | Description | Example Usage |
---|---|---|
cpu_count | The number of CPUs | cpu_count >= 8 |
disk_count | The number of disks attached | disk_count < 10 |
disks_size | The total amount of disk space (in MiB) | disks_size > 1000000 |
11.3.5. Host Name Patterns
@host
attribute, the rand()
function for random integers is available. For example:
- application-server-<%= rand(99999) %>
- load-balancer-<%= @host.facts['bios_vendor'] + '-' + rand(99999) %>
- wwwsrv-<%= @host.hostgroup.name %>
- minion-<%= @host.discovery_rule.name %>
- db-server-<%= @host.ip.gsub('.','-') + '-' + @host.hostgroup.subnet.name %>>
Important
11.3.6. Using the Discovery Plug-in on the Command Line
hammer
command to perform certain tasks related to discovery. Run the hammer -h
command to verify your configuration:
$ hammer -h | grep discovery discovery Manipulate discovered hosts. discovery_rule Manipulate discovered rules.
hammer discovery -h
command to view the available options. For example, you can use the following command to reboot a discovered host (assuming its ID is 130):
$ hammer discovery reboot -id 130 Host reboot started
11.4. Extending the Discovery Image
. ├── autostart.d │ └── 01_zip.sh ├── bin │ └── ntpdate ├── facts │ └── test.rb └── lib ├── libcrypto.so.1.0.0 └── ruby └── test.rb
- The
autostart.d
directory contains scripts that are executed in POSIX order by the image when it starts, but before the host is registered to Satellite. - The
bin
directory is added to the $PATH variable; you can place binary files here and use them in the autostart scripts. - The
facts
directory is added to the FACTERLIB variable so that custom facts can be configured and sent to Satellite. - The
lib
directory is added to the LD_LIBRARY_PATH variable andlib/ruby
is added to the RUBYLIB variable, so that binary files in/bin
can be executed correctly.
/opt/extension
directory on the image.
zip -r my_extension.zip .
fdi.zips
option where the paths are relative to the TFTP root. For example, if you have two archives at $TFTP/zip1.zip
and $TFTP/boot/zip2.zip
, use the following syntax:
fdi.zips=zip1.zip,boot/zip2.zip
11.5. Troubleshooting Satellite Discovery
- Try redeploying the default PXE Linux template.
- Verify the
pxelinux.cfg/default
configuration file on the TFTP Capsule Server. - Ensure adequate network connectivity between hosts, the Capsule Server, and the Satellite Server.
- Verify the
proxy.url
andproxy.type
options in the default PXE Linux template. - Ensure that the DNS is working correctly for that image, or use an IP address in the
proxy.url
option in the default PXE Linux template. - Ensure that the DHCP server is delivering IP addresses to the booted image correctly.
- Ensure the discovered host (or virtual machine) has at least 500 MB of memory. Less memory can lead to various random kernel panic errors as the image needs to be extracted in-memory.
discovery-debug
command. It prints out system logs, network configuration, list of facts, and other information on the standard output. The typical use case is to redirect this output and copy it with the scp
command for further investigation.
- discover-host - initial facts upload
- foreman-discovery - facts refresh, reboot remote commands
- nm-prepare - boot script which pre-configures NetworkManager
- NetworkManager - networking information
fdi.ssh=1 fdi.rootpw=redhat
Chapter 12. Running Jobs on Satellite Hosts
Note
- Install, update, or remove software packages
- Bootstrap a configuration management agent
- Trigger a Puppet, Salt, or Chef run
# satellite-installer --scenario capsule --enable-foreman-proxy-plugin-remote-execution-sshTo verify that remote execution is running on the Capsule Server and in the web UI navigate to → . The Capsule Server should now list in the Features column that SSH is running.
12.1. Establishing a Secure Connection for Remote Commands
/etc/foreman-proxy/settings.d/remote_execution_ssh.yml
file. They include the following options:
- ssh_identity_file
- File to load the SSH key from. By default, set to
/usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy
. - local_working_dir
- Directory used on the Satellite or Capsule to run the scripts necessary for remote execution. By default, set to
/var/tmp
. - remote_working_dir
- Directory on the client system that is used to execute the remote execution jobs. By default, set to
/var/tmp
.
Note
noexec
set for the /var/
volume or file system, change the remote_working_dir
as otherwise the remote execution job will fail since the script cannot be executed.
# chcon --reference=/var new_placeSee the Maintaining SELinux Labels section of the SELinux User's and Administrator's Guide for more information on working with SELinux labels.
Distributing the SSH Keys for Remote Execution
- To distribute keys manually, execute the following command on the Capsule:
# ssh-copy-id -i ~foreman-proxy/.ssh/id_rsa_foreman_proxy.pub root@target.example.com
Here target.example.com is the host name of the target host. Repeat for each target host you want to manage.To confirm the key was successfully copied to the target host, execute the following command on the Capsule:# ssh -i ~foreman-proxy/.ssh/id_rsa_foreman_proxy root@target.example.com
- To use the Satellite API to download the public key directly from the Capsule, execute the following command on each target host:
# curl https://myproxy.example.com:9090/ssh/pubkey >> ~/.ssh/authorized_keys
Here myproxy.example.com stands for the host name of the Capsule. - To include the public key in newly-provisioned hosts, modify for example the Kickstart default finish template to include the following line:
<%= snippet 'remote_execution_ssh_keys' %>
12.2. Configuring and Running Remote Commands
12.2.1. Setting up Job Templates
Procedure 12.1. To Create a Job Template:
- Navigate to→ .
- Click Actions column, select Clone from the drop-down menu.. As an alternative, you can modify an existing template – in the
- Configure the job template:
- On the Template tab, enter a unique name for your job template. Select Default to make the template available for all organizations and locations. You can insert the template manually using Template editor or upload it from a text file by clicking . Templates use Embedded Ruby (ERB) template syntax, see Section 12.2.4, “Creating Advanced Templates” for more information. An advanced template is required, for example, for executing jobs that perform power actions; see Example 12.4, “Including Power Actions in Templates” for information on how to include the Power Action - SSH Default template in a custom template.
- On the Job tab, you can define the job category (define your own or select from the default categories listed in Table 12.1, “Default Job Template Categories”) as well as the effective user; these settings can be configured also when invoking the job (see Procedure 12.2, “To Execute a Remote Job:”). You can also define input parameters for template commands. These parameters are then requested when executing the job.
- Remaining tabs enable setting the template type, organizations and locations as well as viewing the template history.
- Click. When the page refreshes, your new template should appear in the list of job templates.
Important
Job template category
|
Description
|
---|---|
Packages | Templates for performing package related actions. Install, update, and remove actions are included by default. |
Puppet | Templates for executing Puppet runs on target hosts. |
Power | Templates for performing power related actions. Restart and shutdown actions are included by default. |
Commands | Templates for executing custom commands on remote hosts. |
Services | Templates for performing service related actions. Start, stop, restart, and status actions are included by default. |
Katello | Templates for performing content related actions. These templates are used mainly from different parts of the Satellite web UI (for example bulk actions UI for content hosts), but can be used separately to perform operations such as errata installation. |
Example 12.1. Creating a restorecon Template
SELinux
context for all files in the selected directory on target hosts.
- Navigate to→ . Click .
- Insert Run Command - restorecon in the Name field. Select Default to make the template available to all organizations. Add the following text to the Template editor:
restorecon -RvF <%= input("directory") %>
The<%= input("directory") %>
string will be replaced by a user-defined directory during job invocation. - On the Job tab, perform the following actions:
- Set Job category to
Commands
. - Clickto allow job customization. Insert
directory
to the Name field. The input name must match the value specified in the Template editor. - Click Required so that the command cannot be executed without the user specified parameter.
- Select
User input
from the Input type drop-down list. Also provide a Description to be shown during job invocation, for example Target directory for restorecon.
- Click.
12.2.2. Executing Jobs
Procedure 12.2. To Execute a Remote Job:
- Navigate to→ and select the target hosts for your job. You can use the search field to narrow down the host list.
- From the Select Action menu at the upper right of the screen select Run Job. This will take you to the Job invocation page. Alternatively, if you target just one host, click its name and click on the host information page. Note that you can invoke jobs also from the Job Templates page by using the button.
- On the Job invocation page, define the main job settings:
- Select the Job category and the Job template you want to use. These settings are required.
- Optionally, select a stored search string in the Bookmark list to specify the target hosts.
- Optionally, further limit the targeted hosts by inserting a Search query. The Resolves to line displays the number of hosts affected by your query. Use the refresh button to recalculate the number after changing the query. The preview icon will list the targeted hosts.
- The remaining settings depend on the selected job template. See Procedure 12.1, “To Create a Job Template:” for information on adding custom parameters to a template.
- Clicking Display advanced fields will show advanced setting for the job. Some of the advanced settings depend on the job template, the following settings are general:
- Effective user defines the user for executing the job, by default it is the SSH user.
- Concurrency level defines maximum number of jobs executed at once, which can prevent overload of systems' resources in a case of executing the job on a large number of hosts.
- Time span defines time interval in seconds after which the job should be killed, if it is not finished already. A task which could not be started during the defined interval, for example, if the previous task took too long to finish, is canceled.
- Type of query defines when the search query is evaluated. This helps to keep the query up to date for scheduled tasks.
Concurrency level and Time span settings enable you to tailor job execution to fit your infrastructure hardware and needs. - If you want to execute the job immediately, ensure that Schedule is set to
Execute now
. You can also define a one-time future job, or set up a recurring job. For recurring tasks, you can define start and end dates, number and frequency of runs. You can also use cron syntax to define repetition. For more information about cron, see Automating System Tasks section of the Red Hat Enterprise Linux 7 System Administrator's Guide. - Click Job Overview page, and when the job completes, also displays the status of the job.. This displays the
Example 12.2. Executing a restorecon Template on Multiple Hosts
/home/
directory.
- Navigate to Run Job from the Select Action drop-down list.→ and select target hosts. Select
- In the Job invocation page, select the
Commands
job category and theRun Command - restorecon
job template. - Type
/home
in the directory field. - Set Schedule to
Execute now
. - Click Job invocation page where you can monitor the status of job execution.. You are taken to the
12.2.3. Monitoring Jobs
Procedure 12.3. To Monitor a Job:
- Navigate to the Job page. This page is automatically displayed if you triggered the job with the
Execute now
setting. To monitor scheduled jobs, navigate to → and select the job run you wish to inspect. - On the Job page, click the Hosts tab. This displays the list of hosts on which the job is running.
- In the Host column, click the name of the host that you want to inspect. This displays the Detail of Commands page where you can monitor the job execution in real time.
- Click Job Details page.at any time to return to the
12.2.4. Creating Advanced Templates
httpd
service on Red Hat Enterprise Linux systems:
<%= render_template 'Package Action - SSH Default', :action => 'install', :package => 'httpd' %> <%= render_template 'Service Action - SSH Default', :action => 'start', :service_name => 'httpd' %>
input()
method to allow users to define input for the rendered template on job execution. For example, you can use the following syntax:
<%= render_template 'Package Action - SSH Default', :action => 'install', :package => input("package") %>
Example 12.3. Rendering a restorecon Template
/home/
directory on target hosts.
<%= render_template("Run Command - restorecon", :directory => "/home") %>
Example 12.4. Including Power Actions in Templates
<%= render_template("Power Action - SSH Default", :action => "restart") %>
12.3. Configuring Global Settings
Parameter Name
|
Description
|
---|---|
remote_execution_effective_user
|
This is the default effective user for any job. When the job is executed the effective user of the process is changed accordingly (for example, by sudo). This option can be overridden per job template and job invocation.
|
remote_execution_effective_user_method
|
Specifies which method to use to set the effective user on the target host. Currently only su and sudo are supported.
|
remote_execution_fallback_proxy
|
Search the host for any Capsule with remote execution configured. This is useful when the host has no subnet or if the subnet does not have a Capsule with remote execution enabled.
|
remote_execution_global_proxy
|
Search for a remote execution Capsule outside of the Capsules assigned to the host. If Locations or Organizations are enabled, the search will be limited to the host's Organization or Location.
|
remote_execution_ssh_user
|
The default user to use while the Capsule connects to the target using SSH. You can set the
remote_execution_ssh_user variable to override this on a per-host basis.
You can set this by Host, Host Group, Operating System, Domain, Location, or Organization. This can also be a different user from the
remote_execution_effective_user .
|
remote_execution_sync_templates | Defines whether job templates should be synchronized from disk when seeding a database. |
Important
/etc/foreman/settings.yaml
configuration file, but any manual changes that you make to this file are overwritten the next time you run satellite-installer
. Consequently, Red Hat recommends that you modify these parameters in the web UI. Alternatively, use the foreman-rake config
command from a console.
12.3.1. Choosing a Capsule for Remote Execution
remote_execution_global_proxy
variable to false
to disable this behavior. This may be necessary in more complex environments, where not all Capsules can be used due to possible network isolation. In this configuration, you can assign a pool of Capsules to each subnet, and jobs are load balanced across them.
remote_execution_fallback_proxy
variable to true
to enable fallback mode. In this configuration, remote execution will use any Capsule associated with the host, such as its Puppet Master, provided that Capsule also has remote execution configured.
12.4. Delegating Permissions for Remote Execution
- Remote Execution Manager: This role allows access to all remote execution features and functionality.
- Remote Execution User: This role only allows running jobs; it does not provide permission to modify job templates.
view_job_templates
permission, the user can only see and trigger jobs based on matching job templates. You can use the view_hosts
and view_smart_proxies
permissions to limit which hosts or Capsules are visible to the role.
execute_template_invocation
permission is a special permission that is checked immediately before execution of a job begins. This permission defines which job template you can run on a particular host. This allows for even more granularity when specifying permissions. For more information on working with roles and permissions see Creating and Managing Roles in the Server Administration Guide.
execute_template_invocation
permission:
name = Reboot and host.name = staging.example.com name = Reboot and host.name ~ *.staging.example.com name = "Restart service" and host_group.name = webservers
Note
Chapter 13. Configuring Host Collections
- Add hosts to a collection.
- Apply a mass installation of packages, errata, or package groups to all host members of a host collection.
- Update specific packages, errata, or specific package groups to all host members.
13.1. Creating a Host Collection
Procedure 13.1. To Create a Host Collection:
- Click→ .
- Click.
- Add the Name and Description of the host collection.
- Deselectto specify the maximum number of hosts that will be allowed to the group. Otherwise, leave it checked to allow unlimited hosts to join the host collection.
- Click.
13.2. Adding Hosts to a Host Collection
Prerequisites
Procedure 13.2. To Add Hosts to a Host Collection:
- Click→ .
- Click the host collection where the host should be added.
- On the Add subtab.tab, select the
- Select the hosts to be added from the table and click.
13.3. Adding Content to Host Collections
13.3.1. Adding Packages to a Host Collection
Prerequisites
- The content to be added should be available in one of the existing repositories or added prior to this procedure.
- Content should be promoted to the environment where the hosts are assigned.
Procedure 13.3. To Add Packages to Host Collections:
- Click→ .
- Click the host collection where the package should be added.
- On thetab, click .
- To update all packages, click the Job invocation page where you can customize the action.button to use the default method. Alternatively, select the drop-down icon to the right of the button to select a method to use. Selecting the menu entry will take you to the
- Select the Package or Package Group radio button as required.
- In the field provided, specify the package or package group name. Then click:
- Job invocation page where you can customize the action.— to install a new package using the default method. Alternatively, select the drop-down icon to the right of the button and select a method to use. Selecting the menu entry will take you to the
- Job invocation page where you can customize the action.— to update an existing package in the host collection using the default method. Alternatively, select the drop-down icon to the right of the button and select a method to use. Selecting the menu entry will take you to the
13.3.2. Adding Errata to a Host Collection
Prerequisites
- The errata to be added should be available in one of the existing repositories or added prior to this procedure.
- Errata should be promoted to the environment where the hosts are assigned.
Procedure 13.4. To Add Errata to a Host Collection:
- Click→ .
- Select the host collection where the errata should be added.
- On thetab, click .
- Select the errata you want to add to the host collection and click the Job invocation page where you can customize the action.button to use the default method. Alternatively, select the drop-down icon to the right of the button to select a method to use. Selecting the menu entry will take you to the
13.4. Removing Content from a Host Collection
Procedure 13.5. To Remove Content from a Host Collection:
- Click→ .
- Click the host collection where the package should be removed.
- On thetab, click .
- Select the Package or Package Group radio button as required.
- In the field provided, specify the package or package group name.
- Click the Job invocation page where you can customize the action.button to remove the package or package group using the default method. Alternatively, select the drop-down icon to the right of the button and select a method to use. Selecting the menu entry will take you to the
13.5. Changing the Life Cycle Environment or Content View of a Host Collection
Procedure 13.6. To Change the Life Cycle Environment or Content View of a Host Collection:
- Click→ .
- Selection the host collection where the life cycle environment or content view should be changed.
- On the Change assigned Life Cycle Environment or Content View.tab, click
- Select the life cycle environment to be assigned to the host collection.
- Select the required content view from the drop-down list.
- Click.
Note
The changes take effect in approximately 4 hours. To make the changes take effect immediately, on the host, enter the following command:# subscription-manager refresh
You can use remote execution to run this command on multiple hosts at the same time.
13.6. Removing a Host from a Host Collection
Procedure 13.7. To Remove Hosts from a Host Collection:
- Click→ .
- Choose the desired host collection.
- On the List/Remove subtab.tab, select the
- Select the hosts you want to remove from the host collection and click.
13.7. Removing a Host Collection
Procedure 13.8. To Remove a Host Collection:
- Click→ .
- Choose the host collection to be removed.
- Click. An alert box appears:
Are you sure you want to remove host collection Host Collection Name?
- Click.
13.8. Cloning a Host Collection
Procedure 13.9. To Clone a Host Collection:
- Click→ .
- On the left hand panel, click the host collection you want to clone.
- Click.
- Specify a name for the cloned collection.
- Click.
13.9. Reviewing Host Collection Details
Procedure 13.10. To Reviewing Host Collection Details:
- Click→ .
- Select the host collection you want to review and navigate to the Details tab.
Appendix A. Template Writing Reference
A.1. Writing ERB Templates
- <% %> – marks enclosing Ruby code within the ERB template. The code is executed when the template is rendered. It can contain Ruby control flow structures as well as Satellite specific functions and variables. For example:
<% if @host.operatingsystem.family == "Redhat" && @host.operatingsystem.major.to_i > 6 %> systemctl <%= input("action") %> <%= input("service") %> <% else %> service <%= input("service") %> <%= input("action") %> <% end -%>
- <%= %> – the code output is inserted into the template. This is useful for variable substitution, for example:
echo <%= @host.name %>
- <% -%>, <%= -%> – by default, a newline character is inserted after a Ruby block if it is closed at the end of a line. To suppress this behavior, modify the enclosing mark. For example, the following template:
curl <%= @host.ip -%> /mydir
is rendered the same as:curl <%= @host.ip %>/mydir
In practice, this is used to reduce the number of lines in rendered templates (where Ruby syntax permits). - <%# %> – marks enclosing a comment that will be ignored during template rendering:
<%# A comment %>
A.2. Troubleshooting ERB Templates
- Directly in the template editor – when editing a template (under → , → , or → ), on the Template tab click and select a host from the drop-down menu. The template then renders in the text field using the selected host's parameters. Preview failures can help to identify issues in your template.
- At the host's details page – select a host at → and click the Templates tab to list templates associated with the host. Select Review from the drop-down menu next to the selected template to view it's rendered version.
A.3. Satellite Specific Functions and Variables
Name | Description |
---|---|
indent(n) | Indents the block of code by n spaces, useful when using a snippet template that is not indented. |
foreman_url(kind) | Returns the full URL to host-rendered templates of the given kind. For example, templates of the "provision" type usually reside at http://HOST/unattended/provision. |
snippet(name) | Renders the specified snippet template. Useful for nesting provisioning templates. |
snippets(file) | Renders the specified snippet found in the Foreman database, attempts to load it from the unattended/snippets/ directory if it is not found in the database. |
snippet_if_exists(name) | Renders the specified snippet, skips if no snippet with the specified name is found. |
Example A.1. Using the snippet and indent Functions
<%= indent 4 do snippet 'subscription_manager_registration' end %>
Name | Description |
---|---|
input(input_name) | Returns the value of the specified input on the job execution. |
render_template(name, parameters) | Renders the specified template, similar to the generic snippet() function but enables passing arguments to the template. |
Name | Description |
---|---|
@host.architecture | The architecture of the host. |
@host.bond_interfaces | Returns an array of all bonded interfaces. See Note. |
@host.capabilities | The method of system provisioning, can be either build (for example kickstart) or image. |
@host.certname | The SSL certificate name of the host. |
@host.diskLayout | The disk layout of the host. Can be inherited from the operating system. |
@host.domain | The domain of the host. |
@host.environment | The Puppet environment of the host. |
@host.facts | Returns a Ruby hash of facts from Facter. For example to access the 'ipaddress' fact from the output, specify @host.facts['ipaddress']. |
@host.grub_pass | Returns the host's GRUB password. |
@host.hostgroup | The host group of the host. |
@host.info['parameters'] | Returns a Ruby hash containing information on host parameters. For example, use @host.info['parameters']['lifecycle_environment'] to get the life cycle environment of a host. |
@host.image_build? | Returns true if the host is provisioned using an image. |
@host.interfaces | Contains an array of all available host interfaces including the primary interface. See Note. |
@host.interfaces_with_identifier('IDs') | Returns array of interfaces with given identifier. You can pass an array of multiple identifiers as an input, for example @host.interfaces_with_identifier(['eth0', 'eth1']). See Note. |
@host.ip | The IP address of the host. |
@host.location | The location of the host. |
@host.mac | The MAC address of the host. |
@host.managed_interfaces | Returns an array of managed interfaces (excluding BMC and bonded interfaces). See Note. |
@host.medium | The assigned operating system installation medium. |
@host.name | The full name of the host. |
@host.operatingsystem.family | The operating system family. |
@host.operatingsystem.major | The major version number of the assigned operating system. |
@host.operatingsystem.minor | The minor version number of the assigned operating system. |
@host.operatingsystem.name | The assigned operating system name. |
@host.operatingsystem.boot_files_uri(@host.medium,@host.architecture) | Full path to the kernel and initrd, returns an array. |
@host.os.medium_uri(@host) | The URI used for provisioning (path configured in installation media). |
@host.param_false?(name) | Returns false if host parameter of a given name evaluates to false. |
@host.param_true?(name) | Returns true if host parameter of a given name evaluates to true. |
@host.params['parameter_name'] | Returns the value of specified parameters. |
@host.primary_interface | Returns the primary interface of the host. |
@host.provider | The compute resource provider. |
@host.provision_interface | Returns the provisioning interface of the host. Returns an interface object. |
@host.ptable | The partition table name. |
@host.puppetmaster | The Puppet master the host should use. |
@host.pxe_build? | Returns true if the host is provisioned using the network or PXE. |
@host.shortname | The short name of the host. |
@host.sp_ip | The IP address of the BMC interface. |
@host.sp_mac | The MAC address of the BMC interface. |
@host.sp_name | The name of the BMC interface. |
@host.sp_subnet | The subnet of the BMC network. |
@host.subnet.dhcp | Returns true if a DHCP proxy is configured for this host. |
@host.subnet.dns_primary | The primary DNS server of the host. |
@host.subnet.dns_secondary | The secondary DNS server of the host. |
@host.subnet.gateway | The gateway of the host. |
@host.subnet.mask | The subnet mask of the host. |
@host.url_for_boot(:initrd) | Full path to the initrd image associated with this host. Not recommended, as it does not interpolate variables. |
@host.url_for_boot(:kernel) | Full path to the kernel associated with this host. Not recommended, as it does not interpolate variables, prefer boot_files_uri. |
@provisioning_type | Equals to 'host' or 'hostgroup' depending on type of provisioning. |
@static | Returns true if the network configuration is static. |
@template_name | Name of the template being rendered. |
grub_pass | Returns the GRUB password wrapped in md5pass argument, that is --md5pass=#{@host.grub_pass} . |
ks_console | Returns a string assembled using the port and the baud rate of the host which can be added to a kernel line. For example console=ttyS1,9600 . |
root_pass | Returns the root password configured for the system. |
Note
@host.interfaces
or @host.bond_interfaces
return interface data grouped in an array. To extract a parameter value of a specific interface, use Ruby methods to parse the array. For example, to get information about the first interface from an array and use it in a kickstart template:
<% myinterface = @host.interfaces.first %> IPADDR="<%= myinterface.ip %>" NETMASK="<%= myinterface.subnet.mask %>" GATEWAY="<%= myinterface.subnet.gateway %>"
<% ifnames = [] @host.interfaces.each do |i| ifnames.push(i.name) end %>
Example A.2. Using Host Specific Variables
<% pm_set = @host.puppetmaster.empty? ? false : true puppet_enabled = pm_set || @host.param_true?('force-puppet') puppetlabs_enabled = @host.param_true?('enable-puppetlabs-repo') %>
<% os_major = @host.operatingsystem.major.to_i os_minor = @host.operatingsystem.minor.to_i %> <% if ((os_minor < 2) && (os_major < 14)) -%> ... <% end -%>
<% subnet = @host.subnet %> <% if subnet.respond_to?(:dhcp_boot_mode?) -%> <%= snippet 'kickstart_networking_setup' %> <% end -%>
<% @host.ip.split('.').last %>
Name | Description |
---|---|
@arch | The host architecture name, same as @host.architecture.name. |
@dynamic | Returns true if the partition table being used is a %pre script (has the #Dynamic option as the first line of the table). |
@epel | A command which will automatically install the correct version of the epel-release rpm. Use in a %post script. |
@mediapath | The full kickstart line to provide the URL command. |
@osver | The operating system major version number, same as @host.operatingsystem.major. |