summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorHao Liu <haoli@redhat.com>2023-04-13 20:43:06 +0200
committerHao Liu <haoli@redhat.com>2023-04-19 05:15:47 +0200
commitcfbbc4cb92a9ce637b9f632f46cbb312bd0b3fbc (patch)
treea4f5916b6ed9abef44949480fbb5d45d9443cd20 /tools
parentMerge pull request #13725 from l3acon/collection-existential-state-for-creden... (diff)
downloadawx-cfbbc4cb92a9ce637b9f632f46cbb312bd0b3fbc.tar.xz
awx-cfbbc4cb92a9ce637b9f632f46cbb312bd0b3fbc.zip
Auto reload services in kube dev env
Diffstat (limited to 'tools')
-rw-r--r--tools/ansible/roles/dockerfile/templates/supervisor_rsyslog.conf.j213
-rw-r--r--tools/ansible/roles/dockerfile/templates/supervisor_task.conf.j213
-rw-r--r--tools/ansible/roles/dockerfile/templates/supervisor_web.conf.j215
3 files changed, 39 insertions, 2 deletions
diff --git a/tools/ansible/roles/dockerfile/templates/supervisor_rsyslog.conf.j2 b/tools/ansible/roles/dockerfile/templates/supervisor_rsyslog.conf.j2
index f225b935c5..265b84dca4 100644
--- a/tools/ansible/roles/dockerfile/templates/supervisor_rsyslog.conf.j2
+++ b/tools/ansible/roles/dockerfile/templates/supervisor_rsyslog.conf.j2
@@ -33,6 +33,19 @@ stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
+{% if kube_dev | bool %}
+[program:awx-autoreload]
+command = /awx_devel/tools/docker-compose/awx-autoreload /awx_devel/awx 'supervisorctl -c /etc/supervisord_rsyslog.conf restart tower-processes:*'
+autostart = true
+autorestart = true
+stopasgroup=true
+killasgroup=true
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0
+{% endif %}
+
[group:tower-processes]
programs=awx-rsyslog-configurer,awx-rsyslogd
priority=5
diff --git a/tools/ansible/roles/dockerfile/templates/supervisor_task.conf.j2 b/tools/ansible/roles/dockerfile/templates/supervisor_task.conf.j2
index 9d14a45621..bce0a8752a 100644
--- a/tools/ansible/roles/dockerfile/templates/supervisor_task.conf.j2
+++ b/tools/ansible/roles/dockerfile/templates/supervisor_task.conf.j2
@@ -56,6 +56,19 @@ stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
+{% if kube_dev | bool %}
+[program:awx-autoreload]
+command = /awx_devel/tools/docker-compose/awx-autoreload /awx_devel/awx 'supervisorctl -c /etc/supervisord_task.conf restart tower-processes:*'
+autostart = true
+autorestart = true
+stopasgroup=true
+killasgroup=true
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0
+{% endif %}
+
[group:tower-processes]
programs=dispatcher,callback-receiver,wsrelay
priority=5
diff --git a/tools/ansible/roles/dockerfile/templates/supervisor_web.conf.j2 b/tools/ansible/roles/dockerfile/templates/supervisor_web.conf.j2
index a752862537..fcd32efc0d 100644
--- a/tools/ansible/roles/dockerfile/templates/supervisor_web.conf.j2
+++ b/tools/ansible/roles/dockerfile/templates/supervisor_web.conf.j2
@@ -25,8 +25,6 @@ stderr_logfile_maxbytes=0
{% if kube_dev | bool %}
command = make uwsgi
directory = /awx_devel
-environment =
- DEV_RELOAD_COMMAND='supervisorctl -c /etc/supervisord_task.conf restart all; supervisorctl restart tower-processes:daphne'
{% else %}
command = /var/lib/awx/venv/awx/bin/uwsgi /etc/tower/uwsgi.ini
directory = /var/lib/awx
@@ -91,6 +89,19 @@ stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
+{% if kube_dev | bool %}
+[program:awx-autoreload]
+command = /awx_devel/tools/docker-compose/awx-autoreload /awx_devel/awx 'supervisorctl -c /etc/supervisord_web.conf restart tower-processes:*'
+autostart = true
+autorestart = true
+stopasgroup=true
+killasgroup=true
+stdout_logfile=/dev/stdout
+stdout_logfile_maxbytes=0
+stderr_logfile=/dev/stderr
+stderr_logfile_maxbytes=0
+{% endif %}
+
[group:tower-processes]
programs=nginx,uwsgi,daphne,awx-cache-clear,heartbeet
priority=5