-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop support for Puppet 3 and Filebeat <5 #118
Conversation
cc some recent contributors Any thoughts? |
With Puppet 3.x passed EOL there's little point in maintaining that compatibility. Additionally, the defined resource type filebeat::processor can be moved into $filebeat_config to be handled by |
I support this change. We no longer have puppet 3 or less than filebeat 5 in our environment. I would suggest cutting a 1.0.0 version that will be the last version to support these. Then drop support and cut a 2.0.0 for depreciating puppet 3 and filebeat less than 5. |
I have not reviewed this code yet to see if it seems like it will work.... |
@corey-hammerton Which use case didn't work? The pure_hash.erb approach or the current processor implementation? If the pure_hash.erb approach won't work at all then we may just need to stick with the long complex template we already have. |
The current processor implementation did not work. The pure_hash.erb approach I already use in https://forge.puppet.com/coreyh/packetbeat and I've not received a single complaint. |
ebfca95
to
b639cb6
Compare
b639cb6
to
951327b
Compare
.travis.yml
Outdated
@@ -41,10 +41,5 @@ matrix: | |||
- rvm: 2.1.10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be 2.1.9, since all aio packages for puppet4 pc1 ship with 2.1.9.
when you add puppet 5 support, it will be 2.4.0 for that
https://github.com/puppetlabs/puppetlabs-java/blob/master/.travis.yml#L25
manifests/config.pp
Outdated
mode => $filebeat::config_file_mode, | ||
notify => Service['filebeat'], | ||
require => File['filebeat-config-dir'], | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$validate_cmd = $filebeat::disable_config_test ? {
true => undef,
default => '/usr/share/filebeat/bin/filebeat -N -configtest -c %',
}
file {'filebeat.yml':
ensure => $filebeat::file_ensure,
path => $filebeat::config_file,
content => template($filebeat::conf_template),
owner => 'root',
group => 'root',
mode => $filebeat::config_file_mode,
validate_cmd => $validate_cmd,
notify => Service['filebeat'],
require => File['filebeat-config-dir'],
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a lot simpler 😄 Thanks!
manifests/init.pp
Outdated
Hash $fields = $filebeat::params::fields, | ||
Boolean $fields_under_root = $filebeat::params::fields_under_root, | ||
Boolean $disable_config_test = $filebeat::params::disable_config_test, | ||
Hash $processors = {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will have to be Array[Hash] for the processors to work in pure_hash.erb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this - I was looking at what I put in the docs and the default value.
4174b08
to
52aa847
Compare
Dropping support for Puppet 3 allows us to use a more native hash to YAML configuration method, so processors are now part of the main configuration file instead of a separate defined resource.
52aa847
to
25b810f
Compare
I'd like to switch back to a generic template assuming that the simplified/dynamic template is actually idempotent and doesn't have the issues that existed back in Puppet 3.x days (#20).
I'd also like to go ahead and drop Puppet 3.x support now that Puppet 5 is out (and 3.x reached end of support nearly 18 months ago).
I'm opening this as a PR so that folks can let me know if they think this is a bad idea before I make such a significant change. I don't have a timeline for merging right now, but wanted to start getting feedback first.