mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
ff1e8cc356
this commit implements the bulk of `awx-manage run_dispatcher`, a new command that binds to RabbitMQ via kombu and balances messages across a pool of workers that are similar to celeryd workers in spirit. Specifically, this includes: - a new decorator, `awx.main.dispatch.task`, which can be used to decorate functions or classes so that they can be designated as "Tasks" - support for fanout/broadcast tasks (at this point in time, only `conf.Setting` memcached flushes use this functionality) - support for job reaping - support for success/failure hooks for job runs (i.e., `handle_work_success` and `handle_work_error`) - support for auto scaling worker pool that scale processes up and down on demand - minimal support for RPC, such as status checks and pool recycle/reload
83 lines
1.9 KiB
YAML
83 lines
1.9 KiB
YAML
version: '2'
|
|
services:
|
|
haproxy:
|
|
build:
|
|
context: ./docker-compose
|
|
dockerfile: Dockerfile-haproxy
|
|
depends_on:
|
|
- "awx_1"
|
|
- "awx_2"
|
|
- "awx_3"
|
|
ports:
|
|
- "8013:8013"
|
|
- "8043:8043"
|
|
- "1936:1936"
|
|
- "15672:15672"
|
|
awx_1:
|
|
privileged: true
|
|
image: ${DEV_DOCKER_TAG_BASE}/awx_devel:${TAG}
|
|
hostname: awx_1
|
|
environment:
|
|
RABBITMQ_HOST: rabbitmq_1
|
|
RABBITMQ_USER: guest
|
|
RABBITMQ_PASS: guest
|
|
RABBITMQ_VHOST: /
|
|
SDB_HOST: 0.0.0.0
|
|
SDB_PORT: 5899
|
|
AWX_GROUP_QUEUES: alpha,tower
|
|
volumes:
|
|
- "../:/awx_devel"
|
|
ports:
|
|
- "5899-5999:5899-5999"
|
|
awx_2:
|
|
privileged: true
|
|
image: ${DEV_DOCKER_TAG_BASE}/awx_devel:${TAG}
|
|
hostname: awx_2
|
|
environment:
|
|
RABBITMQ_HOST: rabbitmq_2
|
|
RABBITMQ_USER: guest
|
|
RABBITMQ_PASS: guest
|
|
RABBITMQ_VHOST: /
|
|
SDB_HOST: 0.0.0.0
|
|
SDB_PORT: 6899
|
|
AWX_GROUP_QUEUES: bravo,tower
|
|
volumes:
|
|
- "../:/awx_devel"
|
|
ports:
|
|
- "6899-6999:6899-6999"
|
|
awx_3:
|
|
privileged: true
|
|
image: ${DEV_DOCKER_TAG_BASE}/awx_devel:${TAG}
|
|
hostname: awx_3
|
|
environment:
|
|
RABBITMQ_HOST: rabbitmq_3
|
|
RABBITMQ_USER: guest
|
|
RABBITMQ_PASS: guest
|
|
RABBITMQ_VHOST: /
|
|
SDB_HOST: 0.0.0.0
|
|
SDB_PORT: 7899
|
|
AWX_GROUP_QUEUES: charlie,tower
|
|
volumes:
|
|
- "../:/awx_devel"
|
|
ports:
|
|
- "7899-7999:7899-7999"
|
|
rabbitmq_1:
|
|
image: ${DEV_DOCKER_TAG_BASE}/rabbit_cluster_node:latest
|
|
hostname: rabbitmq_1
|
|
rabbitmq_2:
|
|
image: ${DEV_DOCKER_TAG_BASE}/rabbit_cluster_node:latest
|
|
hostname: rabbitmq_2
|
|
environment:
|
|
- CLUSTERED=true
|
|
- CLUSTER_WITH=rabbitmq_1
|
|
rabbitmq_3:
|
|
image: ${DEV_DOCKER_TAG_BASE}/rabbit_cluster_node:latest
|
|
hostname: rabbitmq_3
|
|
environment:
|
|
- CLUSTERED=true
|
|
- CLUSTER_WITH=rabbitmq_1
|
|
postgres:
|
|
image: postgres:9.6
|
|
memcached:
|
|
image: memcached:alpine
|