Merge lp:~canonical-ci-engineering/charms/trusty/kibana/local-tarball into lp:charms/trusty/kibana

Proposed by Celso Providelo
Status: Merged
Merged at revision: 16
Proposed branch: lp:~canonical-ci-engineering/charms/trusty/kibana/local-tarball
Merge into: lp:charms/trusty/kibana
Diff against target: 58 lines (+26/-4)
2 files modified
README.md (+16/-0)
hooks/install (+10/-4)
To merge this branch: bzr merge lp:~canonical-ci-engineering/charms/trusty/kibana/local-tarball
Reviewer Review Type Date Requested Status
Charles Butler (community) Approve
Whit Morriss (community) Approve
Review via email: mp+254638@code.launchpad.net

Description of the change

Supporting installation from local tarball payload, instead of fetching from the internet.

If files/kibana.tgz exists it will be used (no checksum checks).

To post a comment you must log in.
Revision history for this message
Whit Morriss (whitmo) wrote :

LGTM +1. Please add some documentation to the README about said feature.

review: Approve
17. By Celso Providelo

Extend README to cover support for local payload.

Revision history for this message
Celso Providelo (cprov) wrote :

Whit,

Thanks for accepting this change, README was extended to cover the introduced feature.

Revision history for this message
Whit Morriss (whitmo) wrote :

Thanks!

-w

On Tue, Mar 31, 2015 at 11:06 AM, Celso Providelo <
<email address hidden>> wrote:

> Whit,
>
> Thanks for accepting this change, README was extended to cover the
> introduced feature.
> --
>
> https://code.launchpad.net/~canonical-ci-engineering/charms/trusty/kibana/local-tarball/+merge/254638
> You are reviewing the proposed merge of
> lp:~canonical-ci-engineering/charms/trusty/kibana/local-tarball into
> lp:charms/trusty/kibana.
>

--
---------------
D. Whit Morriss
Developer, Juju Ecosystem
Canonical USA

Revision history for this message
Charles Butler (lazypower) wrote :

Approved and released.

Thanks for the contribution!

review: Approve
Revision history for this message
Jay R. Wren (evarlast) :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.md'
2--- README.md 2013-09-29 21:58:50 +0000
3+++ README.md 2015-03-31 16:04:48 +0000
4@@ -24,6 +24,22 @@
5
6 browse to http://ip-address to begin searching.
7
8+Installation
9+------------
10+
11+Kibana source tarball will be downloaded and verified according to the
12+configured values in 'kibana_source' and 'kibana_source_checksum', which
13+default to::
14+
15+ https://download.elasticsearch.org/kibana/kibana/kibana-3.1.1.tar.gz
16+
17+It will, obviously, require internet access on deployed nodes.
18+
19+This behavior can be bypassed by providing `<charm>/files/kibana.tgz`
20+payload prior deployment. The given payload will be used, without any
21+checksum verification, but respecting the 'kibana_source_unpack_directory'.
22+
23+
24 Configuration
25 -------------
26
27
28=== modified file 'hooks/install'
29--- hooks/install 2015-03-06 15:37:51 +0000
30+++ hooks/install 2015-03-31 16:04:48 +0000
31@@ -1,6 +1,7 @@
32 #!/bin/bash
33 set -eux
34 HOME=$PWD
35+KIBANA_TARBALL=files/kibana.tgz
36 KIBANA_SOURCE=$(config-get kibana_source)
37 KIBANA_SOURCE_UNPACK_DIRECTORY=$(config-get kibana_source_unpack_directory)
38 KIBANA_SOURCE_CHECKSUM=$(config-get kibana_source_checksum)
39@@ -10,10 +11,15 @@
40 apt-get update
41 apt-get install -y curl wget git nginx
42
43-juju-log "download kibana from elasticsearch.org"
44-wget -q -O /tmp/kibana.tgz ${KIBANA_SOURCE}
45-echo "${KIBANA_SOURCE_CHECKSUM} /tmp/kibana.tgz" > /tmp/kibana.tgz.sha1
46-sha1sum -c /tmp/kibana.tgz.sha1
47+if [! -f $KIBANA_TARBALL]; then
48+ juju-log "download kibana from elasticsearch.org"
49+ wget -q -O /tmp/kibana.tgz ${KIBANA_SOURCE}
50+ echo "${KIBANA_SOURCE_CHECKSUM} /tmp/kibana.tgz" > /tmp/kibana.tgz.sha1
51+ sha1sum -c /tmp/kibana.tgz.sha1
52+else
53+ juju-log "using provided kibana tarball"
54+ cp $KIBANA_TARBALL /tmp/kibana.tgz
55+fi
56
57 install -o root -g root -m 0644 files/charm/nginx.conf /etc/nginx/sites-available/kibana
58 install -o root -g root -m 0644 files/charm/nginx_lb.conf /etc/nginx/sites-available/es_cluster

Subscribers

People subscribed via source and target branches