Move rabbitmq logs to volume for heka collecting

Change-Id: Ide02b7933000bf1a23c727cfaad1b7a9cad197f1
This commit is contained in:
Proskurin Kirill 2016-07-28 16:01:44 +02:00
parent b87f434cab
commit 6e082e06e5
4 changed files with 16 additions and 1 deletions

View File

@ -1 +1 @@
%microservices ALL=(root) NOPASSWD: /usr/bin/chown -R rabbitmq\: /var/lib/rabbitmq, /bin/chown -R rabbitmq\: /var/lib/rabbitmq, /bin/chown -R rabbitmq\: /etc/rabbitmq
%microservices ALL=(root) NOPASSWD: /bin/chown -R rabbitmq\: /var/lib/rabbitmq, /bin/chown -R rabbitmq\: /etc/rabbitmq, /bin/chown rabbitmq\: /var/log/ccp/rabbitmq

View File

@ -2,3 +2,4 @@ configs:
rabbitmq_port: 5672
rabbitmq_password: password
rabbitmq_user: rabbitmq
rabbitmq_log_base: /var/log/ccp/rabbitmq

View File

@ -0,0 +1,2 @@
NODENAME=rabbitmq
RABBITMQ_LOG_BASE={{ rabbitmq_log_base }}

View File

@ -8,15 +8,27 @@ service:
probes:
readiness: "true"
liveness: "true"
volumes:
- name: rabbitmq-logs
path: "{{ rabbitmq_log_base }}"
type: host
readOnly: False
pre:
- name: chown-logs-dir
command: "sudo /bin/chown rabbitmq: {{ rabbitmq_log_base }}"
daemon:
files:
- rabbitmq-conf
- rabbitmq-env
- erlang-cookie
command: rabbitmq-server
files:
rabbitmq-conf:
path: /etc/rabbitmq/rabbitmq.config
content: rabbitmq.config.j2
rabbitmq-env:
path: /etc/rabbitmq/rabbitmq-env.conf
content: rabbitmq-env.conf.j2
erlang-cookie:
path: /var/lib/rabbitmq/.erlang.cookie
content: erlang.cookie