Skip to content

Instantly share code, notes, and snippets.

@arsalanses
Created January 3, 2024 08:27
Show Gist options
  • Select an option

  • Save arsalanses/45cfd9a46fdf1f18e301cf6ca6e942ca to your computer and use it in GitHub Desktop.

Select an option

Save arsalanses/45cfd9a46fdf1f18e301cf6ca6e942ca to your computer and use it in GitHub Desktop.
awx ansible tower

Docker Compose for Development

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

Clone the repo

git clone -b 23.6.0 https://github.com/ansible/awx.git

Prerequisites

apt install ansible make

Configuration

In the inventory file, set your pg_password, broadcast_websocket_secret, secret_key, and any other settings you need for your deployment.

openssl rand -base64 12
vim tools/docker-compose/inventory

Build the Image

make docker-compose-build

Optional

docker pull quay.io/ansible/receptor:devel
export RECEPTOR_IMAGE=quay.io/ansible/receptor:devel

Run AWX, Start the containers

# docker-compose -> docker compose
vim Makefile
make docker-compose COMPOSE_UP_OPTS=-d

Wait for migrations

docker compose -f tools/docker-compose/_sources/docker-compose.yml logs -f

Clean and build the UI

docker exec tools_awx_1 make clean-ui ui-devel

Create an admin user

docker exec -it tools_awx_1 awx-manage createsuperuser

Once migrations are completed and the UI is built, you can begin using AWX. The UI can be reached in your browser at https://localhost:8043/#/home, and the API can be found at https://localhost:8043/api/v2.

Remove ssl

docker exec -it tools_awx_1 bash
# remove ssl from server section with `8043` port
vi /etc/nginx/nginx.conf
nginx -t
nginx -s reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment