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 |
|
| Sections |
|
| Lab |
|
Manage software on specific registered hosts with content views and lifecycle environments.
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.
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.
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.
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 → .
Select the content view to publish.
Click . Optionally, add a description, and then click . Review the details and click .
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"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 → and select the content view to promote.
On the tab, click 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 .
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"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.
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 the podman utility to log in and fetch content from Katello container registries.
[root@host]#podman login satellite.example.comUsername:usernamePassword:passwordLogin 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-minimalTrying 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
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