Bookmark this page

Chapter 4.  Deploy Software to Hosts

Abstract

Goal

Manage software deployment to registered hosts of your Red Hat Satellite infrastructure and practice managing environment paths, lifecycle environments, and content views.

Objectives
  • Manage software on specific registered hosts with content views and lifecycle environments.

  • Create and manage content view filters and composite content views to provide content subsets or supersets to managed hosts.

  • Inspect, filter, and apply Red Hat errata to content views for precise patch management.

Sections
  • Control Software with Content Views (and Guided Exercise)

  • Create Content View Filters (and Guided Exercise)

  • Manage and Apply Errata to Hosts (and Guided Exercise)

Lab
  • Deploy Software to Hosts

Control Software with Content Views

Objectives

  • Manage software on specific registered hosts with content views and lifecycle environments.

Manage Content Views

You can use content views to define the software versions for a particular environment. For example, a production environment might use a content view that contains fully tested packages for stability, whereas a development environment might use a content view that contains beta package versions.

Satellite stores and manages repositories for each content view across each environment. When you publish a content view, Satellite creates custom repositories to manage the content view. When you promote a content view from one environment to the next in the application lifecycle, the respective repository is updated and it publishes the new packages.

Figure 4.1: New software in the Development content view

The repositories for the QA and Production content views contain the example_software-1.0-0.noarch.rpm package. If you promote version 2 of the content view from Development to QA, then the repository for the QA content view is re-created and subsequently contains the example_software-1.1-0.noarch.rpm package.

Figure 4.2: New software is promoted to the Testing content view

Apart from later versions, promotion is useful as a rollback action. If a version of the software is not functioning in the way that you want, then you can always promote an earlier version of the content view to the lifecycle environment to restore operations.

Publish a Content View

After you create a content view, you must publish it to the Library environment so that hosts can use it. If you change a content view, such as to update repositories or filters, then you must republish that content view.

Whenever a content view is published, a new content view version gets created. Versions are numbered sequentially for identification and version control purposes.

To publish a Content View:

  • Log in to the Satellite web UI as an admin user.

  • Choose the organization that hosts the content view to publish.

  • Navigate to ContentContent Views.

  • Select the content view to publish.

  • Click Publish new version. Optionally, add a description, and then click Next. Review the details and click Finish.

A new version of the selected content view is created, and is promoted to the Library environment.

To publish a Content View via the CLI:

  • Run the hammer content-view publish command.

[root@satellite ~]# hammer content-view publish \
--name "My_Content_View" \
--description "My Content View" \
--organization "My_Organization"

Promote a Content View

When a new content view is published to the Library environment, it can be promoted to the first lifecycle environment in an environment path.

By promoting a content view to each environment, you can systematically release software packages and errata to each lifecycle environment in an environment path.

You should promote content views sequentially through all lifecycle environments in your lifecycle environment path to ensure that the content is tested at every stage. However, when technical or business needs are pressing, you can skip lifecycle environments in the path. For example, if you must quickly make a previously-tested content view available in production, you can choose to skip the sequential promotion. Satellite displays a warning to remind you that skipping lifecycle environments is not recommended.

To promote a Content View:

  • Log in to the Satellite web UI as the admin user.

  • Choose the organization that contains the content view to promote.

  • Navigate to ContentContent Views and select the content view to promote.

  • On the Versions tab, click Promote for the version of the content view to promote.

  • Complete the description field.

  • The applicable environment paths appear in a list.

  • Select the appropriate lifecycle environment and then click Promote.

To promote a Content View via the CLI:

  • Run the hammer content-view version promote command.

[root@satellite ~]# hammer content-view version promote \
--content-view "My_Content_View" \
--version 2 \
--to-lifecycle-environment "QA" \
--description "Promote description" \
--organization "My_Organization"

Manage Container Images

You can use content views to import container images from various sources and to distribute them to the hosts. You can include container repositories in a content view and designate images to be promoted through lifecycle environments.

You can configure a lifecycle environment to require authentication when accessing containers. You might want to configure authentication in a development environment where you have unreleased container images. This configuration might not be required when you access a production environment with publicly released images.

Import Container Images

Container images, similar to RPM repository package content, must be configured under a product. First, create a custom product. Then, use the hammer repository create command to create a docker-type repository. For example, to create a container repository called UBI9 and to pull the images that match the ubi9-minimal search criteria, run the following command:

[root@server]# hammer repository create \
--name UBI9 \
--content-type docker \
--url 'http://registry.access.redhat.com/' \
--docker-upstream-name ubi9-minimal \
--product 'My Container Catalog' \
--organization 'My Organization'
Repository created.

To start the synchronization process for the new repository, run the hammer repository synchronize command.

[root@server]# hammer repository synchronize \
--name UBI9 \
--product 'My Container Catalog' \
--organization 'My Organization'
[.......................................................................] [100%]
Added Docker tags: 73
Total steps: 6087/6087
--------------------------------
Associating Content: 2821/2821
Downloading Artifacts: 3192/3192
Downloading tag list: 1/1
Processing Tags: 73/73
Un-Associating Content: 0/0

Use Satellite Container Registry

Use the podman utility to log in and fetch content from Katello container registries.

[root@host]# podman login satellite.example.com
Username: username
Password: password
Login Succeeded!

Use the podman search command to list container images.

[root@host]# podman search \
--format "table {{.Name}}" \
satellite.example.com/
NAME
satellite.example.com/myorganization-my_container_catalog-ubi9-minimal

Use the podman pull command to download the container image to the local system.

[root@host]# podman pull \
satellite.example.com/myorganization-my_container_catalog-ubi9-minimal
Trying to pull satellite.example.com/operations-my_container_catalog-ubi9-minimal:latest...
Getting image source signatures
Copying blob 54e56e6f8572 done
Copying blob 4f8ddd7f5a75 done
Copying config 1ecf95eda5 done
Writing manifest to image destination
Storing signatures
1ecf95eda522cf8db84ac321e43a353deea042480ed4e97e02c5290eb53390c3

References

For more information, refer to the Managing Content Views chapter in the Red Hat Satellite 6.11 Managing Content Guide at https://access.redhat.com/documentation/en-us/red_hat_satellite/6.11/html-single/managing_content/index#Managing_Content_Views_content-management

For more information, refer to the Managing Container Images chapter in the Red Hat Satellite 6.11 Managing Content Guide at https://access.redhat.com/documentation/en-us/red_hat_satellite/6.11/html-single/managing_content/index#Managing_Container_Images_content-management

Revision: rh403-6.11-3ad886e