Chapter 3. Manage containers in private automation hub
Chapter 3. Manage containers in private automation hub Learn the administrator workflows and processes for configuring the private automation hub remote registry and repositories. 3.1. Manage your private automation hub remote registry Manage container image repositories in your Ansible Automation Platform infrastructure by using the automation hub remote registry. You can perform the following tasks with Automation hub: Control who can access individual container repositories Change tags on images View activity and image layers Provide additional information related to each container repository 3.1.1. Container registries The automation hub remote registry is used for storing and managing execution environments. When you have built or sourced an execution environment, you can push that execution environment to the registry portion of private automation hub to create a container repository. steps Push an execution environment to the automation hub remote registry. Create a group with access to the container repository in the registry. Add the new group to the container repository. Add a README to the container repository to provide users with information and relevant links. 3.2. Configuring user access for container repositories in private automation hub To determine who can access and manage execution environments in your Ansible Automation Platform, you must configure user access for container repositories in your private automation hub. 3.2.1. Remote registry team permissions You can control how users can interact with execution environments managed in private automation hub. Use the following list of permissions to create teams with the right privileges for your remote registries. Table 3.1. List of team permissions used to manage containers in private automation hub Permission name Description Create new containers Users can create new containers Change container namespace permissions Users can change permissions on the container repository Change container Users can change information on a container Change execution environment tags Users can modify execution environment tags Push to existing container Users can push an execution environment to an existing container 3.2.2. Creating a new team in private automation hub You can create and assign permissions to a team in private automation hub that enables users to access specified features in the system. By default, new teams do not have any assigned permissions. You can add permissions when first creating a team or edit an existing team to add or remove permissions. For more information, see Teams in the Access management and authentication guide. 3.3. Populating your private automation hub container registry By default, private automation hub does not include automation execution environments. To populate your container registry, you must push an execution environment to it. You must follow a specific workflow to populate your private automation hub remote registry: Pull automation execution environments from the Red Hat Ecosystem Catalog (registry.redhat.io) Tag them Push them to your private automation hub remote registry Important As of April 1st, 2025 , quay.io is adding three additional endpoints. As a result, customers must adjust the allow/block lists within their firewall systems lists to include the following endpoints: cdn04.quay.io cdn05.quay.io cdn06.quay.io To avoid problems pulling container images, customers must allow outbound TCP connections (ports 80 and 443) to the following hostnames: cdn.quay.io cdn01.quay.io cdn02.quay.io cdn03.quay.io cdn04.quay.io cdn05.quay.io cdn06.quay.io This change should be made to any firewall configuration that specifically enables outbound connections to registry.redhat.io or registry.access.redhat.com . Use the hostnames instead of IP addresses when configuring firewall rules. After making this change, you can continue to pull images from registry.redhat.io or registry.access.redhat.com . You do not require a quay.io login, or need to interact with the quay.io registry directly in any way to continue pulling Red Hat container images. For more information, see Firewall changes for container image pulls 2024/2025 . Ensure that the Network ports and protocols listed in Table 6.4. Execution Environments (EE) are available to avoid problems pulling container images. 3.3.1. Pulling 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. The following example details how to pull an execution environment from the Red Hat Ecosystem Catalog (registry.redhat.io). Prerequisites You have permissions to pull automation execution environments from registry.redhat.io. Procedure Log in to Podman by using your registry.redhat.io credentials: USD podman login registry.redhat.io Enter your username and password. Pull an execution environment: USD podman pull registry.redhat.io/ <ee_name> : <tag> Verification To verify that the execution environment you recently pulled is contained in the list, take these steps: List the images in local storage: USD podman images Check the execution environment name, and verify that the tag is correct. Additional resources See Red Hat Ecosystem Catalog Help for information on registering and getting execution environments. 3.3.2. Tagging execution environments for use in automation hub After you pull execution environments from a registry, tag them for use in your private automation hub remote registry. Prerequisites 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: USD podman tag registry.redhat.io/ <ee_name> : <tag> <automation_hub_hostname> / <ee_name> Verification List the images in local storage: USD podman images Verify that the execution environment you recently tagged with your automation hub information is contained in the list. 3.3.3. Pushing 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. Prerequisites You have permissions to create new containers. You have the FQDN or IP address of the automation hub instance. Procedure Log in to Podman using your automation hub location and credentials: USD podman login -u= <username> -p= <password> <automation_hub_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. Push your execution environment to your automation hub remote registry: USD podman push <automation_hub_url> / <ee_name> Troubleshooting 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) . Verification Log in to your Ansible Automation Platform. Navigate to Automation Content Execution Environments . Locate the container in the container repository list. 3.4. Setting up your container repository When you set up your container repository, you must add a description, include a README, add teams that can access the repository, and tag automation execution environments. 3.4.1. Prerequisites to setting up your remote registry You are logged in to Ansible Automation Platform. You have permissions to change the repository. 3.4.2. Adding a README to your container repository Add a README to your container repository to provide instructions to your users on how to work with the container. Automation hub container repositories support Markdown for creating a README. By default, the README is empty. Prerequisites You have permissions to change containers. Procedure Log in to Ansible Automation Platform. From the navigation panel, select Automation Content Execution Environments . Select your execution environment. On the Detail tab, click Add . In the Raw Markdown text field, enter your README text in Markdown. Click Save when you are finished. After you add a README, you can edit it at any time by clicking Edit and repeating steps 4 and 5. 3.4.3. Providing access to your automation execution environments Provide access to your automation execution environments for users who need to work with the images. Adding a team allows you to modify the permissions the team can have to the container repository. You can use this option to extend or restrict permissions based on what the team is assigned. Prerequisites You have change container namespace permissions. Procedure Log in to Ansible Automation Platform. From the navigation panel, select Automation Content Execution Environments . Select your automation execution environment. From the Team Access tab, click Add roles . Select the team or teams to which you want to grant access and click . Select the roles that you want to add to this execution environment and click . Click Finish . 3.4.4. Tagging container images Tag automation execution environments to add an additional name to automation execution environments stored in your automation hub container repository. If no tag is added to an automation execution environment, automation hub defaults to latest for the name. Prerequisites You have change automation execution environment tags permissions. Procedure From the navigation panel, select Automation Content Execution Environments . Select your automation execution environments. Click the Images tab. Click the More Actions icon ... , and click Manage tags . Add a new tag in the text field and click Add . Optional: Remove current tags by clicking x on any of the tags for that image. Verification Click the Activity tab and review the latest changes. 3.4.5. Creating a credential To pull automation execution environments images from a password or token-protected registry, you must create a credential. In earlier versions of Ansible Automation Platform, you were required to deploy a registry to store execution environment images. On Ansible Automation Platform 2.0 and later, the system operates as if you already have a remote registry up and running. To store execution environment images, add the credentials of only your selected remote registries. Procedure Log in to Ansible Automation Platform. From the navigation panel, select Automation Execution Infrastructure Credentials . Click Create credential to create a new credential. Enter an authorization Name , Description , and Organization . In the Credential Type drop-down, select Container Registry . Enter the Authentication URL . This is the remote registry address. Enter the Username and Password or Token required to log in to the remote registry. Optional: To enable SSL verification, select Verify SSL . Click Create credential . Filling in at least one of the fields organization, user, or team is mandatory, and can be done through the user interface. 3.5. Pulling images from a container repository Pull automation execution environments from the automation hub remote registry to make a copy to your local machine. Automation hub provides the podman pull command for each latest automation execution environments in the container repository. You can copy and paste this command into your terminal, or use podman pull to copy an automation execution environments based on an automation execution environments tag. 3.5.1. Pulling an image You can pull automation execution environments from the automation hub remote registry to make a copy to your local machine. Prerequisites You must have permission to view and pull from a private container repository. Procedure If you are pulling automation execution environments from a password or token-protected registry, create a credential before pulling the automation execution environments. From the navigation panel, select Automation Content Execution Environments . Select your automation execution environments. In the Pull this image entry, click Copy to clipboard . Paste and run the command in your terminal. Verification Run podman images to view images on your local machine. 3.5.2. Syncing images from a container repository You can pull automation execution environments from the automation hub remote registry to sync an image to your local machine. To sync an automation execution environment from a remote registry, you must first configure a remote registry. Prerequisites You must have permission to view and pull from a private container repository. Procedure From the navigation panel, select Automation Content Execution Environments . Add https://registry.redhat.io to the registry. Add any required credentials to authenticate. Note Some remote registries are aggressive with rate limiting. Set a rate limit under Advanced Options . From the navigation panel, select Automation Content Execution Environments . Click Create execution environment in the page header. 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". Set a list of tags to include or exclude. Syncing automation execution environments with a large number of tags is time consuming and uses a lot of disk space. Additional resources See Red Hat Container Registry Authentication for a list of registries. See the What is Podman? documentation for options to use when pulling images. 3.6. Working with signed containers Automation execution environments are container images used by Ansible Automation Platform to run jobs. You can download this content to private automation hub, and publish it within your organization. 3.6.1. Deploying your system for container signing To deploy your system so that it is ready for container signing, first ensure that you have enabled automation content collection and container signing . Then you can create a signing script, or add and sign an execution environment manually. Note Installer looks for the script and key on the same server where installer is located. Procedure From a terminal, create a signing script, and pass the script path as an installer parameter. Example : #!/usr/bin/env bash # pulp_container SigningService will pass the 4 variables to the script. MANIFEST_PATH=USD1 FINGERPRINT="USDPULP_SIGNING_KEY_FINGERPRINT" IMAGE_REFERENCE="USDREFERENCE" SIGNATURE_PATH="USDSIG_PATH" # Create container signature using skopeo skopeo standalone-sign \ USDMANIFEST_PATH \ USDIMAGE_REFERENCE \ USDFINGERPRINT \ --output USDSIGNATURE_PATH # Optionally pass the passphrase to the key if password protected. # --passphrase-file /path/to/key_password.txt # Check the exit status STATUS=USD? if [ USDSTATUS -eq 0 ]; then echo {\"signature_path\": \"USDSIGNATURE_PATH\"} else exit USDSTATUS fi Review the Ansible Automation Platform installer inventory file for options for container signing that begin with automationhub_* . [all:vars] . . . automationhub_create_default_container_signing_service = True automationhub_container_signing_service_key = /absolute/path/to/key/to/sign automationhub_container_signing_service_script = /absolute/path/to/script/that/signs Once installation is complete, log in to Ansible Automation Platform and navigate to Automation Content Signature Keys . Ensure that you have a key titled container-default , or container - anyname . Note The container-default service is created by the Ansible Automation Platform installer. 3.6.2. Adding containers remotely to automation hub You can add containers remotely to automation hub in one of the following two ways: By creating remotes By using an automation execution environment Procedure Log in to Ansible Automation Platform. From the navigation panel, select Automation Content Remote Registries . Click Create remote registry . In the Name field, enter the name of the registry where the container resides. In the URL field, enter the URL of the registry where the container resides. In the Username field, enter the username if necessary. In the Password field, enter the password if necessary. Click Create remote registry . 3.6.3. Adding and signing an execution environment Automation execution environments are container images that make it possible to incorporate system-level dependencies and collection-based content. Each execution environment allows you to have a customized image to run jobs, and each of them contain only what you need when running the job. Procedure From the navigation panel, select Automation Content Execution Environments . Click Create execution environment and enter the relevant information in the fields that appear. The Name field displays the name of the execution environment on your local registry. The Upstream name field is the name of the image on the remote server. Under Registry , select the name of the registry from the drop-down menu. Optional: Enter tags in the Add tag(s) to include field. If the field is blank, all the tags are passed. You must specify which repository-specific tags to pass. Optional: Enter tags to exclude in the Add tag(s) to exclude field. Click Create execution environment . You should see your new execution environment in the list that appears. Sync and sign your new automation execution environment. Click the More Actions icon ... and select Sync execution environment . Click the More Actions icon ... and select Sign execution environment . Click on your new execution environment. On the Details page, find the Signed label to determine that your execution environment has been signed. 3.6.4. Pushing container images from your local environment Use the following procedure to sign an automation execution environment on a local system and push the signed execution environment to the automation hub registry. Procedure From a terminal, log in to Podman, or any container client currently in use: > podman pull <container-name> After the execution environment is pulled, add tags (for example: latest, rc, beta, or version numbers, such as 1.0; 2.3, and so on): > podman tag <container-name> <server-address>/<container-name>:<tag name> Sign the execution environment after changes have been made, and push it back up to the automation hub registry: > podman push <server-address>/<container-name>:<tag name> --tls-verify=false --sign-by <reference to the gpg key on your local> If the execution environment is not signed, it can only be pushed with any current signature embedded. Alternatively, you can use the following script to push the execution environment without signing it: > podman push <server-address>/<container-name>:<tag name> --tls-verify=false Once the execution environment has been pushed, navigate to Automation Content Execution Environments . To display the new execution environment, click the Refresh icon. Click the name of the image to view your pushed image. Troubleshooting The details page for each execution environment indicates whether it has been signed. If the details page indicates that an image is Unsigned , you can sign the execution environment from automation hub using the following steps: Click the execution environment name to navigate to the details page. Click the More Actions icon ... . Three options are available: Sign execution environment Use in Controller Delete execution environment Click Sign execution environment from the drop-down menu. The signing service signs the execution environment. After the execution environment is signed, the status changes to "signed". 3.6.5. Policies with signed images Policies can be used by podman or other image clients to ensure the validity of the image by assigning specific policies to that signature. 3.6.6. Using podman to ensure an image is signed by a specific signature To ensure an execution environment is signed by specific signatures, the signatures must first be on your local environment. Procedure From the navigation panel, select Automation Content Signature Keys . Click the Download key icon to the signature that you are using. A new window should open to indicate you have downloaded the key. 3.6.7. Configuring the client to verify signatures To ensure an execution environment pulled from the remote registry is properly signed, you must first configure the execution environment with the proper public key in a policy file. Prerequisites The client must have sudo privileges configured to verify signatures. Procedure Open your terminal and use the following command: > sudo <name of editor> /etc/containers/policy.json The file that is displayed is similar to this: { "default": [{"type": "reject"}], "transports": { "docker": { "quay.io": [{"type": "insecureAcceptAnything"}], "docker.io": [{"type": "insecureAcceptAnything"}], "<server-address>": [ { "type": "signedBy", "keyType": "GPGKeys", "keyPath": "/tmp/containersig.txt" }] } } } This file shows that neither quay.io , or docker.io will perform the verification, because the type is insecureAcceptAnything which overrides the default type of reject . However, <server-address> will perform the verification, because the parameter type is set to "signedBy" . Note The only keyType currently supported is GPG keys. Under the <server-address> entry, modify the keyPath <1> to include the name of your key file. { "default": [{"type": "reject"}], "transports": { "docker": { "quay.io": [{"type": "insecureAcceptAnything"}], "docker.io": [{"type": "insecureAcceptAnything"}], "<server-address>": [{ "type": "signedBy", "keyType": "GPGKeys", "keyPath": "/tmp/<key file name>", "signedIdentity": { "type": "matchExact" } }] } } } Save and close the file. Verification Pull the file using Podman, or your client of choice: > podman pull <server-address>/<container-name>:<tag name> --tls-verify=false This response verifies the execution environment has been signed with no errors. If the execution environment is not signed, the command fails. Additional resources For more information about policy.json, see documentation for containers-policy.json . 3.7. Deleting a container repository Delete a remote repository from your Ansible Automation Platform to manage your disk space. You can delete repositories from the Red Hat Ansible Automation Platform interface in the Execution Environment list view. Prerequisites You have permissions to manage repositories. Procedure Log in to Ansible Automation Platform. From the navigation panel, select Automation Content Execution Environments . On the container repository that you want to delete, click the More Actions icon ... , and click Delete execution environment . When the confirmation message is displayed, click the checkbox and click Delete execution environment . Verification Return to the automation execution environments list view. If the automation execution environments has been successfully deleted, it will no longer be in the list.
podman login registry.redhat.io podman pull registry.redhat.io/ <ee_name> : <tag> podman images podman tag registry.redhat.io/ <ee_name> : <tag> <automation_hub_hostname> / <ee_name> podman images podman login -u= <username> -p= <password> <automation_hub_url> podman push <automation_hub_url> / <ee_name> #!/usr/bin/env bash pulp_container SigningService will pass the next 4 variables to the script. MANIFEST_PATH=USD1 FINGERPRINT="USDPULP_SIGNING_KEY_FINGERPRINT" IMAGE_REFERENCE="USDREFERENCE" SIGNATURE_PATH="USDSIG_PATH" Create container signature using skopeo skopeo standalone-sign USDMANIFEST_PATH USDIMAGE_REFERENCE USDFINGERPRINT --output USDSIGNATURE_PATH Optionally pass the passphrase to the key if password protected. --passphrase-file /path/to/key_password.txt Check the exit status STATUS=USD? if [ USDSTATUS -eq 0 ]; then echo {\"signature_path\": \"USDSIGNATURE_PATH\"} else exit USDSTATUS fi [all:vars] . . . automationhub_create_default_container_signing_service = True automationhub_container_signing_service_key = /absolute/path/to/key/to/sign automationhub_container_signing_service_script = /absolute/path/to/script/that/signs > podman pull <container-name> > podman tag <container-name> <server-address>/<container-name>:<tag name> > podman push <server-address>/<container-name>:<tag name> --tls-verify=false --sign-by <reference to the gpg key on your local> > podman push <server-address>/<container-name>:<tag name> --tls-verify=false > sudo <name of editor> /etc/containers/policy.json { "default": [{"type": "reject"}], "transports": { "docker": { "quay.io": [{"type": "insecureAcceptAnything"}], "docker.io": [{"type": "insecureAcceptAnything"}], "<server-address>": [ { "type": "signedBy", "keyType": "GPGKeys", "keyPath": "/tmp/containersig.txt" }] } } } { "default": [{"type": "reject"}], "transports": { "docker": { "quay.io": [{"type": "insecureAcceptAnything"}], "docker.io": [{"type": "insecureAcceptAnything"}], "<server-address>": [{ "type": "signedBy", "keyType": "GPGKeys", "keyPath": "/tmp/<key file name>", "signedIdentity": { "type": "matchExact" } }] } } } > podman pull <server-address>/<container-name>:<tag name> --tls-verify=false