POC channels 2

This commit is contained in:
chris meyers
2019-11-08 10:36:39 -05:00
committed by Ryan Petrello
parent d0a3c5a42b
commit c8eeacacca
23 changed files with 497 additions and 278 deletions

View File

@@ -7,45 +7,50 @@ services:
dockerfile: Dockerfile-haproxy
container_name: tools_haproxy_1
depends_on:
- "awx_1"
- "awx_2"
- "awx_3"
- "awx-1"
- "awx-2"
- "awx-3"
ports:
- "8013:8013"
- "8043:8043"
- "1936:1936"
- "15672:15672"
awx_1:
awx-1:
user: ${CURRENT_UID}
container_name: tools_awx_1_1
privileged: true
image: ${DEV_DOCKER_TAG_BASE}/awx_devel:${TAG}
hostname: awx_1
hostname: awx-1
#entrypoint: ["bash"]
environment:
CURRENT_UID:
RABBITMQ_HOST: rabbitmq_1
RABBITMQ_USER: guest
RABBITMQ_PASS: guest
RABBITMQ_VHOST: /
# BROKER_URL will go away when we use postgres as our message broker
BROKER_URL: "redis://redis_1:63791"
REDIS_HOST: redis_1
REDIS_PORT: 63791
SDB_HOST: 0.0.0.0
SDB_PORT: 5899
AWX_GROUP_QUEUES: alpha,tower
command: /start_development.sh
working_dir: "/awx_devel"
volumes:
- "../:/awx_devel"
ports:
- "5899-5999:5899-5999"
awx_2:
awx-2:
user: ${CURRENT_UID}
container_name: tools_awx_2_1
privileged: true
image: ${DEV_DOCKER_TAG_BASE}/awx_devel:${TAG}
hostname: awx_2
hostname: awx-2
command: /start_development.sh
working_dir: "/awx_devel"
environment:
CURRENT_UID:
RABBITMQ_HOST: rabbitmq_2
RABBITMQ_USER: guest
RABBITMQ_PASS: guest
RABBITMQ_VHOST: /
# BROKER_URL will go away when we use postgres as our message broker
BROKER_URL: "redis://redis_1:63791"
REDIS_HOST: redis_2
REDIS_PORT: 63792
SDB_HOST: 0.0.0.0
SDB_PORT: 7899
AWX_GROUP_QUEUES: bravo,tower
@@ -53,18 +58,21 @@ services:
- "../:/awx_devel"
ports:
- "7899-7999:7899-7999"
awx_3:
awx-3:
user: ${CURRENT_UID}
container_name: tools_awx_3_1
privileged: true
image: ${DEV_DOCKER_TAG_BASE}/awx_devel:${TAG}
hostname: awx_3
hostname: awx-3
entrypoint: ["bash"]
command: /start_development.sh
working_dir: "/awx_devel"
environment:
CURRENT_UID:
RABBITMQ_HOST: rabbitmq_3
RABBITMQ_USER: guest
RABBITMQ_PASS: guest
RABBITMQ_VHOST: /
# BROKER_URL will go away when we use postgres as our message broker
BROKER_URL: "redis://redis_1:63791"
REDIS_HOST: redis_3
REDIS_PORT: 63793
SDB_HOST: 0.0.0.0
SDB_PORT: 8899
AWX_GROUP_QUEUES: charlie,tower
@@ -72,24 +80,33 @@ services:
- "../:/awx_devel"
ports:
- "8899-8999:8899-8999"
rabbitmq_1:
image: ${DEV_DOCKER_TAG_BASE}/rabbit_cluster_node:latest
hostname: rabbitmq_1
container_name: tools_rabbitmq_1_1
rabbitmq_2:
image: ${DEV_DOCKER_TAG_BASE}/rabbit_cluster_node:latest
hostname: rabbitmq_2
container_name: tools_rabbitmq_2_1
environment:
- CLUSTERED=true
- CLUSTER_WITH=rabbitmq_1
rabbitmq_3:
image: ${DEV_DOCKER_TAG_BASE}/rabbit_cluster_node:latest
hostname: rabbitmq_3
container_name: tools_rabbitmq_3_1
environment:
- CLUSTERED=true
- CLUSTER_WITH=rabbitmq_1
redis_1:
image: redis:latest
hostname: redis_1
container_name: tools_redis_1_1
command: "redis-server /usr/local/etc/redis/redis.conf"
volumes:
- "./redis/redis_1.conf:/usr/local/etc/redis/redis.conf"
ports:
- "63791:63791"
redis_2:
image: redis:latest
hostname: redis_2
container_name: tools_redis_2_1
command: "redis-server /usr/local/etc/redis/redis.conf"
volumes:
- "./redis/redis_2.conf:/usr/local/etc/redis/redis.conf"
ports:
- "63792:63792"
redis_3:
image: redis:latest
hostname: redis_3
container_name: tools_redis_3_1
command: "redis-server /usr/local/etc/redis/redis.conf"
volumes:
- "./redis/redis_3.conf:/usr/local/etc/redis/redis.conf"
ports:
- "63793:63793"
postgres:
image: postgres:10
container_name: tools_postgres_1

View File

@@ -11,10 +11,6 @@ services:
environment:
CURRENT_UID:
OS:
RABBITMQ_HOST: rabbitmq
RABBITMQ_USER: guest
RABBITMQ_PASS: guest
RABBITMQ_VHOST: /
SDB_HOST: 0.0.0.0
SDB_PORT: 7899
AWX_GROUP_QUEUES: tower
@@ -28,7 +24,7 @@ services:
links:
- postgres
- memcached
- rabbitmq
- redis
# - sync
# volumes_from:
# - sync
@@ -57,8 +53,9 @@ services:
container_name: tools_memcached_1
ports:
- "11211:11211"
rabbitmq:
image: rabbitmq:3-management
container_name: tools_rabbitmq_1
redis:
image: redis:latest
container_name: tools_redis_1
ports:
- "15672:15672"
- "6379:6379"

View File

@@ -4,7 +4,6 @@ set +x
# Wait for the databases to come up
ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=postgres port=5432" all
ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=memcached port=11211" all
ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=${RABBITMQ_HOST} port=5672" all
# In case AWX in the container wants to connect to itself, use "docker exec" to attach to the container otherwise
# TODO: FIX

View File

@@ -22,11 +22,6 @@ frontend localnodes_ssl
mode tcp
default_backend nodes_ssl
frontend rabbitctl
bind *:15672
mode http
default_backend rabbitctl_nodes
backend nodes
mode http
balance roundrobin
@@ -35,28 +30,16 @@ backend nodes
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
option httpchk HEAD / HTTP/1.1\r\nHost:localhost
server awx_1 awx_1:8013 check
server awx_2 awx_2:8013 check
server awx_3 awx_3:8013 check
server awx-1 awx-1:8013 check
server awx-2 awx-2:8013 check
server awx-3 awx-3:8013 check
backend nodes_ssl
mode tcp
balance roundrobin
server awx_1 awx_1:8043
server awx_2 awx_2:8043
server awx_3 awx_3:8043
backend rabbitctl_nodes
mode http
balance roundrobin
option forwardfor
option http-pretend-keepalive
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
#option httpchk HEAD / HTTP/1.1\r\nHost:localhost
server rabbitmq_1 rabbitmq_1:15672
server rabbitmq_2 rabbitmq_2:15672
server rabbitmq_3 rabbitmq_3:15672
server awx-1 awx-1:8043
server awx-2 awx-2:8043
server awx-3 awx-3:8043
listen stats
bind *:1936

View File

@@ -27,14 +27,6 @@ redirect_stderr=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
[program:awx-runworker]
command = make runworker
autostart = true
autorestart = true
redirect_stderr=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
[program:awx-uwsgi]
command = make uwsgi
autostart = true
@@ -64,7 +56,7 @@ stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
[group:tower-processes]
programs=awx-dispatcher,awx-receiver,awx-runworker,awx-uwsgi,awx-daphne,awx-nginx
programs=awx-dispatcher,awx-receiver,awx-uwsgi,awx-daphne,awx-nginx
priority=5
[unix_http_server]

4
tools/redis/redis_1.conf Normal file
View File

@@ -0,0 +1,4 @@
protected-mode no
port 63791
dir .
logfile "/tmp/redis.log"

4
tools/redis/redis_2.conf Normal file
View File

@@ -0,0 +1,4 @@
protected-mode no
port 63792
dir .
logfile "/tmp/redis.log"

4
tools/redis/redis_3.conf Normal file
View File

@@ -0,0 +1,4 @@
protected-mode no
port 63793
dir .
logfile "/tmp/redis.log"