I would like to build a custom image that I can run in production. I ran this command: make awx-kube-build
and it builds an image but throws errors about a missing django-auth-ldap module when I try to run it. I tried adding this in requirements.txt but it doesn’t appear to work.
I also changed requirements-git.txt to my repos and branches for awx-plugins and exported these 2 environment variables before issueing the make command:
try also updating the requirements.in file. Also depending on where in the build your respective packages are required, you may need to make an update to the awx/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 file to add respective system dependencies in order to get the make process to compile the awx-image build successfully.
For example I had an issue with a build for version: 24.6.1 recently, that was complaining about openssl version 3.0.7. I ended up commenting out that specific version and using just openssl, and my build completed successfully.
To build a custom AWX image for production with your changes, I believe this may help:
Fix Missing Dependency: Add django-auth-ldap to requirements_base.txt and requirements_git.txt in your AWX fork. Pin the version for compatibility (e.g., django-auth-ldap==4.0.0).
Set Environment Variables: Export variables for all custom repositories and branches, e.g.:
Much appreciated for all the suggestions here! I have been able to build a new image which also includes the django_auth_ldap module but the problem is that the UWSGI appears to not load the virtual environment correctly. If I login to the awx-web pod and activate the virtual env, I can easily import django_auth_ldap. I lost the logs I’m afraid but I’ll see if I can still get them. Basically, ‘production.py’ and ‘settings.py’ could not import django_auth_ldap (no such module).