diff --git a/awx/README.md b/awx/README.md index 10e13de..26ca5ca 100644 --- a/awx/README.md +++ b/awx/README.md @@ -12,10 +12,13 @@ data ├── projects │ └── example │ └── playbook.yml +├── redis +│ └── redis.conf └── settings ├── SECRET_KEY ├── credentials.py - └── environment.sh + ├── environment.sh + └── nginx.conf ``` ## up and running diff --git a/awx/data/redis/redis.conf b/awx/data/redis/redis.conf new file mode 100644 index 0000000..daf69de --- /dev/null +++ b/awx/data/redis/redis.conf @@ -0,0 +1,4 @@ +unixsocket /var/run/redis/redis.sock +unixsocketperm 777 +port 0 +bind 127.0.0.1 diff --git a/awx/data/settings/credentials.py b/awx/data/settings/credentials.py index 5f91162..e289a4e 100644 --- a/awx/data/settings/credentials.py +++ b/awx/data/settings/credentials.py @@ -10,20 +10,4 @@ DATABASES = { } } -BROKER_URL = 'amqp://guest:guest@rabbitmq:5672/awx' - -CHANNEL_LAYERS = { - 'default': {'BACKEND': 'asgi_amqp.AMQPChannelLayer', - 'ROUTING': 'awx.main.routing.channel_routing', - 'CONFIG': {'url': BROKER_URL}} -} - -CACHES = { - 'default': { - 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', - 'LOCATION': 'memcached:11211' - }, - 'ephemeral': { - 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', - }, -} +BROADCAST_WEBSOCKET_SECRET = "{{ '🤖starscream🤖' | b64encode }}" diff --git a/awx/data/settings/environment.sh b/awx/data/settings/environment.sh index 817283d..dc836a1 100644 --- a/awx/data/settings/environment.sh +++ b/awx/data/settings/environment.sh @@ -3,10 +3,5 @@ DATABASE_NAME=awx DATABASE_HOST=postgres DATABASE_PORT=5432 DATABASE_PASSWORD=awxpass -DATABASE_ADMIN_PASSWORD=postgrespass -MEMCACHED_HOST=memcached -MEMCACHED_PORT=11211 -RABBITMQ_HOST=rabbitmq -RABBITMQ_PORT=5672 AWX_ADMIN_USER=admin AWX_ADMIN_PASSWORD=password diff --git a/awx/data/settings/nginx.conf b/awx/data/settings/nginx.conf index abed11c..e48aec5 100644 --- a/awx/data/settings/nginx.conf +++ b/awx/data/settings/nginx.conf @@ -93,6 +93,7 @@ http { uwsgi_pass uwsgi; include /etc/nginx/uwsgi_params; proxy_set_header X-Forwarded-Port 443; + uwsgi_param HTTP_X_FORWARDED_PORT 443; } } } diff --git a/awx/docker-compose.yml b/awx/docker-compose.yml index 3d5c695..e5d7ae4 100644 --- a/awx/docker-compose.yml +++ b/awx/docker-compose.yml @@ -1,5 +1,5 @@ # -# https://github.com/ansible/awx/raw/devel/installer/roles/local_docker/templates/docker-compose.yml.j2 +# https://github.com/ansible/awx/blob/12.0.0/installer/roles/local_docker/templates/docker-compose.yml.j2 # version: '2' @@ -7,54 +7,57 @@ version: '2' services: web: - image: ansible/awx_web:9.3.0 + image: ansible/awx:12.0.0 container_name: awx_web hostname: awxweb user: root ports: - "8052:8052" volumes: + - supervisor-socket:/var/run/supervisor + - rsyslog-socket:/var/run/awx-rsyslog + - rsyslog-config:/var/lib/awx/rsyslog - ./data/settings/SECRET_KEY:/etc/tower/SECRET_KEY - ./data/settings/environment.sh:/etc/tower/conf.d/environment.sh - ./data/settings/credentials.py:/etc/tower/conf.d/credentials.py - ./data/settings/nginx.conf:/etc/nginx/nginx.conf - - ./data/projects:/var/lib/awx/projects + - ./data/redis/redis_socket:/var/run/redis:rw + - ./data/projects:/var/lib/awx/projects:rw depends_on: - - rabbitmq - - memcached - postgres + - redis restart: unless-stopped task: - image: ansible/awx_task:9.3.0 + image: ansible/awx:12.0.0 + command: /usr/bin/launch_awx_task.sh container_name: awx_task hostname: awx user: root volumes: + - supervisor-socket:/var/run/supervisor + - rsyslog-socket:/var/run/awx-rsyslog + - rsyslog-config:/var/lib/awx/rsyslog - ./data/settings/SECRET_KEY:/etc/tower/SECRET_KEY - ./data/settings/environment.sh:/etc/tower/conf.d/environment.sh - ./data/settings/credentials.py:/etc/tower/conf.d/credentials.py - - ./data/projects:/var/lib/awx/projects - depends_on: - - rabbitmq - - memcached - - web - - postgres - restart: unless-stopped - - rabbitmq: - image: ansible/awx_rabbitmq - container_name: awx_rabbitmq + - ./data/redis/redis_socket:/var/run/redis:rw + - ./data/projects:/var/lib/awx/projects:rw environment: - RABBITMQ_DEFAULT_VHOST: awx - RABBITMQ_DEFAULT_USER: guest - RABBITMQ_DEFAULT_PASS: guest - RABBITMQ_ERLANG_COOKIE: cookiemonster + - SUPERVISOR_WEB_CONFIG_PATH=/supervisor.conf + depends_on: + - postgres + - redis + - web restart: unless-stopped - memcached: - image: memcached:alpine - container_name: awx_memcached + redis: + image: redis:5-alpine + container_name: awx_redis + command: ["/usr/local/etc/redis/redis.conf"] + volumes: + - ./data/redis/redis.conf:/usr/local/etc/redis/redis.conf:ro + - ./data/redis/redis_socket:/var/run/redis:rw restart: unless-stopped postgres: @@ -68,3 +71,8 @@ services: POSTGRES_DB: awx PGDATA: /var/lib/postgresql/data/pgdata restart: unless-stopped + +volumes: + supervisor-socket: + rsyslog-socket: + rsyslog-config: