Bookmark this page

Guided Exercise: Initial Configuration of Automation Controller and Private Automation Hub

  • Navigate the web UI of private automation hub and automation controller, and launch a test job.

Outcomes

  • Upload automation execution environments to private automation hub.

  • Create namespaces for automation content collections on private automation hub.

  • Upload automation content collections to private automation hub.

  • Modify existing automation controller resources.

  • Launch an automation controller job template.

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

This command ensures that private automation hub and automation controller are installed.

[student@workstation ~]$ lab start install-configuration

Procedure 1.2. Instructions

  1. Upload the three provided automation execution environments to private automation hub.

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

      [student@workstation ~]$ cd ~/certified-EEs/
    2. Use the skopeo login command to log in to private automation hub, 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!
    3. Use the skopeo copy command to upload the compatibility, minimal, and supported automation execution environment image archives. Red Hat uses compatibility to refer to the ee-29-rhel8 automation execution environment because that execution environment contains Ansible 2.9 (a version that is compatible with many earlier playbooks). Upload the image archives to the hub.lab.example.com server using the ansible-automation-platform-22 namespace and the latest tag.

      Set the HUB and AAP shell variables to reduce typing in the following skopeo commands.

      [student@workstation certified-EEs]$ HUB="hub.lab.example.com"
      [student@workstation certified-EEs]$ AAP="ansible-automation-platform-22"
      
      [student@workstation certified-EEs]$ skopeo copy \
      > docker-archive:ee-29-rhel8.tgz docker://${HUB}/${AAP}/ee-29-rhel8:latest
      ...output omitted...
      
      [student@workstation certified-EEs]$ skopeo copy \
      > docker-archive:ee-minimal-rhel8.tgz \
      > docker://${HUB}/${AAP}/ee-minimal-rhel8:latest
      ...output omitted...
      
      [student@workstation certified-EEs]$ skopeo copy \
      > docker-archive:ee-supported-rhel8.tgz \
      > docker://${HUB}/${AAP}/ee-supported-rhel8:latest
      ...output omitted...

      Note

      This example uses the skopeo command, but you can use the podman command if you prefer. Assuming that you logged in to private automation hub with the podman login command, you can upload an archive with the following commands. When not specified, the podman tag and podman push commands default to using the latest tag.

      [student@workstation certified-EEs]$ podman load -i ee-supported-rhel8.tgz
      ...output omitted...
      [student@workstation certified-EEs]$ podman tag \
      > registry.redhat.io/ansible-automation-platform-22/ee-supported-rhel8 \
      > hub.lab.example.com/ansible-automation-platform-22/ee-supported-rhel8
      ...output omitted...
      [student@workstation certified-EEs]$ podman push \
      > hub.lab.example.com/ansible-automation-platform-22/ee-supported-rhel8
      ...output omitted...
  2. Verify that the automation execution environments are available from private automation hub.

    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.

      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. You created the three container repositories that use the ansible-automation-platform-22 namespace.

      Figure 1.18: Private automation hub automation execution environments
    3. Click the link for the ansible-automation-platform-22/ee-supported-rhel8 container repository and then click the Images tab. Private automation hub provides the container image using the latest tag.

  3. Create the containers namespace and then upload the containers.podman content collection.

    1. Navigate to CollectionsNamespaces and then click Create.

    2. Enter containers in the Name field and then click Create to create the namespace.

    3. Click Upload collection.

    4. Click Select file, select /home/student/content-collections/community/containers-podman-1.9.1.tar.gz, and then click Upload.

  4. Create the ansible namespace and then upload the ansible.posix content collection.

    1. Navigate to CollectionsNamespaces and then click Create.

    2. Enter ansible in the Name field and then click Create to create the namespace.

    3. Click Upload collection.

    4. Click Select file, select the /home/student/content-collections/certified/ansible-posix-1.3.0.tar.gz archive, and then click Upload.

  5. Approve the uploaded content collections.

    1. Navigate to CollectionsApproval.

    2. Click Approve to approve the ansible.posix content collection.

    3. Click Approve to approve the containers.podman content collection.

    4. Navigate to CollectionsCollections and verify that private automation hub displays the podman and posix automation content collections.

  6. Synchronize the automaton controller Demo Project project resource.

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

    2. Navigate to ResourcesProjects to display existing project resources.

    3. Click the Sync Project icon to synchronize the Demo Project resource.

  7. Update the Demo Inventory resource to remove the localhost resource. Add the workstation.lab.example.com host to the Demo Inventory resource.

    Making this change allows the Demo Inventory resource to target a machine in your environment (workstation.lab.example.com) rather than the automation execution environment (localhost).

    1. Navigate to ResourcesInventories to display existing inventory resources.

    2. Click the link for the Demo Inventory resource and then click the Hosts tab.

    3. Select the localhost resource and then click Delete. Confirm your decision to delete the localhost resource.

    4. Click Add. Enter workstation.lab.example.com in the Name field and then click Save.

  8. Update the Demo Credential machine credential resource so that it uses valid credentials for accessing the workstation.lab.example.com host.

    1. Navigate to ResourcesCredentials to display existing credentials.

    2. Locate the Demo Credential resource and click the Edit Credential icon for that row.

    3. Enter student in the Username field, enter student in the Password field, and then click Save.

      If you previously completed this exercise, then click the Replace icon to enter a new password.

  9. Launch the Demo Job Template job.

    1. Navigate to ResourcesTemplates to display existing templates.

    2. Click the Launch Template icon to initiate the job. The Demo Job Template resource uses the Demo Credential machine credential resource to connect to the workstation.lab.example.com host in the Demo Inventory resource.

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 install-configuration

This concludes the section.

Revision: do467-2.2-08877c1