FAQ
Hi,

I want to manage some configuration files (let's say my.cnf) using Puppet.
I want to keep that file in some version control repository and developers
will have access to it. Once they change it, Puppet should pull it, put it
in place on server and restart service.

Is there any general guide what is the best practice how to achieve this ?

Thanks...

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

Search Discussions

  • Brian Lalor at May 24, 2013 at 10:11 am

    On May 24, 2013, at 4:12 AM, dusan.dordevic@clavistechnology.com wrote:

    I want to manage some configuration files (let's say my.cnf) using Puppet. I want to keep that file in some version control repository and developers will have access to it. Once they change it, Puppet should pull it, put it in place on server and restart service.

    Is there any general guide what is the best practice how to achieve this ?

    I'm not sure that's really a best practice, but it does come in handy from time to time. There's a module for that: vcsrepo.

    --
    Brian Lalor
    blalor@bravo5.org


    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dusan Dordevic at May 24, 2013 at 10:14 am
    Hi,

    Yes, I know about vcsrepo module and that part is not a problem. It is
    fairly easy to set it up and pull release from repository.

    My problem is following, if I want to manage /etc/mysql/my.cnf and other
    config files, that means I would need to make repository in / which I am
    not really happy with. Mercurial that we are using do not support
    relocating files, so I cannot check out my.cnf from somewhere else and
    place it to /etc/mysql/. Only thing that comes to mi mind is to check out
    repo somewhere else and then create a copy of file.

    Is there any better method ?

    Best regards,
    Dušan

    On Fri, May 24, 2013 at 11:10 AM, Brian Lalor wrote:

    On May 24, 2013, at 4:12 AM, dusan.dordevic@clavistechnology.com wrote:

    I want to manage some configuration files (let's say my.cnf) using Puppet.
    I want to keep that file in some version control repository and developers
    will have access to it. Once they change it, Puppet should pull it, put it
    in place on server and restart service.

    Is there any general guide what is the best practice how to achieve this ?


    I'm not sure that's really a best practice, but it does come in handy from
    time to time. There's a module for that: vcsrepo<https://forge.puppetlabs.com/puppetlabs/vcsrepo>
    .

    --
    Brian Lalor
    blalor@bravo5.org


    --
    You received this message because you are subscribed to a topic in the
    Google Groups "Puppet Users" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/puppet-users/e3YJSINkNPc/unsubscribe?hl=en
    .
    To unsubscribe from this group and all its topics, send an email to
    puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Brian Lalor at May 24, 2013 at 10:20 am

    On May 24, 2013, at 6:14 AM, Dusan Dordevic wrote:

    My problem is following, if I want to manage /etc/mysql/my.cnf and other config files, that means I would need to make repository in / which I am not really happy with. Mercurial that we are using do not support relocating files, so I cannot check out my.cnf from somewhere else and place it to /etc/mysql/. Only thing that comes to mi mind is to check out repo somewhere else and then create a copy of file.

    This is the approach that I'm taking. It works very well; have vcsrepo manage the repository, then use a file resource to ensure that a target file is kept in sync with the one checked out from the remote repo. Make the file resource require the vcsrepo resource. Then you can notify MySQL to restart when its config file changes.

    --
    Brian Lalor
    blalor@bravo5.org


    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dusan Dordevic at May 24, 2013 at 10:30 am
    Thanks for feedback once more. I will try it as well then...

    Best regards,
    Dušan

    On Fri, May 24, 2013 at 11:20 AM, Brian Lalor wrote:

    On May 24, 2013, at 6:14 AM, Dusan Dordevic <
    dusan.dordevic@clavistechnology.com> wrote:

    My problem is following, if I want to manage /etc/mysql/my.cnf and other
    config files, that means I would need to make repository in / which I am
    not really happy with. Mercurial that we are using do not support
    relocating files, so I cannot check out my.cnf from somewhere else and
    place it to /etc/mysql/. Only thing that comes to mi mind is to check out
    repo somewhere else and then create a copy of file.


    This is the approach that I'm taking. It works very well; have vcsrepo
    manage the repository, then use a file resource to ensure that a target
    file is kept in sync with the one checked out from the remote repo. Make
    the file resource require the vcsrepo resource. Then you can notify MySQL
    to restart when its config file changes.

    --
    Brian Lalor
    blalor@bravo5.org


    --
    You received this message because you are subscribed to a topic in the
    Google Groups "Puppet Users" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/puppet-users/e3YJSINkNPc/unsubscribe?hl=en
    .
    To unsubscribe from this group and all its topics, send an email to
    puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Kodiak Firesmith at May 24, 2013 at 11:54 am
    Hello,
    We are doing something similar to manage our entire Puppet hierarchy with
    Subversion. Essentially we make changes 'go live' in Puppet by using
    post-hooks that copy the modified files into the normal puppet areas upon
    committing.

    We use svnserve with GSSAPI auth and sub-repository level ACLs to delegate
    access to host & service owners or groups.

    We cobbled this together during the Puppet 2.6 era and have used it since -
    I'm not sure if new functionality has been integrated with Puppet or Puppet
    Enterprise to do version control since then.

    Now that we have everything set up just right we love it for the most part.
    On Friday, May 24, 2013 6:30:11 AM UTC-4, Dusan Dordevic wrote:

    Thanks for feedback once more. I will try it as well then...

    Best regards,
    Dušan


    On Fri, May 24, 2013 at 11:20 AM, Brian Lalor <bla...@bravo5.org<javascript:>
    wrote:
    On May 24, 2013, at 6:14 AM, Dusan Dordevic <
    dusan.d...@clavistechnology.com <javascript:>> wrote:

    My problem is following, if I want to manage /etc/mysql/my.cnf and other
    config files, that means I would need to make repository in / which I am
    not really happy with. Mercurial that we are using do not support
    relocating files, so I cannot check out my.cnf from somewhere else and
    place it to /etc/mysql/. Only thing that comes to mi mind is to check out
    repo somewhere else and then create a copy of file.


    This is the approach that I'm taking. It works very well; have vcsrepo
    manage the repository, then use a file resource to ensure that a target
    file is kept in sync with the one checked out from the remote repo. Make
    the file resource require the vcsrepo resource. Then you can notify MySQL
    to restart when its config file changes.

    --
    Brian Lalor
    bla...@bravo5.org <javascript:>


    --
    You received this message because you are subscribed to a topic in the
    Google Groups "Puppet Users" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/puppet-users/e3YJSINkNPc/unsubscribe?hl=en
    .
    To unsubscribe from this group and all its topics, send an email to
    puppet-users...@googlegroups.com <javascript:>.
    To post to this group, send email to puppet...@googlegroups.com<javascript:>
    .
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Maik Kulbe at May 24, 2013 at 11:37 am
    You could create a puppet module and clone the repo into a subirectory of
    the files-dir of that module. Then you create a cronjob(on the puppet
    master) that pulls the repo every n minutes.
    Then you can use this file now in a puppet manifest. But I would highly
    recommend to add some kind of automated testing(like some continous
    integration environment) before pulling so you don't pull bad/broken files.

    On Friday, May 24, 2013 10:12:22 AM UTC+2, dusan.d...@clavistechnology.com
    wrote:
    Hi,

    I want to manage some configuration files (let's say my.cnf) using Puppet.
    I want to keep that file in some version control repository and developers
    will have access to it. Once they change it, Puppet should pull it, put it
    in place on server and restart service.

    Is there any general guide what is the best practice how to achieve this ?

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 24, '13 at 8:12a
activeMay 24, '13 at 11:54a
posts7
users4
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase