Skip to content
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

Merged
merged 1 commit into from
Jul 17, 2017
Merged

Conversation

pcfens
Copy link
Owner

@pcfens pcfens commented Jul 10, 2017

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.

@pcfens
Copy link
Owner Author

pcfens commented Jul 10, 2017

cc some recent contributors
@edestecd @corey-hammerton @kpankonen

Any thoughts?

@corey-hammerton
Copy link
Contributor

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 pure_hash.erb. The Use Case at my employer with this patch did not work as expected.

@edestecd
Copy link
Contributor

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 if folks need it, they can stick to 1.0.0.

Then drop support and cut a 2.0.0 for depreciating puppet 3 and filebeat less than 5.

@edestecd
Copy link
Contributor

I have not reviewed this code yet to see if it seems like it will work....
I just support the idea. I will try to give it a once over in the next few days...

@pcfens
Copy link
Owner Author

pcfens commented Jul 10, 2017

@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.

@corey-hammerton
Copy link
Contributor

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.

@pcfens pcfens force-pushed the remove_old_version_support branch 2 times, most recently from ebfca95 to b639cb6 Compare July 10, 2017 21:56
@pcfens
Copy link
Owner Author

pcfens commented Jul 10, 2017

@edestecd Thanks - I think I'll do that with the version numbers too.

This should also fix issues #73 and #107.

@pcfens pcfens force-pushed the remove_old_version_support branch from b639cb6 to 951327b Compare July 10, 2017 22:29
.travis.yml Outdated
@@ -41,10 +41,5 @@ matrix:
- rvm: 2.1.10
Copy link
Contributor

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

mode => $filebeat::config_file_mode,
notify => Service['filebeat'],
require => File['filebeat-config-dir'],
}
}
Copy link
Contributor

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'],
}

Copy link
Owner Author

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!

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 = {},
Copy link
Contributor

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

Copy link
Owner Author

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.

@pcfens pcfens force-pushed the remove_old_version_support branch 3 times, most recently from 4174b08 to 52aa847 Compare July 13, 2017 21:54
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants