Hi, I''m new to puppet and trying to get started using it just in local mode. My basic question is: how can i reference a static file within the module (eg in the module''s files/ subdirectory, as described in http://reductivelabs.com/trac/puppet/wiki/ModuleOrganisation). I suppose i could try using a full.absolute path to the file, but that seems to completely defeat the purpose of a module. I overcame my first hurdle - which was getting puppet to find the module at all. I created a puppet.conf containing a modulepath declaration. At this point, even without a fileserver.conf file at all, it seems like puppet knows where my module is and should be able to find its files. Here is my test setup manifests/test.pp: import "testmod" include testmod modules/testmod/manifests/init.pp class testmod { file { "/tmp/hithere.txt": ensure => present, source => "/testmod/hello.txt" } } modules/testmod/files/hello.txt: hello world puppet.conf: modulepath=$confdir/modules:/usr/share/puppet/modules:/home/rich/puppet/modules i run with the command: puppet test.pp and get the output: notice: mount[localhost]: File source /testmod/hello.txt does not exist I have tried numerous variations to no avail. i have been reading the puppet source code to try to understand how it works. From what i gather, here is what is happening: since the source of the file does not use the puppet: protocol, file: is used, and pfile.rb forces @@localfileserver to a fileserver instance whose only mount point is ''/''. in particular, the modulepath is ignored and no configuration is read either. (NOTE: i started playing around with a fileserver.conf but found that the code specifically ignores it anyway) Am i just being stupid here? Can someone explain how to make this work? Better yet, let me explain a bit more about what i really want and maybe someone can suggest a better way :) Basically, i''d like to create some modules that include files to install. So, my thinking is that i will copy them to /tmp, so that i can subsequently refer to them using an absolute path (/tmp/foo.zip, for example) in order to install them. Is there a better way? Oh, and, yes, i expect to eventually move to a client-server model, but prefer the simplicity (or so i thought!) of a completely local setup, especially since at this point i don''t expect to run puppetd daemon on the client(s). also, i''m interested in using this for systems running nginx/mongrel/rails/mysql/monit/munin. i''ve seen puppet recipes for mysql and munin (Thanks!), but if there are recipes available for the other parts that somoene could point me to, i''d be most appreciative. We are early in our development, so puppet is not ''necessary'' yet, but i prefer having a framework in place to build on from the start. thanks rich _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Juri Rischel Jensen
2007-Jun-07 09:59 UTC
Re: can i access module "files" w/o using client-server?
Hi Rich On Jun 7, 2007, at 9:24, Rich Liebling wrote:> also, i''m interested in using this for systems running nginx/ > mongrel/rails/mysql/monit/munin. i''ve seen puppet recipes for > mysql and munin (Thanks!), but if there are recipes available for > the other parts that somoene could point me to, i''d be most > appreciative. We are early in our development, so puppet is not > ''necessary'' yet, but i prefer having a framework in place to build > on from the start.I''ve just added my code stubs for setting up a Rails+Mongrel+Apache2 +Proxybalancer -based railsstack. Feel free to take a look at it and comment back. -- Med venlig hilsen Juri Rischel Jensen Fab:IT ApS Vesterbrogade 50 DK-1620 København Tlf: 70 202 407 / Fax: 33 313 640 www.fab-it.dk / juri@fab-it.dk
Juri Rischel Jensen
2007-Jun-07 09:59 UTC
Re: can i access module "files" w/o using client-server?
On Jun 7, 2007, at 9:24, Rich Liebling wrote:> also, i''m interested in using this for systems running nginx/ > mongrel/rails/mysql/monit/munin. i''ve seen puppet recipes for > mysql and munin (Thanks!), but if there are recipes available for > the other parts that somoene could point me to, i''d be most > appreciative. We are early in our development, so puppet is not > ''necessary'' yet, but i prefer having a framework in place to build > on from the start.Sorry - forgot the URL: http://reductivelabs.com/trac/puppet/wiki/ RailsMongrelApacheProxybalancer -- Med venlig hilsen Juri Rischel Jensen Fab:IT ApS Vesterbrogade 50 DK-1620 København Tlf: 70 202 407 / Fax: 33 313 640 www.fab-it.dk / juri@fab-it.dk
Luke Kanies
2007-Jun-07 15:37 UTC
Re: can i access module "files" w/o using client-server?
On Jun 7, 2007, at 2:24 AM, Rich Liebling wrote:> Hi, > > I''m new to puppet and trying to get started using it just in local > mode. My basic question is: how can i reference a static file > within the module (eg in the module''s files/ subdirectory, as > described in http://reductivelabs.com/trac/puppet/wiki/ > ModuleOrganisation). I suppose i could try using a full.absolute > path to the file, but that seems to completely defeat the purpose > of a module.Indeed.> I overcame my first hurdle - which was getting puppet to find the > module at all. I created a puppet.conf containing a modulepath > declaration. At this point, even without a fileserver.conf file at > all, it seems like puppet knows where my module is and should be > able to find its files.[...]> i run with the command: > puppet test.pp > and get the output: > notice: mount[localhost]: File source /testmod/hello.txt does > not existLooks like maybe there''s a bug using modules to find local files. Filed as a bug.> I have tried numerous variations to no avail. i have been reading > the puppet source code to try to understand how it works. From > what i gather, here is what is happening: > since the source of the file does not use the puppet: protocol, > file: is used, and pfile.rb forces @@localfileserver to a > fileserver instance whose only mount point is ''/''. in particular, > the modulepath is ignored and no configuration is read either. > (NOTE: i started playing around with a fileserver.conf but found > that the code specifically ignores it anyway) > > Am i just being stupid here? Can someone explain how to make this > work? Better yet, let me explain a bit more about what i really > want and maybe someone can suggest a better way :) Basically, i''d > like to create some modules that include files to install. So, my > thinking is that i will copy them to /tmp, so that i can > subsequently refer to them using an absolute path (/tmp/foo.zip, > for example) in order to install them. Is there a better way? > Oh, and, yes, i expect to eventually move to a client-server model, > but prefer the simplicity (or so i thought!) of a completely local > setup, especially since at this point i don''t expect to run puppetd > daemon on the client(s).I guess I haven''t spent much time on the fileserver when used with puppet. Clearly this is an oversight, and I''ve filed #658 (which was discussed a long time ago on the list) to help fix that oversight. -- What happens to the hole when the cheese is gone? -- Bertolt Brecht --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com