From pjotr at pckassa.com Fri Nov 4 07:03:37 2005 From: pjotr at pckassa.com (Pjotr Prins) Date: Fri, 4 Nov 2005 13:03:37 +0100 Subject: [Cfruby-general] Speed up Message-ID: <20051104120337.GA30469@tm2.nmi-agro.nl> The speed of Cfruby in general is very good. The only area where I have to wait is when I do a run checking rights on directory trees. Specifically these two cases are recurring: dirname m=somemode o=someowner g=somegroup recurse=infinite act=fixplain and dirname m=somemode o=someowner g=somegroup recurse=infinite act=fixdirs I.e. check the dirs and check the files. Is there some way we could speed these up? Pj. From drosihn at gmail.com Mon Nov 7 20:01:52 2005 From: drosihn at gmail.com (Garance A Drosehn) Date: Mon, 7 Nov 2005 20:01:52 -0500 Subject: [Cfruby-general] Just starting out... In-Reply-To: <435F5B27.8010600@grayskies.net> References: <97880ae0510251709y15e9a379wcf0f97ede7b09e20@mail.gmail.com> <435F5B27.8010600@grayskies.net> Message-ID: <97880ae0511071701k6ddb6d7t3af4e8300203c834@mail.gmail.com> On 10/25/05, Garance A Drosehn wrote: > > Here at RPI we are interested in doing something new with > our system-configuration setup. We could either make some > improvements to a C program that we've been using for ten > years, or I could rewrite it. I've seen the original cfengine in > the past, and frankly I didn't like it much. But if I were to write > some new tool, I would do it in ruby, so I figured it would be > smart to look around to see what else is already available. > Cfruby looks pretty promising, so here I am. > > This is my first foray into a rubyforge project, or gems. I have > figured out enough to get cfruby installed and to skim through > some of the documentation, but it'll probably be a little longer > before I have any intelligent questions to ask... Well, so far I've been having some problems just getting the time to work on this. So, for now I'll have to stick with making a few dumb comments. >From what little I've looked at, I'm not sure how to get started with cfenjin. I have the feeling that I'm missing something. The "manual" web page at: http://cfruby.grayskies.net/documentation/cfenjin/ seems very sparse (and seems to have some formatting mark-up that makes me think it is copied out of some Wiki). And the main page at http://cfruby.grayskies.net:2500/cfruby/published/HomePage implies that I'm looking at some kind of Wiki (since the page claims it is running on Instiki), but I don't see the Wiki-ness of it... And that home page just points me to the above web page for the manual, which as I said isn't all that helpful to me. And the reference it points to is apparently just a listing of all the source files, classes and methods which implement cfenjin. I can see where that would be useful, but it's not useful when it comes to writing up an initial attempt at a configuration file. - - - - Looking at that page, I have a impression that cfenjin isn't going to be quite what we're looking for, but I'm still thinking that the work in libcfruby will be very useful. The writeup at http://cfruby.grayskies.net/documentation/libcfruby/manual.html does seem reasonably helpful, but I haven't had the time to really try out anything yet. Maybe cfyaml would be reasonable, but that looks a lot wordier than I wanted to get into (compared to 'package'). Also note that I want to end up with something that sysadmins can use without having to know ruby itself. So some of the comments about cfenjin which say "this syntax is a mix of regular cfengine and ruby!" makes me rather uneasy. I've got two vague projects in mind. One is to rewrite a program called 'package' which we have used here at RPI for many years, the original version of which came with AFS. The other, totally unrelated idea would be to have a new 'mergemaster' script for FreeBSD. But I'm not as likely to get around to that one. - - - - And for a really dumb comment: It would be nice if it had a name which worked better in conversation... I was trying to discuss this in a weekly meeting here, and people were constantly getting confused between the standard 'cfengine', and this 'cfenjin'. Sure, 'cfenjin' is a cute name when reading it, but it is rather confusing in conversation. Or should I be pronouncing it in some distinctive way? I ended up referring to it as "cfengine with a J" in the meeting just to avoid confusion! As for an alternate, maybe 'cfrengine', 'cfrenjin' or 'cfenjineer'. - - - - well, speaking of not having any time, I have to run to a meeting now. Please note that I really am interested in this, even if I seem to have some trouble finding the time to work with it! -- Garance Alistair Drosehn = gad at gilead.netel.rpi.edu Senior Systems Programmer or gad at FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA From pjotr at pckassa.com Tue Nov 8 03:10:31 2005 From: pjotr at pckassa.com (Pjotr Prins) Date: Tue, 8 Nov 2005 09:10:31 +0100 Subject: [Cfruby-general] Just starting out... In-Reply-To: <97880ae0511071701k6ddb6d7t3af4e8300203c834@mail.gmail.com> References: <97880ae0510251709y15e9a379wcf0f97ede7b09e20@mail.gmail.com> <435F5B27.8010600@grayskies.net> <97880ae0511071701k6ddb6d7t3af4e8300203c834@mail.gmail.com> Message-ID: <20051108081031.GA22147@tm2.nmi-agro.nl> Running cfenjin is easy - just run from the ./bin/ dir and give it the scripts on the command line. I.e. ./bin/cfenjin site.rb cfsshd.rb cfsudo.rb etc... The --help switch is also exhaustive. Cfenjin does save the user from Ruby - but if he wants he can use Ruby to expand on the language. This is unlike Cfengine itself. So in my opinion Cfenjin offers what Cfengine does - i.e. a simple language for system administration one can learn without learning Ruby - but adds the power of Ruby for those who need it. Once can also call into cfrubylib directly. I would certainly look a little deeper and try stuff. I am sure it will pay off. Sorry about the lack of docs at this point - it is the major thing to do before release 1.0. Did you find the howto in doc/cfenjin/howto? I am willing to help if you hit problems, and will add it to the docs. The name comes from Iain Bank's Fearsum Enjin - it is a fearsum enjin indeed ;-). If it is a problem just use 'cfruby' instead. The enjin just runs the parser. Regards, Pj. On Mon, Nov 07, 2005 at 08:01:52PM -0500, Garance A Drosehn wrote: > On 10/25/05, Garance A Drosehn wrote: > > > > Here at RPI we are interested in doing something new with > > our system-configuration setup. We could either make some > > improvements to a C program that we've been using for ten > > years, or I could rewrite it. I've seen the original cfengine in > > the past, and frankly I didn't like it much. But if I were to write > > some new tool, I would do it in ruby, so I figured it would be > > smart to look around to see what else is already available. > > Cfruby looks pretty promising, so here I am. > > > > This is my first foray into a rubyforge project, or gems. I have > > figured out enough to get cfruby installed and to skim through > > some of the documentation, but it'll probably be a little longer > > before I have any intelligent questions to ask... > > Well, so far I've been having some problems just getting the time > to work on this. So, for now I'll have to stick with making a few > dumb comments. > > > >From what little I've looked at, I'm not sure how to get started with > cfenjin. I have the feeling that I'm missing something. The "manual" > web page at: > > http://cfruby.grayskies.net/documentation/cfenjin/ > > seems very sparse (and seems to have some formatting mark-up that > makes me think it is copied out of some Wiki). And the main page at > > http://cfruby.grayskies.net:2500/cfruby/published/HomePage > > implies that I'm looking at some kind of Wiki (since the page claims > it is running on Instiki), but I don't see the Wiki-ness of it... And > that home page just points me to the above web page for the manual, > which as I said isn't all that helpful to me. > > And the reference it points to is apparently just a listing of all > the source files, classes and methods which implement cfenjin. I > can see where that would be useful, but it's not useful when it comes > to writing up an initial attempt at a configuration file. > - - - - > Looking at that page, I have a impression that cfenjin isn't going > to be quite what we're looking for, but I'm still thinking that the > work in libcfruby will be very useful. The writeup at > > http://cfruby.grayskies.net/documentation/libcfruby/manual.html > > does seem reasonably helpful, but I haven't had the time to really > try out anything yet. Maybe cfyaml would be reasonable, but that > looks a lot wordier than I wanted to get into (compared to 'package'). > Also note that I want to end up with something that sysadmins can > use without having to know ruby itself. So some of the comments > about cfenjin which say "this syntax is a mix of regular cfengine > and ruby!" makes me rather uneasy. > > I've got two vague projects in mind. One is to rewrite a program > called 'package' which we have used here at RPI for many years, the > original version of which came with AFS. > > The other, totally unrelated idea would be to have a new 'mergemaster' > script for FreeBSD. But I'm not as likely to get around to that one. > > - - - - > And for a really dumb comment: It would be nice if it had a name which > worked better in conversation... I was trying to discuss this in a > weekly meeting here, and people were constantly getting confused between > the standard 'cfengine', and this 'cfenjin'. Sure, 'cfenjin' is a cute > name when reading it, but it is rather confusing in conversation. Or > should I be pronouncing it in some distinctive way? I ended up referring > to it as "cfengine with a J" in the meeting just to avoid confusion! > > As for an alternate, maybe 'cfrengine', 'cfrenjin' or 'cfenjineer'. > > - - - - > well, speaking of not having any time, I have to run to a meeting now. > Please note that I really am interested in this, even if I seem to have > some trouble finding the time to work with it! > > -- > Garance Alistair Drosehn = gad at gilead.netel.rpi.edu > Senior Systems Programmer or gad at FreeBSD.org > Rensselaer Polytechnic Institute; Troy, NY; USA > > _______________________________________________ > Cfruby-general mailing list > Cfruby-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/cfruby-general From dolf.andringa at elcyion.nl Tue Nov 8 04:11:45 2005 From: dolf.andringa at elcyion.nl (Dolf Andringa) Date: Tue, 08 Nov 2005 10:11:45 +0100 Subject: [Cfruby-general] Just starting out... In-Reply-To: <97880ae0511071701k6ddb6d7t3af4e8300203c834@mail.gmail.com> References: <97880ae0510251709y15e9a379wcf0f97ede7b09e20@mail.gmail.com> <435F5B27.8010600@grayskies.net> <97880ae0511071701k6ddb6d7t3af4e8300203c834@mail.gmail.com> Message-ID: <43706BD1.2010707@elcyion.nl> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 It indeed isn't that hard. I am just your average sys admin who doesn't know ruby at all. :) And I've mastered it pretty easily. You arevarge setup is a directory tree in for instance /usr/data/cfruby where you keep the config files and scripts. I'm putting all the files inside a darcs repository, which adds versioning possiblities. CVS or SVN could be used as well, altough I like darcs. We've got a directory /usr/data/darcs/cf In that folder there's a site.rb defining all machine groups, and other variables to be used throughout the config files. Then there's a folder config. In that folder are all the config scripts. Examples you can find in the install dir of cfruby under documentation/cfenjin/examples. There's also a site.rb example in there. Next i've got a masterfiles folder, which contains the actual config files (smb.conf, apache.conf, etc). The scripts in /config copy the files in /mastefiles around the system, set their rights, etc. Then there's the /scripts folder which contains some scripts, among which a cfenjin-run script. This script runs cfenjin, with the appropriate config files from /config and site.rb as arguments basically. You can run cfenjin with just the site.rb and some config script from /config as arguments to update to configuration from that one config script, or you can run the cfenjin-run script to update all the configuration. The scripts in /config can do a lot more than just copying files around the system, I'm using one for instance to edit AllowUsers in sshd.conf, based on a variable set in site.rb (the cfsshd.rb is in the examples folder I think). I'm also using it to edit some other files, and to copy files from the filesystem back to the darcs repository to keep the states from some files. Of course the config scripts in /config also restart the services they just updated. In the /config scripts you can also define that some action should only be executed on machines that belong to a certain group. Well, there?s loads more you can do I guess with the config scripts, this is just a basic setup. Don't hesitate to ask! :) Cheers, Dolf. Garance A Drosehn wrote: > On 10/25/05, Garance A Drosehn wrote: > >>Here at RPI we are interested in doing something new with >>our system-configuration setup. We could either make some >>improvements to a C program that we've been using for ten >>years, or I could rewrite it. I've seen the original cfengine in >>the past, and frankly I didn't like it much. But if I were to write >>some new tool, I would do it in ruby, so I figured it would be >>smart to look around to see what else is already available. >>Cfruby looks pretty promising, so here I am. >> >>This is my first foray into a rubyforge project, or gems. I have >>figured out enough to get cfruby installed and to skim through >>some of the documentation, but it'll probably be a little longer >>before I have any intelligent questions to ask... > > > Well, so far I've been having some problems just getting the time > to work on this. So, for now I'll have to stick with making a few > dumb comments. > > >>From what little I've looked at, I'm not sure how to get started with > cfenjin. I have the feeling that I'm missing something. The "manual" > web page at: > > http://cfruby.grayskies.net/documentation/cfenjin/ > > seems very sparse (and seems to have some formatting mark-up that > makes me think it is copied out of some Wiki). And the main page at > > http://cfruby.grayskies.net:2500/cfruby/published/HomePage > > implies that I'm looking at some kind of Wiki (since the page claims > it is running on Instiki), but I don't see the Wiki-ness of it... And > that home page just points me to the above web page for the manual, > which as I said isn't all that helpful to me. > > And the reference it points to is apparently just a listing of all > the source files, classes and methods which implement cfenjin. I > can see where that would be useful, but it's not useful when it comes > to writing up an initial attempt at a configuration file. > - - - - > Looking at that page, I have a impression that cfenjin isn't going > to be quite what we're looking for, but I'm still thinking that the > work in libcfruby will be very useful. The writeup at > > http://cfruby.grayskies.net/documentation/libcfruby/manual.html > > does seem reasonably helpful, but I haven't had the time to really > try out anything yet. Maybe cfyaml would be reasonable, but that > looks a lot wordier than I wanted to get into (compared to 'package'). > Also note that I want to end up with something that sysadmins can > use without having to know ruby itself. So some of the comments > about cfenjin which say "this syntax is a mix of regular cfengine > and ruby!" makes me rather uneasy. > > I've got two vague projects in mind. One is to rewrite a program > called 'package' which we have used here at RPI for many years, the > original version of which came with AFS. > > The other, totally unrelated idea would be to have a new 'mergemaster' > script for FreeBSD. But I'm not as likely to get around to that one. > > - - - - > And for a really dumb comment: It would be nice if it had a name which > worked better in conversation... I was trying to discuss this in a > weekly meeting here, and people were constantly getting confused between > the standard 'cfengine', and this 'cfenjin'. Sure, 'cfenjin' is a cute > name when reading it, but it is rather confusing in conversation. Or > should I be pronouncing it in some distinctive way? I ended up referring > to it as "cfengine with a J" in the meeting just to avoid confusion! > > As for an alternate, maybe 'cfrengine', 'cfrenjin' or 'cfenjineer'. > > - - - - > well, speaking of not having any time, I have to run to a meeting now. > Please note that I really am interested in this, even if I seem to have > some trouble finding the time to work with it! > > -- > Garance Alistair Drosehn = gad at gilead.netel.rpi.edu > Senior Systems Programmer or gad at FreeBSD.org > Rensselaer Polytechnic Institute; Troy, NY; USA > > _______________________________________________ > Cfruby-general mailing list > Cfruby-general at rubyforge.org > http://rubyforge.org/mailman/listinfo/cfruby-general -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDcGvRKaTTNeXBMakRAuRSAJ9w5UaK4PTZC5fNFpY4QsUvP3z1MwCeIzqc DjgAFw97NQ3+1x4ELsuo5qo= =J9YL -----END PGP SIGNATURE----- From david at grayskies.net Tue Nov 8 13:36:02 2005 From: david at grayskies.net (David Powers) Date: Tue, 08 Nov 2005 13:36:02 -0500 Subject: [Cfruby-general] Just starting out... In-Reply-To: <97880ae0511071701k6ddb6d7t3af4e8300203c834@mail.gmail.com> References: <97880ae0510251709y15e9a379wcf0f97ede7b09e20@mail.gmail.com> <435F5B27.8010600@grayskies.net> <97880ae0511071701k6ddb6d7t3af4e8300203c834@mail.gmail.com> Message-ID: <4370F012.7050301@grayskies.net> I'll try to address everything brought up in here in some sort of order. ;) We suffer from a manpower issue and a feedback issue on these. There is, as you have seen, some available documentation, but it hasn't really been brought into a single cohesive whole (either in style, or substance). Currently the most complete work is probably the libcfruby manual linked on the site, but it is hardly the whole story. In terms of finding a starting place, the thing to remember is that cfruby is a core library with a number of different access methods that map to different purposes - which can be confusing. I would choose just one (cfyaml or cfenjin most likely) and start doing something with that. It should give you a feel for what the libraries are capable of without overwhelming you with the whole. Out goal is obviously to improve the documentation and provide a more cohesive overview as we have time and get more concrete feedback from people about what does and does not work. The web page is built on a wiki - but only really to make it simple for us to make changes. Eventually this will be hidden from the end user, and following that we may provide a general "real" wiki for end users to play with. If you can, tell me a little about the programs you are trying to replace (mergemaster I know, package I don't) and hopefully I can bounce some ideas off of you. Without background I'm having trouble putting your comments about cfyaml being wordy into context. Naming in conversations - the whole thing is called cfruby, and I suggest you call it that when talking about it to avoid confusion. Cfenjin is just one of many tools in the whole package. -David Garance A Drosehn wrote: > On 10/25/05, Garance A Drosehn wrote: > >> Here at RPI we are interested in doing something new with >> our system-configuration setup. We could either make some >> improvements to a C program that we've been using for ten >> years, or I could rewrite it. I've seen the original cfengine in >> the past, and frankly I didn't like it much. But if I were to write >> some new tool, I would do it in ruby, so I figured it would be >> smart to look around to see what else is already available. >> Cfruby looks pretty promising, so here I am. >> >> This is my first foray into a rubyforge project, or gems. I have >> figured out enough to get cfruby installed and to skim through >> some of the documentation, but it'll probably be a little longer >> before I have any intelligent questions to ask... >> > > Well, so far I've been having some problems just getting the time > to work on this. So, for now I'll have to stick with making a few > dumb comments. > > > From what little I've looked at, I'm not sure how to get started with > cfenjin. I have the feeling that I'm missing something. The "manual" > web page at: > > http://cfruby.grayskies.net/documentation/cfenjin/ > > seems very sparse (and seems to have some formatting mark-up that > makes me think it is copied out of some Wiki). And the main page at > > http://cfruby.grayskies.net:2500/cfruby/published/HomePage > > implies that I'm looking at some kind of Wiki (since the page claims > it is running on Instiki), but I don't see the Wiki-ness of it... And > that home page just points me to the above web page for the manual, > which as I said isn't all that helpful to me. > > And the reference it points to is apparently just a listing of all > the source files, classes and methods which implement cfenjin. I > can see where that would be useful, but it's not useful when it comes > to writing up an initial attempt at a configuration file. > - - - - > Looking at that page, I have a impression that cfenjin isn't going > to be quite what we're looking for, but I'm still thinking that the > work in libcfruby will be very useful. The writeup at > > http://cfruby.grayskies.net/documentation/libcfruby/manual.html > > does seem reasonably helpful, but I haven't had the time to really > try out anything yet. Maybe cfyaml would be reasonable, but that > looks a lot wordier than I wanted to get into (compared to 'package'). > Also note that I want to end up with something that sysadmins can > use without having to know ruby itself. So some of the comments > about cfenjin which say "this syntax is a mix of regular cfengine > and ruby!" makes me rather uneasy. > > I've got two vague projects in mind. One is to rewrite a program > called 'package' which we have used here at RPI for many years, the > original version of which came with AFS. > > The other, totally unrelated idea would be to have a new 'mergemaster' > script for FreeBSD. But I'm not as likely to get around to that one. > > - - - - > And for a really dumb comment: It would be nice if it had a name which > worked better in conversation... I was trying to discuss this in a > weekly meeting here, and people were constantly getting confused between > the standard 'cfengine', and this 'cfenjin'. Sure, 'cfenjin' is a cute > name when reading it, but it is rather confusing in conversation. Or > should I be pronouncing it in some distinctive way? I ended up referring > to it as "cfengine with a J" in the meeting just to avoid confusion! > > As for an alternate, maybe 'cfrengine', 'cfrenjin' or 'cfenjineer'. > > - - - - > well, speaking of not having any time, I have to run to a meeting now. > Please note that I really am interested in this, even if I seem to have > some trouble finding the time to work with it! > > -- > Garance Alistair Drosehn = gad at gilead.netel.rpi.edu > Senior Systems Programmer or gad at FreeBSD.org > Rensselaer Polytechnic Institute; Troy, NY; USA > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/cfruby-general/attachments/20051108/2aee12ca/attachment.htm From pjotr at pckassa.com Wed Nov 9 02:24:36 2005 From: pjotr at pckassa.com (Pjotr Prins) Date: Wed, 9 Nov 2005 08:24:36 +0100 Subject: [Cfruby-general] Just starting out... In-Reply-To: <4370F012.7050301@grayskies.net> References: <97880ae0510251709y15e9a379wcf0f97ede7b09e20@mail.gmail.com> <435F5B27.8010600@grayskies.net> <97880ae0511071701k6ddb6d7t3af4e8300203c834@mail.gmail.com> <4370F012.7050301@grayskies.net> Message-ID: <20051109072436.GB28548@tm2.nmi-agro.nl> On Tue, Nov 08, 2005 at 01:36:02PM -0500, David Powers wrote: > We suffer from a manpower issue and a feedback issue on these. There > is, as you have seen, some available documentation, but it hasn't really Uhm. Maybe it is more accurate to state that we do have the man power, but so far prioritised on getting a robust and stable system with all the required features. That was what we went public with. The documentation needs to be adressed. Though with Cfenjin you have the benefit of existing GNU Cfengine documentation. Switching is pretty straightforward. Putting most of the docs straight on Cfenjin is a 2-3 day job. I will do it before X-mas. I am in no hurry, I believe we have a great system and it is of great use to myself. We manage a cluster and a great number of servers and workstations with relative ease. It is also easy to adapt for those who dig under the surface. That is the whole point of the Cfruby exercise. Pj. From pjotr at pckassa.com Sun Nov 13 04:57:03 2005 From: pjotr at pckassa.com (Pjotr Prins) Date: Sun, 13 Nov 2005 10:57:03 +0100 Subject: [Cfruby-general] Just starting out... In-Reply-To: <97880ae0511071701k6ddb6d7t3af4e8300203c834@mail.gmail.com> References: <97880ae0510251709y15e9a379wcf0f97ede7b09e20@mail.gmail.com> <435F5B27.8010600@grayskies.net> <97880ae0511071701k6ddb6d7t3af4e8300203c834@mail.gmail.com> Message-ID: <20051113095703.GA29288@tm2.nmi-agro.nl> Here I have an example where I mix in Ruby when the standard scripting language is not powerful enough. A procmailrc file gets copied to all user directories, setting the user's permissions. Note the mixing of cfenjin scripting with library calls. Now iterating users could be useful in the scripting language itself. Anyone suggestions for a syntax? (as Cfengine has no such feature). Maybe something like: copy: userlist.each { | user | @master_procmailrc dest='/usr/data/homes/'+user m=444 o=user backup=false end Anyway, the following works now: # Configure the vacation system through procmailrc control: vacation:: # All users get a procmailrc file Dir.entries('/usr/data/homes').each do | user | if user !~ /^\./ and File.directory?(user) begin userhome = '/user/data/homes/'+user Parser.new.copy "#{$masterfiles}/user_procmailrc dest='#{userhome}/.procmailrc' m=444 o=#{user} backup=false" rescue Cfruby::Users::NoSuchUserError end end end copy: vacation:: $masterfiles+'/vacation_wrapper' dest=/usr/local/bin/vacation_wrapper m=555