ansible / ansible-builder

An Ansible execution environment builder
Other
289 stars 93 forks source link

unable to build awx-ee image fails on galaxy requirements #630

Closed lessfoobar closed 10 months ago

lessfoobar commented 10 months ago

ansible-builder build -t awx Running command: podman build -f context/Containerfile -t awx context ...showing last 20 lines of output... [2/4] STEP 8/12: RUN /output/scripts/check_galaxy --> Using cache 93e66a735cdd0238ee0fb37874203ea545a5ea86c6913e1ede7f0a35d22d37b5 --> 93e66a735cdd [2/4] STEP 9/12: COPY _build /build --> adac98e6e31e [2/4] STEP 10/12: WORKDIR /build --> aa553d9d8559 [2/4] STEP 11/12: RUN ansible-galaxy role install $ANSIBLE_GALAXY_CLI_ROLE_OPTS -r requirements.yml --roles-path "/usr/share/ansible/roles" Skipping install, no requirements found --> 5d7a6fdc5dc9 [2/4] STEP 12/12: RUN ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1 ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path "/usr/share/ansible/collections" Starting galaxy collection install process Process install dependency map [WARNING]: Skipping Galaxy server https://galaxy.ansible.com/api/. Got an unexpected error when getting available versions of collection ansible.netcommon: '/api/v3/plugin/ansible/content/published/collections/index/ ansible/netcommon/versions/' to see the full traceback, use -vvv ERROR! Unexpected Exception, this is probably a bug: '/api/v3/plugin/ansible/content/published/collections/index/ansible/netcommon/versions/' Error: building at STEP "RUN ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1 ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path "/usr/share/ansible/collections"": while running runtime: exit status 250

An error occurred (rc=250), see output line(s) above for details.

sivel commented 10 months ago

You've not provided very much context about your EE definition, but you are either specifying an unsupported ansible-core version to install, or using a base image that is out of date and includes an unsupported ansible-core version.

Closing as a duplicate of https://github.com/ansible/ansible-builder/issues/609

lessfoobar commented 10 months ago

execution-environment.yml

---
version: 3
dependencies:
  python: requirements.txt
  galaxy: requirements.yml
  system: bindep.txt

and I have my requirements in the above files, if required please let me know I'll repost them

lessfoobar commented 10 months ago

@sivel why did you put the issue on closed ? Your response didn't answer or fix the issue

sivel commented 10 months ago

As indicated, you are utilizing a base image that is no longer maintained, and contains an unsupported ansible-core version that contains a bug related to caching galaxy requests.

When you do not supply an images.base_image.name in your definition, as of now (this won't be true for ever), you will utilize quay.io/ansible/ansible-runner which is no longer maintained, and contains an unsupported ansible-core version.

When using the v3 schema, you should always specify a base image to use. You may want to review the official awx-ee, or use that as your base image:

https://github.com/ansible/awx-ee

lessfoobar commented 10 months ago

even if I use the awx-ee execution-env sudo is missing you need it for delegate to localhost with become: true and if you install sudo it is complaining about a password so you have to do passwordless sudo, since ansible-runner is deprecated is there a way to find a working image that users can use with ease?