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

Feature/master/support non default versions #43

Conversation

cprice404
Copy link

This is a slight refactor of #36. It adds support for versions of postgres other than the system default, and some initial framework for managing postgresql.org package repos. It also includes the first (extremely basic) spec tests for postgres 9.2 on CentOS6.

cprice404 and others added 19 commits December 2, 2012 20:47
The service provider / status stuff got a little broken during
the refactors.  This should mostly fix it but there is still
one spec failing, and I will probably also refactor the
paths.pp and packages.pp into a single file together eventually.
This commit creates a new class called `package_source_info`,
which has some initial framework for managing the postgresql.org
yumrepo.  It also serves as a container for the 'version'
variable that is needed by the 'platform' class in order to
use other versions of postgres besides the system default.
@cprice404
Copy link
Author

@etiennep : would you be willing to test this out and see if it still covers your use cases? It's mostly your code, with a few minor changes:

  1. combined paths/packages into ::platform class... they seemed really similar and it seemed easier to keep that stuff all in one spot.
  2. introduced package_source_info class--has some simplistic stuff for managing the yumrepo (defaults to not managing it), and I am using it as the container for the version variable. This is kind of going back to your original idea of having a special "version" class to contain that... I really wanted to avoid the need for having any kind of container class that we had to reach into to grab a "global" variable from platform or elsewhere, but I tried a ton of different ideas and they were all looking like they were going to be worse. So I decided to basically go back to your original idea on that.
  3. there are vagrant spec tests for Cent6 now, including one that does some very basic stuff with postgres 9.2 on cent6.

If this looks like it'll suit your needs I'll probably merge it tomorrow-ish. Feel free to add comments or whatever if you have any thoughts!

@etiennep
Copy link

etiennep commented Dec 3, 2012

I'm getting some merge conflicts with initdb.pp and database.pp btw.

@cprice404
Copy link
Author

Yeah, I don't recommend trying to merge this into your branch... I already had to deal with a bunch of merge conflicts from both sides. I'd recommend just pulling this branch directly if you can try it out.

@etiennep
Copy link

etiennep commented Dec 3, 2012

Oh yeah ok. I'll do that.

On Mon, Dec 3, 2012 at 1:27 PM, Chris Price notifications@github.comwrote:

Yeah, I don't recommend trying to merge this into your branch... I already
had to deal with a bunch of merge conflicts from both sides. I'd recommend
just pulling this branch directly if you can try it out.


Reply to this email directly or view it on GitHubhttps://github.com//pull/43#issuecomment-10967386.

@cprice404
Copy link
Author

@etiennep : so I just talked to a co-worker of mine and learned some interesting tricks that might clean this up a bit further (get rid of some of those repetitive "_real" blocks). I'll probably add a commit or two to this before I consider merging it now that I know these tricks :) But those commits should hopefully be cosmetic, so I'm still eager to hear whether or not this branch is working OK for your needs.

Nan showed me a trick that will let us keep all of that param stuff
inside of params.pp, make it a parameterized class, and still support
the ability for users to specify a custom (non-system-default) pg
version.  This commit takes the first step towards that pattern by
consolidating platform.pp and params.pp.  (Everything old is new again!)
Thanks to some tricks I learned from Nan Liu and Dan Bode, I was
able to figure out a way to move all of the new version-related stuff
back into the params class, and clean up some of the if/_real stuff.

Basic tests for centos6 + pg 9.2 are passing.
@cprice404
Copy link
Author

@etiennep I think I'm basically done with this now, with the possible exception of adding some more docs. I just added a couple of commits that clean things up a lot, thanks to some secret sauce that my co-workers filled me in on. You can see an example of how to use it in tests/server-yum-postgresql-org.pp. I'd love to get this merged today or tomorrow but since you are responsible for a lot of this work, I definitely want to make sure it meets your needs first!

cprice404 added a commit that referenced this pull request Dec 6, 2012
…default-versions

Feature/master/support non default versions
@cprice404 cprice404 merged commit 9d12358 into puppetlabs:master Dec 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants