Bookmark this page

Guided Exercise: Create Software Lifecycles

Create an environment path with several lifecycle environments that represent different stages of a software development and deployment workflow.

Outcomes

  • Create a lifecycle environment path for each of the Operations and Marketing organizations with lifecycle environments named Development, QA, and Production.

Log in to workstation as student with student as the password.

Run the lab lifecycles-define start command to prepare your system for the exercise. This command determines whether the satellite host is operational, and verifies that the required resources exist.

[student@workstation ~]$ lab start lifecycles-create

Instructions

  1. Log in to the Satellite Server web UI, https://satellite.lab.example.com, as admin with redhat as the password.

  2. In the upper-left corner of the web page, verify that the Operations organization context is set.

  3. Click ContentLifecycle Environments and then click Create Environment Path. The New Environment page is displayed.

  4. Create Development as the first environment in an environment path.

    1. Enter Development in the Name field. The Label field is automatically populated from the Name field value, and replaces spaces or special characters with underscores if necessary.

    2. Enter Development in the Description field, and click Save to create the first environment in this path.

  5. Create the QA environment as an additional environment in the same lifecycle environment path as the Development environment.

    1. Click Add New Environment to display the New Environment page.

    2. Enter QA in the Name field.

    3. Enter Quality Assurance in the Description field.

    4. Select Development for the Prior Environment field, and then click Save to create the environment.

  6. Use the hammer command to create the Production environment in the Operations organization as another environment in the same lifecycle environment path as Development and QA.

    1. On workstation, log in to the satellite system as the student user and switch to the root user

      [student@workstation ~]$ ssh student@satellite
      [student@satellite ~]$ sudo -i
      [sudo] password for student: student
      [root@satellite ~]#
    2. List the lifecycle environments in the Operations organization.

      [root@satellite ~]# hammer lifecycle-environment list --organization Operations
      ---|-------------|------------
      ID | NAME        | PRIOR
      ---|-------------|------------
      3  | Development | Library
      2  | Library     |
      4  | QA          | Development
      ---|-------------|------------
    3. Create the Production lifecycle environment in the Operations organization. Verify that the Production environment follows the QA environment.

      [root@satellite ~]# hammer lifecycle-environment create \
      --organization Operations --name Production --label Production \
      --description Production --prior QA
      Environment created.
    4. View the lifecycle environment paths in the Operations organization.

      [root@satellite ~]# hammer lifecycle-environment paths --organization Operations
      ------------------------------------------
      LIFECYCLE PATH
      ------------------------------------------
      Library >> Development >> QA >> Production
      ------------------------------------------
  7. Use the hammer command to create an environment path for the Marketing organization, to contain the Development, QA, and Production environments.

    1. List the lifecycle environments in the Marketing organization.

      [root@satellite ~]# hammer lifecycle-environment list --organization Marketing
      ---|-------------|------------
      ID | NAME        | PRIOR
      ---|-------------|------------
      7  | Library     |
      ---|-------------|------------
    2. Create the Development lifecycle environment in the Marketing organization. To begin a unique environment path, you must create the initial environment to follow the Library environment.

      [root@satellite ~]# hammer lifecycle-environment create \
      --organization Marketing --name Development --label Development \
      --description Development --prior Library
      Environment created.
    3. Create the QA and Production lifecycle environments in the Marketing organization. Verify that the QA environment follows the Development environment, and that the Production environment follows the QA environment.

      [root@satellite ~]# hammer lifecycle-environment create \
      --organization Marketing --name QA --label QA \
      --description "Quality Assurance" --prior Development
      Environment created.
      [root@satellite ~]# hammer lifecycle-environment create \
      --organization Marketing --name Production --label Production \
      --description Production --prior QA
      Environment created.
    4. View the lifecycle environment paths in the Marketing organization.

      [root@satellite ~]# hammer lifecycle-environment paths --organization Marketing
      ------------------------------------------
      LIFECYCLE PATH
      ------------------------------------------
      Library >> Development >> QA >> Production
      ------------------------------------------
    5. Return to the workstation system as the student user.

      [root@satellite ~]# exit
      logout
      [student@satellite ~]$ exit
      logout
      Connection to satellite closed.
      [student@workstation ~]$

Finish

On the workstation machine, change to the student user home directory and use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish lifecycles-create

Revision: rh403-6.11-3ad886e