This code is working - but due to the file declaration it keeps downloading the rpm even after the package gets installed. 1. How do I stop the rpm from downloading after the package is installed? class svn { $TMP = "/tmp" $RPM = "CollabNetSubversion-client-1.6.12-1.i386.rpm" package { "svn": name => "CollabNetSubversion-client-1.6.12-1", ensure => installed, provider => rpm, source => "$TMP/$RPM", require => file["$TMP/$RPM"] } file { "$TMP/$RPM": source => "puppet://puppet.xxx.com/files/svn/$RPM" } file { "/usr/bin/svn": ensure => symlink, replace => true, target => "/opt/CollabNet_Subversion/bin/svn" } } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Patrick Mohr
2010-Jul-29 18:23 UTC
Re: [Puppet Users] Newbie question - package installation
On Jul 29, 2010, at 9:45 AM, Rustler wrote:> This code is working - but due to the file declaration it keeps > downloading the rpm even after the package gets installed. > > 1. How do I stop the rpm from downloading after the package is > installed?Best method: *) If at all possible you should just replace this with a real package repository. Should also work: *) Put the rpm files on a webserver and download them as needed. I think rpm can take URLs instead of local paths. or *)Install from a network drive like nfs Not recommended: *) Just put the rpms into a folder you create. It will keep growing forever, but it probably won''t ever get very big unless you release a lot of packages. Trust me on this, pushing out big files with puppet is probably a mistake. It will put a large load on the puppetmaster, and if you are using a version of puppet less than 2.6.0, the RAM requirements on the client and serve will be horrendous. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
I am using version 2.6 and it would be nice if you could use a puppet url for the package source, but that does not appear to work (docs say it has to be a local file). My other choices seem to be an nfs mount, or a local repo server. Thanks On Jul 29, 11:23 am, Patrick Mohr <kc7...@gmail.com> wrote:> On Jul 29, 2010, at 9:45 AM, Rustler wrote: > > > This code is working - but due to the file declaration it keeps > > downloading the rpm even after the package gets installed. > > > 1. How do I stop the rpm from downloading after the package is > > installed? > > Best method: > *) If at all possible you should just replace this with a real package repository. > > Should also work: > *) Put the rpm files on a webserver and download them as needed. I think rpm can take URLs instead of local paths. > or > *)Install from a network drive like nfs > > Not recommended: > *) Just put the rpms into a folder you create. It will keep growing forever, but it probably won''t ever get very big unless you release a lot of packages. Trust me on this, pushing out big files with puppet is probably a mistake. It will put a large load on the puppetmaster, and if you are using a version of puppet less than 2.6.0, the RAM requirements on the client and serve will be horrendous.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
quicksilver03
2010-Jul-30 09:53 UTC
[Puppet Users] Re: Newbie question - package installation
I''m using 0.25.5 and I do it in pretty much the same way: file { "oratoolkit_rpm": require => [ Group["oinstall"], Group["dba"], User["oracle"], ], path => "/home/admin/install/oratoolkit-1.0.2.1.4-1.noarch.rpm", source => "puppet:///oracle/oratoolkit-1.0.2.1.4-1.noarch.rpm", owner => admin, group => admin, ensure => present, } # installs the oratoolkit package package { "oratoolkit": require => File[oratoolkit_rpm], source => "/home/admin/install/oratoolkit-1.0.2.1.4-1.noarch.rpm", provider => "rpm", ensure => installed, } Try adding an ensure => present to your File resource and see if it avoids downloading the RPM file over and over again. On Jul 29, 10:40 pm, Rustler <coltsixshoo...@gmail.com> wrote:> I am using version 2.6 and it would be nice if you could use a puppet > url for the package source, but that does not appear to work (docs say > it has to be a local file). > > My other choices seem to be an nfs mount, or a local repo server. > > Thanks > > On Jul 29, 11:23 am, Patrick Mohr <kc7...@gmail.com> wrote: > > > > > On Jul 29, 2010, at 9:45 AM, Rustler wrote: > > > > This code is working - but due to the file declaration it keeps > > > downloading the rpm even after the package gets installed. > > > > 1. How do I stop the rpm from downloading after the package is > > > installed? > > > Best method: > > *) If at all possible you should just replace this with a real package repository. > > > Should also work: > > *) Put the rpm files on a webserver and download them as needed. I think rpm can take URLs instead of local paths. > > or > > *)Install from a network drive like nfs > > > Not recommended: > > *) Just put the rpms into a folder you create. It will keep growing forever, but it probably won''t ever get very big unless you release a lot of packages. Trust me on this, pushing out big files with puppet is probably a mistake. It will put a large load on the puppetmaster, and if you are using a version of puppet less than 2.6.0, the RAM requirements on the client and serve will be horrendous.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
I wasn''t clear enough in describing the problem - What I''m trying to achieve is that if the package is installed, don''t execute the file statement and download the rpm. If I leave the file in /tmp, it does not download again, if I delete the file and the package is installed, it still downloads the rpm. I don''t want to have to keep the rpm on the system after the package install. Seems an NFS mount for the rpm''s might be the solution? Thanks On Jul 30, 2:53 am, quicksilver03 <sebasti...@mailworks.org> wrote:> I''m using 0.25.5 and I do it in pretty much the same way: > > file { "oratoolkit_rpm": > require => [ Group["oinstall"], > Group["dba"], > User["oracle"], > ], > path => "/home/admin/install/oratoolkit-1.0.2.1.4-1.noarch.rpm", > source => "puppet:///oracle/oratoolkit-1.0.2.1.4-1.noarch.rpm", > owner => admin, > group => admin, > ensure => present, > } > > # installs the oratoolkit package > package { "oratoolkit": > require => File[oratoolkit_rpm], > source => "/home/admin/install/oratoolkit-1.0.2.1.4-1.noarch.rpm", > provider => "rpm", > ensure => installed, > } > > Try adding an ensure => present to your File resource and see if it > avoids downloading the RPM file over and over again. > > On Jul 29, 10:40 pm, Rustler <coltsixshoo...@gmail.com> wrote: > > > I am using version 2.6 and it would be nice if you could use a puppet > > url for the package source, but that does not appear to work (docs say > > it has to be a local file). > > > My other choices seem to be an nfs mount, or a local repo server. > > > Thanks > > > On Jul 29, 11:23 am, Patrick Mohr <kc7...@gmail.com> wrote: > > > > On Jul 29, 2010, at 9:45 AM, Rustler wrote: > > > > > This code is working - but due to the file declaration it keeps > > > > downloading the rpm even after the package gets installed. > > > > > 1. How do I stop the rpm from downloading after the package is > > > > installed? > > > > Best method: > > > *) If at all possible you should just replace this with a real package repository. > > > > Should also work: > > > *) Put the rpm files on a webserver and download them as needed. I think rpm can take URLs instead of local paths. > > > or > > > *)Install from a network drive like nfs > > > > Not recommended: > > > *) Just put the rpms into a folder you create. It will keep growing forever, but it probably won''t ever get very big unless you release a lot of packages. Trust me on this, pushing out big files with puppet is probably a mistake. It will put a large load on the puppetmaster, and if you are using a version of puppet less than 2.6.0, the RAM requirements on the client and serve will be horrendous. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Patrick Mohr
2010-Jul-31 01:33 UTC
Re: [Puppet Users] Re: Newbie question - package installation
On Jul 30, 2010, at 2:53 AM, quicksilver03 wrote:> Try adding an ensure => present to your File resource and see if it > avoids downloading the RPM file over and over again.I''m almost sure the problem is he''s putting the rpm in /tmp which is nuked by the OS on reboot. One of my solutions was just to put them in a folder that isn''t nuked on reboot.> On Jul 29, 10:40 pm, Rustler <coltsixshoo...@gmail.com> wrote: >> I am using version 2.6 and it would be nice if you could use a puppet >> url for the package source, but that does not appear to work (docs say >> it has to be a local file). >> >> My other choices seem to be an nfs mount, or a local repo server. >> >> Thanks >> >> On Jul 29, 11:23 am, Patrick Mohr <kc7...@gmail.com> wrote: >> >> >> >>> On Jul 29, 2010, at 9:45 AM, Rustler wrote: >> >>>> This code is working - but due to the file declaration it keeps >>>> downloading the rpm even after the package gets installed. >> >>>> 1. How do I stop the rpm from downloading after the package is >>>> installed? >> >>> Best method: >>> *) If at all possible you should just replace this with a real package repository. >> >>> Should also work: >>> *) Put the rpm files on a webserver and download them as needed. I think rpm can take URLs instead of local paths. >>> or >>> *)Install from a network drive like nfs >> >>> Not recommended: >>> *) Just put the rpms into a folder you create. It will keep growing forever, but it probably won''t ever get very big unless you release a lot of packages. Trust me on this, pushing out big files with puppet is probably a mistake. It will put a large load on the puppetmaster, and if you are using a version of puppet less than 2.6.0, the RAM requirements on the client and serve will be horrendous. > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Daniel Pittman
2010-Aug-01 02:45 UTC
Re: [Puppet Users] Re: Newbie question - package installation
Rustler <coltsixshooter@gmail.com> writes:> I wasn''t clear enough in describing the problem - What I''m trying to achieve > is that if the package is installed, don''t execute the file statement and > download the rpm.The ''file'' resource can''t do that: it doesn''t have the capability to achieve the results you want. You have three choices here: One, you can replace the file resource with an exec resource, and tie that to a test if the file exists. Two, you can store the file somewhere persistent, and accept that it isn''t going to do what you want. Finally, three, which is the hardest, but also the *right* answer: Create a YUM repository for your RPM packages. Configure that on your hosts. Then use YUM to install the package, rather than trying to rewrite YUM inside puppet.> If I leave the file in /tmp, it does not download again, if I delete the > file and the package is installed, it still downloads the rpm. I don''t want > to have to keep the rpm on the system after the package install. > > Seems an NFS mount for the rpm''s might be the solution?...or that, which is basically option one except you replace the exec/wget with an NFS mount being set up. :) Regards, Daniel -- ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Daniel Maher
2010-Aug-02 09:36 UTC
Re: [Puppet Users] Re: Newbie question - package installation
On 08/01/2010 04:45 AM, Daniel Pittman wrote:> Finally, three, which is the hardest, but also the *right* answer: > > Create a YUM repository for your RPM packages. Configure that on your hosts. > Then use YUM to install the package, rather than trying to rewrite YUM inside > puppet.It''s not really that difficult. :) $ createrepo -d /path/to/files/ Then let an httpd serve /path/to/files/ and you''re set. I daresay it''s actually _easier_ than the other options that the OP is suggesting, since Puppet already knows how to work with Yum and RPMs. -- Daniel Maher <dma AT witbe DOT net> "The Internet is completely over." -- Prince -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Aug 2, 2:36 am, Daniel Maher <d...@witbe.net> wrote:> > It''s not really that difficult. :) > > $ createrepo -d /path/to/files/ > > Then let an httpd serve /path/to/files/ and you''re set. I daresay it''s > actually _easier_ than the other options that the OP is suggesting, > since Puppet already knows how to work with Yum and RPMs.I agree with Daniel. It''s trivially simple to do with ''createrepo''. You don''t even need the httpd server. Someone suggested NFS and even that will work for Yum repos. (though I prefer HTTP as well). Cheers, -Dave -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.