How can I install a lot (more than 800) of APT packages using an easy way in puppet? I mean, using some file.txt where I put there the packages I want to install and my package resource get the list . Is it possible? Or do I have to put all packages in the package resource? regards, Israel. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
The spirit of puppet is to install via the package resource. You could write a shell script to install using a text file as a data source then use the exec resource using onlyif to check to see if you need to run it. What I would do is create a separate class in its own manifest file and do some fancy searching and replacing (matching beginnings and endings of lines) with your list of packages. Since you have so many packages I doubt the resource will be more than one line. End up with something like: package { "package_name": ensure => installed } You might run into trouble here if you are using different distros of linux or linux and freebsd as the package names may be different. You would get the benefit of later being able to hit the file and change installed to latest if you want update a specific package though. I have never heard of a file being used as a source for a resource but it is an interesting thought. You might get away with an inline template to do that but that would be dirty: package { inline_template("<%= filename.each_line.collect %>"): require => File["filename"], ensure => installed } I have no idea if the above will work and I doubt the erb is correct since my ruby sucks. Chris On Sat, Sep 12, 2009 at 12:02 AM, ELTigre <igalvarez@gmail.com> wrote:> > How can I install a lot (more than 800) of APT packages using an easy > way in puppet? I mean, using some file.txt where I put there the > packages I want to install and my package resource get the list . Is > it possible? Or do I have to put all packages in the package resource? > > regards, > Israel. > > >--~--~---------~--~----~------------~-------~--~----~ 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 Sep 12, 10:10 am, Chris Blumentritt <cblum...@gmail.com> wrote: Hi Chirs, I only use debian lenny on my servers. I just want to create a class with all package from APT to keep them up2date all the time with this configuration (ensure => latest) and whenever I create a new server it install all theses packages.> The spirit of puppet is to install via the package resource. You could > write a shell script to install using a text file as a data source then use > the exec resource using onlyif to check to see if you need to run it. WhatHow does "onlyif" fits here if I use exec? What should I check to prevent exec running every time puppet client get the catalog?> I would do is create a separate class in its own manifest file and do some > fancy searching and replacing (matching beginnings and endings of lines) > with your list of packages. Since you have so many packages I doubt the > resource will be more than one line. End up with something like: > package { "package_name": ensure => installed }Coul you explain me this, please? :-)>> You might run into trouble here if you are using different distros of linux > or linux and freebsd as the package names may be different. You would get > the benefit of later being able to hit the file and change installed to > latest if you want update a specific package though. > > I have never heard of a file being used as a source for a resource but it is > an interesting thought. You might get away with an inline template to do > that but that would be dirty: > > package { inline_template("<%= filename.each_line.collect %>"): > require => File["filename"], > ensure => installedI''ll test it and let you know. thanks a lot. regards, israel> > } > > I have no idea if the above will work and I doubt the erb is correct since > my ruby sucks. > > Chris > > On Sat, Sep 12, 2009 at 12:02 AM, ELTigre <igalva...@gmail.com> wrote: > > > How can I install a lot (more than 800) of APT packages using an easy > > way in puppet? I mean, using some file.txt where I put there the > > packages I want to install and my package resource get the list . Is > > it possible? Or do I have to put all packages in the package resource? > > > regards, > > Israel.--~--~---------~--~----~------------~-------~--~----~ 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 Sat, Sep 12, 2009 at 3:56 PM, ELTigre <igalvarez@gmail.com> wrote:> > On Sep 12, 10:10 am, Chris Blumentritt <cblum...@gmail.com> wrote: > Hi Chirs, > > I only use debian lenny on my servers. I just want to create a class > with all package from APT to keep them up2date all the time with this > configuration (ensure => latest) and whenever I create a new server it > install all theses packages. > > > The spirit of puppet is to install via the package resource. You could > > write a shell script to install using a text file as a data source then > use > > the exec resource using onlyif to check to see if you need to run it. > What > How does "onlyif" fits here if I use exec? What should I check to > prevent exec running every time puppet client get the catalog? >You would have test to see if a directory that a packages does not exist. If it does not exist then install packages. This really is the wrong way to go about it though since this would be a huge pain to do for more than a few packages.> > > I would do is create a separate class in its own manifest file and do > some > > fancy searching and replacing (matching beginnings and endings of lines) > > with your list of packages. Since you have so many packages I doubt the > > resource will be more than one line. End up with something like: > > package { "package_name": ensure => installed } > Coul you explain me this, please? :-) >This really is the best way to go have the package resource handle this. It will check to see if each package is installed without extra effort on your part. I am not sure what you want to explain about this, here is a link to the package documentation: http://reductivelabs.com/trac/puppet/wiki/TypeReference#package> > > > You might run into trouble here if you are using different distros of > linux > > or linux and freebsd as the package names may be different. You would > get > > the benefit of later being able to hit the file and change installed to > > latest if you want update a specific package though. > > > > I have never heard of a file being used as a source for a resource but it > is > > an interesting thought. You might get away with an inline template to do > > that but that would be dirty: > > > > package { inline_template("<%= filename.each_line.collect %>"): > > require => File["filename"], > > ensure => installed > I''ll test it and let you know. > > thanks a lot. > regards, > israel > > > > } > > > > I have no idea if the above will work and I doubt the erb is correct > since > > my ruby sucks. > > > > Chris > > > > On Sat, Sep 12, 2009 at 12:02 AM, ELTigre <igalva...@gmail.com> wrote: > > > > > How can I install a lot (more than 800) of APT packages using an easy > > > way in puppet? I mean, using some file.txt where I put there the > > > packages I want to install and my package resource get the list . Is > > > it possible? Or do I have to put all packages in the package resource? > > > > > regards, > > > Israel. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 My suggestion, if possible, is to run a nightly cron job that updates everything on the system. This way, puppet only manages the things you actually want to manage. Trevor On 09/12/2009 04:56 PM, ELTigre wrote:> > On Sep 12, 10:10 am, Chris Blumentritt <cblum...@gmail.com> wrote: > Hi Chirs, > > I only use debian lenny on my servers. I just want to create a class > with all package from APT to keep them up2date all the time with this > configuration (ensure => latest) and whenever I create a new server it > install all theses packages. > >> The spirit of puppet is to install via the package resource. You could >> write a shell script to install using a text file as a data source then use >> the exec resource using onlyif to check to see if you need to run it. What > How does "onlyif" fits here if I use exec? What should I check to > prevent exec running every time puppet client get the catalog? > >> I would do is create a separate class in its own manifest file and do some >> fancy searching and replacing (matching beginnings and endings of lines) >> with your list of packages. Since you have so many packages I doubt the >> resource will be more than one line. End up with something like: >> package { "package_name": ensure => installed } > Coul you explain me this, please? :-) > >> > > >> You might run into trouble here if you are using different distros of linux >> or linux and freebsd as the package names may be different. You would get >> the benefit of later being able to hit the file and change installed to >> latest if you want update a specific package though. >> >> I have never heard of a file being used as a source for a resource but it is >> an interesting thought. You might get away with an inline template to do >> that but that would be dirty: >> >> package { inline_template("<%= filename.each_line.collect %>"): >> require => File["filename"], >> ensure => installed > I''ll test it and let you know. > > thanks a lot. > regards, > israel >> >> } >> >> I have no idea if the above will work and I doubt the erb is correct since >> my ruby sucks. >> >> Chris >> >> On Sat, Sep 12, 2009 at 12:02 AM, ELTigre <igalva...@gmail.com> wrote: >> >>> How can I install a lot (more than 800) of APT packages using an easy >>> way in puppet? I mean, using some file.txt where I put there the >>> packages I want to install and my package resource get the list . Is >>> it possible? Or do I have to put all packages in the package resource? >> >>> regards, >>> Israel. > >-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqti2kACgkQyjMdFR1108B0EQCeIEFZC0Thahsf27RGGeal7Qpv MX0An2Kkuwo6a1o0kvtGwq1gei9UHnEu =lkQl -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, You could take a slightly different approch and create a debian meta package with all the required packages listed, then have puppet keep the mata package up to date. Don''t know if this helps. Martin On Mon, Sep 14, 2009 at 1:16 AM, Trevor Vaughan <peiriannydd@gmail.com> wrote:> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > My suggestion, if possible, is to run a nightly cron job that updates > everything on the system. > > This way, puppet only manages the things you actually want to manage. > > Trevor > > On 09/12/2009 04:56 PM, ELTigre wrote: >> >> On Sep 12, 10:10 am, Chris Blumentritt <cblum...@gmail.com> wrote: >> Hi Chirs, >> >> I only use debian lenny on my servers. I just want to create a class >> with all package from APT to keep them up2date all the time with this >> configuration (ensure => latest) and whenever I create a new server it >> install all theses packages. >> >>> The spirit of puppet is to install via the package resource. You could >>> write a shell script to install using a text file as a data source then use >>> the exec resource using onlyif to check to see if you need to run it. What >> How does "onlyif" fits here if I use exec? What should I check to >> prevent exec running every time puppet client get the catalog? >> >>> I would do is create a separate class in its own manifest file and do some >>> fancy searching and replacing (matching beginnings and endings of lines) >>> with your list of packages. Since you have so many packages I doubt the >>> resource will be more than one line. End up with something like: >>> package { "package_name": ensure => installed } >> Coul you explain me this, please? :-) >> >>> >> >> >>> You might run into trouble here if you are using different distros of linux >>> or linux and freebsd as the package names may be different. You would get >>> the benefit of later being able to hit the file and change installed to >>> latest if you want update a specific package though. >>> >>> I have never heard of a file being used as a source for a resource but it is >>> an interesting thought. You might get away with an inline template to do >>> that but that would be dirty: >>> >>> package { inline_template("<%= filename.each_line.collect %>"): >>> require => File["filename"], >>> ensure => installed >> I''ll test it and let you know. >> >> thanks a lot. >> regards, >> israel >>> >>> } >>> >>> I have no idea if the above will work and I doubt the erb is correct since >>> my ruby sucks. >>> >>> Chris >>> >>> On Sat, Sep 12, 2009 at 12:02 AM, ELTigre <igalva...@gmail.com> wrote: >>> >>>> How can I install a lot (more than 800) of APT packages using an easy >>>> way in puppet? I mean, using some file.txt where I put there the >>>> packages I want to install and my package resource get the list . Is >>>> it possible? Or do I have to put all packages in the package resource? >>> >>>> regards, >>>> Israel. >> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAkqti2kACgkQyjMdFR1108B0EQCeIEFZC0Thahsf27RGGeal7Qpv > MX0An2Kkuwo6a1o0kvtGwq1gei9UHnEu > =lkQl > -----END PGP SIGNATURE----- > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chris Blumentritt wrote:> The spirit of puppet is to install via the package resource. You could > write a shell script to install using a text file as a data source then > use the exec resource using onlyif to check to see if you need to run > it. What I would do is create a separate class in its own manifest file > and do some fancy searching and replacing (matching beginnings and > endings of lines) with your list of packages. Since you have so many > packages I doubt the resource will be more than one line. End up with > something like: > > package { "package_name": ensure => installed } > > You might run into trouble here if you are using different distros of > linux or linux and freebsd as the package names may be different. You > would get the benefit of later being able to hit the file and change > installed to latest if you want update a specific package though. > > I have never heard of a file being used as a source for a resource but > it is an interesting thought. You might get away with an inline > template to do that but that would be dirty: > > package { inline_template("<%= filename.each_line.collect %>"): > require => File["filename"], > ensure => installed > }No need to make it so complicated: | $packages = split("\n", file("/etc/puppet/packagelist")) | packages { $packages: ensure => latest } Please be aware though, that this will lead puppet to query the package manager for every package, one by one, which may be quite the performance hit. Alternatively only specify the differences from the basic installed system and use something like apt-dater to keep your servers up to date. Regards, DavidS --~--~---------~--~----~------------~-------~--~----~ 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 Sep 14, 4:00 am, David Schmitt <da...@dasz.at> wrote:> Chris Blumentritt wrote: > > The spirit of puppet is to install via the package resource. You could > > write a shell script to install using a text file as a data source then > > use the exec resource using onlyif to check to see if you need to run > > it. What I would do is create a separate class in its own manifest file > > and do some fancy searching and replacing (matching beginnings and > > endings of lines) with your list of packages. Since you have so many > > packages I doubt the resource will be more than one line. End up with > > something like: > > > package { "package_name": ensure => installed } > > > You might run into trouble here if you are using different distros of > > linux or linux and freebsd as the package names may be different. You > > would get the benefit of later being able to hit the file and change > > installed to latest if you want update a specific package though. > > > I have never heard of a file being used as a source for a resource but > > it is an interesting thought. You might get away with an inline > > template to do that but that would be dirty: > > > package { inline_template("<%= filename.each_line.collect %>"): > > require => File["filename"], > > ensure => installed > > } > > No need to make it so complicated: > > | $packages = split("\n", file("/etc/puppet/packagelist")) > | packages { $packages: ensure => latest }Hi Cris, Do you think it a good idea to use puppet to maintain servers up2date? Or it''s better to use some kind of cron scripts? We''re planning to use puppet for this task, but we''ve found a lot of packages, dependencies, priorities, essential, no essential so it''s a little bit complicated to split packages regarding categories and setup puppet for doing this. Another thing we''re looking for is how to manage packages belonging daemon services in production with puppet. I''d like to know at what level we can use puppet to keep systems up2date. I appreciate if you share some experiences. :-) thanks regards, Israel.> > Please be aware though, that this will lead puppet to query the package > manager for every package, one by one, which may be quite the > performance hit. > > Alternatively only specify the differences from the basic installed > system and use something like apt-dater to keep your servers up to date. > > Regards, DavidS--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi> I''d like to know at what level we can use puppet to keep systems > up2date. I appreciate if you share some experiences. > :-)we don''t use puppet at all to keep systems up2date and I don''t think it''s a good idea either. Your package manager usually does a much better job. To manage bigger installations something like satellite or even an own managed package repository, which you sync with the upstream updates you need and then run a cron only against that repository might be a suitable solution. cheers pete --~--~---------~--~----~------------~-------~--~----~ 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 Sep 14, 1:56 pm, Peter Meier <peter.me...@immerda.ch> wrote:> Hi > > > I''d like to know at what level we can use puppet to keep systems > > up2date. I appreciate if you share some experiences. > > :-) >Hi Pete, Thanks for your soon answer, We''ve always updated packages of principal services manually and other packages not so important automatically using some cron jobs. BUT, puppet comes to play and we have a lot of servers running in production environment. That''s the reason why I''m asking the list. The updating process is complicated because you have to manually do the dirty job. We thought puppet can handle this servers''s update job. But I see it''s not a good idea. Does anyone in the list use puppet to handle updates on servers? :-) regards, Israel.> we don''t use puppet at all to keep systems up2date and I don''t think > it''s a good idea either. Your package manager usually does a much better > job. To manage bigger installations something like satellite or even an > own managed package repository, which you sync with the upstream updates > you need and then run a cron only against that repository might be a > suitable solution. > > cheers pete--~--~---------~--~----~------------~-------~--~----~ 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 Mon, Sep 14, 2009 at 1:12 PM, ELTigre <igalvarez@gmail.com> wrote:> > On Sep 14, 1:56 pm, Peter Meier <peter.me...@immerda.ch> wrote: > > Hi > > > > > I''d like to know at what level we can use puppet to keep systems > > > up2date. I appreciate if you share some experiences. > > > :-) > > > Hi Pete, > Thanks for your soon answer, We''ve always updated packages of > principal services manually and other packages not so important > automatically using some cron jobs. BUT, puppet comes to play and we > have a lot of servers running in production environment. That''s the > reason why I''m asking the list. The updating process is complicated > because you have to manually do the dirty job. We thought puppet can > handle this servers''s update job. But I see it''s not a good idea. > > Does anyone in the list use puppet to handle updates on servers? :-) >We have execs of apt-get update/upgrade that we run as part of our Puppet runs.> > regards, > Israel. > > we don''t use puppet at all to keep systems up2date and I don''t think > > it''s a good idea either. Your package manager usually does a much better > > job. To manage bigger installations something like satellite or even an > > own managed package repository, which you sync with the upstream updates > > you need and then run a cron only against that repository might be a > > suitable solution. > > > > cheers pete > > >-- Nigel Kersten nigelk@google.com System Administrator Google Inc. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
We''re a Debian shop, with our own internal repository for controlling packages. We use the unattended-upgrades package to perform upgrades and use puppet to instantiate the whole process using a variant of the recipe at the bottom of this page: http://reductivelabs.com/trac/puppet/wiki/Recipes/Debian - Jeff On 09/14/2009 03:12 PM, ELTigre wrote:> > On Sep 14, 1:56 pm, Peter Meier<peter.me...@immerda.ch> wrote: >> Hi >> >>> I''d like to know at what level we can use puppet to keep systems >>> up2date. I appreciate if you share some experiences. >>> :-) >> > Hi Pete, > Thanks for your soon answer, We''ve always updated packages of > principal services manually and other packages not so important > automatically using some cron jobs. BUT, puppet comes to play and we > have a lot of servers running in production environment. That''s the > reason why I''m asking the list. The updating process is complicated > because you have to manually do the dirty job. We thought puppet can > handle this servers''s update job. But I see it''s not a good idea. > > Does anyone in the list use puppet to handle updates on servers? :-) > > regards, > Israel. >> we don''t use puppet at all to keep systems up2date and I don''t think >> it''s a good idea either. Your package manager usually does a much better >> job. To manage bigger installations something like satellite or even an >> own managed package repository, which you sync with the upstream updates >> you need and then run a cron only against that repository might be a >> suitable solution. >> >> cheers pete > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---