Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Documentation Not Working #15262

Open
7 of 11 tasks
ckozler opened this issue Jun 8, 2024 · 4 comments
Open
7 of 11 tasks

Docker Documentation Not Working #15262

ckozler opened this issue Jun 8, 2024 · 4 comments

Comments

@ckozler
Copy link

ckozler commented Jun 8, 2024

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to security@ansible.com instead.)

Bug Summary

Following this document to the letter in 3 tracked separate attempts. I am using Rocky Linux 9. I have tried from HEAD as well as 24.5.0 and all versions back to 24.0.0

https://github.com/ansible/awx/blob/devel/tools/docker-compose/README.md

  • Deploy new RL9 image from DigitalOcean
  • dnf groupinstall 'Development Tools'
  • git clone -b 24.5.0 https://github.com/ansible/awx.git -- also tried HEAD and all versions back to 24.0.0
  • Ansible Installation -> I did this both with pipx and without pipx using the normal pip installation documented here with pipx and here without pipx
  • docker installed from https://docs.docker.com/engine/install/centos/
  • cd awx && make docker-compose-build (tried with and without this step)
  • make docker-compose
  • docker exec tools_awx_1 make clean-ui ui-devel
  • docker exec -ti tools_awx_1 awx-manage createsuperuser
  • docker exec tools_awx_1 awx-manage create_preload_data
  • I have not customized receptor nor the AWX image. I am using devel and not pulling separate images or using what ever is able natively without using DEVEL_IMAGE_NAME or COMPOSE_TAG

And I am met with a different error in each tag so it feels like something is broken somewhere (dependency?)

Error 1 #14876
Error 2 containers/podman#21032
Error 3 containers/podman#21024

Everything installs but Error 1 is showing the entire time inside make docker-compose logs. Error 2 and 3 are seen whenever I try to sync a project or run a template.

Each build takes me about 35 minutes or so as I have to snap the DO VM back to base install each time I want to make another attempt.

I was going to attempt other OS's like CentOS Stream 9 and RHEL directly but did not want to waste my time repeating the same issues as these are all the same derivative I would expect them to fail in the same way.

I've tried from tag 24.5.0 until 24.0.0 and each time I face a different error. The most common are the above.

No epel in use. Stock RL9 image from DO.

Ansible version installed not using EPEL
[root@sfo3do-awx ~]# ansible --version ansible [core 2.15.12] config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /root/.local/lib/python3.9/site-packages/ansible ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections executable location = /root/.local/bin/ansible python version = 3.9.18 (main, Jan 24 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] (/usr/bin/python3) jinja version = 3.1.4 libyaml = True

AWX version

24.5.0 - 24.0.0

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

docker development environment

Modifications

no

Ansible version

2.5.12

Operating system

RockyLinux 9

Web browser

No response

Steps to reproduce

Documented above

Expected results

Can sync projects and run templates

Actual results

I cannot. While AWX installs fine nothing seems to work on the internals.

Additional information

A user on the ansible forums with similar issues as me but they went further back to 23.3.1 https://forum.ansible.com/t/updating-awx-image-on-docker/1850/6

@ckozler
Copy link
Author

ckozler commented Jun 8, 2024

Fixed some typos on versions I tried. To clarify, issues seem to exist for me across the entire 24 version. I tried version 23 once without paying much attention and it failed because docker-compose command is replaced as a plugin in the version of docker installed via the above process so it appears as if there are a bunch of cross dependencies I am not seeing? While installation works it does not seem functional. I am still testing.

@ckozler
Copy link
Author

ckozler commented Jun 8, 2024

I can confirm that, for me, I am unable to build a functional version 24. Running 23.8.1 and I can refresh projects and run templates. The attached script is a bootstrap script. The only dependency is needing an SSH key with root access in your ~/.ssh directory that will work with the destination.

I had to try so many times that I figured in the spirit of automation I should create a reproducible build. So I built it by hand a bunch and then ported it all in to a script. Observed the same failures by hand and by the automation script for version 24. Ran for the first time on 23.8.1 and everything was complete with UI accessible

awx-docker-deploy.sh.zip

Screenshot showing the bulk of the script

2024-06-08-150855_1104x334_scrot

@ckozler
Copy link
Author

ckozler commented Jun 12, 2024

The attached two scripts can successfully deploy 23.8.1 and 24.5.0. The same requirements as the other script but just cleaned up with some more structure.
awx-deploy.zip

This was in an effort to test as many other versions as I could to see what the issue was and can confirm the 24.x seems "broke" when doing the docker install.

Please let me know what you would like me to test. I cannot find any issues logged which have the same problem as I describe here.

@gdeleon23
Copy link

gdeleon23 commented Aug 28, 2024

I @ckozler

I test the version 24.6.0 on Ubuntu 22 LTS, i put all my commands to work correctly:

Installation of docker

sudo apt -y update
sudo apt -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common python3-venv python3-pip python3-dev
sudo pip3 install pytest virtualenv
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg
sudo add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt -y install docker-ce docker-ce-cli containerd.io
sudo usermod -aG docker $USER
sudo curl -L https://github.com/docker/compose/releases/download/v2.18.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo systemctl enable docker

Installation of awx ifr

git clone -b 24.6.0 https://github.com/ansible/awx.git
cd awx
CONTAINERCMD=docker TAG=quay.io/ansible/receptor:latest make container
export RECEPTOR_IMAGE=quay.io/ansible/receptor:latest
export DEVEL_IMAGE_NAME=ghcr.io/ansible/awx_devel:24.6.0
COMPOSE_TAG=24.6.0 make docker-compose-build 
COMPOSE_TAG=24.6.0 make docker-compose COMPOSE_UP_OPTS=-d
docker exec tools_awx_1 make clean-ui ui-devel
docker exec -ti tools_awx_1 awx-manage createsuperuser

Username (leave blank to use 'awx'): soy_root
Email address: xxx@gmail.com
Password:
Password (again):
Superuser created successfully.

Install awx-ui

cd awx/ui
docker build -t awx-ui .
docker run --name tools_ui_1 --network awx --link 'tools_awx_1:awx' -e TARGET="https://awx:8043" -p '3001:3001' --rm -v $(pwd)/src:/ui/src awx-ui

Compiled successfully!
You can now view ui in the browser.

Local: https://localhost:3001
On Your Network: https://172.19.0.5:3001

And now i can login with my previous user called "soy_root"

I hope this is helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants