Chapter 6. Managing and Promoting Content

6.1. Creating Application Life Cycle Environments

An application life cycle environment represents a step, or stage, in a promotion path through the software development life cycle (SDLC).

  1. Click ContentLife Cycle Environments to open the Life Cycle Environment Paths page.
  2. Click Add New Environment to display the New Environment page.

    The library is the origin of all content that you can use in your environments.

  3. Enter a name in the Name Field.

    The label is automatically populated with the same name, but you can change it to suit your needs. You can also add a description of your environment.

  4. Click Save.

Creating Life Cycle Environments Using Hammer CLI

  1. Create the life cycle environment.

    $ hammer lifecycle-environment create --name Development \
    --prior Library \
    --organization “$ORG”

6.2. Creating Simple Content Views

A Content View is a managed selection of content, which contains one or more repositories (either yum or Puppet) with optional filtering. These filters can be either inclusive or exclusive, and tailor a host view of content for life cycle management. You can use Content Views to customize content that is made available to client hosts.

Creating Content Views Using the Web UI

  1. Click ContentContent Views and then click Create New View.
  2. Type RHEL6 x86_64 in the Name field.

    The label is automatically populated.

  3. Clear the Composite View? check box and click Save.

Creating Content Views Using Hammer CLI

  1. Create the Content View.

    $ hammer content-view create --organization "$ORG" \
    --name 'RHEL7_Base' \
    --label rhel7_base \
    --description 'Core Build for RHEL 7'

6.3. Adding Red Hat Enterprise Linux Repositories

You can add Red Hat Enterprise Linux repositories to a Content View. You can use the same process for both Red Hat and custom repositories.

This task uses a simple use case where all content is published. You can also create filters to control the content that is included in or excluded from the published Content View.

Adding Repositories Using Web UI

  1. Go to the Content Selection page.
  2. On the Add tab, select the check box next to each of the following repositories:

    • Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.2
    • Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server
    • Red Hat Satellite Tools 6 for RHEL 7 Server RPMs x86_64
  3. Click Add Repositories.

    After the page has refreshed, you can see the list of repositories in your Content View on the List/Remove tab.

Adding Repositories Using Hammer CLI

  1. Add your Kickstart repository.

    $ hammer content-view add-repository --organization "$ORG" \
    --name 'RHEL7_Base' \
    --product 'Red Hat Enterprise Linux Server' \
    --repository 'Red Hat Enterprise Linux 7 Server Kickstart x86_64 7.2'
  2. Add your RPMs repository.

    $ hammer content-view add-repository --organization "$ORG" \
    --name 'RHEL7_Base' \
    --product 'Red Hat Enterprise Linux Server' \
    --repository 'Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server'
  3. Add your Satellite Tools repository.

    $ hammer content-view add-repository --organization "$ORG" \
    --name 'RHEL7_Base' \
    --product 'Red Hat Enterprise Linux Server' \
    --repository 'Red Hat Satellite Tools 6 for RHEL 7 Server RPMs x86_64'

6.4. Adding Puppet Modules to a Content View

Puppet Modules are self-contained bundles of code and data that you can use to manage resources such as users, files, and services.

Adding Puppet Modules Using the Web UI

  1. Go to the Content Views page.
  2. Click Content → Content Views.
  3. On the Puppet Modules tab, click Add New Module to display a list of available Puppet Modules.

    You can use the Filter field to help locate the required module.

  4. Click Select Version and select the 'motd' module.
  5. Click Select Version next to the version of the module that you want to add.
Note

If you select "Use Latest" when you select which Puppet module version to use, it means that whenever a new version of the Content View is published, the latest version of that module is included in the published view.

Adding Puppet Modules Using Hammer CLI

  1. Add a Puppet module.

    $ hammer content-view puppet-module add \
    --content-view cv_name \
    --name module_name

6.5. Publishing a Content View

After you have created Content Views and Puppet Modules, you can publish them to the Library.

Publishing a Content View Using the Web UI

  1. Click ContentContent Views.
  2. Click the name of the Content View that you want to publish.
  3. Click Publish New Version to display the Publish New Version page.

    This specifies the version and allows you to enter a comment to reflect any changes made to the Content View.

  4. Click Save to publish the Content View to the library.

    You can monitor the publication progress on the screen that appears.

  5. When the publishing process is complete, click Promote.

    The list of available promotion paths (Library → Dev → QA) displays.

  6. Select the check box for the Dev environment, and then click Promote Version.

Publishing a Content View Using Hammer CLI

  1. Publish your Content View.

    $ hammer content-view publish --organization "$ORG" \
    --name RHEL7_Base \
    --description 'Initial Publishing'
  2. Promote your Content View.

    $ hammer content-view version promote \
    --organization "$ORG" \
    --content-view RHEL7_Base \
    --to-lifecycle-environment Development

6.6. Creating and Editing Activation Keys

After you have successfully published a Content View, you need to create an Activation Key to associate with a Host Group.

Creating and Editing an Activation Key Using the Web UI

  1. On the main menu, click ContentActivation KeysNew Activation Key.
  2. In the Name field, enter a name.
  3. If applicable, clear the Content Host Limit check box.

    You can use this field to control how many times a given activation key is used. For example, if you associate the key with a subscription that has a limited quantity, you can set the limit on the activation key to eliminate exceeding that quantity.

  4. Select the check box for your environment.
  5. In the Content View drop-down list, select the RHEL 7 x86_64 Content View, and then click Save.
  6. On the Activation Keys page, click the Subscriptions tab, then click the Add tab to display the list of available subscriptions.
  7. From the list of available subscriptions, select the subscriptions you want to add.
  8. Click Add Selected.

Creating and Editing an Activation Key Using Hammer CLI

  1. Create the activation key.

    $ hammer activation-key create --name ak-Reg_To_Dev_EL7 \
    --organization-label org_label \
    --content-view RHEL7_Base
    --lifecycle-environment Development
  2. Add a subscription.

    $ hammer subscription list --organization “$ORG”
    $ hammer activation-key add-subscription \
    --name ak-Reg_To_Dev_EL7 \
    --subscription-id 8 \
    --organization "$ORG"
  3. Set Product content to enable the repository.

    $ hammer activation-key content-override --name ak-Reg_To_Dev_EL7 \
    --organization "$ORG" \
    --content-label rhel-7-server-satellite-tools-6.2-rpms \
    --value 1

If you do not plan to use Satellite Server to patch your systems, continue to Creating Provisioning Templates.