mirror of
https://github.com/ansible/awx.git
synced 2026-03-16 16:37:30 -02:30
Add automatic deprovisioning support, only enabled for openshift
* Implement a config watcher for service restarts * If the configmap bind point changes then restart all services
This commit is contained in:
@@ -41,6 +41,15 @@ priority=5
|
||||
|
||||
# TODO: Exit Handler
|
||||
|
||||
[eventlistener:awx-config-watcher]
|
||||
command=/usr/bin/config-watcher
|
||||
stderr_logfile=/dev/stdout
|
||||
stderr_logfile_maxbytes=0
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
events=TICK_60
|
||||
priority=0
|
||||
|
||||
[unix_http_server]
|
||||
file=/tmp/supervisor.sock
|
||||
|
||||
|
||||
@@ -43,6 +43,15 @@ priority=5
|
||||
|
||||
# TODO: Exit Handler
|
||||
|
||||
[eventlistener:awx-config-watcher]
|
||||
command=/usr/bin/config-watcher
|
||||
stderr_logfile=/dev/stdout
|
||||
stderr_logfile_maxbytes=0
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
events=TICK_60
|
||||
priority=0
|
||||
|
||||
[unix_http_server]
|
||||
file=/tmp/supervisor.sock
|
||||
|
||||
|
||||
@@ -163,6 +163,12 @@
|
||||
dest: "{{ docker_base_path }}/requirements"
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Stage config watcher
|
||||
copy:
|
||||
src: ../tools/scripts/config-watcher
|
||||
dest: "{{ docker_base_path }}/config-watcher"
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Stage Makefile
|
||||
copy:
|
||||
src: ../Makefile
|
||||
|
||||
@@ -22,6 +22,7 @@ ADD requirements/requirements_ansible.txt \
|
||||
requirements/requirements_git.txt \
|
||||
/tmp/requirements/
|
||||
ADD ansible.repo /etc/yum.repos.d/ansible.repo
|
||||
ADD config-watcher /usr/bin/config-watcher
|
||||
ADD RPM-GPG-KEY-ansible-release /etc/pki/rpm-gpg/RPM-GPG-KEY-ansible-release
|
||||
# OS Dependencies
|
||||
WORKDIR /tmp
|
||||
@@ -50,7 +51,7 @@ ADD supervisor.conf /supervisor.conf
|
||||
ADD supervisor_task.conf /supervisor_task.conf
|
||||
ADD launch_awx.sh /usr/bin/launch_awx.sh
|
||||
ADD launch_awx_task.sh /usr/bin/launch_awx_task.sh
|
||||
RUN chmod +rx /usr/bin/launch_awx.sh && chmod +rx /usr/bin/launch_awx_task.sh
|
||||
RUN chmod +rx /usr/bin/launch_awx.sh && chmod +rx /usr/bin/launch_awx_task.sh && chmod +rx /usr/bin/config-watcher
|
||||
ADD settings.py /etc/tower/settings.py
|
||||
RUN chmod g+w /etc/passwd
|
||||
RUN chmod -R 777 /var/log/nginx && chmod -R 777 /var/lib/nginx
|
||||
|
||||
@@ -12,7 +12,10 @@ data:
|
||||
|
||||
# Container environments don't like chroots
|
||||
AWX_PROOT_ENABLED = False
|
||||
|
||||
|
||||
# Automatically deprovision pods that go offline
|
||||
AWX_AUTO_DEPROVISION_INSTANCES = True
|
||||
|
||||
#Autoprovisioning should replace this
|
||||
CLUSTER_HOST_ID = socket.gethostname()
|
||||
SYSTEM_UUID = '00000000-0000-0000-0000-000000000000'
|
||||
|
||||
Reference in New Issue
Block a user