See https://github.com/ansible/awx/tree/24.6.1-docs/tools/docker-compose


Clone the Repo 

# clone repo release 24.6.1
git clone -b 24.6.1 https://github.com/ansible/awx.git

cd awx


Set Password/Key (Optional)

If you don't set, it will generate some.... 

Create Key

openssl rand -base64 30

K8SDkfGqkIzIyhIYJnsv/z0eI3PAsmxyrqDo2cug

Update Inventory File

cd tools/docker-compose
vi inventory
localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python3"

[all:vars]

# AWX-Managed Database Settings
# If left blank, these will be generated upon install.
# Values are written out to tools/docker-compose/_sources/secrets/
pg_password="awx"
broadcast_websocket_secret="K8SDkfGqkIzIyhIYJnsv/z0eI3PAsmxyrqDo2cug"
secret_key="K8SDkfGqkIzIyhIYJnsv/z0eI3PAsmxyrqDo2cug" 
...


Build

Update Dockerfile.j2. Remove version since this version is no longer available.

vi ./tools/ansible/roles/dockerfile/templates/Dockerfile.j2
# pin to older openssl, see jira AAP-23449
#openssl-3.0.7 \
openssl \

...

# pin to older openssl, see jira AAP-23449
#openssl-3.0.7 \
openssl \


cd <awx_root_folder>
make docker-compose-build




OLD---

make docker-compose-buildmake docker-compose

#install nvm and open a new shell
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

# use node 18
nvm install 18

#build UI
make clean/ui ui

#make docker-compose

# startup in background
make docker-compose COMPOSE_UP_OPTS=-d


Create super user

docker exec -ti tools_awx_1 awx-manage createsuperuser

/var/lib/awx/venv/awx/lib64/python3.12/site-packages/django/db/backends/utils.py:98: RuntimeWarning: Accessing the database during app initialization is discouraged. To fix this warning, avoid executing queries in AppConfig.ready() or when your app modules are imported.
  warnings.warn(self.APPS_NOT_READY_WARNING_MSG, category=RuntimeWarning)

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



Browse https://localhost:8043/


make docker-compose-up
make docker-compose-down


References

  • No labels