Chapter 7. Managing Application Life Cycles
This chapter outlines the application life cycle in Satellite and how to create and remove application life cycles for Satellite and Capsule.
7.1. Application Life Cycle Overview
The application life cycle is a concept central to Red Hat Satellite 6’s content management functions. The application life cycle defines how a particular system and its software look at a particular stage. For example, an application life cycle might be simple; you might only have a development stage and production stage. In this case the application life cycle might look like this:
- Development
- Production
However, a more complex application life cycle might have further stages, such as a phase for testing or a beta release. This adds extra stages to the application life cycle:
- Development
- Testing
- Beta Release
- Production
Red Hat Satellite 6 provides methods to customize each application life cycle stage so that it suits your specifications.
Each stage in the application life cycle is called an environment in Red Hat Satellite 6. Each environment uses a specific collection of content. Red Hat Satellite 6 defines these content collections as a Content View. Each Content View acts as a filter where you can define what repositories, packages, and Puppet modules to include in a particular environment. This provides a method for you to define specific sets of content to designate to each environment.
For example, an email server might only require a simple application life cycle where you have a production-level server for real-world use and a test server for trying out the latest mail server packages. When the test server passes the initial phase, you can set the production-level server to use the new packages.
Another example is a development life cycle for a software product. To develop a new piece of software in a development environment, test it in a quality assurance environment, pre-release as a beta, then release the software as a production-level application.
Figure 7.1. The Red Hat Satellite 6 Application Life Cycle
7.2. Promoting Content across the Application Life Cycle
In the application life cycle chain, when content moves from one environment to the next, this is called promotion.
Example Content Promotion Across Satellite Life Cycle Environments
Each environment contains a set of systems registered to Red Hat Satellite 6. These systems only have access to repositories relevant to their environment. When you promote packages from one environment to the next, the target environment’s repositories receive new package versions. As a result, each system in the target environment can update to the new package versions.
Development | Testing | Production |
---|---|---|
example_software-1.1-0.noarch.rpm | example_software-1.0-0.noarch.rpm | example_software-1.0-0.noarch.rpm |
After completing development on the patch, you promote the RPM to the Testing environment so the Quality Engineering team can review the patch. The application life cycle then contains the following package versions in each environment:
Development | Testing | Production |
---|---|---|
example_software-1.1-0.noarch.rpm | example_software-1.1-0.noarch.rpm | example_software-1.0-0.noarch.rpm |
While the Quality Engineering team reviews the patch, the Development team starts work on example_software 2.0. This results in the following application life cycle:
Development | Testing | Production |
---|---|---|
exampleware-2.0-0.noarch.rpm | exampleware-1.1-0.noarch.rpm | exampleware-1.0-0.noarch.rpm |
The Quality Engineering team completes their review of the patch. Now example_software 1.1 is ready to release. You promote 1.1 to the Production environment:
Development | Testing | Production |
---|---|---|
example_software-2.0-0.noarch.rpm | example_software-1.1-0.noarch.rpm | example_software-1.1-0.noarch.rpm |
The Development team completes their work on example_software 2.0 and promotes it to the Testing environment:
Development | Testing | Production |
---|---|---|
example_software-2.0-0.noarch.rpm | example_software-2.0-0.noarch.rpm | example_software-1.1-0.noarch.rpm |
Finally, the Quality Engineering team reviews the package. After a successful review, promote the package to the Production environment:
Development | Testing | Production |
---|---|---|
exampleware-2.0-0.noarch.rpm | exampleware-2.0-0.noarch.rpm | exampleware-2.0-0.noarch.rpm |
For more information, see Section 8.4, “Promoting a Content View”.
7.3. Creating a Life Cycle Environment Path
To create an application life cycle for developing and releasing software, use the Library environment as the initial environment to create environment paths. Then optionally add additional environments to the environment paths.
Procedure
- In the Satellite web UI, navigate to Content > Lifecycle Environments.
- Click New Environment Path to start a new application life cycle.
- In the Name field, enter a name for your environment.
- In the Description field, enter a description for your environment.
- Click Save.
- Optional: To add an environment to the environment path, click Add New Environment, complete the Name and Description fields, and select the prior environment from the Prior Environment list.
For CLI Users
To create an environment path, enter the
hammer lifecycle-environment create
command and specify the Library environment with the--prior
option:# hammer lifecycle-environment create \ --name "Environment Path Name" \ --description "Environment Path Description" \ --prior "Library" \ --organization "My_Organization"
Optional: To add an environment to the environment path, enter the
hammer lifecycle-environment create
command and specify the parent environment with the--prior
option:# hammer lifecycle-environment create \ --name "Environment Name" \ --description "Environment Description" \ --prior "Prior Environment Name" \ --organization "My_Organization"
To view the chain of the life cycle environment, enter the following command:
# hammer lifecycle-environment paths --organization "My_Organization"
7.4. Removing Life Cycle Environments from Satellite Server
Use this procedure to remove a life cycle environment.
Procedure
To remove a life cycle environment, complete the following steps:
- In the Satellite web UI, navigate to Content > Life Cycle Environments.
- Click the name of the life cycle environment that you want to remove, and then click Remove Environment.
- Click Remove to remove the environment.
For CLI Users
List the life cycle environments for your organization and note the name of the life cycle environment you want to remove:
# hammer lifecycle-environment list --organization "My_Organization"
Use the
hammer lifecycle-environment delete
command to remove an environment:# hammer lifecycle-environment delete \ --name "your_environment" \ --organization "My_Organization"
7.5. Removing Life Cycle Environments from Capsule Server
When life cycle environments are no longer relevant to the host system or environments are added incorrectly to Capsule Server, you can remove the life cycle environments from Capsule Server.
You can use both the Satellite web UI and the Hammer to remove life cycle environments from Capsule.
Procedure
To remove a life cycle environment from Capsule Server, complete the following step:
- In the Satellite web UI, navigate to Infrastructure > Capsules, and select the Capsule that you want to remove a life cycle from.
- Click Edit and click the Life Cycle Environments tab.
- From the right menu, select the life cycle environments that you want to remove from Capsule, and then click Submit.
- To synchronize Capsule’s content, click the Overview tab, and then click Synchronize.
- Select either Optimized Sync or Complete Sync.
For CLI Users
To remove a life cycle environment from Capsule Server, complete the following steps:
Select the Capsule Server that you want from the list and take note of its id:
# hammer capsule list
To verify the Capsule Server’s details, enter the following command:
# hammer capsule info --id capsule_id
Verify the list of life cycle environments currently attached to the Capsule Server and take note of the environment id:
# hammer capsule content lifecycle-environments \ --id capsule_id
Remove the life cycle environment from Capsule Server:
# hammer capsule content remove-lifecycle-environment \ --id capsule_id \ --lifecycle-environment-id lifecycle_environment_id
Repeat this step for every life cycle environment that you want to remove from Capsule Server.
Synchronize the content from Satellite Server’s environment to Capsule Server:
# hammer capsule content synchronize \ --id capsule_id
7.6. Adding Life Cycle Environments to Capsule Servers
If your Capsule Server has the content functionality enabled, you must add an environment so that Capsule can synchronize content from Satellite Server and provide content to host systems.
Do not assign the Library lifecycle environment to your Capsule Server because it triggers an automated Capsule sync every time the CDN updates a repository. This might consume multiple system resources on Capsules, network bandwidth between Satellite and Capsules, and available disk space on Capsules.
You can use Hammer CLI on Satellite Server or the Satellite web UI.
Procedure
To add a life cycle environment to Capsule Server, complete the following steps:
- In the Satellite web UI, navigate to Infrastructure > Capsules, and select the Capsule that you want to add a life cycle to.
- Click Edit and click the Life Cycle Environments tab.
- From the left menu, select the life cycle environments that you want to add to Capsule and click Submit.
- To synchronize the content on the Capsule, click the Overview tab and click Synchronize.
Select either Optimized Sync or Complete Sync.
For definitions of each synchronization type, see Section 5.10, “Recovering a Repository”.
For CLI Users
To display a list of all Capsule Servers, on Satellite Server, enter the following command:
# hammer capsule list
Note the Capsule ID of the Capsule that you want to add a life cycle to.
Using the ID, verify the details of your Capsule:
# hammer capsule info --id capsule_id
Display the life cycle environments that are available and note the environment ID:
# hammer capsule content available-lifecycle-environments \ --id capsule_id
To view the life cycle environments available for your Capsule Server, enter the following command and note the ID and the organization name:
# hammer capsule content available-lifecycle-environments --id capsule_id
Add the life cycle environment to your Capsule Server:
# hammer capsule content add-lifecycle-environment \ --id capsule_id --organization "My_Organization" \ --environment-id environment_id
Repeat for each life cycle environment you want to add to Capsule Server.
Synchronize the content from Satellite to Capsule.
To synchronize all content from your Satellite Server environment to Capsule Server, enter the following command:
# hammer capsule content synchronize --id capsule_id
To synchronize a specific life cycle environment from your Satellite Server to Capsule Server, enter the following command:
# hammer capsule content synchronize --id external_capsule_id \ --environment-id environment_id