Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Puppet Idioms for distributing RPMs and/or buildign source tarballs?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michael L. Artz  
View profile  
 More options Feb 23, 10:40 am
From: "Michael L. Artz" <mla...@gmail.com>
Date: Mon, 23 Feb 2009 07:40:57 -0800 (PST)
Local: Mon, Feb 23 2009 10:40 am
Subject: Puppet Idioms for distributing RPMs and/or buildign source tarballs?
Sorry for the topic confluence, but I was wondering if there were
common puppet "idioms" for either:

  - distributing an RPM to a series of clients (namely RabbitMQ) and
installing the package?  I realize that I can do it naively by pulling
the file from the puppetmaster and then using the package resource to
install it via RPM, but I was wondering if there was a better way to
do this.  I would love to be able to install via RPM with a URL (i.e.
rpm -Uvh http://....), but the command that actually gets executed
with puppet (something like 'rpm -i --oldpackage http://....) doesn't
seem to be idempotent, i.e. it fails after the package is already
installed.  Also, I would rather not have all of my puppets calling
out to the rpm url every 2 minutes.

  - distributing and compiling a tarball?  Its a pretty standard
autoconf/automake tarball (i.e. './configure --prefix=/usr; make; make
install') ... is there a "standard" way to do this with puppet.  I'm
also using a source-built Ruby and RubyGems, which would be nice to
manage with puppet.

I've looked through a bunch of existing modules, but I haven't seen
this sort of thing.

Thanks for any help,
-Mike


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Pruitt  
View profile  
 More options Feb 23, 4:43 pm
From: Jeremy Pruitt <jeremypru...@gmail.com>
Date: Mon, 23 Feb 2009 13:43:37 -0800 (PST)
Local: Mon, Feb 23 2009 4:43 pm
Subject: Re: Puppet Idioms for distributing RPMs and/or buildign source tarballs?
In response to your first comment, it certainly should be idempotent.
Puppet should be able to determine that the rpm is already installed,
and I believe that is just a local "rpm -q" or something. So, I don't
think it should hit the URL unless it doesn't think it's installed.
This can happen, though, when the name of the resource doesn't match
the name that "rpm -qa" returns. Perhaps you can provide the output of
one of the non-idempotent puppet runs with the --debug and --trace
options.

I also occasionally use something like this for packages that have a
different name when you install vs when you query. FreeBSD is full of
this:
  http://pastie.org/397847

What's not clear to me is how to tell rpm to do an "-U" update instead
of an "-i" install. I believe I have used execs to get around this in
the past.

As far as building from source, I just create a puppet definition like
so:
  http://pastie.org/397821

And I use it like this:
  http://pastie.org/397827

If there is a better way out there, I'm all ears! :)

Anyways, I hope that helped in some way.

 - Jeremy

On Feb 23, 7:40 am, "Michael L. Artz" <mla...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Renfro  
View profile  
 More options Feb 23, 5:35 pm
From: Mike Renfro <ren...@tntech.edu>
Date: Mon, 23 Feb 2009 16:35:15 -0600
Local: Mon, Feb 23 2009 5:35 pm
Subject: Re: [Puppet Users] Puppet Idioms for distributing RPMs and/or buildign source tarballs?
On 2/23/2009 9:40 AM, Michael L. Artz wrote:

>   - distributing an RPM to a series of clients (namely RabbitMQ) and
> installing the package?  I realize that I can do it naively by pulling
> the file from the puppetmaster and then using the package resource to
> install it via RPM, but I was wondering if there was a better way to
> do this.

Make a regular http- or ftp-accessible repository (instead of using the
puppetmaster's file distribution facility), and use one of the
higher-level rpm-based package providers with the puppet package type
(yum, aptrpm, etc.). You might also be able to do this just with rpm and
a repository (I'm Redhat-illiterate). But the important thing would be
to ensure you can check if a package is already installed before you
attempt another rpm installation. Even if you had to fall back to an

   exec { "install-rabbit":
     command => "rpm -Uvh http://path/to/rabbit.rpm"
   }

you could make that idempotent with an unless parameter:

   exec { "install-rabbit":
     command => "rpm -Uvh http://path/to/rabbit.rpm",
     unless  => "rpm -qsomethingsomething rabbit | grep -q installed"
   }

>   - distributing and compiling a tarball?  Its a pretty standard
> autoconf/automake tarball (i.e. './configure --prefix=/usr; make; make
> install') ... is there a "standard" way to do this with puppet.  I'm
> also using a source-built Ruby and RubyGems, which would be nice to
> manage with puppet.

I use GNU stow and a stowedpackage definition:
http://blogs.cae.tntech.edu/mwr/2008/02/01/the-autostow-is-dead-long-...
-- this wouldn't exactly work for things you insist on building per
node, but could be modified. It'd be very similar to what Jeremy pointed
to in the other reply.

--
Mike Renfro  / R&D Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Meier  
View profile  
 More options Feb 23, 7:45 pm
From: Peter Meier <peter.me...@immerda.ch>
Date: Tue, 24 Feb 2009 01:45:55 +0100
Local: Mon, Feb 23 2009 7:45 pm
Subject: Re: [Puppet Users] Re: Puppet Idioms for distributing RPMs and/or buildign source tarballs?
Hi

package{'rabbit':
    ensure => present,
    source => "http://path/to/rabbit.rpm",
    privater => rpm,

}

works as well.
However managing your own yum repository is easy and imho the best way
to go.

cheers pete


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeffrey Hulten  
View profile  
 More options Feb 23, 8:11 pm
From: Jeffrey Hulten <jhul...@gmail.com>
Date: Mon, 23 Feb 2009 17:11:15 -0800
Local: Mon, Feb 23 2009 8:11 pm
Subject: Re: [Puppet Users] Re: Puppet Idioms for distributing RPMs and/or buildign source tarballs?

Sourcing to a HTTP address works? Since when?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Meier  
View profile  
 More options Feb 23, 8:14 pm
From: Peter Meier <peter.me...@immerda.ch>
Date: Tue, 24 Feb 2009 02:14:13 +0100
Local: Mon, Feb 23 2009 8:14 pm
Subject: Re: [Puppet Users] Re: Puppet Idioms for distributing RPMs and/or buildign source tarballs?
Hi

> Sourcing to a HTTP address works? Since when?

always.

package is not file.

cheers pete


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joe McDonagh  
View profile  
 More options Feb 24, 10:18 am
From: Joe McDonagh <joseph.e.mcdon...@gmail.com>
Date: Tue, 24 Feb 2009 10:18:21 -0500
Local: Tues, Feb 24 2009 10:18 am
Subject: Re: [Puppet Users] Re: Puppet Idioms for distributing RPMs and/or buildign source tarballs?

I wrote a definition when I first started to use puppet for a
source_package that puts it under /usr/src then subsequently builds it
based on a string of cfg_opts and make_opts, and uses onlyif to serve
out and execute the build based on a test or two... it's a little hairy
and usually best to distribute things through the distro's PM, but I
wanted to do it as an academic exercise more than anything. I can try to
unearth it if you express interest.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google