FAQ
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Luke Bigum at May 15, 2012 at 2:30 pm
    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+unsubscribe@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.bigum@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+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • David Campos at May 15, 2012 at 2:56 pm
    I knew about that features. When a file is placed a files and referenced
    through puppet:///<module>/<file> is automatically served to the agent.
    Either through puppet master or apply.

    My problem came because we have a Nexus server that serves any external
    file (we also try to store there our supported versions of third party
    applications and software) and a Jenkins server that performs incremental
    builds of our software. When I want to mix that together in order to get an
    environment (either for dry-run, production, or testing purposes) I need
    to: download my infrastructure from Nexus (or wget the correct files),
    install if necessary, get the latest version from my module at Jenkins,
    deploy.

    The first portion of work could be moved to files but I do not find it a
    good practice to version it (remember that I was using a standalone puppet
    installation before master) and would be hard to change versions through
    environments (Nexus allows that, since is just a proxy). The second part,
    download from Jenkins, is not possible since the new build has just come
    out from the oven.

    That's why I did choose a method to download them from an external http
    resource and not from static file serve. Does puppet provide a tool for it?
    Should I stick with the fixed files folder, fileserve.conf and so?

    --
    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/-/4a1bfb6N7LMJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • David Campos at May 21, 2012 at 4:58 pm
    To solve this I changed the way that I used to retrieve artifacts. Since
    now, server is the one that executes the functions and it is the function
    the one that download files from network I did automount a folder (at
    puppet libdir) that would be the one that stores all files and serves them
    to my agents.

    The code that download artifacts from Nexus does not redownload if the
    artifact is already downloaded so the overhead from Nexus artifacts would
    be small and the master has to download the file only once (this is a plus
    from the agent downloading files architecture). The problem is that files
    from Jenkins should be downloaded ALWAYS (there may be always a new file
    with changes) and this may cause a big overhead if too many projects
    request catalog compilation (also there is a downside of too many of the
    'same' node asking the same file). Clearly I do not like this because now,
    it is the master that has the biggest work retrieving files...

    Anyone with a better puppet background than mine could show me a better way
    to deal with third party files? Keep in mind that the only 'static' files
    are the ones from Nexus and not the ones from Jenkins.

    Thanks,
    On Tuesday, May 15, 2012 4:56:11 PM UTC+2, David Campos wrote:

    I knew about that features. When a file is placed a files and referenced
    through puppet:///<module>/<file> is automatically served to the agent.
    Either through puppet master or apply.

    My problem came because we have a Nexus server that serves any external
    file (we also try to store there our supported versions of third party
    applications and software) and a Jenkins server that performs incremental
    builds of our software. When I want to mix that together in order to get an
    environment (either for dry-run, production, or testing purposes) I need
    to: download my infrastructure from Nexus (or wget the correct files),
    install if necessary, get the latest version from my module at Jenkins,
    deploy.

    The first portion of work could be moved to files but I do not find it a
    good practice to version it (remember that I was using a standalone puppet
    installation before master) and would be hard to change versions through
    environments (Nexus allows that, since is just a proxy). The second part,
    download from Jenkins, is not possible since the new build has just come
    out from the oven.

    That's why I did choose a method to download them from an external http
    resource and not from static file serve. Does puppet provide a tool for it?
    Should I stick with the fixed files folder, fileserve.conf and so?
    --
    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/-/nf9cejD3yLQJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 15, '12 at 1:48p
activeMay 21, '12 at 4:58p
posts4
users2
websitepuppetlabs.com

2 users in discussion

David Campos: 3 posts Luke Bigum: 1 post

People

Translate

site design / logo © 2022 Grokbase