Skip to content

Commit

Permalink
Fix: supervisor unix socket adjusted for overlay2 issue (#35)
Browse files Browse the repository at this point in the history
* Fix: supervisor unix socket changed to adjust for overlay2 issue

Signed-off-by: Harish Anand <[email protected]>
  • Loading branch information
harishanand95 authored Feb 15, 2018
1 parent 9a8ac28 commit 5a33e51
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
28 changes: 28 additions & 0 deletions config/apt_repo/supervisor.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
; supervisor config file

[unix_http_server]
file=/dev/shm/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)

[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///dev/shm/supervisor.sock ; use a unix:// URL for a unix socket

; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.

[include]
files = /etc/supervisor/conf.d/*.conf
25 changes: 25 additions & 0 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
dest: 'config/apt_repo/keys/ansible.pub'
flat: yes

- name: Setting up supervisor.conf
copy:
src: config/apt_repo/supervisor.conf
dest: /etc/supervisor/supervisord.conf

- name: Start supervisor
shell: service supervisor start

Expand Down Expand Up @@ -92,6 +97,11 @@
- name: Install supervisor
apt: name=supervisor state=present

- name: Setting up supervisor.conf
copy:
src: config/apt_repo/supervisor.conf
dest: /etc/supervisor/supervisord.conf

- name: Setting up RabbitMQ configuration
copy:
src: config/rabbitmq/rabbitmq.config
Expand Down Expand Up @@ -160,6 +170,11 @@
- name: Install supervisor
apt: name=supervisor state=present

- name: Setting up supervisor.conf
copy:
src: config/apt_repo/supervisor.conf
dest: /etc/supervisor/supervisord.conf

- name: Install screen
apt: name=screen state=present

Expand Down Expand Up @@ -295,6 +310,11 @@
- name: Install supervisor
apt: name=supervisor state=present

- name: Setting up supervisor.conf
copy:
src: config/apt_repo/supervisor.conf
dest: /etc/supervisor/supervisord.conf

- name: Copy supervisor-kong.conf
copy:
src: config/kong/supervisor-kong.conf
Expand Down Expand Up @@ -643,6 +663,11 @@
- name: Install supervisor
apt: name=supervisor state=present

- name: Setting up supervisor.conf
copy:
src: config/apt_repo/supervisor.conf
dest: /etc/supervisor/supervisord.conf

- name: Copy tomcat.conf
copy:
src: config/tomcat/tomcat.conf
Expand Down
3 changes: 0 additions & 3 deletions modules/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ def create_instance(server, image, log_file, storage_host="", storage_guest="",
"\n Check logs {0} for more details.".format(log_file),
error_message=traceback.format_exc())
exit()

elif server == "rabbitmq": # separate rabbitmq log storage needed
ssh = config.get('RABBITMQ', 'SSH')
http = config.get('RABBITMQ', 'HTTP')
Expand All @@ -391,7 +390,6 @@ def create_instance(server, image, log_file, storage_host="", storage_guest="",
"\n Check logs {0} for more details.".format(log_file),
error_message=traceback.format_exc())
exit()

elif server == "tomcat": # separate tomcat log storage needed
ssh = config.get('TOMCAT', 'SSH')
http = config.get('TOMCAT', 'HTTP')
Expand All @@ -408,7 +406,6 @@ def create_instance(server, image, log_file, storage_host="", storage_guest="",
"\n Check logs {0} for more details.".format(log_file),
error_message=traceback.format_exc())
exit()

elif server == "hypercat": # separate data storage needed
ssh = config.get('CATALOGUE', 'SSH')
http = config.get('CATALOGUE', 'HTTP')
Expand Down

0 comments on commit 5a33e51

Please sign in to comment.