Building an EE - just any way possible

,

Can anyone provide a link to any tutorial that’s worked for them to build a custom EE?

I have failed with Ansible-builder in more ways than I might have imagined possible. It’s been a weeks-long, horrible experience. I’ve failed on RHEL 8 and 9, both, with podman and docker, and for days and days because buildx cannot be made to trust my internally signed certificates but the process seems to fail with buildx disabled. And when I did, once, get the build process to succeed, there was evidently nothing there for me to push. The image was supposed to be in docker’s cache, but it was not there. This has been brutal.

It seems ansible-builder only works with external images, so I guess I’ll go back to trying again to make that work, but it’s really a dead end for me.

So, does anyone have a tutorial that might get me to a way to build a custom image? Maybe it can be done in some old-fashioned way, without builder?

Kevin

this tutorial should still be relevant https://www.ansible.com/blog/introduction-to-ansible-builder

also a good example to follow is the awx-ee image https://github.com/ansible/awx-ee

AWX Team

Thank you. It’s really nice to hear from you.

I’m afraid I need a tutorial with listed preconditions. Literally the first line of that tutorial failed for me. pip install ansible-builder. The tutorial assumes a lot of things about my environment that I have to make true, and then does not tell me what those things are. If I happened to have a box configured with the doohickeys needed, then great, but I’m starting from a bare box with no idea what I need.

I’m starting with a fresh RHEL box each time, and trying to guess an environment on which this will work and the commands it lists just don’t work with the preconditions I’ve guessed so far. I’ve tried RHEL 9 (it cannot load the python3.8 crypto libraries needed) and RHEL 8 with podman (it literally destroys the box. I don’t know how, but it shuts the box down and it will never restart again) and with docker. With docker, I had to give up building it with an internally hosted image due to builderx refusing to accept the certificates the host machine was trusting, and then when I built it with the quay.io image (it told me I was successful), the image was nowhere to be found.

I think today, I found a misconfig in my docker install. After fixing that, I managed to get almost there, but ran out of disk space so I’m waiting for the admins to give me more space, then I’ll try it again.

Thank you, again, for answering.

Kevin

This is killing me. Can anyone please provide a different way forward?

I have the build process working, but now it fails on:
#18 24.96 Error: Unable to find a match: python38-cryptography python38-pytz python38-pyyaml python38-requests

but if I run:
dnf -y install python38-cryptography python38-pytz python38-pyyaml python38-requests qemu-img rsync

It succeeds.

How can the packages absolutely be there and installed with dnf, but ansible-builder says dnf cannot find the packages?

AWX Team, you realize your tutorial requires a subscription to AAP, right?
NOTE: The following collection example is sourced from Automation Hub on cloud.redhat.com and requires a valid Ansible Automation Platform subscription and an upcoming feature to ansible-builder to access.

I’m running a bare build, adding nothing to the base image, and I get this error:
#18 24.32 + /usr/bin/dnf install -y python3-rpm python38-cryptography python38-pytz python38-pyyaml python38-requests qemu-img rsync
#18 24.90 Last metadata expiration check: 0:00:07 ago on Fri Apr 21 18:54:07 2023.
#18 25.17 Package python3-rpm-4.16.1.3-22.el9.x86_64 is already installed.
#18 25.17 No match for argument: python38-cryptography
#18 25.18 No match for argument: python38-pytz
#18 25.19 No match for argument: python38-pyyaml
#18 25.20 No match for argument: python38-requests
#18 25.21 Package qemu-img-17:7.2.0-14.el9.x86_64 is already installed.
#18 25.21 Package rsync-3.2.3-19.el9.x86_64 is already installed.
#18 25.22 Error: Unable to find a match: python38-cryptography python38-pytz python38-pyyaml python38-requests
#18 ERROR: process “/bin/sh -c /output/install-from-bindep && rm -rf /output/wheels” did not complete successfully: exit code: 1

Resolved: Happily. I was able to phone a friend.

My blindspot was around bindep.txt (https://docs.openstack.org/infra/bindep/). My python dependencies were all resolved by the following bindep.txt, though I’m sure I can remove some of these and still succeed.
findutils [compile platform:centos-8 platform:rhel-8]
gcc [compile platform:centos-8 platform:rhel-8]
make [compile platform:centos-8 platform:rhel-8]
python38-devel [compile platform:centos-8 platform:rhel-8]
python38-cffi [platform:centos-8 platform:rhel-8]
python38-cryptography [platform:centos-8 platform:rhel-8]
python38-pycparser [platform:centos-8 platform:rhel-8]