Add elastic_stack_keystore resource to handle keystore files for both elasticsearch and kibana#71
Open
lcharreau wants to merge 33 commits intovoxpupuli:masterfrom
Open
Add elastic_stack_keystore resource to handle keystore files for both elasticsearch and kibana#71lcharreau wants to merge 33 commits intovoxpupuli:masterfrom
lcharreau wants to merge 33 commits intovoxpupuli:masterfrom
Conversation
added 4 commits
December 19, 2023 18:45
bastelfreak
reviewed
Dec 19, 2023
| mk_resource_methods | ||
|
|
||
| def self.defaults_dir | ||
| @defaults_dir ||= case Facter.value('osfamily') |
Member
There was a problem hiding this comment.
please don't use the legacy fact osfamily, that's deprecated. Please use the nested os.family.
added 25 commits
December 20, 2023 09:05
Author
|
Finally, I wonder if it wouldn't be more appropriate to implement the This would simplify the code and would be justified by the fact that there are differences in keystore management between |
|
Hello. Is there any news on this PR? The change suggested by @lcharreau seems interesting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I needed to install Elasticsearch version 8 (with Kibana).
I had several problems configuring the keystore files (elasticsearch and kibana) using the
puppet-elasticsearchandpuppet-kibanamodules.Here are the problems encountered:
elasticsearch_keystoreresource is not indempotent. It recreates the keystore file each time it is run, whether or not there has been a change. It does not parse the contents to ensure that the file is synchronized;I thought it simpler to implement a single resource type to manage the keystore in the
puppet-elastic_stackmodule (to be used by both the elasticsearch and kibana modules). This avoids duplicate code.I used the
elasticsearch_keystoreresource to correct the problems encountered and added keystore management for Kibana. I didn't keep the notion of instances, which weren't necessarily of interest in my case.Example of the
elastic_stack_keystoreresource declaration for Elasticsearch:To manage the keystore password, there are 2 modes:
passwordparameter is set and not empty, when the resource is executed, the keystore will be password-protected. However, it will not be possible to re-modify it by changing thepasswordparameter (this will have to be done manually on the target).passwordparameter to be changed without having to do so manually. To do this, declare a resource file containing the (with thebackupparameter set to true).I haven't included all the code in the elasticsearch module, just an example to illustrate.
Example of the
elastic_stack_keystoreresource declaration for Kibana (kibana-keystore does not support password):The
serviceparameter is the namevar and can take 2 values:elasticsearchorkibana.