Skip to content

LexMachinaInc/lex-awx-ee

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

awx-build-custom-ee

Short project to know how to create a basic AWX Execution Environment custom image based on Centos:stream10. In this example :

  • requirements.txt will be used to install
    • requests python module
  • requirements.yml will be used to install
    • community.general, kubernetes.core, and google.cloud collections
  • bindep.txt will be used to install some well known 'OS' packages (such as python!)

Project has been tested & validated with

  • ansible-builder 3.1.1
  • Nerdctl version 1.7.6

Requirements

Linux Host

  • It has to have access to https://quay.io/repository/ansible/awx-ee?tab=tags&tag=latest in order to use the base EE from RedHat quay.io.
  • It has to have access to a private registry to push/pull images (i.e. setup a private Docker registry on your own or use GitHub/GitLab container registry, Sonatype Nexus etc...).
  • Packages ansible-builder and docker must be installed.

Execution Environment information

  • You have to know :
    • which ansible collections you need.
    • which python lib you need.
    • which CentOS 'OS packages' you need.

Note: ansible-core & ansible-runner version aren't specified so they will use the latest available. If needed you can change that in execution-environment.yml.

Step-by-step

  1. Add ansible collections you need into requirements.yml.
  2. Add python libraries you need into requirements.txt.
  3. If needed, you can add some 'OS' packages into bindep.txt.
  4. If needed, you can set some append/prepend instructions in execution-environment.yml or change base_image name to use a different CentOS image for instance.
  5. Run the following command (-v is verbose level, -t is to tag your image and --container-runtime allow to use docker instead of podman as container engine). X.Y.Z is image tagging if you're using such a system. If not, you can replace it and tag it with latest.
ansible-builder build -v3 -t your-registry.com/path-to-image/your-image-name:X.Y.Z  --container-runtime docker

Note: You can see your fresh docker image using

docker image ls
  1. Finally, login to your private registry and push your image using
docker push your-registry.com/path-to-image/your-image-name:X.Y.Z

Now you've successfully created a custom EE to pull from your AWX instance, congrats !😍

Sources

Ansible Execution Environment Definition https://ansible.readthedocs.io/projects/builder/en/stable/definition/#execution-environment-definition

Ansible Release Schedule https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#release-schedule

About

Small project for building AWX images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published