Ask Your Question
3

Managing Packages

asked 2013-12-18 22:01:04 -0500

Michael Bauer gravatar image

Hi,

I want to manage about 200 packages with Puppet and I want a separate "package"-resource for each package. The problem is: Every time, the Puppet-Agent does a "run" / "apply", he checks every 200 packages. Each package-check needs about 2 seconds. Altogether it takes about 400 seconds, which is to much. I want the check to only few seconds. I heard that it would be possible if I use yaml with using a single command which contains all the desired packages. But I don't know how to do it.

Hopefully someone can help.

Thanks

edit retag flag offensive close merge delete

Comments

What package provider are you using and are you ensuring specific versions or latest? It shouldn't be taking that long to process 200 package resources.

rodjek gravatar imagerodjek ( 2013-12-19 00:49:55 -0500 )edit

If you are using RHEL based systems, take a look at pulp to help manage packages. http://www.pulpproject.org

spuder gravatar imagespuder ( 2014-03-10 21:50:03 -0500 )edit

3 Answers

Sort by » oldest newest most voted
6

answered 2013-12-20 07:35:40 -0500

gh gravatar image

Do not ensure 'latest'. Instead ensure that the package is present. You can use MCollective to update your packages during a maintenance event, as opposed to possibly updating packages every puppet run. As rodjek mentioned, if you are using latest, that could incur a longer amount of time per resource.

edit flag offensive delete link more
1

answered 2013-12-26 23:02:51 -0500

scoopex gravatar image

I think you question is not related to "yaml". It is possible to provide a list of packages using hiera (hiera is capable to use yaml files, see http://docs.puppetlabs.com/hiera/1/complete_example.html for an introduction), but that’s not the point.

If you provide a list of packages with a single package resource puppet might fetch the information about installed packages with a single command.

Example:

       package {
          'curl':                ensure => present;
          'wget':                ensure => present;
          'iftop':               ensure => present;
          'iptraf':              ensure => present;
          'sysstat':             ensure => present;
          'xfsdump':             ensure => present;
          'xfsprogs':            ensure => present;
          'zip':                 ensure => present;
          'ncftp':               ensure => present;
        }

I you ... (more)

edit flag offensive delete link more
0

answered 2013-12-31 07:32:07 -0500

ethrbunny gravatar image

Use an external node classifier (enc). Have the list of which packages need to be upgraded dealt with server-side to save processing on your clients. Use whatever script language you like to generate this list when you update a given package on the server.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2013-12-18 22:01:04 -0500

Seen: 229 times

Last updated: Dec 31 '13