Bookmark this page

Lab: Uploading Automation Execution Environments to Private Automation Hub

  • Upload Automation execution environments to a private automation hub.

Outcomes

  • Upload Automation execution environments to a private automation hub.

  • Identify the version and release of container images.

  • Add tags to the private automation hub container repositories.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

This command ensures that automation controller and private automation hub are installed. The command also removes three container repositories from private automation hub and downloads container image archive files to the /home/student/certified-EEs directory.

[student@workstation ~]$ lab start compreview-hub

Specifications

Based on the following specification, upload the three automation execution environment image archives located in the /home/student/certified-EEs directory on workstation to your private automation hub, hub.lab.example.com. The password for the admin user on that private automation hub is redhat.

  • Upload the following image archives as container images in the ansible-automation-platform-22 namespace and use the latest tag:

    Image archiveContainer image
    ee-29-rhel8.tgz hub.lab.example.com/ansible-automation-platform-22/ee-29-rhel8:latest
    ee-minimal-rhel8.tgz hub.lab.example.com/ansible-automation-platform-22/ee-minimal-rhel8:latest
    ee-supported-rhel8.tgz hub.lab.example.com/ansible-automation-platform-22/ee-supported-rhel8:latest
  • Determine the version and release of each container image file by using the skopeo inspect command on workstation, such as 1.0.0-119 where 1.0.0 is the version, and 119 is the release. Based on this information, add a tag using the matching string for each container file. In other words, the version and release reported by skopeo inspect for a particular image should match a tag on the container image in your private automation hub.

  • Verify that all three automation execution environments are available and that you can use the podman pull command to download the container images to workstation. Make sure that you can download each container image when using the version-and-release tag that you added for that image.

  1. Upload the container image archives in the /home/student/certified-EEs directory to your private automation hub.

    1. From a terminal window, change to the /home/student/certified-EEs directory.

      [student@workstation ~]$ cd ~/certified-EEs/
    2. List the container image archives in the directory.

      [student@workstation certified-EEs]$ ls
      ee-29-rhel8.tgz  ee-minimal-rhel8.tgz  ee-supported-rhel8.tgz
    3. Log in to private automation hub at hub.lab.example.com, using admin as the username and redhat as the password.

      [student@workstation certified-EEs]$ skopeo login hub.lab.example.com
      Username: admin
      Password: redhat
      Login Succeeded!
    4. Use the skopeo copy command to upload the image archives. Upload the image archives to the hub.lab.example.com server using the ansible-automation-platform-22 namespace and the latest tag.

      [student@workstation certified-EEs]$ skopeo copy \
      > docker-archive:ee-29-rhel8.tgz \
      > docker://hub.lab.example.com/ansible-automation-platform-22/ee-29-rhel8:latest
      Getting image source signatures
      ...output omitted...
      Writing manifest to image destination
      Storing signatures
      
      [student@workstation certified-EEs]$ skopeo copy \
      > docker-archive:ee-minimal-rhel8.tgz docker://hub.lab.example.com/\
      > ansible-automation-platform-22/ee-minimal-rhel8:latest
      Getting image source signatures
      ...output omitted...
      Writing manifest to image destination
      Storing signatures
      
      [student@workstation certified-EEs]$ skopeo copy \
      > docker-archive:ee-supported-rhel8.tgz docker://hub.lab.example.com/\
      > ansible-automation-platform-22/ee-supported-rhel8:latest
      Getting image source signatures
      ...output omitted...
      Writing manifest to image destination
      Storing signatures

      Important

      The previous commands use the line continuation character, \, to split the commands across multiple lines. Do not insert a space before the line continuation character used in the docker://hub.lab.example.com/\ portion of the commands.

  2. Using the web UI, verify that private automation hub provides at least the following three container repositories:

    • ansible-automation-platform-22/ee-29-rhel8

    • ansible-automation-platform-22/ee-minimal-rhel8

    • ansible-automation-platform-22/ee-supported-rhel8

    1. Navigate to https://hub.lab.example.com and log in as the admin user with redhat as the password.

    2. Navigate to Execution EnvironmentsExecution Environments to display the available Automation execution environments.

      • You created the three container repositories that use ansible-automation-platform-22 in their names.

      • The installer created the ee-29-rhel8, ee-minimal-rhel8, and ee-supported-rhel8 container repositories using the container image archives included in the Ansible Automation Platform setup bundle.

      Figure 12.5: Execution environments
  3. Identify the version and release of each container image archive in the /home/student/certified-EEs directory and then use that information to add new tags to the previously created private automation hub container repositories.

    1. From the terminal window, use the skopeo inspect command to identify the version and release of the container image archives.

      [student@workstation certified-EEs]$ skopeo inspect \
      > docker-archive:ee-29-rhel8.tgz \
      > --format "{{ .Labels.version }}-{{ .Labels.release }}"
      1.0.0-119
      
      [student@workstation certified-EEs]$ skopeo inspect \
      > docker-archive:ee-minimal-rhel8.tgz \
      > --format "{{ .Labels.version }}-{{ .Labels.release }}"
      1.0.0-128
      
      [student@workstation certified-EEs]$ skopeo inspect \
      > docker-archive:ee-supported-rhel8.tgz \
      > --format "{{ .Labels.version }}-{{ .Labels.release }}"
      1.0.0-99
    2. From the private automation hub web UI, navigate to Execution EnvironmentsExecution Environments and click the link for the ansible-automation-platform-22/ee-29-rhel8 container repository.

    3. Click the Images tab. Click the vertical ellipsis icon and then click Manage tags.

    4. Enter 1.0.0-119 in the Add new tag field and click Add.

    5. Click Save and then close the window. After a few seconds, you should see the 1.0.0-119 tag in the tag list.

    6. Use the same steps to add the 1.0.0-128 tag to the ansible-automation-platform-22/ee-minimal-rhel8 container repository.

    7. Use the same steps to add the 1.0.0-99 tag to the ansible-automation-platform-22/ee-supported-rhel8 container repository.

  4. Use the podman pull command to verify that you can download the following three container images from your private automation hub:

    • ansible-automation-platform-22/ee-29-rhel8:1.0.0-119

    • ansible-automation-platform-22/ee-minimal-rhel8:1.0.0-128

    • ansible-automation-platform-22/ee-supported-rhel8:1.0.0-99

    1. Download the ansible-automation-platform-22/ee-29-rhel8:1.0.0-119 container image:

      [student@workstation certified-EEs]$ podman pull \
      > hub.lab.example.com/ansible-automation-platform-22/ee-29-rhel8:1.0.0-119
      ...output omitted...
    2. Download the ansible-automation-platform-22/ee-minimal-rhel8:1.0.0-128 container image:

      [student@workstation certified-EEs]$ podman pull \
      > hub.lab.example.com/ansible-automation-platform-22/ee-minimal-rhel8:1.0.0-128
      ...output omitted...
    3. Download the ansible-automation-platform-22/ee-supported-rhel8:1.0.0-99 container image:

      [student@workstation certified-EEs]$ podman pull \
      > hub.lab.example.com/ansible-automation-platform-22/ee-supported-rhel8:1.0.0-99
      ...output omitted...
    4. List the downloaded container images:

      [student@workstation certified-EEs]$ podman images
      REPOSITORY                                                             TAG
      hub.lab.example.com/ansible-automation-platform-22/ee-supported-rhel8  1.0.0-99
      hub.lab.example.com/ansible-automation-platform-22/ee-minimal-rhel8    1.0.0-128
      hub.lab.example.com/ansible-automation-platform-22/ee-29-rhel8         1.0.0-119

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 compreview-hub

This concludes the section.

Revision: do467-2.2-08877c1