Comment 15 for bug 822979

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

Hi all,

I'd originally worked on an ansible version of the elasticsearch charm not realising that the charmstore should only have one charm for each service. I'm putting it here for discussion, in case it's something Paul and Luis or others involved in the elasticsearch charm are interested switching to (once parity is achieved), if not, I can just use it as a separate charm outside of the charmstore.

lp:~michael.nelson/charms/precise/elasticsearch/trunk (attached above)

My needs were (for a deployment):
  * Be able to install an elasticsearch deb package without downloading it during the install hook (while still allowing the default behaviour of downloading during the install hook)
  * Provide a generic way of doing the discovery that can work on all providers without extra plugins (ie. using juju to orchestrate via a peer relationship rather than plugins that work on ec2 only).
  * Include both unit-tests and functional (amulet) tests for the charm.
  * Simple to maintain

And I wanted to try out the ansible charm helpers support on a real charm (which was more of an experiment). I'm pretty happy with the result from a maintenance point-of-view - you can understand everything about what the charm does by looking at the one file - the playbook.yaml:

http://bazaar.launchpad.net/~michael.nelson/charms/precise/elasticsearch/trunk/view/head:/playbook.yaml

Test locally with `juju test` (verified on trusty, juju 1.17.3, charm-tools 1.2.8-0ubuntu1~ubuntu13.10.1~ppa1, amulet 1.2.1-0ubuntu1~ubuntu13.10.1~ppa1)

If this is something others are keen to switch to, there are a few things that I'll need to check and followup:
 * Confirm that cluster-name not required for rest interface (why rest interface, and not just website?). The kibana rest-relation-changed doesn't use the cluster name (and could get it from the host if needed), and just uses private-address for the host anyway).
 * Find out why logstash template is included in this elasticsearch charm, and why the template is added in start hook - shouldn't that be part of logstash charm/subordinate?
 * Check whether need to add cluster-relation-changed as it was previously.

I'm happy to work on this until it has feature parity with what people are currently using, but understand if it's not something you want in the charmstore version given the work that's gone into the current charm.

Thanks!