Create automation runtimes with execution and decision environments
All automation in Red Hat Ansible Automation Platform runs on container images called automation execution environments.
Automation execution environments are consistent and shareable container images that serve as Ansible control nodes. Automation execution environments reduce the challenge of sharing Ansible content that has external dependencies.
If automation content is similar to a script that a developer has written, an automation execution environment is like a replica of that developer’s environment, thereby enabling you to reproduce and scale that automation content. In this way, execution environments make it easier for you to implement automation in a range of environments.
Automation execution environments contain:
- Ansible Core
- Ansible Runner
- Ansible Collections
- Python libraries
- System dependencies
- Custom user needs
You can either use the default base execution environment included in your Ansible Automation Platform subscription, or you can define and create an automation execution environment using Ansible Builder.
Use the base automation execution environment Copy linkLink copied!
Ansible Automation Platform provides access to some base automation execution environments. You can use a base execution environment as a starting point for creating a customized execution environment.
Before you begin Copy linkLink copied!
- You have a valid Red Hat Ansible Automation Platform subscription.
About this task Copy linkLink copied!
Ansible Automation Platform includes the following execution environments:
Minimal- Includes the latest Ansible-core 2.15 release along with Ansible Runner, but does not include collections or other contentEE Supported- Minimal, plus all Red Hat-supported collections and dependencies
Base images included with Ansible Automation Platform are hosted on the Red Hat Ecosystem Catalog (registry.redhat.io).
Procedure Copy linkLink copied!
Add an execution environment to a job template Copy linkLink copied!
After you have built an execution environment, use it to run jobs. To do so, first associate the execution environment with a job template.
Before you begin Copy linkLink copied!
- An execution environment created using
ansible-builderas described in Define, create, and build execution environments. - Organization administrator privileges (if the execution environment is associated with an organization).
- A credential with a username, host, and password (if assigned to the execution environment).
About this task Copy linkLink copied!
Use the following procedure to add an execution environment to a job template.
Procedure Copy linkLink copied!
- From the navigation panel, select .
- Click to create an execution environment.
- Enter the appropriate details into the following fields:
- Click . Your newly added execution environment is ready to be used in a job template.
- To add an execution environment to a job template, navigate to and select your template.
- Click and specify your execution environment in the field labeled execution environment.
Results Copy linkLink copied!
After you add an execution environment to a job template, the template is listed in the Templates tab in your execution environment details.
About container registries Copy linkLink copied!
If you have many automation execution environments that you want to support, you can store them in a container registry linked to your private automation hub.
For more information, see Populating your private automation hub container registry.
Build and use a decision environment Copy linkLink copied!
Event-Driven Ansible includes an ansible.eda collection, which contains sample sources, event filters and rulebooks. All the collections, ansible rulebooks and their dependencies use a decision environment, which is an image that can be run on either Podman or Kubernetes.
In decision environments, sources, which are typically Python code, are distributed through ansible-collections. They inject external events into a rulebook for processing. The rulebook consists of the following:
- The python interpreter
- Java Runtime Environment for Drools rule engine
- ansible-rulebook python package
- ansible.eda collection
You can use the base decision environment and build your own customized Decision Environments with additional collections and collection dependencies. You can build a decision environment using a Dockerfile or optionally you can deploy your CA certificate into the image.
Set up a new decision environment Copy linkLink copied!
The following steps describe how to import a decision environment into the platform.
Before you begin Copy linkLink copied!
- You have set up any necessary credentials. For more information, see Setting up credentials.
- You have pushed a decision environment image to an image repository or you chose to use the image
de-supportedprovided at registry.redhat.io.
About this task Copy linkLink copied!
Procedure Copy linkLink copied!
Results Copy linkLink copied!
Your decision environment is now created and can be managed on the Decision Environments page.
After saving the new decision environment, the decision environment’s details page is displayed. From there or the Decision Environments list view, you can edit or delete it.