Merge lp:~tal-it-innovation/charms/precise/rabbitmq-server/management into lp:charms/rabbitmq-server

Proposed by Thomas Leonard
Status: Merged
Merged at revision: 37
Proposed branch: lp:~tal-it-innovation/charms/precise/rabbitmq-server/management
Merge into: lp:charms/rabbitmq-server
Diff against target: 66 lines (+18/-2)
4 files modified
config.yaml (+5/-1)
hooks/config-changed (+11/-0)
hooks/rabbitmq-relations (+1/-0)
revision (+1/-1)
To merge this branch: bzr merge lp:~tal-it-innovation/charms/precise/rabbitmq-server/management
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+135447@code.launchpad.net

Description of the change

Allows enabling the management plugin, which is useful for debugging:

juju expose rabbitmq-server
juju set rabbitmq-server management_plugin=True

You can then access the web UI at:

  http://<address>:55672/

(note: this branch continues the fix-ports branch; I don't know how to rebase in bzr)

To post a comment you must log in.
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Thanks Thomas, this is cool. I've merged all of the changes. You wouldn't really 'rebase' so much as just create a second branch and have changes there. Or with LP merge proposals you can simply mark a different branch as a pre-requisite so the MP's show as separate diffs.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2012-09-04 14:27:11 +0000
3+++ config.yaml 2012-11-21 15:43:23 +0000
4@@ -3,9 +3,13 @@
5 type: boolean
6 default: False
7 description: enable SSL
8+ management_plugin:
9+ type: boolean
10+ default: False
11+ description: enable the management plugin
12 ssl_port:
13 type: int
14- default: 5673
15+ default: 5671
16 description: SSL port
17 ssl_key:
18 type: string
19
20=== modified file 'hooks/config-changed'
21--- hooks/config-changed 2012-09-06 13:20:01 +0000
22+++ hooks/config-changed 2012-11-21 15:43:23 +0000
23@@ -3,6 +3,16 @@
24
25 juju-log "rabbitmq-server: Firing config hook"
26
27+export HOME=/root # (HOME is not set on first run)
28+RABBIT_PLUGINS=/usr/lib/rabbitmq/lib/rabbitmq_server-*/sbin/rabbitmq-plugins
29+if [ "`config-get management_plugin`" == "True" ]; then
30+ $RABBIT_PLUGINS enable rabbitmq_management
31+ open-port 55672/tcp
32+else
33+ $RABBIT_PLUGINS disable rabbitmq_management
34+ close-port 55672/tcp
35+fi
36+
37 ssl_enabled=`config-get ssl_enabled`
38
39 cd /etc/rabbitmq
40@@ -39,6 +49,7 @@
41 {certfile,"$ssl_cert_file"},
42 {keyfile,"$ssl_key_file"}
43 ]},
44+ open-port `config-get ssl_port`/tcp
45 EOF
46 fi
47
48
49=== modified file 'hooks/rabbitmq-relations'
50--- hooks/rabbitmq-relations 2012-09-14 20:06:14 +0000
51+++ hooks/rabbitmq-relations 2012-11-21 15:43:23 +0000
52@@ -38,6 +38,7 @@
53 install --no-install-recommends rabbitmq-server
54 rc=$?
55 service rabbitmq-server stop
56+ open-port 5672/tcp
57 }
58
59 function amqp_changed() {
60
61=== modified file 'revision'
62--- revision 2012-09-14 20:06:14 +0000
63+++ revision 2012-11-21 15:43:23 +0000
64@@ -1,1 +1,1 @@
65-35
66+37

Subscribers

People subscribed via source and target branches