Hello, I use puppet with RHEL and there are some packages that aren''t in up2date/yum repositories. I need a way to get these specific RPMs installed. There''s a blog posting that describes an almost-perfect way to do it: http://www.raskas.be/blog/2007/09/10/managing-user-passwords-with-puppet-on-centos/ The only problem with his example is that the RPM will always in the /tmp directory, even after reboots. If it''s deleted for any reason, puppet puts it back. The behavior I desire is very simple. Execute these steps if package is not installed: 1. Download package to /tmp using puppet (I don''t want to bother with a different server such as FTP/SCP because it adds overhead of additional auth). 2. Install package. 3. Delete package from /tmp. Others must have run into this same situation, please tell me how you handle it. Thanks. -- John Philips johnphilips42@yahoo.com ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
John Philips wrote:> Hello, > > I use puppet with RHEL and there are some packages > that aren''t in up2date/yum repositories. I need a way > to get these specific RPMs installed. > > There''s a blog posting that describes an > almost-perfect way to do it: > http://www.raskas.be/blog/2007/09/10/managing-user-passwords-with-puppet-on-centos/ > > The only problem with his example is that the RPM will > always in the /tmp directory, even after reboots. If > it''s deleted for any reason, puppet puts it back. > > The behavior I desire is very simple. Execute these > steps if package is not installed: > > 1. Download package to /tmp using puppet (I don''t want > to bother with a different server such as FTP/SCP > because it adds overhead of additional auth). > 2. Install package. > 3. Delete package from /tmp. > > Others must have run into this same situation, please > tell me how you handle it.I handle this same scenario with a custom local yum repository containing locally built rpm packages. There''s already even a native type for managing yum repositories. -- Frank Sweetser fs at wpi.edu | For every problem, there is a solution that WPI Senior Network Engineer | is simple, elegant, and wrong. - HL Mencken GPG fingerprint = 6174 1257 129E 0D21 D8D4 E8A3 8E39 29E3 E2E8 8CEC
Frank, I''m sure that would work, but it entails alot of extra effort on my part. I''d have to setup and maintain a yum server. I''d also have to manually install the yum package on the RHEL4 servers (over 200), since I can''t cleanly do it with puppet (the problem I''m trying to solve in the first place). It''s a catch-22! --- Frank Sweetser <fs@WPI.EDU> wrote:> John Philips wrote: > > Hello, > > > > I use puppet with RHEL and there are some packages > > that aren''t in up2date/yum repositories. I need a > way > > to get these specific RPMs installed. > > > > There''s a blog posting that describes an > > almost-perfect way to do it: > > >http://www.raskas.be/blog/2007/09/10/managing-user-passwords-with-puppet-on-centos/> > > > The only problem with his example is that the RPM > will > > always in the /tmp directory, even after reboots. > If > > it''s deleted for any reason, puppet puts it back. > > > > The behavior I desire is very simple. Execute > these > > steps if package is not installed: > > > > 1. Download package to /tmp using puppet (I don''t > want > > to bother with a different server such as FTP/SCP > > because it adds overhead of additional auth). > > 2. Install package. > > 3. Delete package from /tmp. > > > > Others must have run into this same situation, > please > > tell me how you handle it. > > I handle this same scenario with a custom local yum > repository containing > locally built rpm packages. There''s already even a > native type for managing > yum repositories. > > -- > Frank Sweetser fs at wpi.edu | For every problem, > there is a solution that > WPI Senior Network Engineer | is simple, elegant, > and wrong. - HL Mencken > GPG fingerprint = 6174 1257 129E 0D21 D8D4 E8A3 > 8E39 29E3 E2E8 8CEC > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com >https://mail.madstop.com/mailman/listinfo/puppet-users>____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
On Fri, 2007-12-14 at 09:45 -0800, John Philips wrote:> I use puppet with RHEL and there are some packages > that aren''t in up2date/yum repositories. I need a way > to get these specific RPMs installed.Just like Frank, I''d use a custom yum repo, though installing yum on 200 machines is not very appealing.> There''s a blog posting that describes an > almost-perfect way to do it: > http://www.raskas.be/blog/2007/09/10/managing-user-passwords-with-puppet-on-centos/The only nit I have with that method is that the puppet: transport isn''t all that efficient for big files. Instead of a file resource I''d use an exec that calls wget or curl to download the RPM.> 1. Download package to /tmp using puppet (I don''t want > to bother with a different server such as FTP/SCP > because it adds overhead of additional auth). > 2. Install package. > 3. Delete package from /tmp.You''d either have to write a script that does that (and distribute that to all clients) or write a custom type ... maybe just a new package provider might suffice. David
On 12/14/07, John Philips <johnphilips42@yahoo.com> wrote:> > Frank, > > I''m sure that would work, but it entails alot of extra > effort on my part. > > I''d have to setup and maintain a yum server. I''d also > have to manually install the yum package on the RHEL4 > servers (over 200), since I can''t cleanly do it with > puppet (the problem I''m trying to solve in the first > place). It''s a catch-22!Not really, write a puppet manifest to setup the yum server and repo for you. As for installing yum, you don''t have to on rhel4 (it''s already there on rhel5). If you add a yum repo to /etc/sysconfig/rhn/sources up2date will use it. (and that action is fairly trivial with puppet as well) you get other advantages by doing it this way as well... dep resolving being the biggest, ensuring package integrity with gpg also comes to mind. C -- stickm@gmail.com -==< Stick >==- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 14 December 2007, David Lutterkort wrote:> On Fri, 2007-12-14 at 09:45 -0800, John Philips wrote: > The only nit I have with that method is that the puppet: transport isn''t > all that efficient for big files. Instead of a file resource I''d use an > exec that calls wget or curl to download the RPM. > > > 1. Download package to /tmp using puppet (I don''t want > > to bother with a different server such as FTP/SCP > > because it adds overhead of additional auth). > > 2. Install package. > > 3. Delete package from /tmp. > > You''d either have to write a script that does that (and distribute that > to all clients) or write a custom type ... maybe just a new package > provider might suffice.Wouldn''t it be better to integrate this directly into the rpm/dpkg providers to accept a puppet:// url as "source"? Regards, DavidS - -- The primary freedom of open source is not the freedom from cost, but the free- dom to shape software to do what you want. This freedom is /never/ exercised without cost, but is available /at all/ only by accepting the very different costs associated with open source, costs not in money, but in time and effort. - -- http://www.schierer.org/~luke/log/20070710-1129/on-forks-and-forking -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHYt9X/Pp1N6Uzh0URArrpAJ49lprktvoGFKzZGvBROPkWxkwf4wCeJV5o OmbdNRBrqPVmsPxi6JCaWyI=TnCB -----END PGP SIGNATURE-----
David Lutterkort wrote:> Just like Frank, I''d use a custom yum repo, though installing yum on 200 > machines is not very appealing.?!!?!? http://reductivelabs.com/trac/puppet :) -- Scott Smith, scott@kontera.com [O] 415.830.3191, [C] 415.994.3381
> David Lutterkort wrote: > > Just like Frank, I''d use a custom yum repo, though > installing yum on 200 > > machines is not very appealing. > > ?!!?!? > > http://reductivelabs.com/trac/puppetIt really shouldn''t be this complicated to install a package with puppet. I have one RPM with no dependencies. I shouldn''t have to setup a yum repository and reconfigure up2date on all nodes to install this single RPM. ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
On Fri, 2007-12-14 at 13:24 -0800, John Philips wrote:> It really shouldn''t be this complicated to install a > package with puppet. I have one RPM with no > dependencies. I shouldn''t have to setup a yum > repository and reconfigure up2date on all nodes to > install this single RPM.True ... looking at the code for the RPM provider, it might actually be possible to pass a URL as the source for your package statement - amongst otehr things, RPM has an ftp and URL client, i.e. you can run ''rpm -Uvh http://server/some/where/package.i386.rpm'' on the command line, and it seems like that would be possible from the puppet manifest, too, though I haven''t tried it. David
On Fri, 2007-12-14 at 20:53 +0100, David Schmitt wrote:> Wouldn''t it be better to integrate this directly into the rpm/dpkg providers > to accept a puppet:// url as "source"?I wouldn''t use puppet:// URL''s for that in any event - the puppet fileserver is not really suitable for large files, and I don''t think it should be. There''s plenty of other protocols out there that handle large files very well. As for making the rpm provider generally smarter (the initial post was asking for building some caching into the rpm provider): I don''t think that puppet should go down the path of doing actual package management. It should use the native tools directly. Trouble is that up2date (RHEL4''s package manager) isn''t all that flexible when it comes to add-on repos. You can use yum, but you need to install it on each client. For Fedora and RHEL5, it''s a non-issue, since yum is the default package manager, and setting up a yum repo is very simple (expose a directory on a web server, run createrepo on the server once, done) David
--- David Lutterkort <dlutter@redhat.com> wrote:> > On Fri, 2007-12-14 at 13:24 -0800, John Philips > wrote: > > It really shouldn''t be this complicated to install > a > > package with puppet. I have one RPM with no > > dependencies. I shouldn''t have to setup a yum > > repository and reconfigure up2date on all nodes to > > install this single RPM. > > True ... looking at the code for the RPM provider, > it might actually be > possible to pass a URL as the source for your > package statement - > amongst otehr things, RPM has an ftp and URL client, > i.e. you can run > ''rpm -Uvh http://server/some/where/package.i386.rpm'' > on the command > line, and it seems like that would be possible from > the puppet manifest, > too, though I haven''t tried it.David, Thanks for the tip, it worked. package { "mypackage": ensure => installed, provider => rpm, source => "http://myserver.com/mypackage.rpm", } I''d like to be able to have puppet serve the file instead of managing a web service, but I don''t see how that''s easily done. Using http is a good quick fix. ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
John Philips wrote:> I''d like to be able to have puppet serve the file > instead of managing a web service, but I don''t see how > that''s easily done. Using http is a good quick fix.source => "puppet://blah/foo.rpm" but, as it''s been stated twice, puppet fileserver is not the best solution for serving RPMs. btw, please disregard the phone numbers in my last e-mail :-\ -scott -- Scott Smith, scott@kontera.com
--- Scott Smith <scott@kontera.com> wrote:> John Philips wrote: > > I''d like to be able to have puppet serve the file > > instead of managing a web service, but I don''t see > how > > that''s easily done. Using http is a good quick > fix. > > source => "puppet://blah/foo.rpm" > > but, as it''s been stated twice, puppet fileserver is > not the best > solution for serving RPMs.Scott, When using rpm as the package provider, the "source" parameter must be set to a local file, http address or some other accepted value. puppet isn''t a protocol that rpm understands. Also, in my case puppet IS the best solution for serving RPMs. I have one single RPM to distribute and it''s less than 200KB. If puppet could dish it out, I wouldn''t have to run an instance of apache. ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs