Hi, I''ve writen a draft describing puppet on SuSE/opensuse linux. http://www.reductivelabs.com/trac/puppet/wiki/PuppetSuSE Any feedback is welcome. Martin
在 12 April , 2007,09:39,Martin Vuk 写道:> I've writen a draft describing puppet on SuSE/opensuse linux.> Any feedback is welcome.First and foremost, thank you very much. _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Thu, 2007-04-12 at 15:39 +0200, Martin Vuk wrote:> Hi, > I''ve writen a draft describing puppet on SuSE/opensuse linux. > > http://www.reductivelabs.com/trac/puppet/wiki/PuppetSuSE > > Any feedback is welcome.Nice writeup; thanks for doing that. One minor thing: you could include the appropriate yumrepo definition instead of having users put a file explicitly into /etc/yum.repos.d ... maybe this would be a good module for a puppet standard library: yum configs for various yum-based distros. David
Thank you for your sugestions. 2007/4/12, David Lutterkort <dlutter@redhat.com>:> Nice writeup; thanks for doing that. One minor thing: you could include > the appropriate yumrepo definition instead of having users put a file > explicitly into /etc/yum.repos.d ...Done!> maybe this would be a good module > for a puppet standard library: yum configs for various yum-based > distros.That would be very nice indeed. How can we contribute? What would be the layout? Something like this? module.pp: case $operatingsystem { fedora: {include "yumrepofedora"} suse: {include "yumreposuse"} ... } yumreposuse.pp: class yumreposuse{ yumrepo { "SL-$lsbdistrelease": descr=>"openSuSE Linux $lsbdistrelease", baseurl=>"http://download.opensuse.org/distribution/$lsbdistrelease/inst-source/suse/"; "SL-$lsbdistrelease-update": descr=>"openSuSE Linux $lsbdistrelease updates", baseurl=>"http://download.suse.com/update/$lsbdistrelease/" } } One mor question. Would it be possible to extend yumrepo type to other types of packages sources like apt, yast, ...? Does it use providers? So you would use something like this repo {"fc 6": provider=>yum, baseurl=>"http://download.fedora.org/6/" } repo {"etch": provider=>apt, baseurl=>"ftp.debian.org", distro=>"etch", modules=>"main, contrib" } Martin
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 13 April 2007 10:32, Martin Vuk wrote:> One mor question. Would it be possible to extend yumrepo type to other > types of packages sources like apt, yast, ...? Does it use providers? > So you would use something like this > repo {"fc 6": > provider=>yum, > baseurl=>"http://download.fedora.org/6/" > } > repo {"etch": > provider=>apt, > baseurl=>"ftp.debian.org", > distro=>"etch", > modules=>"main, contrib" > }Yes please! :) As a contribution I have hacked together a little apt_source type based on the ParsedFile provider. This is not production ready as it currently adds the configured components again and again and has no autorequires. This should at least require the apt package and the sources.list file. It''d be nice to notify a apt-get update on changes, if that is possible. (Note to Luke: I guess that''s the reason why the cron providers are so hard? I was thinking about adding the name as comment at the end of the line, but that exceeded what record_line was willing to do. Probably I should override the parsing methods. I was also thinking that perhaps ParsedFile needs a regex_line which has :regex and :format instead of :seperator and :joiner?) To try it out, drop the files "puppet/provider/apt_source/parsed.rb" and "puppet/type/apt_source.rb" from http://club.black.co.at:82/svn/manifests/trunk/files/ into $rubysitedir. Then apt''s sources.list can be created by apt_source { stable: type => deb, # this should be default url => "http://ftp.at.debian.org/debian/" suite => etch, # yay! component => "main contrib", } Additionaly a setting to automatically add security archives might be fun but not really essential. 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) iD8DBQFGH1XT/Pp1N6Uzh0URAgeWAKCKhYslx2b4XHabTJdqfI9Gpy/BtACaA9Ut 06udwnXFOAKNaU53nSgRJBE=dQXF -----END PGP SIGNATURE-----
On Fri, 2007-04-13 at 10:32 +0200, Martin Vuk wrote:> > maybe this would be a good module > > for a puppet standard library: yum configs for various yum-based > > distros. > That would be very nice indeed. How can we contribute? What would be the layout? > Something like this?What you have there is pretty close. For comparison, I wrote something similar for Fedora a while ago [1], it needs some love, but should go in the right general direction (it''s got some syntax problems, be warned).> module.pp: > > case $operatingsystem { > fedora: {include "yumrepofedora"} > suse: {include "yumreposuse"} > ... > }I''d probably do it the other way around, something like class yumrepos::base { case $operatingsystem { fedora: { include yumrepos::fedora } suse: { include yumrepos::suse } ... } } and then have classes yumrepos::fedora, yumrepos::suse etc. pull in yumrepo resources that model what is installed by default on those distros. That way, somebody could do something like class myyumrepos inherits yumrepos::base { Yumrepo[updates-testing] { enabled => 1 } Yumrepo[core] { baseurl => "http://my.local.mirror/fedora/core", mirrorlist => absent } } I am actually not sure if the yumrepos::base class above makes much sense, i.e. trying to hide differences between different OS''s at that level.> yumreposuse.pp: > > class yumreposuse{ > > yumrepo { > "SL-$lsbdistrelease": > descr=>"openSuSE Linux $lsbdistrelease", > baseurl=>"http://download.opensuse.org/distribution/$lsbdistrelease/inst-source/suse/"; > "SL-$lsbdistrelease-update": > descr=>"openSuSE Linux $lsbdistrelease updates", > baseurl=>"http://download.suse.com/update/$lsbdistrelease/" > } > }Is there only one yum repo that people use by default on SuSe ?> One mor question. Would it be possible to extend yumrepo type to other > types of packages sources like apt, yast, ...? Does it use providers?I am not sure whether it makes sense here to try to hide the differences between configuring yum, apt, yast etc. It would probably be just as easy for users to have completely separate types for configuring these, seeing how they will likely have different options. The first order of business would be to get types into puppet that can handle apt, yast, etc. Whether that should be exposed as one or multiple types in the language is then a relatively easy decision. David [1] http://hg.et.redhat.com/hg/emd/recipes/fedora-yum?f=8ece33067275;file=manifests/fedora-yum.pp