Comments (14)
Hi,
This is something i still want to solve indeed.
The idea i'm having is to have a default hash with all the values the defaults file has when being installed.
Then i can merge the init_defaults hash with that and overwriting only the values you've specified.
What do you think?
from puppet-elasticsearch.
I know that user / group are defaulted in manifests/params.pp
, so it would be nice to keep those consistent with the init defaults.
On a related note, how would you recommend keeping the other information consistent as well (such as paths)? Right now, the RPM by default creates a defaults file with paths that align with the package's install locations and such (MAX_MAP_COUNT, HOME_DIR, CONF_DIR, CONF_FILE, WORK_DIR, LOG_DIR, DATA_DIR), so needing to override a single value with the Puppet module requires you to redefine everything.
As much as adding additional dependencies annoys me, perhaps it would be worthwhile to look into using Augeas for defining overrides? It would obviously be possible to keep the packaged defaults in-sync with the Puppet module, but with the ability to install from a specific file, differing defaults across distros, etc. it could be annoying to maintain.
Let me know if I'm over-thinking / over-engineering, or if I'm missing something obvious / simple; otherwise, I might spend some time this weekend seeing if it's a valid approach.
Thanks for the response!
from puppet-elasticsearch.
Hi,
I could set a hash with the current values of the defaults file and write that no matter what.
When you override settings in the the init_defaults hash it merges the 2 hashes so it always has the full variable list including the things you override.
Not sure how future proof that is though.
I think the main downside at the moment is that the init scripting fully depends on variable set in the defaults file.
Without it, it doesn't run correctly.
The defaults file should be something to override settings imho.
Augeas could be a good solution indeed but would like to keep dependencies as minimally as possible.
If having a hash for the defaults file content is unreliable / unmaintainable we could have a look at augeas.
Any idea's?
from puppet-elasticsearch.
Did a bit of digging on the augeas part and it should be doable.
Will see if i can implement something.
from puppet-elasticsearch.
Hi,
Been working on it for a bit and seems to work.
Just working on getting the tests to run on the different distro's ( system tests )
from puppet-elasticsearch.
These are the main changes: 862d677
from puppet-elasticsearch.
That worked absolutely perfectly, and it was resolved much quicker than I would have been able to knock it out. Much appreciated!
As to your previous comments: I absolutely agree that the init script is too dependent on those settings being defined in the sysconfig file. However, these changes at least provide a way for the user to only need to override specific settings, and leave the underlying framework in place. If the initscript does become more intelligent in the future, this patch will still continue to function as desired.
Again, thanks for the quick response! I'll leave the closing of the issue to you, to allow closing it with the master merge.
from puppet-elasticsearch.
Just need to fix the $elasticsearch_user and $elasticsearch_group options so they do get into the defaults file.. otherwise its still useless. ( just a bit less useless with this rewrite of it )
from puppet-elasticsearch.
Found a solution for the last bit. Can you check after I've pushed it?
from puppet-elasticsearch.
Should be fixed now. Can you check it? Cheers.
from puppet-elasticsearch.
Pushed an other fix so it works with older versions ( pre 1.0 ) of augeas.
from puppet-elasticsearch.
I'll check it out this morning. Thanks for the quick turnaround!
from puppet-elasticsearch.
No problem :-)
let me know if you find any weird issues.
from puppet-elasticsearch.
Talked via other channels. issue solved.
from puppet-elasticsearch.
Related Issues (20)
- elasticsearch_keystore can't modify frozen String
- elasticsearch_keystore resource fails due to legacy instance code HOT 3
- Node facts not generated when Elasticsearch in cluster mode
- Could not evaluate: undefined method `join' for :name:Symbol HOT 2
- elasticsearch_plugin/ruby.rb wrong path to call plugin binary HOT 2
- ssl=true and version is not defined, gives an error HOT 1
- Setting an Elastic Version should be optional HOT 1
- New release, please HOT 1
- OpenSearch support ? HOT 1
- Elasticsearch API responded with: no handler found for uri [/_xpack/license?acknowledge=true] and method [PUT]
- File jvm.options in root is unmanaged/may be missing
- why was log4j2.properties.erb configuration commented ? HOT 1
- warnings when used with stlib 9. HOT 1
- fix lib directory permissions without changing the mode of files in the directory
- puppet-elastic_stack version HOT 1
- Use Elasticsearch 7+ as default for configuration HOT 1
- mediawiki needs 6.8.23 and I needed to change this
- Issues on the elasticsearch_component_template.rb and elasticsearch_index_template.rb HOT 2
- Problem with puppet CA and elasticsearch.keystore
- `bin/plugin` is used insead of `bin/elasticsearch-plugin` on the first run
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-elasticsearch.