summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorProskurin Kirill <kproskurin@mirantis.com>2016-07-28 16:01:44 +0200
committerProskurin Kirill <kproskurin@mirantis.com>2016-08-05 11:31:35 +0200
commit6e082e06e549f3ad7bd4983875d902a1d920186c (patch)
tree64399ad8b0fe4cced44b9a5f12805f39ba3e3dec
parentb87f434cabbaf417ec92b245f9d89fca7c969771 (diff)
Move rabbitmq logs to volume for heka collecting
Notes
Notes (review): Verified+1: Mirantis CCP CI <mirantis-fuel-ccp-ci@mirantis.com> Code-Review+2: Eric Lemoine <elemoine@mirantis.com> Code-Review+2: Aleksandr Mogylchenko <amogylchenko@mirantis.com> Workflow+1: Aleksandr Mogylchenko <amogylchenko@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 09 Aug 2016 11:06:55 +0000 Reviewed-on: https://review.openstack.org/348400 Project: openstack/fuel-ccp-rabbitmq Branch: refs/heads/master
-rw-r--r--docker/rabbitmq/rabbitmq_sudoers2
-rw-r--r--service/files/defaults.yaml1
-rw-r--r--service/files/rabbitmq-env.conf.j22
-rw-r--r--service/rabbitmq.yaml12
4 files changed, 16 insertions, 1 deletions
diff --git a/docker/rabbitmq/rabbitmq_sudoers b/docker/rabbitmq/rabbitmq_sudoers
index 0891538..b2dc43e 100644
--- a/docker/rabbitmq/rabbitmq_sudoers
+++ b/docker/rabbitmq/rabbitmq_sudoers
@@ -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
diff --git a/service/files/defaults.yaml b/service/files/defaults.yaml
index b555f81..07de8a1 100644
--- a/service/files/defaults.yaml
+++ b/service/files/defaults.yaml
@@ -2,3 +2,4 @@ configs:
2 rabbitmq_port: 5672 2 rabbitmq_port: 5672
3 rabbitmq_password: password 3 rabbitmq_password: password
4 rabbitmq_user: rabbitmq 4 rabbitmq_user: rabbitmq
5 rabbitmq_log_base: /var/log/ccp/rabbitmq
diff --git a/service/files/rabbitmq-env.conf.j2 b/service/files/rabbitmq-env.conf.j2
new file mode 100644
index 0000000..3cd0991
--- /dev/null
+++ b/service/files/rabbitmq-env.conf.j2
@@ -0,0 +1,2 @@
1NODENAME=rabbitmq
2RABBITMQ_LOG_BASE={{ rabbitmq_log_base }}
diff --git a/service/rabbitmq.yaml b/service/rabbitmq.yaml
index 2bd340f..377ac51 100644
--- a/service/rabbitmq.yaml
+++ b/service/rabbitmq.yaml
@@ -8,15 +8,27 @@ service:
8 probes: 8 probes:
9 readiness: "true" 9 readiness: "true"
10 liveness: "true" 10 liveness: "true"
11 volumes:
12 - name: rabbitmq-logs
13 path: "{{ rabbitmq_log_base }}"
14 type: host
15 readOnly: False
16 pre:
17 - name: chown-logs-dir
18 command: "sudo /bin/chown rabbitmq: {{ rabbitmq_log_base }}"
11 daemon: 19 daemon:
12 files: 20 files:
13 - rabbitmq-conf 21 - rabbitmq-conf
22 - rabbitmq-env
14 - erlang-cookie 23 - erlang-cookie
15 command: rabbitmq-server 24 command: rabbitmq-server
16files: 25files:
17 rabbitmq-conf: 26 rabbitmq-conf:
18 path: /etc/rabbitmq/rabbitmq.config 27 path: /etc/rabbitmq/rabbitmq.config
19 content: rabbitmq.config.j2 28 content: rabbitmq.config.j2
29 rabbitmq-env:
30 path: /etc/rabbitmq/rabbitmq-env.conf
31 content: rabbitmq-env.conf.j2
20 erlang-cookie: 32 erlang-cookie:
21 path: /var/lib/rabbitmq/.erlang.cookie 33 path: /var/lib/rabbitmq/.erlang.cookie
22 content: erlang.cookie 34 content: erlang.cookie