summaryrefslogtreecommitdiffstats
path: root/tools/ansible/roles
diff options
context:
space:
mode:
authorHao Liu <haoli@redhat.com>2023-03-30 01:41:35 +0200
committerHao Liu <haoli@redhat.com>2023-03-30 04:09:19 +0200
commit6c0c1f68532eb876459c1cd693a9811ebe6bb5de (patch)
tree93ef40858e761618feaffcfaa2a57f35783fd03a /tools/ansible/roles
parentRename supervisor.conf.j2 to be descriptive (diff)
downloadawx-6c0c1f68532eb876459c1cd693a9811ebe6bb5de.tar.xz
awx-6c0c1f68532eb876459c1cd693a9811ebe6bb5de.zip
Rename launch script for launch awx web
launch_awx.sh that this PR rename is also now only use for launching awx web container renaming to reflect it's purpose also remove the no longer needed creation of rsyslog conf as rsyslog is no longer in the web container Update Dockerfile.j2
Diffstat (limited to 'tools/ansible/roles')
-rwxr-xr-xtools/ansible/roles/dockerfile/files/launch_awx.sh27
-rwxr-xr-xtools/ansible/roles/dockerfile/files/launch_awx_web.sh20
-rw-r--r--tools/ansible/roles/dockerfile/templates/Dockerfile.j23
3 files changed, 21 insertions, 29 deletions
diff --git a/tools/ansible/roles/dockerfile/files/launch_awx.sh b/tools/ansible/roles/dockerfile/files/launch_awx.sh
deleted file mode 100755
index edababb445..0000000000
--- a/tools/ansible/roles/dockerfile/files/launch_awx.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-if [ `id -u` -ge 500 ]; then
- echo "awx:x:`id -u`:`id -g`:,,,:/var/lib/awx:/bin/bash" >> /tmp/passwd
- cat /tmp/passwd > /etc/passwd
- rm /tmp/passwd
-fi
-
-if [ -n "${AWX_KUBE_DEVEL}" ]; then
- pushd /awx_devel
- make awx-link
- popd
-
- export SDB_NOTIFY_HOST=$MY_POD_IP
-fi
-
-set -e
-
-wait-for-migrations
-
-# This file will be re-written when the dispatcher calls reconfigure_rsyslog(),
-# but it needs to exist when supervisor initially starts rsyslog to prevent the
-# container from crashing. This was the most minimal config I could get working.
-cat << EOF > /var/lib/awx/rsyslog/rsyslog.conf
-action(type="omfile" file="/dev/null")
-EOF
-
-exec supervisord -c /etc/supervisord.conf
diff --git a/tools/ansible/roles/dockerfile/files/launch_awx_web.sh b/tools/ansible/roles/dockerfile/files/launch_awx_web.sh
new file mode 100755
index 0000000000..d12750eead
--- /dev/null
+++ b/tools/ansible/roles/dockerfile/files/launch_awx_web.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+if [ `id -u` -ge 500 ]; then
+ echo "awx:x:`id -u`:`id -g`:,,,:/var/lib/awx:/bin/bash" >> /tmp/passwd
+ cat /tmp/passwd > /etc/passwd
+ rm /tmp/passwd
+fi
+
+if [ -n "${AWX_KUBE_DEVEL}" ]; then
+ pushd /awx_devel
+ make awx-link
+ popd
+
+ export SDB_NOTIFY_HOST=$MY_POD_IP
+fi
+
+set -e
+
+wait-for-migrations
+
+exec supervisord -c /etc/supervisord_web.conf
diff --git a/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 b/tools/ansible/roles/dockerfile/templates/Dockerfile.j2
index e63b2baa65..999ce24056 100644
--- a/tools/ansible/roles/dockerfile/templates/Dockerfile.j2
+++ b/tools/ansible/roles/dockerfile/templates/Dockerfile.j2
@@ -210,7 +210,7 @@ ADD tools/scripts/config-watcher /usr/bin/config-watcher
ADD tools/docker-compose/containers.conf /etc/containers/containers.conf
ADD tools/docker-compose/podman-containers.conf /var/lib/awx/.config/containers/containers.conf
{% else %}
-ADD tools/ansible/roles/dockerfile/files/launch_awx.sh /usr/bin/launch_awx.sh
+ADD tools/ansible/roles/dockerfile/files/launch_awx_web.sh /usr/bin/launch_awx_web.sh
ADD tools/ansible/roles/dockerfile/files/launch_awx_task.sh /usr/bin/launch_awx_task.sh
ADD tools/ansible/roles/dockerfile/files/launch_awx_rsyslog.sh /usr/bin/launch_awx_rsyslog.sh
ADD {{ template_dest }}/supervisor_web.conf /etc/supervisord_web.conf
@@ -297,7 +297,6 @@ USER 1000
EXPOSE 8052
ENTRYPOINT ["dumb-init", "--"]
-CMD /usr/bin/launch_awx.sh
VOLUME /var/lib/nginx
VOLUME /var/lib/awx/.local/share/containers
{% endif %}