about feature #184 (use svn as source)

28 views
Skip to first unread message

Marc Fournier

unread,
May 9, 2009, 5:27:47 AM5/9/09
to puppet-dev
Hello,

I would find very useful to be able to have more than file:// and puppet://
as sources for file/directory content management. http:// for instance.
git:// and svn:// would be nice too.

As mentioned in #184, FileSources classes should be used. But this appears
to have been obsoleted long time ago.

Furthermore, Luke mentioned even earlier (in lib/puppet/type/file.rb): "As
Puppet matures, it expected that the ``file`` resource will be used less
and less to manage content, and instead native resources will be used to do
so."

Any thoughts on the way to go with this ?

Marc

Luke Kanies

unread,
May 11, 2009, 6:09:11 PM5/11/09
to puppe...@googlegroups.com

Short answer: This is now much easier but still not done.

Long answer:

With the impending release of 0.25, this will finally become largely
possible (that is, file serving is pluggable, but I haven't tested
external plugins with it).

Basically, (in the master branch), look in the lib/puppet/indirector/
file_content and .../file_metadata directories. Fileserving is two
pieces: Retrieving the metadata (owner/mode/group/checksum), and
retrieving the content. You just need to make svn/etc plugins, one
for each type. Your plugins mus interact with the backend and produce
a FileContent instance or a FileMetadata instance, which *should* be
straightforward.

I expect it's not entirely that easy, of course. I just checked the
file's source parameter and it checks that you're using file or
puppet, so that'll have to be fixed. And the file_serving/
indirection_hooks.rb module has a method that'll need to be updated.
Preferably, it would be dynamic, but for now it requires that all
supported protocol types be registered in a constant.

--
I worry that the person who thought up Muzak may be thinking up
something else. -- Lily Tomlin
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

Reply all
Reply to author
Forward
0 new messages