New Charm - Kibana

Bug #1075400 reported by Paul Czarkowski
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juju Charms Collection
Fix Released
Wishlist
Unassigned

Bug Description

created a Kibana charm to go with the logstash-indexer and elasticsearch charms. example commands to bring up whole stack on my local system. tested in LXC only.

juju bootstrap

juju deploy --repository=examples local:precise/elasticsearch
juju deploy --repository=examples local:precise/logstash-indexer
juju add-relation logstash-indexer elasticsearch:cluster
juju deploy --repository=examples local:precise/kibana
juju add-relation kibana elasticsearch:rest
juju expose kibana

Related branches

Paul Czarkowski (paulcz)
tags: added: new-charm
tags: removed: new-charm
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Paul, thanks for submitting, this is pretty cool!

All of these need to be addressed before the charm can be promulgated into the store.

**
$ charm proof
E: no copyright file
E: Includes template README.ex file
E: README.ex Includes boilerplate README.ex line 11
E: README.ex Includes boilerplate README.ex line 12
E: README.ex Includes boilerplate README.ex line 14
E: README.ex Includes boilerplate README.ex line 15
I: relation web has no hooks
**
gem install bundler is not secure. You'll need to use the system's ruby-bundler, or download it, and all of its dependencies, securely from rubygems.com (which does offer https, but just doesn't enforce it).
**

Now, all these next items are just minors/suggestions that can be worked out later, though I strongly encourage you to address them now.

*************
in hooks/install, setting HOME with dirname $0 is not needed. Hooks are always guaranteed to start out in the root dir of the charm. So $PWD at the beginning of the charm is all you need.
**
if [ -f $HOME/../files/charm/kibana-ruby.tar.gz ]

You need to double-quote the path there. While there's no reason why I'd think we'd ever see spaces in this, its not safe to assume when you're not in control of the directories. Of course, you can also just do

if [ -f files/charm/kibana-ruby.tar.gz ]

Again, no need for HOME.
**
The static checksumming is not necessary, as github allows downloads via https. That might be easier.
**
mkdir -p /opt/kibana
cd /tmp
tar xzvf /tmp/kibana-ruby.tar.gz
mv /tmp/rashidkpc-Kibana-*/* /opt/kibana/

This looks like it might not be fully idempotent. Perhaps better to use rsync here.
*************

Next step: I'll assign this bug to you and set to Incomplete. You should change the status back to 'New' when it is ready for review again.

Changed in charms:
assignee: nobody → Paul Czarkowski (paulcz)
status: New → Incomplete
importance: Undecided → Wishlist
Revision history for this message
Paul Czarkowski (paulcz) wrote :

heh, idiot forgot the copyright, weird I'm sure I ran charm proof and didn't get an error before I uploaded it. musta been drunk. Not a big fan of the template errors, I guess I finally managed to clear them off, but really there was nothing wrong with the file itself. I think there might be something screwy with the checks as I cleared all 4 of the warning lines when I changed a single line.

$ charm proof
$

**

this should take care of securing the gem install bundler -
sed -i "s|http://rubygems.org|https://rubygems.org|" /opt/kibana/Gemfile

**

$HOME stuff is cleaned up ... although I am using it to cd back to the right place after chdir'ing briefly into /opt/kibana .. . I guess I could use pushd/popd to do this ... might play with this and change.

**

fixed the "tar /; mv" garbage with new (to me) tar option --strip 1 so I can untar it directly in /opt/kibana ... neat.

Changed in charms:
status: Incomplete → New
assignee: Paul Czarkowski (paulcz) → nobody
Revision history for this message
Juan L. Negron (negronjl) wrote :

Reviewing this now.

-Juan

Revision history for this message
Juan L. Negron (negronjl) wrote :

This looks good to me.

I am reviewing the other two related charms ( elasticsearch and logstash-indexer ) as well as they appear to be related.

Approved.

-Juan

Revision history for this message
Juan L. Negron (negronjl) wrote :

Promulgated.

-Juan

Changed in charms:
status: New → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

FYI, there was in fact a bug in charm proof, which I have since fixed. Sorry for the noise.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.