allow installation of plugins on 2.x #477

Merged
merged 1 commit into from Nov 9, 2015

Projects

None yet

3 participants

@igalic
Contributor
igalic commented Nov 2, 2015

this adds a fact, elasitcsearch_version, which works without
elasticsearch running, and helps determine the basic version of the
es installation.

using this info, we then decide in elasticsearch::plugin how to
(un)install plugins.

@igalic igalic referenced this pull request Nov 2, 2015
Closed

Elasticsearch 2 support #471

@elasticsearch-release

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

@elasticsearch-release

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

@igalic
Contributor
igalic commented Nov 2, 2015

elasticsearch::plugin should probably be elasticsearch_plugin…

@electrical
Contributor

@igalic thanks!
Was looking for a good solution on this but completely forgot the cmd line version option :-)
Will trigger jenkins on this.

@electrical
Contributor

jenkins, test it

@electrical
Contributor

jenkins, test it

@electrical
Contributor

Did some local checking.
--version only works on 2.x
on 1.x its -v

I hope this is taken in account? if so could you also add some tests for this? ( Unit tests )

@igalic igalic commented on an outdated diff Nov 5, 2015
manifests/plugin.pp
@@ -93,6 +93,11 @@
default => Elasticsearch::Service[$instances],
}
+ $remove_cmd = $::elasticsearch_version? {
+ /^2/ => 'remove',
@igalic
igalic Nov 5, 2015 Contributor

this should use versioncmp()

@igalic igalic allow installation of plugins on 2.x
this adds a fact, elasitcsearch_version, which works without
elasticsearch running, and helps determine the basic version of the
es installation.

using this info, we then decide in elasticsearch::plugin how to
(un)install plugins.
4a90ec3
@electrical
Contributor

Could you add a test to the plugin define as well?

@igalic
Contributor
igalic commented Nov 7, 2015

yes!

how?

@electrical
Contributor

I think we can set the fact value and just assert we set the right install / remove commands? Worst case i can add them afterwards :-)

@electrical electrical merged commit 127b160 into elastic:master Nov 9, 2015

1 check passed

CLA Commit author has signed the CLA
Details
@electrical electrical added a commit to electrical/puppet-elasticsearch that referenced this pull request Nov 9, 2015
@electrical electrical Add simple plugin test for PR #477 5d1630f
@igalic igalic deleted the igalic:plugin-deinst branch Nov 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment