The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Feature #2835

support subversion URI for file source

Added by Jason Antman over 4 years ago. Updated 4 months ago.

Status:AcceptedStart date:11/18/2009
Priority:LowDue date:
Assignee:-% Done:

0%

Category:fileserving
Target version:-
Affected Puppet version:0.25.1 Branch:
Keywords:subversion git file server VCS serving backend

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket is now tracked at: https://tickets.puppetlabs.com/browse/PUP-1083


Description

I know this is pretty pie-in-the-sky right now, but I thought I’d at leas submit it and see what you guys think – whether you want to push it back to “unplanned” target or just kill it. If I ever manage to really learn Ruby, I’ll see what I can do.

It would be wonderful if the Puppet file resources could understand keeping files/directories in sync with SVN repositories. My thought was to support a source URI like: svn://svn.example.com/repo/file or svn://svn.example.com/repo/

The problem is thus: I’ve moved almost totally to Puppet (via kickstart) for build, installation, and configuration. However, at least with web servers, I still have to check the web root directory out of SVN to get the machine up and running. As most of these are single hosts (i.e. only one box serving one set of content) it’s not particularly practical to export everything via NFS. It would be absolutely wonderful if I could tell puppet to keep /var/www/html in sync with a specified subversion repository.

Granted, I know this would require a bit of heavy lifting on the puppet client side (I hope there are Ruby subversion libs?)

The only other issue that comes to mind is how to handle the URI – assuming the repository is being served by WebDAV, it should really be a http:// URI, but then how would Puppet know that it should be checking out from subversion?

Just some food for thought…


Related issues

Related to Puppet - Feature #184: Allow file type to use svn as source Rejected

History

#1 Updated by James Turnbull over 4 years ago

  • Category set to fileserving
  • Status changed from Unreviewed to Accepted
  • Target version set to 4
  • Keywords changed from subversion to subversion git file server VCS serving backend

This should be easier now – the other options include other VCSs like Git.

#2 Updated by Trevor Hemsley over 4 years ago

Even better if this can take an ‘ensure => 25721’ parameter and treat it as the SVN revision number to checkout!

#3 Updated by Dan Hanks almost 4 years ago

I’d love to see this feature as well—particularly being able to specify a revision number.

#4 Updated by Roberto Bouza almost 3 years ago

Great feature to have. I want to do something similar and have to use execs to get around it.

Thank you.

#5 Updated by Marc Fournier almost 3 years ago

Meanwhile someone implemented the equivalent of this in the “vcsrepo” type: https://github.com/puppetlabs/puppet-vcsrepo

It provides “ensure => latest”, “ensure => 12345” and supports svn, cvs, git, bzr and hg.

The idea of having this sort of stuff in external modules seem better. Else the same feature request could be opened for http/ssh/torrent/etc URIs, and the “file” type would become a maintenance nightmare.

I suggest to close or reject this bugreport.

#6 Updated by Jason Antman almost 3 years ago

I haven’t looked into the vcsrepo in depth, but that really doesn’t seem to solve the problem (at least that I have):

1) The VCS repo layout doesn’t necessarily mirror the filesystem layout 2) At least for SVN, that doesn’t seem to have a way to work with anything more granular than a full repo 3) I don’t see a way to manage permissions and ownership

#7 Updated by Nigel Kersten almost 3 years ago

For what it’s worth, we’re not planning for the core dev team to work on this any time soon, so this functionality would have to come from the wider community.

You can combine the vcsrepo type with a recursive file type to manage permissions like this:


  Vcsrepo { ensure => present, provider => "git", }

  $repo_root = "/home/nigel/src"

  file { "${repo_root}":
    ensure => directory,
    mode   => 0755,
    owner  => nigel,
    group  => nigel,
  }


  vcsrepo { "${repo_root}/facter":
    source   => "git://github.com/puppetlabs/facter.git",
  }

  file { "${repo_root}/facter":
    owner   => nigel,
    recurse => true,
  }

#8 Updated by James Turnbull over 2 years ago

  • Target version deleted (4)

#9 Updated by Jason Antman 7 months ago

I say close this. We’ve got the vcsrepo module now, staging, and a number of other, better ways to do this. I don’t think it’s any longer suitable to be in the core.

#10 Updated by Jason Antman 4 months ago

Redmine Issue #2835 has been migrated to JIRA:

https://tickets.puppetlabs.com/browse/PUP-1083

Also available in: Atom PDF