[Puppet Users] Re: Puppet status reporting

2009-09-13 Thread Ohad Levy
Hi,

For future references, the primary website can be found at
http://theforeman.org

Cheers,
Ohad

On Mon, Sep 14, 2009 at 6:48 AM, James Turnbull wrote:

>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Craig Miskell wrote:
> > Hi,
> >   I'd like to have some sort of "status report" GUI for my puppet
> installation.  Specifically, I would like to see
> > a) Any nodes that haven't reported in for a while
> > b) Any recent instances of having to make unexpected changes (restart a
> stopped service, resetting some important file
> > permissions but not because the policy changed, etc)
> > c) Any failures to set policy on a client.
> > d) Summary green light for the rest.
>
> Have a look at:
>
> http://github.com/ohadlevy/foreman
>
> And the Reductive Labs can probably jump in with whatever they are
> working on.
>
> Cheers
>
> James Turnbull
>
> - --
> Author of:
> * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin)
> * Pulling Strings with Puppet (http://tinyurl.com/pupbook)
> * Pro Nagios 2.0 (http://tinyurl.com/pronagios)
> * Hardening Linux (http://tinyurl.com/hardeninglinux)
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.7 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEVAwUBSq12oSFa/lDkFHAyAQJ2vAgA3Tp9eLsqHYyWx0aGrCZS4JYEt6qoXf97
> KY4bAF5A7rd8pTeUsZgVPZZ6JszsS/2YHiLzYoM78NXqWEucwvj/jEUw653C/s/g
> +OsikXaMGZ/Xj3FvgGAsFHnapcqe6zQykI4Bn8Vik9UzpCpC+O2rIS2gaZ+AU+X3
> ASmRV9T8ZuQ8vQ/6jnL/1+LTCDgeprZvMr8wnX/vDYxoGDYaSOeW2nyJQJz51Km8
> 0gIV3hlBjyYa5dQ3AJdXEysSVoqSdIshTBAHhAiew83nZVn7itcfGxYpIhiRTKKD
> L1X48ZCSFd2Vr0YU2TdK5xbkUsLUsttxyOVQyfGItaF/YBufu0b04A==
> =HC8Z
> -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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Configuration parse testing

2009-09-13 Thread Craig Miskell

Tim Uckun wrote:
>> Try some of the tips at:
>>
>> http://reductivelabs.com/trac/puppet/wiki/PuppetVersionControl
>>
> 
> One thing you should be careful of is that the syntax check will not
> catch all mistakes. For example let's say you have an entry like this.
..
> This code will actually run through your config and generate a catalog
> for each of my nodes.  I find this check to be more thorough but it
> could take a while if you have a lot of nodes so you might want to
> modify it to only check the set you have worked on.

Great suggestion thanks; we have a slightly different way to generate the list 
of servers, but the concept is sound. 
Just a couple of notes for anyone who might try this in Debian, with 0.25:

1) The "puppetmasterd --compile" has to run as the puppet user.  It's something 
to do with how all the defaults use 
"service" instead of "puppet" to represent the user/group that the process is 
actually running as.   I use "su", having 
changed the shell for the puppet user to /bin/bash.

2) You'll need the JSON library package (libjson-ruby1.8 in etch at least).

-- 
Craig Miskell
Senior Systems Administrator
Opus International Consultants
Government's view of the economy should be summed up in a few short phrases: If 
it moves, tax it. If it keeps moving, 
regulate it. If it stops moving, subsidize it.
Ronald Reagan (1986)

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: modifying a client's config file

2009-09-13 Thread Tim Uckun

>        augeas {"/boot/grub/grub.conf":
>                context => "/files/boot/grub/grub.conf",
>                changes => [ "set timeout 3",
>                        ],
>                require => File["/usr/share/augeas/lenses/grub.aug"]
>                }
>
> Because of a bug in the current Augeas I have a copy of
> /usr/share/augeas/lenses/dist/grub.aug in
> /usr/share/augeas/lenses/grub.aug where I've edited the hard coded
> location of /etc/grub.conf to /boot/grub/grub/conf, hence the require on
> the above. If your /etc is on the same disk partition as your /boot then
> you won't need this.

Automateit handles these in ruby. I wonder of some of the code that's
in automateit can be incorporated into puppet since they are both
GPLed (automateit is GPL3).

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Configuration parse testing

2009-09-13 Thread Tim Uckun

> Try some of the tips at:
>
> http://reductivelabs.com/trac/puppet/wiki/PuppetVersionControl
>

One thing you should be careful of is that the syntax check will not
catch all mistakes. For example let's say you have an entry like this.

file { "dir_colors" :
path => "/etc/DIR_COLORS",
content => template("bash/dir_colors"),
}

If you make a mistake in specifying the template file (say you typed
"bash/dir_colours" instead) the syntax check isn't going to catch
that. What will catch it is generating a catalog so I wrote the
following script which works for me but you might have to modify it to
work for you.

-
#! /usr/bin/env ruby
exit_code = 0
Dir[File.expand_path(File.dirname(__FILE__)) +
'/manifests/nodes/*'].each do |file|
  node= File.basename(file, '.pp')
  puts "Processing  #{node}"
  `puppetmasterd --compile #{node}`
   exit_code =  $? unless exit_code != 0
end

exit exit_code
---

This code will actually run through your config and generate a catalog
for each of my nodes.  I find this check to be more thorough but it
could take a while if you have a lot of nodes so you might want to
modify it to only check the set you have worked on.

Note: This means you have to install puppermaster on your workstation.

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet status reporting

2009-09-13 Thread Tim Uckun

> Hi,
>        I'd like to have some sort of "status report" GUI for my puppet 
> installation.  Specifically, I would like to see
> a) Any nodes that haven't reported in for a while
> b) Any recent instances of having to make unexpected changes (restart a 
> stopped service, resetting some important file
> permissions but not because the policy changed, etc)
> c) Any failures to set policy on a client.
> d) Summary green light for the rest.
>
> I envisage some sort of dashboard page for viewing it, with drill downs to 
> see more details, and probably the processing
> side sending notification e-mails on the more critical problems.
>

One thing you can do is to integrate zabbix or nagios into your setup.
I am more familiar with zabbix so I'll speak about that.

You can set up zabbix to monitor any value you want. Perhaps you can
set up a puppet template which at a minimum would report a heartbeat.
If there is a policy failure you can send a special key for that.
Later on you can add other facter values to your setup and monitor
them too.

After that you'd need to add a hook into the report to capture the
host and associated variables and send them to zabbix using their XML
interface (trivial with just a few lines of ruby and socket).

You can also set up alarms so that if zabbix doesn't get a heartbeat
every hour (or whatever you set up your interval as) it can raise a
stink. You can also set up other alarms bases on other facter values,
policy failures etc as you wish. For example you can set an alarm to
go off if the last two policy_failure values were the value "1".  This
will give it a chance to reset itself the next time it runs.


Zabbix already gives you nice consoles, summary views, graphs etc.


It won't be trivial and will involve some work but it can be done.

If you do set it up please share :)

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Installing a lot of packages

2009-09-13 Thread Trevor Vaughan

-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  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  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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Configuration parse testing

2009-09-13 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Craig Miskell wrote:
>> Try some of the tips at:
>>
>> http://reductivelabs.com/trac/puppet/wiki/PuppetVersionControl
>>
> Ahhh.  .  My search-fu is not strong (enough).  Thanks
> 

No matter.  The wiki search also sucks greatly.  Soon to be replaced
with "actual search that works" TM.

Regards

James Turnbull

- --
Author of:
* Pro Linux Systems Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBSq160iFa/lDkFHAyAQIeyggAlwY0E73pVXJse1GoKKNaukB6mwlKbYF6
F6ke9v5e8fxsJayAXFF391VdGyLUqh/lgHO7kaii/SmOC5JyfTq5aqY/28w71Euo
kwZTsKMkqhDzV5iy/pnMVByqQORg85Wrs/kps6vMnr9i1lhCyy39MWwxzcI+/oNa
+YkhvHXexQ6omapXQ0ViEwa97DXJv9gFR0um0MAwbw2TnY5uCJEGRQ0MjKeNFlxc
Ywyt3c5J98cGugw6tMi8s1jc7XJg4219D56TCShERXcXvj4rGXwFt4Rd6aCotzv0
kx0EqwcQO8tI02UmYO99CyWfvDfYfpOd6n/5RJM8y7RRGv0lJh/7yg==
=DLNQ
-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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Configuration parse testing

2009-09-13 Thread Craig Miskell

James Turnbull wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Craig Miskell wrote:
>> Hi,
>>  My current puppet deployment is in it's very early stages, so I'm still 
>> fumbling around a little.  Assuming I'm editing 
>> my configuration outside of the main tree, how do I test it before deploying 
>> to be sure it compiles?  I'm talking about 
>> checking for basic syntax errors, not "correctness" of application (that's a 
>> completely different kettle of fish).  I 
>> don't yet have 
> 
> Craig
> 
> Try some of the tips at:
> 
> http://reductivelabs.com/trac/puppet/wiki/PuppetVersionControl
> 
Ahhh.  .  My search-fu is not strong (enough).  Thanks

-- 
Craig Miskell
Senior Systems Administrator
Opus International Consultants
Never go off on tangents, which are lines that intersect a curve at
only one point and were discovered by Euclid, who lived in the 6th
century, which was an era dominated by the Goths, who lived in what
we now know as Poland." - Nov. 1998 issue of Infosystems Executive.

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet status reporting

2009-09-13 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Craig Miskell wrote:
> Hi,
>   I'd like to have some sort of "status report" GUI for my puppet 
> installation.  Specifically, I would like to see
> a) Any nodes that haven't reported in for a while
> b) Any recent instances of having to make unexpected changes (restart a 
> stopped service, resetting some important file 
> permissions but not because the policy changed, etc)
> c) Any failures to set policy on a client.
> d) Summary green light for the rest.

Have a look at:

http://github.com/ohadlevy/foreman

And the Reductive Labs can probably jump in with whatever they are
working on.

Cheers

James Turnbull

- --
Author of:
* Pro Linux Systems Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBSq12oSFa/lDkFHAyAQJ2vAgA3Tp9eLsqHYyWx0aGrCZS4JYEt6qoXf97
KY4bAF5A7rd8pTeUsZgVPZZ6JszsS/2YHiLzYoM78NXqWEucwvj/jEUw653C/s/g
+OsikXaMGZ/Xj3FvgGAsFHnapcqe6zQykI4Bn8Vik9UzpCpC+O2rIS2gaZ+AU+X3
ASmRV9T8ZuQ8vQ/6jnL/1+LTCDgeprZvMr8wnX/vDYxoGDYaSOeW2nyJQJz51Km8
0gIV3hlBjyYa5dQ3AJdXEysSVoqSdIshTBAHhAiew83nZVn7itcfGxYpIhiRTKKD
L1X48ZCSFd2Vr0YU2TdK5xbkUsLUsttxyOVQyfGItaF/YBufu0b04A==
=HC8Z
-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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Configuration parse testing

2009-09-13 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Craig Miskell wrote:
> Hi,
>   My current puppet deployment is in it's very early stages, so I'm still 
> fumbling around a little.  Assuming I'm editing 
> my configuration outside of the main tree, how do I test it before deploying 
> to be sure it compiles?  I'm talking about 
> checking for basic syntax errors, not "correctness" of application (that's a 
> completely different kettle of fish).  I 
> don't yet have 

Craig

Try some of the tips at:

http://reductivelabs.com/trac/puppet/wiki/PuppetVersionControl

Regards

James Turnbull

- --
Author of:
* Pro Linux Systems Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBSq11eiFa/lDkFHAyAQLv3AgAyhYwgAqD9W34PxALbWQ1IrQlOwt7pz6w
/utxdreJNZL+r7HefVPctH1KLXHWk646BA2Y6bE2u8xmw0AsQvCeXIKmaYJgWbVi
w7RvS/su2FEY69aSoDo0Z50X2kabSy3DyBAmIjAhI/JSgWC0j+HvFarmfg8hndyS
1B/S24SoVP7Uy+hArk0brPdyt5wrmuKM2ju+H0hnbCHflri9+vibrIC5PiRSRLdr
GRhiWqoN2mGDj0CUtyAv6ksU49g3Nygyfb65GnypVJZXiTWK+KXNtFZaWLvxWbAC
wUtKBuvFBENgWXtf5OMhApyHB1E90X+OIStdCK+V515zVB7EkPZZzw==
=0lm3
-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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Configuration parse testing

2009-09-13 Thread Craig Miskell

Hi,
My current puppet deployment is in it's very early stages, so I'm still 
fumbling around a little.  Assuming I'm editing 
my configuration outside of the main tree, how do I test it before deploying to 
be sure it compiles?  I'm talking about 
checking for basic syntax errors, not "correctness" of application (that's a 
completely different kettle of fish).  I 
don't yet have a separate "test" environment; how do other people handle this 
sort of thing?

Thanks,

-- 
Craig Miskell
Senior Systems Administrator
Opus International Consultants
"Yeah, all that emacs is missing to be counted as a full-featured
operating system is an easy-to-use texteditor."
--  Arnold Krille on the Linux Audio Developer mailing list


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Puppet status reporting

2009-09-13 Thread Craig Miskell

Hi,
I'd like to have some sort of "status report" GUI for my puppet 
installation.  Specifically, I would like to see
a) Any nodes that haven't reported in for a while
b) Any recent instances of having to make unexpected changes (restart a stopped 
service, resetting some important file 
permissions but not because the policy changed, etc)
c) Any failures to set policy on a client.
d) Summary green light for the rest.

I envisage some sort of dashboard page for viewing it, with drill downs to see 
more details, and probably the processing 
side sending notification e-mails on the more critical problems.

I've hunted around, but not found anything.  I don't need it to be able to view 
the actual policy, so PuppetShow isn't 
really what I'm after from what I can tell (the solitary screenshot and 
available documentation), and there doesn't seem 
to be any other projects in this vein.

I can see roughly where I'd have to go to make it work myself, but before I do 
that work, it'd be good to be sure 
there's not something already there.  Is anyone aware of such a thing, either 
already done, or in-progress that I could 
contribute to?

Thanks,

-- 
Craig Miskell
Senior Systems Administrator
Opus International Consultants
A real engineer only resorts to documentation when the keyboard
  dents on the forehead get too noticeable.


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: modifying a client's config file

2009-09-13 Thread Craig Miskell

Kelly Collier wrote:
> Hi.
> 
> I'd like to modify certain values in the config files on client machines.
> 
> For example:
> 
> in /boot/grub/menu.lst, change "timeout   10" to "timeout   3"
> 
> I'd prefer not to create a template, since there's no guarantee that the 
> rest of menu.lst is the same (e.g., a kernel is updated on one client 
> machine but not another).
> 
> The sloppy solution I'm using now is exec'ing a sed command if 
> /timeout\s+3/ is not found in the file. But it just seems tacky.
> 
> Any suggestions on how to do this more properly?
For grub, check if your distro has "grubby", a command line tool for modifying 
the grub config file.  Last I saw it was 
on RedHat/CentOS/Fedora; it's not on the Debian I have here to hand, nor my 
Ubuntu, so I don't know where it comes from. 
   Other distros may have equivalents.

Craig Miskell

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Installing a lot of packages

2009-09-13 Thread Chris Blumentritt
On Sat, Sep 12, 2009 at 3:56 PM, ELTigre  wrote:

>
> On Sep 12, 10:10 am, Chris Blumentritt  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  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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet Camp codefest prelude

2009-09-13 Thread Nigel Kersten
On Sun, Sep 13, 2009 at 5:27 AM, James Turnbull wrote:

>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> I'm in on the morning of the 26th but I want to have a few days off
> - - might go to Napa/Sonoma/Muir Woods if anyone wants to tag along.
>
> So the 30th suits me any time after perhaps 10am and somewhere near
> the Serrano.
>

I live here down in the South Bay, so happy to meet up whenever really.




>
> Cheers
>
> James Turnbull
>
> - --
> Author of:
> * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin)
> * Pulling Strings with Puppet (http://tinyurl.com/pupbook)
> * Pro Nagios 2.0 (http://tinyurl.com/pronagios)
> * Hardening Linux (http://tinyurl.com/hardeninglinux)
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.7 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEVAwUBSqzlHyFa/lDkFHAyAQI6RQgAnY9LwiwH2J5hBkjTjUx4am2IvCe6MTIq
> JHZ+K2g0B61R2wXLvUTSfpfIUI1QsQKX8RSJEfNV06gKLXaTk04gL98umORInsly
> diEXBFBCjM54J7oyS0dAUa50fE41YKysRbLwd7D1COuVCXQ5ADgCrbB8e+nUyol2
> EwnPBQnYsZ/cVO0uVVr5NqYn+9qPdlsQib1M7XbqEzFJkynP7JNWia1lumXabmEx
> f09dVs6JXesoN80NW4704Gvquohawf+o8HPBtW5fUyb5d0ZWrMjpNO1kh3O38LR6
> iCAeGtqByCL0Z28fWfxVnV5aMU1kMkku3r7+WBpj4dZXgYFh6oZ7GQ==
> =m97U
> -END PGP SIGNATURE-
>
> >
>


-- 
Nigel Kersten
nig...@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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet Camp codefest prelude

2009-09-13 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm in on the morning of the 26th but I want to have a few days off
- - might go to Napa/Sonoma/Muir Woods if anyone wants to tag along.

So the 30th suits me any time after perhaps 10am and somewhere near
the Serrano.

Cheers

James Turnbull

- --
Author of:
* Pro Linux Systems Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBSqzlHyFa/lDkFHAyAQI6RQgAnY9LwiwH2J5hBkjTjUx4am2IvCe6MTIq
JHZ+K2g0B61R2wXLvUTSfpfIUI1QsQKX8RSJEfNV06gKLXaTk04gL98umORInsly
diEXBFBCjM54J7oyS0dAUa50fE41YKysRbLwd7D1COuVCXQ5ADgCrbB8e+nUyol2
EwnPBQnYsZ/cVO0uVVr5NqYn+9qPdlsQib1M7XbqEzFJkynP7JNWia1lumXabmEx
f09dVs6JXesoN80NW4704Gvquohawf+o8HPBtW5fUyb5d0ZWrMjpNO1kh3O38LR6
iCAeGtqByCL0Z28fWfxVnV5aMU1kMkku3r7+WBpj4dZXgYFh6oZ7GQ==
=m97U
-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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet Camp codefest prelude

2009-09-13 Thread Al @ Lab42

I'm supposed to arrive at SF the evening of 29, lodging at the
Serrano.
At disposal for documentation and test support.

cu
Alessandro Franceschi

> It starts as soon as you get there.
>
> I didn't see anyone actually set a time yet, which is sort of what I was
> hoping to get out of this thread.
>
> Who's around, when and where?
>
> If there is enough interest and foreign nationals, we could just make a day
> of it.

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---