Merge lp:~canonical-is-sa/charms/trusty/kibana/trunk into lp:charms/trusty/kibana

Proposed by Michael Foley
Status: Rejected
Rejected by: Michael Foley
Proposed branch: lp:~canonical-is-sa/charms/trusty/kibana/trunk
Merge into: lp:charms/trusty/kibana
Diff against target: 82 lines (+13/-10)
4 files modified
config.yaml (+4/-0)
files/charm/config.js (+1/-1)
hooks/install (+8/-0)
hooks/web-relation-joined (+0/-9)
To merge this branch: bzr merge lp:~canonical-is-sa/charms/trusty/kibana/trunk
Reviewer Review Type Date Requested Status
Michael Foley (community) superseded Disapprove
Andrew McLeod (community) Needs Fixing
charmers Pending
Adam Israel Pending
Review via email: mp+276221@code.launchpad.net

This proposal supersedes a proposal from 2015-05-25.

Description of the change

Added ability to change the elasticsearch url for kibana so that it can be set to https. This is so that kibana can be secured behind an apache2 proxy with openid.

Also added support for ubuntu basenode.

To post a comment you must log in.
Revision history for this message
Adam Israel (aisrael) wrote : Posted in a previous version of this proposal

Hi Michael,

I had a chance to review this merge proposal today. Thanks for your work on improving the kibana charm!

`charm proof` alerted me to 'hooks/website-relation-joined' not being executable. That's not a blocker, as juju should do the right thing, but is an easy fix.

With a new feature such as this, I look for two things that I'm not seeing: some documentation about the new feature in the README, and a test to exercise it. If you could address both of those issues, I'll happily approve this merge.

Thanks once again for your work on this!

review: Needs Fixing
Revision history for this message
Michael Nelson (michael.nelson) wrote : Posted in a previous version of this proposal

Hey there Michael. I'm just looking at this charm change, and it looks like upstream has already changed the web relation to 'http'. So I think that part is done. There are two other features you've included - the elasticsearch url config option, and the exec.d support.

I'll give you an MP to merge into your canonical-is-sa branch which re-merges trunk, so we can push those two options up for review again.

Revision history for this message
Andrew McLeod (admcleod) wrote :

Running bundletester against this hits some issues that are fixed by https://code.launchpad.net/~chris.macnaughton/charms/trusty/kibana/version_bump/+merge/274029 which has been approved and merged. Could you please pull these changes in and someone can test?

review: Needs Fixing
Revision history for this message
Michael Nelson (michael.nelson) wrote :

If you mean that tests/11-scale-elastic.py fails, that would be a good thing IMO, as we updated our branch here to explicitly deny requests to :9200 on the kibana unit (as it's basically giving anyone with access to :80 on the kibana unit write access to the ES cluster).

Anyway, I've re-merged upstream, and updated 11-scale-elastic.py so it doesn't expect to be able to use :9200 on the kibana unit externally, in our kibana4 branch here:
https://code.launchpad.net/~canonical-is-sa/charms/trusty/kibana/kibana4/+merge/276944

I think this MP should be marked superseded. Michael F?

Revision history for this message
Michael Foley (foli) wrote :

Agreed it should be marked superseded.

The elasticsearch url setting is no longer needed with kibana4. So the only actual thing left in the MP is the adding of ubuntu basenode (exec.d), which looks like is covered in Michael N's MP.

Marking this MP as rejected instead of deleting it since it is linked to in a few places.

review: Disapprove (superseded)

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'config.yaml'
--- config.yaml 2015-04-01 20:07:40 +0000
+++ config.yaml 2015-10-30 07:18:46 +0000
@@ -20,3 +20,7 @@
20 default: ''20 default: ''
21 description: 'The url path of kibana. This is required if kibana is21 description: 'The url path of kibana. This is required if kibana is
22 proxied at a non root path. e.g. http://example.com/kibana/'22 proxied at a non root path. e.g. http://example.com/kibana/'
23 elasticsearch_url:
24 type: string
25 default: '"http://"+window.location.hostname'
26 description: URL to for elasticsearch line in config.sh, defaults to '"http://"+window.location.hostname'
2327
=== modified file 'files/charm/config.js'
--- files/charm/config.js 2014-04-14 15:59:48 +0000
+++ files/charm/config.js 2015-10-30 07:18:46 +0000
@@ -72,4 +72,4 @@
72 'sparklines'72 'sparklines'
73 ]73 ]
74 });74 });
75});
76\ No newline at end of file75\ No newline at end of file
76});
7777
=== modified file 'hooks/config-changed' (properties changed: -x to +x)
=== modified file 'hooks/install'
--- hooks/install 2015-06-18 18:49:22 +0000
+++ hooks/install 2015-10-30 07:18:46 +0000
@@ -1,10 +1,15 @@
1#!/bin/bash1#!/bin/bash
2set -eux2set -eux
3
4juju-log 'Invoking charm-pre-install hooks'
5[ -d exec.d ] && ( for f in exec.d/*/charm-pre-install; do [ -x $f ] && /bin/sh -c "$f"; done )
6
3HOME=$PWD7HOME=$PWD
4KIBANA_TARBALL=files/kibana.tgz8KIBANA_TARBALL=files/kibana.tgz
5KIBANA_SOURCE=$(config-get kibana_source)9KIBANA_SOURCE=$(config-get kibana_source)
6KIBANA_SOURCE_UNPACK_DIRECTORY=$(config-get kibana_source_unpack_directory)10KIBANA_SOURCE_UNPACK_DIRECTORY=$(config-get kibana_source_unpack_directory)
7KIBANA_SOURCE_CHECKSUM=$(config-get kibana_source_checksum)11KIBANA_SOURCE_CHECKSUM=$(config-get kibana_source_checksum)
12ELASTICSEARCH_URL=$(config-get elasticsearch_url)
8HOST=$(unit-get private-address)13HOST=$(unit-get private-address)
914
10juju-log "install dependency"15juju-log "install dependency"
@@ -38,6 +43,9 @@
38rm -f /srv/kibana3/config.js43rm -f /srv/kibana3/config.js
39install -o root -g root -m 0644 files/charm/config.js /srv/kibana3/config.js44install -o root -g root -m 0644 files/charm/config.js /srv/kibana3/config.js
4045
46# edit the elasticsearch line to be the value of option elasticsearch_url
47sed -r -i -e 's|(^\s*elasticsearch:\s*).*$|\1'"${ELASTICSEARCH_URL}"',|' /srv/kibana3/config.js
48
41hooks/config-changed49hooks/config-changed
4250
43ln -s /etc/nginx/sites-available/kibana /etc/nginx/sites-enabled/kibana51ln -s /etc/nginx/sites-available/kibana /etc/nginx/sites-enabled/kibana
4452
=== modified file 'hooks/start' (properties changed: -x to +x)
=== added file 'hooks/web-relation-joined'
--- hooks/web-relation-joined 1970-01-01 00:00:00 +0000
+++ hooks/web-relation-joined 2015-10-30 07:18:46 +0000
@@ -0,0 +1,9 @@
1#!/bin/bash
2set -eux
3juju-log $JUJU_REMOTE_UNIT joined
4
5PORT=$(config-get port)
6
7# Set ip/port for web relation
8relation-set port="$PORT"
9relation-set host=`unit-get private-address`
010
=== removed file 'hooks/web-relation-joined'
--- hooks/web-relation-joined 2015-04-01 20:07:40 +0000
+++ hooks/web-relation-joined 1970-01-01 00:00:00 +0000
@@ -1,9 +0,0 @@
1#!/bin/bash
2set -eux
3juju-log $JUJU_REMOTE_UNIT joined
4
5PORT=$(config-get port)
6
7# Set ip/port for web relation
8relation-set port="$PORT"
9relation-set host=`unit-get private-address`

Subscribers

People subscribed via source and target branches