-
Notifications
You must be signed in to change notification settings - Fork 290
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
Getting my feet wet with sensu-puppet #2
Conversation
- Adding apt/* and debian manifests to deal with APT sources. So far hardcoding Sensuapp ones as from Sensu wiki - Add init.pp to be compliant with Puppet module guidelines
I believe @rodjek purposely left apt and yum recipes out of this module because he believes most folks already have their own mechanism for managing apt and yum repos. That said, perhaps we can include apt and yum recipes but make them selectable via configuration param (or similar) and default to 'off'? Might be nice for folks who don't, for whatever reason, have their own module for managing repos yet. Also makes testing the module with the @shaftoe - also, can you add support for the sensu-testing repo, again, perhaps as a config option |
@shaftoe I don't 'do' puppet, just wanted to say your contribution and improvements are much appreciated! Woot! |
This is fantastic, reduces adoption friction for puppet users. Not enforcing the use of the apt/yum manifests will do the trick, modular is good :) |
Hi folks, first thing thanks for the warm welcome! Yep, my (totally selfish) idea was to make my sensu evaluation/testing easier leveraging puppet/vagrant, but I agree with @joemiller it should be a choice and not be mandatory to have it installed via (those) apt repository, ah and yes the 'testing" like parameter is nice to have too. I'll fix that soon. @nstielau I've not been into puppet that much but seems that finally I've found a way to contribute, it feels good! @portertech that's the idea, yes. My first feeling is that @joemiller blog post is great, but a puppet cross-distro module could encourage even more Sensu adoption (and testers ;) ) |
Refactored sensu::debian to be more flexible, now declaring a sensu::debian class you can remove the repository or setup the unstable repo, i.e. class { 'sensu::debian': ensure => 'absent' } class { 'sensu::debian': repo => 'unstable }
@shaftoe rather than duplicate the logic of existing apt types, what I'd do instead is detect if the user has the puppetlabs apt module installed (or something compatible) and use that instead
|
@rodjek yep good idea. So you suggest no fallback if the APT module is not installed? I'd add at least an else notifying the module is missing |
is there something similar we could/should do for yum distros here? |
@joemiller yes, on the Sensu wiki there's a reference to a yum repo as well. I don't know RH based distributions very well but I'm quite sure there'll be a puppet module to manage yum repos we can use in the same way as for apt |
there's a some brainstorming here... pseudo-code-ish:
Might also be a good idea to have a I'm going to try to bring @jamtur01 into the conversation for some feedback on the approach too. |
@joemiller The pseudo-code is broadly fine. Regarding the lack of a params.pp that is a style thing and I'd have to understand what @rodjek was/is planning. Currently this isn't actually a valid module - @rodjek is there any reason no init.pp? |
- Removed sensu::apt classes - Added sensu::repo class. So far it handles apt only. Manifest seems fine, but it breaks with http://repos.sensuapp.org/apt, seems that Release file for that APT repo is missing
looks good to me. +1 next, we need a readme soon with mention of including sensu::repo class for those who want it =) |
@joemiller nah, truth is I'm a bad git user, I still have to figure out how to properly rebase code and avoid pushing unfinished code to master... by the way, as it is right now, at least the repo::apt class is not working properly, but it looks like an apt misconfiguration other than a puppet bug. Still have to test repo::yum too |
more info on the apt repo issue would be appreciated. i saw the note about what OS/distro/version? got a gist of detailed output from apt command(s) On Tue, Jul 10, 2012 at 3:34 AM, Alexander Fortin <
|
Here it breaks: https://gist.github.com/3083227 Strange thing is that "aptitude update" doesn't complain, apt-get update does. Seems because of the deb-src line the apt module automatically adds deb http://repos.sensuapp.org/apt sensu main Removing second line seems to fix it |
Can you show the contents of the repo file puppet creates? I suspect it is Looking at the apt module, maybe fixable by adding 'include_src => false' On Tuesday, July 10, 2012, Alexander Fortin wrote:
|
@joemiller I did updated my previous reply, anyway yes it's as you thought, I'm going to fix with the include_src parameter |
Hi folks, finally found some time to dig into this again. What's left to fix here? In the meanwhile I'm thinking about adding some testing, maybe with the new puppetlabs_spec_helper gem. |
@shaftoe Hey! If the Sensu puppeteers agree on the changes above, I'd like to merge this sucker in :) Further additions, testing etc, can be a separate PR. |
+1 from me |
@shaftoe I'd love to see these changes merged in, and then have a PR for Vagrant and testing ;) |
Seems reasonable to me. +1. |
Ok, thanks guys, merging. |
Getting my feet wet with sensu-puppet
Reading Sensu wiki I've seen there's already an APT repo for sensu, adding few manifests to deal with that