Hi David,

It sounds like you've done a fair bit of work in that you've written functions to get "puppet apply" to work for you. Have you read much about Puppet modules and native Puppet file serving? Something like this example dns module with a file system layout like:

--------------
/etc/puppet/modules/dns/files/resolv.conf
/etc/puppet/modules/dns/manifests/init.pp
--------------

And a class definition like:

--------------
$ cat /etc/puppet/modules/dns/manifests/init.pp:
class dns {
  file { '/etc/resolv.conf':
    owner => 'root',
    group => 'root',
    source => 'puppet:///modules/${module_name}/resolv.conf',
  }
}
--------------

You can look at serving files from Puppet from an arbitrary directory using fileserve.conf, but a lot of people prefer a more service oriented approach: all your DNS files and puppet config in a dns module, all your Glassfish stuff in a glassfish module, etc.

-Luke

On 15/05/12 14:48, David Campos wrote:
Hello all,

I am sure that many of my questions may be answered in other topics or into the documentation but I can not clear my mind about how to perform some tasks that I want to accomplish.

To get you into context, I have been developing some puppet configuration files that deal with deployment of our company systems and its dependencies. Those environments obviously require an underlying infrastructure (a tomcat, glassfish or oracle) that is installed and provided by puppet. In order to accomplish that we did choose to take advantage of our nexus server to provide our binaries to puppet and use its hierarchy. We developed some ruby functions placed at lib folder that download those files and leave them at a specific location of our machine (we did choose ruby in order to get a platform independent download strategy).

This worked flawlessly when we were working through puppet apply mode (our virtual machines were provided by Virtual Box and Vagrant) since the agent was some kind of server-agent and could perform all actions by itself.

Recently I have been moving forward a puppet master (there are a lot of distribution issues in stand-alone agents) that would serve catalogs and several agents that could be located at either physical or virtual machines (cloud if possible). With this change I have found that, as documentation says, functions are executed at master computer so the files that I need are downloaded at the master... How can I solve this and at the same time not break stand-alone provisioning?

I have been looking at fileserve.conf in order to fix a specific folder (I would have to work out how to set that folder at either Windows and Linux) file serving but I do not know if there is a better solution... Does puppet provide a best practice for this? An automagically mounted file provider (like the one of the folder files at modules).

Thanks.
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ziVnFXzbZ7wJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.


--
Luke Bigum

Information Systems
Ph: +44 (0) 20 3192 2520
luke.bi...@lmax.com | http://www.lmax.com
LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN



FX and CFDs are leveraged products that can result in losses exceeding
your deposit.  They are not suitable for everyone so please ensure you
fully understand the risks involved.  The information in this email is not
directed at residents of the United States of America or any other
jurisdiction where trading in CFDs and/or FX is restricted or prohibited
by local laws or regulations.

The information in this email and any attachment is confidential and is
intended only for the named recipient(s). The email may not be disclosed
or used by any person other than the addressee, nor may it be copied in
any way. If you are not the intended recipient please notify the sender
immediately and delete any copies of this message. Any unauthorised
copying, disclosure or distribution of the material in this e-mail is
strictly forbidden.

LMAX operates a multilateral trading facility. Authorised and regulated by the Financial Services Authority (firm registration number 509778) and is registered in England and Wales (number 06505809). Our registered address is Yellow Building, 1A Nicholas Road, London, W11
4AN.

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to