Fileserver in standalone mode.

718 views
Skip to first unread message

btimby

unread,
May 24, 2012, 12:37:12 PM5/24/12
to puppet...@googlegroups.com
I am using puppet in standalone mode (puppet apply) to test manifests that I also use in a client/server configuration.

I have everything working as far as files included in modules. I can reference file source as "puppet:///modules/modulename/path/to/file".

However, some files are not part of a module, so for the client/server portion, I just set up a share called files. However, references to these files "puppet://files/path/to/files" don't work in standalone mode.

I understand that standalone mode (puppet apply) command can find the module files because you tell it the path to look in (--modulepath argument). Why is there no argument for adding file shares (--fileserver=files:/path/to/files)? Is there another way to achieve this?

My workaround for now is to simply move the files to a module named files and reference them as "puppet:///modules/files/path/to/file", but it seems like there might be a better solution.

Thanks.

Paul Tötterman

unread,
Nov 23, 2012, 4:01:20 AM11/23/12
to puppet...@googlegroups.com, bti...@gmail.com
My workaround for now is to simply move the files to a module named files and reference them as "puppet:///modules/files/path/to/file", but it seems like there might be a better solution.

I don't know about better, but you can also use file:///... URIs in the source parameter.

Cheers,
Paul 

Brice Figureau

unread,
Nov 23, 2012, 5:34:34 AM11/23/12
to puppet...@googlegroups.com
On Thu, 2012-05-24 at 09:37 -0700, btimby wrote:
> I am using puppet in standalone mode (puppet apply) to test manifests
> that I also use in a client/server configuration.
>
> I have everything working as far as files included in modules. I can
> reference file source as "puppet:///modules/modulename/path/to/file".
>
> However, some files are not part of a module, so for the client/server
> portion, I just set up a share called files. However, references to
> these files "puppet://files/path/to/files" don't work in standalone
> mode.

Because it tries to resolve a host called 'files' as the server where to
get those files.
Have you tried:
puppet:///files/path/to/files
(notice the ///)

> I understand that standalone mode (puppet apply) command can find the
> module files because you tell it the path to look in (--modulepath
> argument). Why is there no argument for adding file shares
> (--fileserver=files:/path/to/files)? Is there another way to achieve
> this?
>
> My workaround for now is to simply move the files to a module named
> files and reference them as "puppet:///modules/files/path/to/file",
> but it seems like there might be a better solution.

You could also setup a puppetmaster only for the purpose of serving
files to your servers, and use:
puppet://fileserver.domain.com/files/path/to/file
kind of url.

It's still masterless for compilation purposes, but uses a master for
file serving.
--
Brice Figureau
Follow the latest Puppet Community evolutions on www.planetpuppet.org!

Ryan Coleman

unread,
Nov 25, 2012, 9:27:10 PM11/25/12
to puppet...@googlegroups.com


On Wed, Nov 21, 2012 at 8:04 AM, Scott Smerchek <scott.s...@gmail.com> wrote:
I'm having this same problem. Is there a solution?

This doc is a bit buried and hard to find but check out serving from custom mount points. That ought to solve your need. http://docs.puppetlabs.com/guides/file_serving.html#serving-files-from-custom-mount-points
Reply all
Reply to author
Forward
0 new messages