Share Feedback to help us keep improving.
Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 4. Publishing an automation execution environment
Publish and customize your execution environment images. This procedure guides users in adding custom content, such as a collection, to an existing execution environment image such as ee-minimal.
4.1. Customizing an existing automation execution environments image Link kopierenLink in die Zwischenablage kopiert!
You can customize existing Automation controller provided default automation execution environments by adding content specific to your needs. Automation controller includes the following default automation execution environments.
Minimal-ansible-automation-platform-26Includes the latest Ansible-core 2.19 release along with Ansible Runner, but does not include collections or other content.While supported execution environments cover many automation prerequisites, minimal execution-environments are the recommended basis for your own custom images, to keep full control over dependencies and their versions.
-
EE Supported- Minimal, plus all Red Hat-supported collections and dependencies
While these environments cover many automation use cases, you can add additional items to customize these containers for your specific needs. The following procedure adds the kubernetes.core collection to the ee-minimal default image:
Procedure
Log in to
registry.redhat.iousing Podman:$ podman login -u="[username]" -p="[token/hash]" registry.redhat.ioEnsure that you can pull the required automation execution environment base image:
podman pull registry.redhat.io/ansible-automation-platform-26/ee-minimal-rhel8:latestConfigure your Ansible Builder files to specify the required base image and any additional content to add to the new execution environment image.
For example, to add the Kubernetes Core Collection from Galaxy to the image, use the Galaxy entry:
collections: - kubernetes.core- For more information about definition files and their content, see the Breakdown of definition file content section.
In the execution environment definition file, specify the original
ee-minimalcontainer’s URL and tag in theEE_BASE_IMAGEfield. In doing so, your finalexecution-environment.ymlfile looks similar to the following:version: 3 images: base_image: name: 'registry.redhat.io/ansible-automation-platform-25/ee-minimal-rhel9:latest' dependencies: galaxy: collections: - kubernetes.coreNoteSince this example uses the community version of
kubernetes.coreand not a certified collection from automation hub, we do not need to create anansible.cfgfile or reference that in our definition file.Build the new execution environment image by using the following command:
$ ansible-builder build -t [username]/new-eewhere
[username]specifies your username, andnew-eespecifies the name of your new container image.NoteIf you do not use
-twithbuild, an image calledansible-execution-envis created and loaded into the local container registry.Use the
podman imagescommand to confirm that your new container image is in that list:The following shows the output of a
podman imagescommand with the imagenew-ee.REPOSITORY TAG IMAGE ID CREATED SIZE localhost/new-ee latest f5509587efbb 3 minutes ago 769 MB
Verify that the collection is installed:
$ podman run [username]/new-ee ansible-doc -l kubernetes.coreTag the image for use in your automation hub:
$ podman tag [username]/new-ee [automation-hub-IP-address]/[username]/new-eeLog in to your automation hub using Podman:
NoteYou must have
adminor appropriate container repository permissions for automation hub to push a container. For more information, see Manage containers in private automation hub.$ podman login -u="[username]" -p="[token/hash]" [automation-hub-IP-address]Push your image to the container registry in automation hub:
$ podman push [automation-hub-IP-address]/[username]/new-eePull your new image into your automation controller instance:
- Go to automation controller.
-
From the navigation panel, select
. - Click .
Enter the appropriate information then click to pull in the new image.
NoteIf your instance of automation hub is password or token protected, ensure that you have the appropriate container registry credential set up.