summaryrefslogtreecommitdiffstats
path: root/ansible_collections/dellemc/openmanage/docs/EXECUTION_ENVIRONMENT.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-18 05:52:22 +0000
commit38b7c80217c4e72b1d8988eb1e60bb6e77334114 (patch)
tree356e9fd3762877d07cde52d21e77070aeff7e789 /ansible_collections/dellemc/openmanage/docs/EXECUTION_ENVIRONMENT.md
parentAdding upstream version 7.7.0+dfsg. (diff)
downloadansible-38b7c80217c4e72b1d8988eb1e60bb6e77334114.tar.xz
ansible-38b7c80217c4e72b1d8988eb1e60bb6e77334114.zip
Adding upstream version 9.4.0+dfsg.upstream/9.4.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/dellemc/openmanage/docs/EXECUTION_ENVIRONMENT.md')
-rw-r--r--ansible_collections/dellemc/openmanage/docs/EXECUTION_ENVIRONMENT.md154
1 files changed, 73 insertions, 81 deletions
diff --git a/ansible_collections/dellemc/openmanage/docs/EXECUTION_ENVIRONMENT.md b/ansible_collections/dellemc/openmanage/docs/EXECUTION_ENVIRONMENT.md
index a688c5c27..c5f556a72 100644
--- a/ansible_collections/dellemc/openmanage/docs/EXECUTION_ENVIRONMENT.md
+++ b/ansible_collections/dellemc/openmanage/docs/EXECUTION_ENVIRONMENT.md
@@ -1,4 +1,4 @@
-# Build execution environment with Dell OpenManage Ansible Modules
+# Using Ansible Automation Platform with Dell OpenManage Ansible Modules
Creating automation execution environments using the OpenManage Ansible Modules enables your automation teams to define, build, and update their automation environment themselves. Execution environments provide a common language to communicate automation dependency between automation developers, architects, and platform administrators.
In this tutorial, you will learn how to build the execution environment image, push the image to a registry, and then create the execution environment in Ansible Automation Platform.
@@ -13,59 +13,68 @@ While Ansible Galaxy is good for testing the latest and greatest developer conte
- Premium support enables you to get help directly from Red Hat if you have any issue with an official Red Hat collection or certified partner collection.
- Red Hat subscription provides free and unlimited access to any content available.
-## Why AWX
-Ansible AWX provides an open-source version of Ansible Automation Platform and is the foundation on which Ansible Automation Platform was developed. With Ansible AWX, you have all the enterprise features for an unlimited number of nodes. However, one drawback to note is that Ansible AWX undergoes minimal testing and quality engineering testing.
## Workflow
In this tutorial, you will learn how to:
-1. [Build custom execution environment image.](#build-custom-execution-environment-image)
+1. [Build execution environment image.](#build-execution-environment-image)
2. [Use Ansible Runner to verify the execution environment (Optional).](#use-ansible-runner-to-verify-the-execution-environment)
3. [Upload the execution environment to a registry.](#upload-the-execution-environment-to-a-registry)
4. [Create execution environment in Ansible Automation Platform.](#create-execution-environment-in-ansible-automation-platform)
-## Build custom execution environment image
-Build a custom image with the required OpenManage Ansible collections ([dellemc.openmanage](https://github.com/dell/dellemc-openmanage-ansible-modules) ) and libraries (omsdk and netaddr), and then upload it to a registry of your choice. In this tutorial, you will learn how to create a Docker image.
+## Build execution environment image
+Build a image with the required Ansible collections and libraries, and then upload it to a registry of your choice. In this tutorial, you will learn how to create a Podman image.
1. Create the following files in your local directory:
- - *execution_environment.yml*
- - *requirement.yml*
+ - *execution-environment.yml*
+ - *requirements.yml*
- *requirements.txt*
2. For installing OpenManage collections and their dependencies, copy the metadata from the [dellemc.openmanage](https://github.com/dell/dellemc-openmanage-ansible-modules) GitHub repository.
-The following are the sample files:
+ The following are the sample files:
-**execution_environment.yml**
+ **execution-environment.yml**
-```yaml
-version: 1
-dependencies:
- galaxy: requirements.yml
- python: requirements.txt
-```
+ ```yaml
+ version: 3
+ dependencies:
+ galaxy: requirements.yml
+ python: requirements.txt
+ system: bindep.txt
+ ```
+
+ We can modify the execution environment file to configure as per your requirement based on the guidelines mentioned [here](https://docs.ansible.com/automation-controller/latest/html/userguide/ee_reference.html)
+
-**requirement.yml**
-```yaml
-collections:
- - name: dellemc.openmanage
-```
+ **requirements.yml**
+ ```yaml
+ collections:
+ - dellemc.openmanage
+ - ansible.utils
+ - ansible.windows
+ ```
+ Note: The content of the *requirements.yml* can be found [here](https://github.com/dell/dellemc-openmanage-ansible-modules/blob/collections/requirements.yml)
-**requirements.txt**
-```yaml
-omsdk
-netaddr>=0.7.19
-```
+ **requirements.txt**
+ ```yaml
+ omsdk
+ netaddr>=0.7.19
+ jmespath
+ ```
-3. Build the Docker image using the following syntax:
+ Note: The content of the *requirements.txt* can be found [here](https://github.com/dell/dellemc-openmanage-ansible-modules/blob/collections/requirements.txt)
-`ansible-builder build -f<path>/execution-environment.yml --container-runtime=<container> -c build_context --tag <container.io>/<org_name or username>/<imagename>:<tag>`
+3. Build the Podman image using the following syntax:
- In this tutorial, the following command is used to build the Docker image with the name "*execution_environment*".
+ `ansible-builder build -f <path>/execution-environment.yml --container-runtime=<container> -c build_context --tag <container.io>/<org_name or username>/<imagename>:<tag>`
-```yaml
-ansible-builder build -f execution-environment.yml --container-runtime=docker -c build_context --tag docker.io/delluser/execution_environment:<tag>
-docker build -f context/Dockerfile -t docker.io/delluser/execution_environment context
-Complete! The build context can be found at: /context
-```
+ In this tutorial, the following command is used to build the Docker image with the name "*execution-environment*".
+
+ ```yaml
+ $ ansible-builder build -f execution-environment.yml --container-runtime=podman -c build_context --tag quay.io/delluser/dell-openmanage-ee:<tag>
+
+ podman build -f context/Containerfile -t quay.io/delluser/dell-openmanage-ee context
+ Complete! The build context can be found at: /context
+ ```
## Use Ansible Runner to verify the execution environment
@@ -86,7 +95,7 @@ runner-example/
└── project
└── testplaybook.yml
```
-
+
2. Create a host file with the following entries:
```yaml
@@ -94,34 +103,30 @@ runner-example/
192.168.0.1
[idrac:vars]
-ansible_python_interpreter=/usr/bin/python3.8
+ansible_python_interpreter=/usr/bin/python3.9
user=user
password=password
```
3. Create a playbook.
```yaml
-- hosts: idrac
- connection: local
- name: Get system inventory
- gather_facts: False
-
- collections:
- - dellemc.openmanage
+- name: Get system inventory
+ hosts: idrac
+ gather_facts: false
tasks:
- - name: Get system inventory.
- idrac_system_info:
- idrac_ip: "{{ inventory_hostname }}"
- idrac_user: "{{ user }}"
- idrac_password: "{{ password }}"
- validate_certs: False
-
+ - name: Get system inventory.
+ dellemc.openmanage.idrac_system_info:
+ idrac_ip: "{{ inventory_hostname }}"
+ idrac_user: "{{ user }}"
+ idrac_password: "{{ password }}"
+ validate_certs: false
+ delegate_to: localhost
```
4. Run the playbook using the following command:
```yaml
-ansible-runner run --process-isolation --process-isolation-executable docker --container-image docker.io/delluser/execution_environment -p sysinfo.yml ./runner-example/ -v
+ansible-runner run --process-isolation --process-isolation-executable podman --container-image quay.io/delluser/dell-openmanage-ee -p sysinfo.yml ./runner-example/ -v
No config file found; using defaults
PLAY [Get system inventory] ****************************************************
@@ -167,33 +172,33 @@ runner-example/
Now that you have built the image, you can upload the execution environment image to a registry. The following steps describe how to upload the image to a Docker registry. You can upload the image to a registry of your choice (https://quay.io or https://docker.io).
-1. Log in to docker.io.
+1. Log in to quay.io.
```yaml
-docker login docker.io
+podman login quay.io
```
2. To view the list of images, run the following command:
```yaml
-docker image list
+podman image list
```
Output:
```yaml
REPOSITORY TAG IMAGE ID CREATED SIZE
-docker.io/delluser/execution_environment latest 6ea6337881f5 36 seconds ago 908MB
+quay.io/delluser/dell-openmanage-ee latest 6ea6337881f5 36 seconds ago 908MB
<none> <none> bab8f0c1f372 3 hours ago 959MB
<none> <none> 26e61b6f31b6 3 hours ago 779MB
```
3. Upload the image to the repository using the following command:
```yaml
-docker push docker.io/delluser/execution_environment
+podman push quay.io/delluser/dell-openmanage-ee
```
Output:
```yaml
Using default tag: latest
-The push refers to repository [docker.io/delluser/execution_environment]
+The push refers to repository [quay.io/delluser/dell-openmanage-ee]
6a938007b4eb: Pushed
c1a7a8b69adb: Pushed
75f55eeed6f1: Pushed
@@ -217,7 +222,6 @@ aadc47c09f66: Layer already exists
101e6c349551: Layer already exists
latest: digest: sha256:7be5110235abf72e0547cac016a506d59313addefc445d35e5dff68edb0a9ad6 size: 4726
<none> 26e61b6f31b6 3 hours ago 779MB
-
```
## Create execution environment in Ansible Automation Platform
@@ -227,8 +231,8 @@ Now that you uploaded the image to a registry, you can now create the execution
1. Log in to Ansible Automation Platform.
2. On the navigation pane, click **Administration > Execution Environments**.
-2. On the **Execution Environments** page, click **Add**.
-3. On the **Create new execution environment** page, enter the following details, and click **Save**.
+3. On the **Execution Environments** page, click **Add**.
+4. On the **Create new execution environment** page, enter the following details, and click **Save**.
- **Name**: Enter a name for the execution environment (required).
- **Image**: Enter the image name (required). The image name requires its full location (repo), the registry, image name, and version tag
- **Pull**: From the **Pull** drop-down list, select **Only pull the image if not present before running**.
@@ -248,7 +252,7 @@ A Project is a logical collection of Ansible playbooks.
- In the **Source Control URL**, specify the source control URL. That is your repository link.
### Create Credential Types
-This tutorial uses a custom credential type. You can create credential types depending on your data center environment. For more information, see [Credential Types](https://docs.ansible.com/automation-controller/4.0.0/html/userguide/credentials.html#credential-types).
+This tutorial uses a custom credential type. You can create credential types depending on your data center environment. For more information, see [Credential Types](https://docs.ansible.com/automation-controller/4.2.1/html/userguide/credentials.html#credential-types).
To create a credential type:
@@ -263,16 +267,16 @@ This tutorial uses a custom credential type. The following are the input configu
```yaml
fields:
- -id: username
+ - id: username
type: string
label: Username
- -Id: password
+ - id: password
type: string
label: Password
secret: true
-Required:
- -username
- -password
+required:
+ - username
+ - password
```
**Injector configuration:**
@@ -295,7 +299,7 @@ extra_vars:
1. On the navigation pane, click **Resources > Inventories**.
2. On the **Inventories** page, click **Add**.
3. On the **Create New Inventory** page, enter the details and click **Save**.
-4. Add groups and hosts to the inventory.
+4. Add Groups and Hosts to the inventory.
## Create Job Templates
@@ -326,22 +330,10 @@ You can add an Ansible python interpreter to a Template or Inventory.
`ansible_python_interpreter: /usr/bin/python<version>`
```yaml
-ansible_python_interpreter: /usr/bin/python3.8
+ansible_python_interpreter: /usr/bin/python3.9
```
## Documentation references
- [https://www.redhat.com/en/technologies/management/ansible](https://www.redhat.com/en/technologies/management/ansible)
- [https://www.redhat.com/en/blog/what-ansible-automation-hub-and-why-should-you-use-it](https://www.redhat.com/en/blog/what-ansible-automation-hub-and-why-should-you-use-it)
-- [https://becloudready.com/ansible-awx-vs-ansible-tower-the-key-to-automation/](https://becloudready.com/ansible-awx-vs-ansible-tower-the-key-to-automation/)
-
-
-
-
-
-
-
-
-
-
-
-
+- [https://www.ansible.com/blog/unlocking-efficiency-harnessing-the-capabilities-of-ansible-builder-3.0](https://www.ansible.com/blog/unlocking-efficiency-harnessing-the-capabilities-of-ansible-builder-3.0)