Skip to content

Commit

Permalink
update awx
Browse files Browse the repository at this point in the history
  • Loading branch information
vimagick committed Jun 22, 2020
1 parent 907391b commit 77dc4a1
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 46 deletions.
5 changes: 4 additions & 1 deletion awx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions awx/data/redis/redis.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
unixsocket /var/run/redis/redis.sock
unixsocketperm 777
port 0
bind 127.0.0.1
18 changes: 1 addition & 17 deletions awx/data/settings/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,4 @@
}
}

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 }}"
5 changes: 0 additions & 5 deletions awx/data/settings/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions awx/data/settings/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
54 changes: 31 additions & 23 deletions awx/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,60 +1,63 @@
#
# 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'

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
- ./data/redis/redis_socket:/var/run/redis:rw
- ./data/projects:/var/lib/awx/projects:rw
environment:
- SUPERVISOR_WEB_CONFIG_PATH=/supervisor.conf
depends_on:
- rabbitmq
- memcached
- web
- postgres
- redis
- web
restart: unless-stopped

rabbitmq:
image: ansible/awx_rabbitmq
container_name: awx_rabbitmq
environment:
RABBITMQ_DEFAULT_VHOST: awx
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
RABBITMQ_ERLANG_COOKIE: cookiemonster
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:
Expand All @@ -68,3 +71,8 @@ services:
POSTGRES_DB: awx
PGDATA: /var/lib/postgresql/data/pgdata
restart: unless-stopped

volumes:
supervisor-socket:
rsyslog-socket:
rsyslog-config:

0 comments on commit 77dc4a1

Please sign in to comment.