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).
- Click Content → Life Cycle Environments to open the Life Cycle Environment Paths page.
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.
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.
- Click Save.
Creating Life Cycle Environments Using Hammer CLI
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
- Click Content → Content Views and then click Create New View.
Type RHEL6 x86_64 in the Name field.
The label is automatically populated.
- Clear the Composite View? check box and click Save.
Creating Content Views Using Hammer CLI
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
- Go to the Content Selection page.
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
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
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'
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'
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
- Go to the Content Views page.
- Click Content → Content Views.
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.
- Click Select Version and select the 'motd' module.
- Click Select Version next to the version of the module that you want to add.
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
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
- Click Content → Content Views.
- Click the name of the Content View that you want to publish.
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.
Click Save to publish the Content View to the library.
You can monitor the publication progress on the screen that appears.
When the publishing process is complete, click Promote.
The list of available promotion paths (Library → Dev → QA) displays.
- Select the check box for the Dev environment, and then click Promote Version.
Publishing a Content View Using Hammer CLI
Publish your Content View.
$ hammer content-view publish --organization "$ORG" \ --name RHEL7_Base \ --description 'Initial Publishing'
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
- On the main menu, click Content → Activation Keys → New Activation Key.
- In the Name field, enter a name.
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.
- Select the check box for your environment.
- In the Content View drop-down list, select the RHEL 7 x86_64 Content View, and then click Save.
- On the Activation Keys page, click the Subscriptions tab, then click the Add tab to display the list of available subscriptions.
- From the list of available subscriptions, select the subscriptions you want to add.
- Click Add Selected.
Creating and Editing an Activation Key Using Hammer CLI
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
Add a subscription.
$ hammer subscription list --organization “$ORG” $ hammer activation-key add-subscription \ --name ak-Reg_To_Dev_EL7 \ --subscription-id 8 \ --organization "$ORG"
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.