im a new puppet user. i need to handle a couple of scenarios in our deployment 1. i should be able to do incremental changes to certain class of nodes in my infrastructure. is it possible with puppet. i see in the puppet documentation that the entire config is downloaded to the client and then made sure that its in sync with that config. i would like to have a base config and then apply incremental config changes as time goes on. 2. im using fedora core machines in my infra. im using yum for getting the packages. if one of my component needs to be upgraded. i do the following - put appropriate version in the yum server - puppet will ensure that the latest version is installed i would like to execute custom scripts. - pre - stop custom script - stop the component - post stop custom script - start the component. how do i achieve this with puppet? should i write an upgrade exec class that does this? thanks in advance. _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 10 April 2007 20:57, Suresh Lakshmanan wrote:> im a new puppet user.Welcome to the list!> i need to handle a couple of scenarios in our deployment > > 1. i should be able to do incremental changes to certain class of nodes in > my infrastructure. > > is it possible with puppet. i see in the puppet documentation that the > entire config is downloaded > to the client and then made sure that its in sync with that config. i would > like to have a base config > and then apply incremental config changes as time goes on.The client activates itself every 30 minutes. The first thing it does is to check whether there are changes to its configuration.> 2. im using fedora core machines in my infra. im using yum for getting the > packages. if one of > my component needs to be upgraded. i do the following > > - put appropriate version in the yum server > - puppet will ensure that the latest version is installed > > i would like to execute custom scripts. > - pre - stop custom script > - stop the component > - post stop custom script > - start the component. > > how do i achieve this with puppet? should i write an upgrade exec class > that does this?If you are packaging the stuff yourself, you should really consider taking advantage of you package managers pre/post scripting facilities. Puppet currently has no good mechanisms to take action only if there is an actual upgrade. For "normal" before/after dependencies between Resources look at the before/require/subscribe/notify parameter. Don't hestitate to ask more specific questions. Regards, David - -- - - hallo... wie gehts heute? - - *hust* gut *rotz* *keuch* - - gott sei dank kommunizieren wir über ein septisches medium ;) -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGHKWq/Pp1N6Uzh0URArtNAJ47n2k6AFC8mzeJQaVDC5FRlOngZQCeM54K 4EuIE/q5OXlMQrTlL0gCV7E=VpW2 -----END PGP SIGNATURE----- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Benjamin C. Kite
2007-Apr-11 14:53 UTC
Re: packaging, incremental configuration and puppet
在 11 April , 2007,05:08,David Schmitt 写道:> The client activates itself every 30 minutes. The first thing it > does is to > check whether there are changes to its configuration.It's worth mentioning for the sake of the uninitiated that this interval (30 minutes) can be configured with the 'runinterval' configuration option. The default is 1800 (seconds). _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Hi David,> Don''t hestitate to ask more specific questions.Thanks for your quick response. Let me ask more specific questions my target production machine contains some components which will get periodically upgraded. after a component is upgraded i would make some calls to my network components to update some network information. it will typically be a http call. so i would need to the following - component X needs to be upgrade - i put in the latest version on the yum server - and the puppet config in the puppet master - puppet client notices it - before it does anything, i want to stop the component. cleanup or do some activities (collect logs etc) also i need to do some sanity tests and do my system related work - do an yum upgrade - call some http urls on my network thing is i cant put log collection or calling http urls in rpm scripts pre/post handlers. can you please advise as to how i can handle this? thanks. _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 11 April 2007 21:12, Suresh Lakshmanan wrote:> Hi David, > > > Don't hestitate to ask more specific questions. > > Thanks for your quick response. Let me ask more specific questions > > my target production machine contains some components which will get > periodically upgraded. > after a component is upgraded i would make some calls to my network > components to update > some network information. it will typically be a http call. so i would > need to the following > > - component X needs to be upgrade > - i put in the latest version on the yum server > - and the puppet config in the puppet master > - puppet client notices it > - before it does anything, i want to stop the component. cleanup or do > some activities (collect logs etc) > also i need to do some sanity tests and do my system related work > - do an yum upgrade > - call some http urls on my network > > thing is i cant put log collection or calling http urls in rpm scripts > pre/post handlers. > > can you please advise as to how i can handle this?Since this is a very narrow problem and most of the things (cleanup and logcollection) seem to be outside of puppet's scope, I would probably just code a shell script to do the upgrade+maintenance and integrate it into puppet via a define like this: define maintained_package() { exec { "maintain_${name}": command => "/usr/local/sbin/maintain_package ${name}", # following is pure fiction. I have no experience with yum at all onlyif => "yum --needs-upgrade ${name}", } } Hope that helps. Regards, David - -- - - hallo... wie gehts heute? - - *hust* gut *rotz* *keuch* - - gott sei dank kommunizieren wir über ein septisches medium ;) -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGHfH+/Pp1N6Uzh0URAioXAKCJb7PzTRUBtD5DjgThY+JNv7MfMwCcDTVH rTTMImpLf8VDS8yrOOGp8Ho=npVN -----END PGP SIGNATURE----- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users