Pull execution environments for use in automation hub

Before you can push execution environments to your private automation hub, you must first pull them from an existing registry and tag them for use.

Before you begin

  • You have permissions to pull automation execution environments from registry.redhat.io.

About this task

The following example details how to pull an execution environment from the Red Hat Ecosystem Catalog (registry.redhat.io).

Procedure

  1. Log in to Podman with your registry.redhat.io credentials:
    $ podman login registry.redhat.io
  2. Pull an execution environment:
    $ podman pull registry.redhat.io/<ee_name>:<tag>

Results

To verify that the execution environment you pulled is contained in the list, take these steps:

  1. List the images in local storage:
    $ podman images
  2. Check the execution environment name, and verify that the tag is correct.

Tag execution environments

After you pull execution environments from a registry, tag them for use in your private automation hub remote registry.

Before you begin

  • You have pulled an execution environment from an external registry.
  • You have the FQDN or IP address of the automation hub instance.

Procedure

Tag a local execution environment with the automation hub container repository:
$ podman tag registry.redhat.io/<ee_name>:<tag> <automation_hub_hostname>/<ee_name>

Results

  1. List the images in local storage:
    $ podman images
  2. Verify that the execution environment you tagged with your automation hub information is contained in the list.

Push an execution environment to private automation hub

You can push tagged execution environments to private automation hub to create new containers and populate the remote registry.

Before you begin

  • You have permissions to create new containers.
  • You have the FQDN or IP address of the Ansible Automation Platform instance.

Procedure

  1. Log in to Podman using your Ansible Automation Platform location and credentials:
    $ podman login -u=<username> -p=<password> <aap_url>
    Warning

    Let Podman prompt you for your password when you log in. Entering your password at the same time as your username can expose your password to the shell history.

  2. Push your execution environment to your automation hub remote registry:
    $ podman push <automation_hub_url>/<ee_name>

Results

  1. Log in to Ansible Automation Platform.
  2. Navigate to Automation Content > Execution Environments.
  3. Locate the container in the container repository list.

The push operation re-compresses image layers during the upload, which is not guaranteed to be reproducible and is client-implementation dependent. This may lead to image-layer digest changes and a failed push operation, resulting in Error: Copying this image requires changing layer representation, which is not possible (image is signed or the destination specifies a digest).

Pull and sync images from automation hub to your local system

Pull Ansible Automation Platform execution environments from the automation hub registry to your local machine. Use the provided podman pull command for the latest version in the repository, or specify a tag to copy a specific execution environment.

Pull an image

Use the user interface to pull an execution environment from your private automation hub remote registry to make a copy to your local machine.

Before you begin

  • You must have permission to view and pull from a private container repository.
  • If you are pulling automation execution environments from a password or token-protected registry, create a credential first.

Procedure

  1. From the navigation panel, select Automation Content > Execution Environments.
  2. Select your execution environment.
  3. In the Pull this image entry, click Copy to clipboard.
  4. Paste and run the command in your terminal.

Results

  • Run podman images to view images on your local machine.

Sync images from a container registry

You can pull automation execution environments from the private automation hub remote registry to sync an image to your local machine. To sync an execution environment from a remote registry, you must first configure a remote registry.

Before you begin

You must have permission to view and pull from a private container repository.

Procedure

  1. From the navigation panel, select Automation Content > Execution Environments.
  2. Add https://registry.redhat.io to the registry.
  3. Add any required credentials to authenticate.
    Note

    Some remote registries are aggressive with rate limiting. Set a rate limit under Advanced Options.

  4. From the navigation panel, select Automation Content > Execution Environments.
  5. Click Create execution environment in the page header.
  6. Select the registry you want to pull from. The Name field displays the name of the automation execution environments displayed on your local registry.
    Note

    The Upstream name field is the name of the image on the remote server. For example, if the upstream name is set to "alpine" and the Name field is "local/alpine", the alpine image is downloaded from the remote and renamed to "local/alpine".

  7. Set a list of tags to include or exclude. Note that syncing automation execution environments with a large number of tags is time consuming and uses a lot of disk space.