Chapter 3. Monthly Patching Example


This chapter explains how to use Satellite to deploy errata to systems each month. In this example, we assume that we are patching systems in March of 2016.

Note

This procedure replicates the functionality of the spacewalk-clone-by-date command that was present in Satellite 5, and was described in this document written by Rich Jerrido: Satellite 5.6 Errata Management Guide. The command-line tool hammer is used in Satellite 6 to perform the same functions that the spacewalk-clone-by-date command performed in Satellite 5.

3.1. Defining a Content View to Filter Errata

In this procedure, we create a Content View, add a filter to the Content View to include the errata in the Content View, and then restrict the filter by date by means of a filter rule.

  1. Create a Content View.

    # hammer -p PASSWORD content-view create --name='test_cv' --organization="Default Organization"
    Note

    The previous command passes the password in plaintext. This method is included in this guide for the sake of customers who are used to this method of authentication, but a more secure method of storing passwords, involving the storage of the password in a .yml file, is recommended to our customers and is to be found here: Authentication in the Hammer CLI Guide.

  2. Create a filter for the errata.

    # hammer -p PASSWORD content-view filter create --name='test_filter' --organization="Default Organization" --content-view='test_cv' --type=erratum
  3. Create the filter rule with the date.

    In this example, the date is 30 Mar 2016. This rule means that all errata on or after 30 Mar 2016 will be excluded.

    # hammer -p PASSWORD content-view filter rule create --content-view='filter_test'  --organization="Default Organization"  --content-view-filter='my-filter' --start-date=2016-03-30  --types=security,enhancement,bugfix
  4. Promote the Content View to the lifecycle environment so that the errata in it are available to that lifecycle environment:

    $ hammer content-view version promote
      --content-view cv_name \
      --organization-label="Default Organization" --to-lifecycle-environment env_name
  5. Use the following command to add a repository to a Content View without clobbering the existing list of repositories that have been added to that Content View:

    $ hammer content-view add-repository --organization-label org_label --name cv_name --repository-id repo_ID
  6. Apply the errata to the host, using the commands in the Hammer CLI Guide:

    $ hammer host errata apply --host <hostname> --errata-ids <erratum_ID1>,<erratum_ID2>...

    For more detail on commands that apply errata to hosts, see Applying Errata to a Content Host in the Hammer CLI Guide.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.