Charm needed: Elastic Search
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Juju Charms Collection |
Fix Released
|
Wishlist
|
Luis Arias |
Related branches
- Marco Ceppi (community): Approve
-
Diff: 53 lines (+6/-6)3 files modifiedapiconfig.yaml (+4/-4)
hooks/install (+1/-1)
revision (+1/-1)
- Tom Haddon (community): Needs Fixing
-
Diff: 360 lines (+108/-73) (has conflicts)11 files modifiedapiREADME.md (+26/-0)
config.yaml (+18/-17)
hooks/cluster-relation-changed (+1/-1)
hooks/cluster-relation-joined (+4/-3)
hooks/common.sh (+7/-6)
hooks/config-changed (+27/-1)
hooks/install (+15/-32)
hooks/start (+3/-9)
hooks/stop (+4/-3)
metadata.yaml (+2/-0)
revision (+1/-1)
summary: |
- Formula needed: Elastic Search + Charm needed: Elastic Search |
Sidnei da Silva (sidnei) wrote : | #1 |
Luis Arias (kaaloo) wrote : | #2 |
I'm working on this charm right now with the intent of using it with logstash (for which I will also attempt to write a charm).
Luis Arias (kaaloo) wrote : | #3 |
I have an initial implementation that seems to be working correctly locally and on ec2 with the elasticsearch aws plugin. I'd like to submit my branch for review. Should I assign myself this bug ?
Changed in charms: | |
assignee: | nobody → Luis Arias (kaaloo) |
Changed in charms: | |
status: | New → In Progress |
Mark Mims (mark-mims) wrote : | #4 |
Hi Luis, thanks for sharing your charm!
Here's my static review to start with:
things to fix:
- charms that are part of the charmstore need to cryptographically verify downloads. Can you please look to see if there're published hashes of the elasticsearch tarball that can be used?
- note that you really don't want the hostname in the rest-relation-
- what's the rest relation for? Can you add some example usage into the README? Is the intention to eventually proxy requests up to the elasticsearch head?
recommendations / discussion (not necessarily "need to fix"):
- in your install hook, I don't suggest an general "apt-get upgrade"... I think you're better off with updating only the packages you need to update. Was there a particular reason for the upgrade or was it just in the upstream script?
So this is a great idea... I'm excited about where it can go.
I'll leave it "In Progress" for now.
Thanks!
Luis Arias (kaaloo) wrote : Re: [Bug 822979] Re: Charm needed: Elastic Search | #5 |
Hi Mark,
Thanks for your review! I'm excited to try and get the charm in shape for
the charm store. Some answers below.
On Thu, Jun 21, 2012 at 1:00 AM, Mark Mims <email address hidden>wrote:
> Hi Luis, thanks for sharing your charm!
>
> Here's my static review to start with:
>
> things to fix:
>
> - charms that are part of the charmstore need to cryptographically
> verify downloads. Can you please look to see if there're published
> hashes of the elasticsearch tarball that can be used?
>
I have posted a request for hashes here and there is a first comment
already. Please step in the conversation since I'm not sure exactly what
to recommend here.
https:/
> - note that you really don't want the hostname in the rest-relation-
> changed hook... you can always get the other side's address using
> `relation-get private-address`.
>
I updated the charm locally and am testing. I'll push to my branch when
done.
>
> - what's the rest relation for? Can you add some example usage into the
> README? Is the intention to eventually proxy requests up to the
> elasticsearch head?
>
>
The rest relation is for querying elasticsearch API:
http://
This allows querying for search results but also a bunch of administrative
tasks.
I did not define a relation for the elasticsearch transport protocol on
port 9300 simply because I was learning as I went along, but for instance
this is used by logstash when interfacing directly with elastic search.
http://
Looking at that page again it seems there are a bunch of modules (JMX,
memcached, etc...) which would merit defining a relation, so there may be a
lot more work involved in this charm than I set out to implement for my use
case.
>
> recommendations / discussion (not necessarily "need to fix"):
>
> - in your install hook, I don't suggest an general "apt-get upgrade"...
> I think you're better off with updating only the packages you need to
> update. Was there a particular reason for the upgrade or was it just in
> the upstream script?
>
>
Ok no prob, this is just a habit that leaked from our current deployment
system which is just a wrapper around aws cloud-formation and we generally
want each new instance to be up to date. I see that it's out of the scope
of juju to guarantee that especially for an individual charm. I'll fix
that.
> So this is a great idea... I'm excited about where it can go.
>
> I'll leave it "In Progress" for now.
>
> Thanks!
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Charm needed: Elastic Search
>
> To manage notifications about this bug go to:
> https:/
>
Clint Byrum (clint-fewbar) wrote : | #6 |
Hi Luis!
IMO, downloading the latest version of elasticsearch in the charm isn't the best plan. Its a big piece of software and you, the charm maintainer, may want to take a look at it before you dump it onto all the current users of the charm.
Perhaps you should just embed the tarball in the charm itself. That will make the charm fairly large in bytes, but it will also make the charm more robust to github downtime or upstream filtering.
The cryptographic hashes are still needed though, because otherwise, how do you verify a download of a file from github? I'm surprised they don't allow uploading of detached signatures the way launchpad does.
Luis Arias (kaaloo) wrote : | #7 |
Hi!
The problem with that approach is that some pieces of software, namely
logstash (which is my use case) really require a specific version of
elasticsearch because they use the transport module and not the REST api.
So the charm needs this kind of flexibility even though yes its huge.
There are probably going to be similar problems with logstash itself which
is another huge jar with a bunch of stuff and I don't see any hashes either
(I haven't asked yet). http://
elasticsearch maintainers are open to working something out for the hashes.
Any pointers to guidelines from the ubuntu / debian practices I could
suggest ?
Luis
On Mon, Jun 25, 2012 at 10:27 PM, Clint Byrum <email address hidden> wrote:
> Hi Luis!
>
> IMO, downloading the latest version of elasticsearch in the charm isn't
> the best plan. Its a big piece of software and you, the charm
> maintainer, may want to take a look at it before you dump it onto all
> the current users of the charm.
>
> Perhaps you should just embed the tarball in the charm itself. That will
> make the charm fairly large in bytes, but it will also make the charm
> more robust to github downtime or upstream filtering.
>
> The cryptographic hashes are still needed though, because otherwise, how
> do you verify a download of a file from github? I'm surprised they don't
> allow uploading of detached signatures the way launchpad does.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Charm needed: Elastic Search
>
> To manage notifications about this bug go to:
> https:/
>
Clint Byrum (clint-fewbar) wrote : | #8 |
If the public API's of elasticsearch (the transport module) change from version to version, that should be different charms, and probably versioned interfaces. Part of 'the interface matching that juju does is built around the idea that you can assume a certain protocol will be available on the other side of the relation.
That said, for your charm, you *could* just add a hash verification after the wget's, and have the hash be specified in the service configs the same way the version is. You do not need the hashes from upstream, you can just calculate the hash yourself with 'sha256sum', but you need to make sure the file is actually the one from upstream and not one with trojaned code in it. ;)
bin/plugin -install elasticsearch/
Its also not clear if that command does verification of the software it downloads. Can you please check it and assert how it does in a comment in the script?
Also, you should do anything that does 'config-get` in config-changed, not install. This makes it a little more difficult as you have to move the current one out of the way and install a new one, but means that users can change the version after deploy, which may be important and will most definitely be the expected way things should work with any config options.
I'm going to mark this back to Incomplete. You should be able to satisfy the hash requirement yourself. The config-changed is just a suggestion, its not required for charm store inclusion.
Changed in charms: | |
status: | In Progress → Incomplete |
Clint Byrum (clint-fewbar) wrote : | #9 |
Hi Luis! I was looking at your excellent charm today and I remembered this bug. Any progress since June? Are you still interested in it? Otherwise I think we might just fix the issues and get this in the store ourselves.
Thanks!
Luis Arias (kaaloo) wrote : | #10 |
Hi Clint,
Oh please go ahead and build on what is there if that is helpful to you. I
do not have the possibility to work on this at the present time since we
are using our own CloudFormation wrapper for logstash / elasticsearch /
kibana.
Luis
On Fri, Oct 19, 2012 at 6:50 AM, Clint Byrum <email address hidden> wrote:
> Hi Luis! I was looking at your excellent charm today and I remembered
> this bug. Any progress since June? Are you still interested in it?
> Otherwise I think we might just fix the issues and get this in the store
> ourselves.
>
> Thanks!
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https:/
>
> Title:
> Charm needed: Elastic Search
>
> To manage notifications about this bug go to:
> https:/
>
Paul Czarkowski (paulcz) wrote : | #11 |
I'm working on a logstash / elastic search / kibana set of charms. I've taken this charm and updated it after reading this discussion. You can find what I did at the below code branch. I hope its suitable.
Paul Czarkowski (paulcz) wrote : | #12 |
let me know if I should create a new bug to track my branch of this ... or if we can just do it from here.
Jorge Castro (jorge) wrote : | #13 |
One for each charm would be preferable, that way we can keep the reviews separate instead of in one pile, thanks!
Luis Arias (kaaloo) wrote : | #14 |
I just got a notification that elasticsearch is now providing sha1 hashes for their downloads:
https:/
The downloads are also taking place on SSL:
http://
I'll close the githhub bug associated with this discussion.
Luis
Michael Nelson (michael.nelson) wrote : | #15 |
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:
Test locally with `juju test` (verified on trusty, juju 1.17.3, charm-tools 1.2.8-0ubuntu1~
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-
* 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-
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!
Michael Nelson (michael.nelson) wrote : | #16 |
I've just added the cluster/rest provisions to match the existing interface, and verified that I get the same results deploying with kibana with the current charmstore elasticsearch and my branch.
I've also added nrpe-external-
Let me know if there are other things that need to change for this to reach the charmstore.
Changed in charms: | |
status: | Incomplete → New |
Charles Butler (lazypower) wrote : | #17 |
Greetings Michael,
Thank you for sharing your work on the elasticsearch charm! I'm excited to review this particular release as
a) you provided tests
b) its in ANSIBLE
c) I've written amulet tests around the existing elasticsearch charm.
In short, I'm jazzed about the work you've put in. During the review process I came up with the following notes/concerns:
There is no copyright file - this is a requirement for inclusion to the charm store. Choose a FOSS license and embed it in the file 'copyright'
When running the amulet tests, all test cases failed on the install hook with the following output:
failed: [localhost] => (item=openjdk-
msg: [Errno 2] No such file or directory
You've made excellent progress on getting the charm under configuration management, and barring some simple modifications You are extremely close to having this revision accepted into the charm store.
I'm going to move the status of the bug to "incomplete". When you are ready for another peer review move the status to "New" or "Fix Committed" and someone will be along shortly to review your work.
Changed in charms: | |
status: | New → Incomplete |
Michael Nelson (michael.nelson) wrote : | #18 |
On Tue, Mar 11, 2014 at 5:24 PM, Charles Butler
<email address hidden> wrote:
> Greetings Michael,
>
> Thank you for sharing your work on the elasticsearch charm! I'm excited
> to review this particular release as
>
> a) you provided tests
> b) its in ANSIBLE
> c) I've written amulet tests around the existing elasticsearch charm.
>
> In short, I'm jazzed about the work you've put in. During the review
> process I came up with the following notes/concerns:
>
> There is no copyright file - this is a requirement for inclusion to the
> charm store. Choose a FOSS license and embed it in the file 'copyright'
Will do.
>
> When running the amulet tests, all test cases failed on the install hook with the following output:
> failed: [localhost] => (item=openjdk-
> msg: [Errno 2] No such file or directory
Yes, that was bad timing. There was a release in the ansible PPA
*today* which causes that bug -
https:/
I'll wait until the ansible PPA is updated before requesting a review again.
>
> You've made excellent progress on getting the charm under configuration
> management, and barring some simple modifications You are extremely
> close to having this revision accepted into the charm store.
>
> I'm going to move the status of the bug to "incomplete". When you are
> ready for another peer review move the status to "New" or "Fix
> Committed" and someone will be along shortly to review your work.
Thanks Charles, will do.
Michael Nelson (michael.nelson) wrote : | #19 |
On Tue, Mar 11, 2014 at 5:46 PM, Michael Nelson
<email address hidden> wrote:
> On Tue, Mar 11, 2014 at 5:24 PM, Charles Butler
> <email address hidden> wrote:
>>
>> There is no copyright file - this is a requirement for inclusion to the
>> charm store. Choose a FOSS license and embed it in the file 'copyright'
>
> Will do.
I've just pushed r16 which simply adds the copyright.
>
>>
>> When running the amulet tests, all test cases failed on the install hook with the following output:
>> failed: [localhost] => (item=openjdk-
>> msg: [Errno 2] No such file or directory
>
> Yes, that was bad timing. There was a release in the ansible PPA
> *today* which causes that bug -
> https:/
>
> I'll wait until the ansible PPA is updated before requesting a review again.
The PPA was updated the next day. If I run `juju test` now, I see the
first test passing, but the second and third fail due to install hook
errors on the sentry unit:
http://
If I run the tests individually it times out:
http://
Let me know if it's a known issue or something I'm doing wrong.
Michael Nelson (michael.nelson) wrote : | #20 |
All 3 amulet tests are passing.
Changed in charms: | |
status: | Incomplete → New |
Whit Morriss (whitmo) wrote : | #21 |
Thanks for this rewrite! awesome to see ES as deployed via an ansible playbook!
In general, everything looks good. Few little things to fix or consider:
Test running:
- tests expect python-nose, but `make test` runs nosetests3, the
executable installed by python3-nose.
- I had to install nose, mock, and py-yaml before I could get the
tests to run. To allow for automated testing, installing the deps
should be a requirement for the makefile test target,
- To get the tests to run, I simplified command to
`@PYTHONPAT
pretty sure this should work in or out of a virtualenv, provided
the deps are installed.
metadata.yaml
Charm proof throws a warning on the maintainer field having more
than a single name and single email. Support is coming for multiple
maintainers and it will expect a yaml list of names and emails.
playbook.yml
I recommend encapsulating your ansible bits into a folder named
`playbook` and naming your entry yaml file `hooks.yml`. The playbook
looks great, you could improve the scannability a bit by
consistently putting the tags at the end of each task declaration.
I'm going ahead and giving this a plus one. Thanks again Micheal!
Whit Morriss (whitmo) wrote : | #22 |
Hey micheal, was playing a bit and noticed some flakiness around adding peers. Is there some reason no to let elasticsearch do auto-discovery and use the cluster name to avoid unwanted cluster joins?
Michael Nelson (michael.nelson) wrote : | #23 |
On Tue, May 6, 2014 at 5:07 PM, Whit Morriss <email address hidden> wrote:
> Hey micheal, was playing a bit and noticed some flakiness around adding
> peers. Is there some reason no to let elasticsearch do auto-discovery
> and use the cluster name to avoid unwanted cluster joins?
Hi Whit, thanks for digging in there.
Can you give me steps to reproduce the flakiness? I'd love to get that sorted.
The elasticsearch autodiscovery is dependent on multicast which isn't
generally available. Different services have their own way of enabling
something similar, but I'd really like to have the charm doing one
thing that works (and is tested) on any service provider, rather than
using one plugin for ec2, something else for HP Cloud etc. Given that
juju is already providing the peer IPs, it seemed like the sane thing
to do.
As above, I'd love to debug and fix the flakiness that you're seeing
(the tests include testing a 3 unit deploy). Thanks!
Curtis Hovey (sinzui) wrote : | #24 |
The cluster problem may relate to bug 1294202.
Michael Nelson (michael.nelson) wrote : | #25 |
On Tue, May 6, 2014 at 6:09 PM, Curtis Hovey <email address hidden> wrote:
> The cluster problem may relate to bug 1294202.
Isn't that bug against the current elasticsearch charm (which uses
autodiscovery)? The version I've got here intentionally does not use
autodiscovery, instead using the peer relation (so it can work in any
environment whether multicast is supported or not).
That said, I'd still like to test what happens if another ES unit on
the same network is started with the same cluster name with
autodiscovery on (ie. will it add the units, even though they have
autodiscovery off themselves... I'd guessing so, which is still
dangerous), add firewall rules or similar so that the units can only
talk to peers on 9400. Auto-generating the clustername is a good idea
too, but would still allow malicious users to set the cluster name
intentionally.
Curtis Hovey (sinzui) wrote : | #26 |
@Michael
Bug 1294202 is against the version of elasticsearch run by Canonical IS. The charm was initially the elasticsearch charm I wrote that used my deb. IS forked the charm and now build their own debs.
Matt Bruzek (mbruzek) wrote : | #27 |
- ElasticSearch charm log file. Edit (14.1 KiB, text/plain)
Hello Michael,
I tried using this branch on our enterprise servers that have a more limited networking (to simulate customer production environments). The install hook failed getting the GPG-KEY from elastsicsearch.org. Would it be possible to edit your code to check for the elasticsearch.
This is a feature the current version of the elasticsearch charm that enables the charm to install on a limited network environment that could not reach elasticsearch.org.
The unit log file is attached for your reference.
Michael Nelson (michael.nelson) wrote : | #28 |
On Sat, May 24, 2014 at 12:04 AM, Matt Bruzek
<email address hidden> wrote:
> Hello Michael,
>
> I tried using this branch on our enterprise servers that have a more
> limited networking (to simulate customer production environments). The
> install hook failed getting the GPG-KEY from elastsicsearch.org. Would
> it be possible to edit your code to check for the elasticsearch.
> (or .deb) in the charm first and use that to install?
>
> This is a feature the current version of the elasticsearch charm that
> enables the charm to install on a limited network environment that could
> not reach elasticsearch.org.
Hi Matt,
I can do that, sure. FWIW, this branch was previously supporting
install of a local package, but we removed it when adding support for
a local repository. So assuming you're dealing with a limited network
environment without access to a local repository from which to install
elasticsearch and/or other packages, I'll add it back as an option.
-Michael
Michael Nelson (michael.nelson) wrote : | #29 |
On Mon, May 26, 2014 at 9:26 AM, Michael Nelson
<email address hidden> wrote:
> On Sat, May 24, 2014 at 12:04 AM, Matt Bruzek
> <email address hidden> wrote:
>> Hello Michael,
>>
>> I tried using this branch on our enterprise servers that have a more
>> limited networking (to simulate customer production environments). The
>> install hook failed getting the GPG-KEY from elastsicsearch.org. Would
>> it be possible to edit your code to check for the elasticsearch.
>> (or .deb) in the charm first and use that to install?
>>
>> This is a feature the current version of the elasticsearch charm that
>> enables the charm to install on a limited network environment that could
>> not reach elasticsearch.org.
>
> Hi Matt,
>
> I can do that, sure. FWIW, this branch was previously supporting
> install of a local package, but we removed it when adding support for
> a local repository. So assuming you're dealing with a limited network
> environment without access to a local repository from which to install
> elasticsearch and/or other packages, I'll add it back as an option.
Just to be explicit, when we're deploying this in our restricted
environment, the options we have set are:
options:
It might be worthwhile ensuring that if a non-default apt-repository
is set, the apt-key-url is defaults to "" rather than the normal
default at elasticsearch.org.
Kapil Thangavelu (hazmat) wrote : | #30 |
fwiw, i've been using your es charm as part of a trusty stack, and wanted
to relay a few findings. first i'm not sure what the hold up is on pushing
this forward, the extant elasticsearch in the store is pretty broken for
non-ec2 and is suboptimal by using config to workaround lack of
implementation of relations.
also i realize its inherited (and complete baggage) but its unclear what
the distinction is between rest and cluster, they both seem to be identical
forms of provider side access via http. one of them should get dropped, are
both actually in use. also you've added a website / http relation isn't
conveying port which is a required part of that interface communications.
also missing a charm icon (i'd just grab the one off trunk).
On Mon, May 26, 2014 at 4:36 AM, Michael Nelson
<email address hidden>wrote:
> On Mon, May 26, 2014 at 9:26 AM, Michael Nelson
> <email address hidden> wrote:
> > On Sat, May 24, 2014 at 12:04 AM, Matt Bruzek
> > <email address hidden> wrote:
> >> Hello Michael,
> >>
> >> I tried using this branch on our enterprise servers that have a more
> >> limited networking (to simulate customer production environments). The
> >> install hook failed getting the GPG-KEY from elastsicsearch.org. Would
> >> it be possible to edit your code to check for the elasticsearch.
> >> (or .deb) in the charm first and use that to install?
> >>
> >> This is a feature the current version of the elasticsearch charm that
> >> enables the charm to install on a limited network environment that could
> >> not reach elasticsearch.org.
> >
> > Hi Matt,
> >
> > I can do that, sure. FWIW, this branch was previously supporting
> > install of a local package, but we removed it when adding support for
> > a local repository. So assuming you're dealing with a limited network
> > environment without access to a local repository from which to install
> > elasticsearch and/or other packages, I'll add it back as an option.
>
> Just to be explicit, when we're deploying this in our restricted
> environment, the options we have set are:
>
> options:
> cluster-name: whatever-name
> install-
> apt-repository: deb http://
> apt-key-url: ""
>
> It might be worthwhile ensuring that if a non-default apt-repository
> is set, the apt-key-url is defaults to "" rather than the normal
> default at elasticsearch.org.
>
> --
> You received this bug notification because you are a member of charmers,
> which is subscribed to the bug report.
> https:/
>
> Title:
> Charm needed: Elastic Search
>
> To manage notifications about this bug go to:
> https:/
>
Michael Nelson (michael.nelson) wrote : | #31 |
On Mon, May 26, 2014 at 2:18 PM, Kapil Thangavelu
<email address hidden> wrote:
> fwiw, i've been using your es charm as part of a trusty stack, and wanted
> to relay a few findings. first i'm not sure what the hold up is on pushing
> this forward, the extant elasticsearch in the store is pretty broken for
> non-ec2 and is suboptimal by using config to workaround lack of
> implementation of relations.
Great, thanks for the feedback Kapil.
>
> also i realize its inherited (and complete baggage) but its unclear what
> the distinction is between rest and cluster, they both seem to be identical
> forms of provider side access via http. one of them should get dropped, are
> both actually in use.
As per the comment in the metadata.yaml, they're there only to provide
backwards compat. for the existing charms that relate using those, and
are as far as I can tell, both otherwise unnecessary.
At least, I'm not using them at all in our deployments, instead using
the standard website interface. Do you think we should instead
standardise on 'rest' (maybe more descriptive, but in the end, also
just an address/port).
> also you've added a website / http relation isn't
> conveying port which is a required part of that interface communications.
Yes, I was a bit unsure what to do there, given that by default
elasticsearch uses a *range*, 9200-9300.
Given that juju is deploying instances for each unit, it seems sane to
just use 9200 instead of a range and publish that through the
interface? Let me know if you're OK with that at:
> also missing a charm icon (i'd just grab the one off trunk).
I've added lp:charms/elasticsearch/icon.svg to the above MP.
If you agree with those changes, I'll merge them in.
Thanks Kapil.
Kapil Thangavelu (hazmat) wrote : | #32 |
On Mon, May 26, 2014 at 11:17 AM, Michael Nelson
<email address hidden>wrote:
> On Mon, May 26, 2014 at 2:18 PM, Kapil Thangavelu
> <email address hidden> wrote:
> > fwiw, i've been using your es charm as part of a trusty stack, and
> wanted
> > to relay a few findings. first i'm not sure what the hold up is on
> pushing
> > this forward, the extant elasticsearch in the store is pretty broken for
> > non-ec2 and is suboptimal by using config to workaround lack of
> > implementation of relations.
>
> Great, thanks for the feedback Kapil.
>
>
Forgot to say, this i really like the way the ansible charm-helpers stuff
has come together, this charm looks great. I'm hoping to use it in a charm
school re how to write ansible charms, it would be nice to toss it into the
charm-tools ala charm create -t ansible that timS's been working on.
One cool trick with newer juju versions (1.18+) is juju run --service=es
"ansible -c playbooks.yaml" to ensure configuration safety (no env
variables set though).
> >
> > also i realize its inherited (and complete baggage) but its unclear what
> > the distinction is between rest and cluster, they both seem to be
> identical
> > forms of provider side access via http. one of them should get dropped,
> are
> > both actually in use.
>
> As per the comment in the metadata.yaml, they're there only to provide
> backwards compat. for the existing charms that relate using those, and
> are as far as I can tell, both otherwise unnecessary.
>
i'm a bit torn on whether their actually not needed. i've been dealing with
this in my etcd and influxdb charms, and it does feel more correct to label
the http traffic per the expected client consumption usage interface rather
than generically via transport. It makes connecting the pieces in the gui
much saner, and with systems like es (or those others) the software
internally routes to the correct location obviating the need for additional
infrastructure like haproxy that could play (albeit poorly) via the extant
http interface.
iotw. i'd rather drop the website/http interface for connecting to clients
(minus ui admin components), and rely on something like 'elasticsearch' for
a client interface, what i find distasteful in the extant store charm is
the use of two named relations using the same interface with zero
distinction creating needless ambiguity for users. unfortunately ic that
same ambiguity throughout the previous monitoring stack charms, and sad
they got into the store with such conventions.
>
> At least, I'm not using them at all in our deployments, instead using
> the standard website interface. Do you think we should instead
> standardise on 'rest' (maybe more descriptive, but in the end, also
> just an address/port).
>
well the rest name is internal to elasticsearch, i'd be just as happy
renaming them to 'client' but renaming relation names is quite tricky
against extant systems. it requires destroying the relation and re-creating
on upgrade. it would be nice to have something in core that could help here
though its a bit unclear on what exactly, some form of declarative upgrade
mapping on relations perhaps.
>
> > also you've added a website / http ...
Michael Nelson (michael.nelson) wrote : | #33 |
On Mon, May 26, 2014 at 6:33 PM, Kapil Thangavelu
<email address hidden> wrote:
> Forgot to say, this i really like the way the ansible charm-helpers stuff
> has come together, this charm looks great. I'm hoping to use it in a charm
> school re how to write ansible charms, it would be nice to toss it into the
> charm-tools ala charm create -t ansible that timS's been working on.
Yes, that would be nice. At the moment I've just got the bootstrap
[1], which could probably be used for the template.
[1] https:/
> i'm a bit torn on whether their actually not needed. i've been dealing with
> this in my etcd and influxdb charms, and it does feel more correct to label
> the http traffic per the expected client consumption usage interface rather
> than generically via transport. It makes connecting the pieces in the gui
> much saner, and with systems like es (or those others) the software
> internally routes to the correct location obviating the need for additional
> infrastructure like haproxy that could play (albeit poorly) via the extant
> http interface.
>
> iotw. i'd rather drop the website/http interface for connecting to clients
> (minus ui admin components), and rely on something like 'elasticsearch' for
> a client interface, what i find distasteful in the extant store charm is
> the use of two named relations using the same interface with zero
> distinction creating needless ambiguity for users. unfortunately ic that
> same ambiguity throughout the previous monitoring stack charms, and sad
> they got into the store with such conventions.
So based on those comments, I've removed the 'website' relation and
instead promoted the 'rest' relation as the client interface, so that
it's just the 'cluster' relation that is now creating the ambiguity
(and it's commented). The other option would have been to add an
'elasticsearch' or 'client' relation but then have 3 using the same
interface without distinction.
Let me know if that's not what you want. And btw, dropping the website
interface shouldn't be an issue here as it's not yet in the charm
store.
>
> well the rest name is internal to elasticsearch, i'd be just as happy
> renaming them to 'client' but renaming relation names is quite tricky
> against extant systems.
If you think we should add the 'client' relation now for going
forward, happy to do that, but it'd mean 3 relations doing the same
thing.
> it requires destroying the relation and re-creating
> on upgrade. it would be nice to have something in core that could help here
> though its a bit unclear on what exactly, some form of declarative upgrade
> mapping on relations perhaps.
Right. In our case that's not really an issue... I want to re-deploy
on trusty anyway.
>
> re matt's comment, it would be nice to support simple file inclusion for
> capturing the dependency on this.. local repositories are a fairly advanced
> usage mode in comparison, with much more cognitive overhead. dropping a
> file into a directory on the charm is about as simple as it can get.
Added that too. So if your charm includes a files/elasticse
it'll be installed instead. Here's an example:
http...
Whit Morriss (whitmo) wrote : | #34 |
Current version looks great except "sets: [cluster-name, host, port]" causes charm proof to fail.
Kapil Thangavelu (hazmat) wrote : | #35 |
On Tue, May 27, 2014 at 10:45 AM, Michael Nelson <email address hidden>
wrote:
> On Mon, May 26, 2014 at 6:33 PM, Kapil Thangavelu
> <email address hidden> wrote:
> > Forgot to say, this i really like the way the ansible charm-helpers stuff
> > has come together, this charm looks great. I'm hoping to use it in a
> charm
> > school re how to write ansible charms, it would be nice to toss it into
> the
> > charm-tools ala charm create -t ansible that timS's been working on.
>
> Yes, that would be nice. At the moment I've just got the bootstrap
> [1], which could probably be used for the template.
>
> [1] https:/
>
> > i'm a bit torn on whether their actually not needed. i've been dealing
> with
> > this in my etcd and influxdb charms, and it does feel more correct to
> label
> > the http traffic per the expected client consumption usage interface
> rather
> > than generically via transport. It makes connecting the pieces in the gui
> > much saner, and with systems like es (or those others) the software
> > internally routes to the correct location obviating the need for
> additional
> > infrastructure like haproxy that could play (albeit poorly) via the
> extant
> > http interface.
> >
> > iotw. i'd rather drop the website/http interface for connecting to
> clients
> > (minus ui admin components), and rely on something like 'elasticsearch'
> for
> > a client interface, what i find distasteful in the extant store charm is
> > the use of two named relations using the same interface with zero
> > distinction creating needless ambiguity for users. unfortunately ic that
> > same ambiguity throughout the previous monitoring stack charms, and sad
> > they got into the store with such conventions.
>
> So based on those comments, I've removed the 'website' relation and
> instead promoted the 'rest' relation as the client interface, so that
> it's just the 'cluster' relation that is now creating the ambiguity
> (and it's commented). The other option would have been to add an
> 'elasticsearch' or 'client' relation but then have 3 using the same
> interface without distinction.
>
> Let me know if that's not what you want. And btw, dropping the website
> interface shouldn't be an issue here as it's not yet in the charm
> store.
>
The big thing i want todo is drop the ambiguity, ie no redundancy on
client interface names ('cluster', 'rest', 'website', 'client').. ideally
we'd just have a single simple name 'client'... 'rest' is fine.
It simplifies the documentation and is compatible with extant charms, just
that they need to add/remove relation if they upgrade (to a new charm of a
different series which seems like a good time for us to fix the bad
practices).
> >
> > well the rest name is internal to elasticsearch, i'd be just as happy
> > renaming them to 'client' but renaming relation names is quite tricky
> > against extant systems.
>
> If you think we should add the 'client' relation now for going
> forward, happy to do that, but it'd mean 3 relations doing the same
> thing.
>
per above, i'd say drop the others. we can do doc fixes in kibana/indexer
to remove using relation names.
>
> > it...
Michael Nelson (michael.nelson) wrote : | #36 |
On Fri, Jun 6, 2014 at 12:39 AM, Whit Morriss
<email address hidden> wrote:
> Current version looks great except "sets: [cluster-name, host, port]"
> causes charm proof to fail.
I'm OK with charm proof failing there - it should be updated shouldn't
it? I mean, according to the docs [1] it's useful not just for
documentation, but will likely be used by future versions of juju.
[1] https:/
Michael Nelson (michael.nelson) wrote : | #37 |
On Fri, Jun 6, 2014 at 12:40 AM, Kapil Thangavelu
<email address hidden> wrote:
>>
>> Let me know if that's not what you want. And btw, dropping the website
>> interface shouldn't be an issue here as it's not yet in the charm
>> store.
>>
>
> The big thing i want todo is drop the ambiguity, ie no redundancy on
> client interface names ('cluster', 'rest', 'website', 'client').. ideally
> we'd just have a single simple name 'client'... 'rest' is fine.
>
> It simplifies the documentation and is compatible with extant charms, just
> that they need to add/remove relation if they upgrade (to a new charm of a
> different series which seems like a good time for us to fix the bad
> practices).
Right.
>
>
>> >
>> > well the rest name is internal to elasticsearch, i'd be just as happy
>> > renaming them to 'client' but renaming relation names is quite tricky
>> > against extant systems.
>>
>> If you think we should add the 'client' relation now for going
>> forward, happy to do that, but it'd mean 3 relations doing the same
>> thing.
>>
>
> per above, i'd say drop the others. we can do doc fixes in kibana/indexer
> to remove using relation names.
Done with r21. I'll update one of my deploys today to use 'client' instead.
Michael Nelson (michael.nelson) wrote : | #38 |
On Fri, Jun 6, 2014 at 8:28 AM, Michael Nelson
<email address hidden> wrote:
>> per above, i'd say drop the others. we can do doc fixes in kibana/indexer
>> to remove using relation names.
>
> Done with r21. I'll update one of my deploys today to use 'client' instead.
...and after testing with a real deploy, fixes in r22 :-)
amir sanjar (asanjar) wrote : | #39 |
problem:
elasticsearch node discovery doesn't work. (tested on local trusty)
How to recreate :
create five elk nodes as follow:
juju deploy local:trusty/
juju deploy local:trusty/
juju add-unit -n 3 slave
however health check (by below json command) of master node revealed
node discovery has been unsuccessful.
curl -XGET 'http://
{
"cluster_name" : "elasticsearch",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1, <== should be 5
"number_
"active_
"active_shards" : 0,
"relocating_
"initializing
"unassigned_
}
Expected discovery :
curl -XGET 'http://
{
"cluster_name" : "elasticsearch",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 5,
"number_
"active_
"active_shards" : 0,
"relocating_
"initializing
"unassigned_
}
amir sanjar (asanjar) wrote : | #40 |
correction update:
my above deployment procedure was based on general Big Data deployment scenarios (master/slave). It happens that this charm uses peer scenario. Please update the readme file for Juju
novice like I .
Kapil Thangavelu (hazmat) wrote : | #41 |
agreed the readme does need an update, its currently referencing relations
interfaces and discovery items that are obsolete.
On Mon, Jun 16, 2014 at 10:57 AM, amir sanjar <email address hidden>
wrote:
> correction update:
> my above deployment procedure was based on general Big Data deployment
> scenarios (master/slave). It happens that this charm uses peer scenario.
> Please update the readme file for Juju
> novice like I .
>
> --
> You received this bug notification because you are a member of charmers,
> which is subscribed to the bug report.
> https:/
>
> Title:
> Charm needed: Elastic Search
>
> To manage notifications about this bug go to:
> https:/
>
Charles Butler (lazypower) wrote : | #42 |
Greetings Michael,
As our followup via Email denoted, the charm has been promulgated as a trusty charm, moved from the original Precise mark. There is a follow up item that we have ot address with backporting the charm changes to precise - however this may impact a number of deployments as it removes several configuration options present in the existing Precise series charm. As this is a first for me, this warrants further discussion but should not hinder the progress of the ElasticSearch charm.
You can find the issue tracker for the ElasticSearch charm here: https:/
Thank you again for your patience during the review process. We appreciate your dedication and efforts to making a high quality contribution to the juju charm store.
If you have any questions/
Changed in charms: | |
status: | New → Fix Released |
Saw this article (http:// www.elasticsear ch.org/ tutorials/ 2012/03/ 21/deploying- elasticsearch- with-chef- solo.html) and thought, wow this ought to be much easier with Juju.