summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Rominger <arominge@redhat.com>2017-08-14 17:31:00 +0200
committerGitHub <noreply@github.com>2017-08-14 17:31:00 +0200
commitdcfcfb6c7bb46345028c39bf3e9decf0ce0971fb (patch)
tree6ac4e5d0783efb20fe28048af22b104cbd5fdd9e
parentremove dead code (diff)
parentspecify all group queues, get supervisor working (diff)
downloadawx-dcfcfb6c7bb46345028c39bf3e9decf0ce0971fb.tar.xz
awx-dcfcfb6c7bb46345028c39bf3e9decf0ce0971fb.zip
Merge pull request #245 from AlanCoding/fix_supervisor
specify all group queues, get supervisor working
-rw-r--r--Makefile9
-rw-r--r--tools/docker-compose-cluster.yml6
-rw-r--r--tools/docker-compose.yml2
-rw-r--r--tools/docker-compose/supervisor.conf2
-rw-r--r--tools/docker-isolated-override.yml2
5 files changed, 11 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 4d150ffc77..e2cb881fa3 100644
--- a/Makefile
+++ b/Makefile
@@ -205,18 +205,19 @@ version_file:
python -c "import awx as awx; print awx.__version__" > /var/lib/awx/.awx_version
# Do any one-time init tasks.
+comma := ,
init:
if [ "$(VENV_BASE)" ]; then \
. $(VENV_BASE)/awx/bin/activate; \
fi; \
$(MANAGEMENT_COMMAND) provision_instance --hostname=$(COMPOSE_HOST); \
$(MANAGEMENT_COMMAND) register_queue --queuename=tower --hostnames=$(COMPOSE_HOST);\
- if [ "$(EXTRA_GROUP_QUEUES)" == "thepentagon" ]; then \
+ if [ "$(AWX_GROUP_QUEUES)" == "tower,thepentagon" ]; then \
$(MANAGEMENT_COMMAND) provision_instance --hostname=isolated; \
$(MANAGEMENT_COMMAND) register_queue --queuename='thepentagon' --hostnames=isolated --controller=tower; \
$(MANAGEMENT_COMMAND) generate_isolated_key | ssh -o "StrictHostKeyChecking no" root@isolated 'cat > /root/.ssh/authorized_keys'; \
- elif [ "$(EXTRA_GROUP_QUEUES)" != "" ]; then \
- $(MANAGEMENT_COMMAND) register_queue --queuename=$(EXTRA_GROUP_QUEUES) --hostnames=$(COMPOSE_HOST); \
+ elif [ "$(AWX_GROUP_QUEUES)" != "tower" ]; then \
+ $(MANAGEMENT_COMMAND) register_queue --queuename=$(firstword $(subst $(comma), ,$(AWX_GROUP_QUEUES))) --hostnames=$(COMPOSE_HOST); \
fi;
# Refresh development environment after pulling new code.
@@ -319,7 +320,7 @@ celeryd:
@if [ "$(VENV_BASE)" ]; then \
. $(VENV_BASE)/awx/bin/activate; \
fi; \
- $(PYTHON) manage.py celeryd -l DEBUG -B -Ofair --autoreload --autoscale=100,4 --schedule=$(CELERY_SCHEDULE_FILE) -Q tower_scheduler,tower_broadcast_all,tower,$(COMPOSE_HOST),$(EXTRA_GROUP_QUEUES) -n celery@$(COMPOSE_HOST)
+ $(PYTHON) manage.py celeryd -l DEBUG -B -Ofair --autoreload --autoscale=100,4 --schedule=$(CELERY_SCHEDULE_FILE) -Q tower_scheduler,tower_broadcast_all,$(COMPOSE_HOST),$(AWX_GROUP_QUEUES) -n celery@$(COMPOSE_HOST)
#$(PYTHON) manage.py celery multi show projects jobs default -l DEBUG -Q:projects projects -Q:jobs jobs -Q:default default -c:projects 1 -c:jobs 3 -c:default 3 -Ofair -B --schedule=$(CELERY_SCHEDULE_FILE)
# Run to start the zeromq callback receiver
diff --git a/tools/docker-compose-cluster.yml b/tools/docker-compose-cluster.yml
index 09c02e3915..0c90d036b5 100644
--- a/tools/docker-compose-cluster.yml
+++ b/tools/docker-compose-cluster.yml
@@ -24,7 +24,7 @@ services:
RABBITMQ_PASS: guest
RABBITMQ_VHOST: /
CELERY_RDB_HOST: 0.0.0.0
- EXTRA_GROUP_QUEUES: alpha
+ AWX_GROUP_QUEUES: alpha,tower
volumes:
- "../:/awx_devel"
@@ -38,7 +38,7 @@ services:
RABBITMQ_PASS: guest
RABBITMQ_VHOST: /
CELERY_RDB_HOST: 0.0.0.0
- EXTRA_GROUP_QUEUES: bravo
+ AWX_GROUP_QUEUES: bravo,tower
volumes:
- "../:/awx_devel"
awx_3:
@@ -51,7 +51,7 @@ services:
RABBITMQ_PASS: guest
RABBITMQ_VHOST: /
CELERY_RDB_HOST: 0.0.0.0
- EXTRA_GROUP_QUEUES: charlie
+ AWX_GROUP_QUEUES: charlie,tower
volumes:
- "../:/awx_devel"
rabbitmq_1:
diff --git a/tools/docker-compose.yml b/tools/docker-compose.yml
index 7a90b40cf9..767bf8f7cb 100644
--- a/tools/docker-compose.yml
+++ b/tools/docker-compose.yml
@@ -10,7 +10,7 @@ services:
RABBITMQ_PASS: guest
RABBITMQ_VHOST: /
CELERY_RDB_HOST: 0.0.0.0
- EXTRA_GROUP_QUEUES:
+ AWX_GROUP_QUEUES: tower
ports:
- "8080:8080"
- "5555:5555"
diff --git a/tools/docker-compose/supervisor.conf b/tools/docker-compose/supervisor.conf
index 78ac4527af..bf95d4e477 100644
--- a/tools/docker-compose/supervisor.conf
+++ b/tools/docker-compose/supervisor.conf
@@ -4,7 +4,7 @@ minfds = 4096
nodaemon=true
[program:celeryd]
-command = python manage.py celeryd -l DEBUG -B --autoreload --autoscale=20,3 --schedule=/celerybeat-schedule -Q tower_scheduler,tower_broadcast_all,tower,%(ENV_EXTRA_GROUP_QUEUES)s,%(ENV_HOSTNAME)s -n celery@%(ENV_HOSTNAME)s
+command = python manage.py celeryd -l DEBUG -B --autoreload --autoscale=20,3 --schedule=/celerybeat-schedule -Q tower_scheduler,tower_broadcast_all,%(ENV_AWX_GROUP_QUEUES)s,%(ENV_HOSTNAME)s -n celery@%(ENV_HOSTNAME)s
autostart = true
autorestart = true
redirect_stderr=true
diff --git a/tools/docker-isolated-override.yml b/tools/docker-isolated-override.yml
index db6efe54c0..9b5242c009 100644
--- a/tools/docker-isolated-override.yml
+++ b/tools/docker-isolated-override.yml
@@ -3,7 +3,7 @@ services:
# Primary Tower Development Container link
awx:
environment:
- EXTRA_GROUP_QUEUES: thepentagon
+ AWX_GROUP_QUEUES: tower,thepentagon
links:
- isolated
# Isolated Rampart Container