• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Build an autoversioning filesystem with Apache2
 

Build an autoversioning filesystem with Apache2

on

  • 2,880 views

 

Statistics

Views

Total Views
2,880
Views on SlideShare
2,880
Embed Views
0

Actions

Likes
2
Downloads
9
Comments
1

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • you failed to mention one critical problem in your slides, one write to the file mounted via davfs2 creates more than one versions in the subversion. this is pretty nasty and can be a deciding factor for choosing a solution.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Build an autoversioning filesystem with Apache2 Build an autoversioning filesystem with Apache2 Presentation Transcript

    • Build a Versioning File Systemusing WebDAV and Subversion BCN Sudoers javier@rodriguez.org.mx 20120103 http://slideshare.net/codehead
    • WebDAV● RFC4918: HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)● http://www.webdav.org/
    • WEBDAV METHODS WebDAV Methods● PROPFIND● PROPPATCH● MKCOL● COPY● MOVE● LOCK● UNLOCK
    • ● the B WHATS Windows IG DE AL May use HTTP or HTTPS as transport layer ? ● Use existing infrastructure● Binary transparent● Can be used as a remote filesystem
    • Apache httpdWeb Browser HTTP filesystem
    • Apache httpdWebDAV Client WebDAV HTTP filesystem
    • Windows ENTS AV CLI WEBD● Mount as a filesystem ● FTP-like interface
    • Windows S WINDOW● Native “Web Folders” ● MS Office (Mostly broken) ● Bit Kinex● Xythos Drive ● CyberDuck ● WebDrive $ ● GoodSync $
    • MAC Mac● Native Finder ● iWork● MacFUSE ● CyberDuck
    • Linux LINUX● davfs2 ● KDE konqueror● fusedav ● KDE dolphin ● Gnome Nautilus ● cadaver
    • Re c ipe 1 SubversionWebDAV server using Apache2
    • In Dependencies s gredient● Mandatory ● apache2-mpm-prefork● Optional ● libapache2-mod-auth-*
    • Hello, mod-ssl<VirtualHost _default_:443> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined SSLEngine on SSLCertificateFile /etc/ssl/certs/webdav.pem SSLCertificateKeyFile /etc/ssl/private/webdav.key BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown</VirtualHost>
    • Enable webd av# a2enmod ssl dav_svn dav_fs# mkdir /var/lib/webdav# chown -R www-data.www-data /var/lib/webdav Alias /webdav/ /var/lib/webdav/ <Location /webdav> DAV On AuthBasicProvider file AuthType Basic AuthUserFile htpasswd AuthName "WebDAV" require valid-user Options +Indexes DirectoryIndex </Location>
    • Enable webd av# a2enmod ssl dav_svn dav_fs# mkdir /var/lib/webdav# chown -R www-data.www-data /var/lib/webdav Alias /webdav/ /var/lib/webdav/ <Location /webdav> Specify a real path DAV On AuthBasicProvider file AuthType Basic AuthUserFile htpasswd AuthName "WebDAV" require valid-user Options +Indexes DirectoryIndex </Location>
    • Enable webd av# a2enmod ssl dav_svn dav_fs# mkdir /var/lib/webdav# chown -R www-data.www-data /var/lib/webdav Alias /webdav/ /var/lib/webdav/ <Location /webdav> DAV On AuthBasicProvider file Turn DAV on AuthType Basic AuthUserFile htpasswd AuthName "WebDAV" require valid-user Options +Indexes DirectoryIndex </Location>
    • Enable webd av# a2enmod ssl dav_svn dav_fs# mkdir /var/lib/webdav# chown -R www-data.www-data /var/lib/webdav Alias /webdav/ /var/lib/webdav/ <Location /webdav> DAV On AuthBasicProvider file AuthType Basic Season to taste AuthUserFile htpasswd AuthName "WebDAV" require valid-user Options +Indexes DirectoryIndex </Location>
    • TEST webdav
    • TEST webdav Apache httpd Web Browser HTTP filesystem# curl --insecure --user testuser https://sandbox.ascii164.com/webdav/
    • TEST webdav Apache httpd WebDAV Client WebDAV HTTP filesystem# mkdir /mnt/dav# mount -t davfs https://sandbox.ascii164.com/webdav/ /mnt/dav# mount# ls /mnt/dav
    • Subversionn v ersio sub● Delta-V WebDAV Versioning Extension (RFC3253)● CollabNet → Apache Software Foundation● http://subversion.apache.org/
    • RECIPE Subversion 2svn server using Apache2
    • Dependenciests re dien Ing● Mandatory ● apache2-mpm-prefork ● libapache2-svn ● subversion● Optional ● libapache2-mod-dnssd ● libapache2-mod-auth-*
    • Enable SUBV ERSION# mkdir /var/lib/svn# svnadmin create /var/lib/svn/repo# chown -R www-data.www-data /var/lib/svn <Location /svn> DAV svn SVNParentPath /var/lib/svn AuthBasicProvider file AuthType Basic AuthUserFile htpasswd AuthName "Subversion" require valid-user Options +Indexes DirectoryIndex </Location>
    • Enable SUBV ERSION# mkdir /var/lib/svn# svnadmin create /var/lib/svn/repo# chown -R www-data.www-data /var/lib/svn <Location /svn> DAV svn Virtual Path SVNParentPath /var/lib/svn AuthBasicProvider file AuthType Basic AuthUserFile htpasswd AuthName "Subversion" require valid-user Options +Indexes DirectoryIndex </Location>
    • Enable SUBV ERSION# mkdir /var/lib/svn# svnadmin create /var/lib/svn/repo# chown -R www-data.www-data /var/lib/svn <Location /svn> DAV svn SVNParentPath /var/lib/svnFile System svn DAV AuthBasicProvider file AuthType Basic AuthUserFile htpasswd AuthName "Subversion" require valid-user Options +Indexes DirectoryIndex </Location>
    • Enable SUBV ERSION# mkdir /var/lib/svn# svnadmin create /var/lib/svn/repo# chown -R www-data.www-data /var/lib/svn <Location /svn> DAV svn SVNParentPath /var/lib/svn Repo Root AuthBasicProvider file (Use SVNPath AuthType Basic for a single repo) AuthUserFile htpasswd AuthName "Subversion" require valid-user Options +Indexes DirectoryIndex </Location>
    • TES T SUBVERSION
    • TES T SUBVERSION SVN Client Delta-V Apache httpd WebDAV HTTP libsvn filesystem# svn mkdir https://sandbox.ascii164.com/svn/repo/trunk/ https://sandbox.ascii164.com/svn/repo/tags/ https://sandbox.ascii164.com/svn/repo/branches/# svn ls https://sandbox.ascii164.com/svn/repo/
    • TES T SUBVERSION Delta-V Apache httpd WebDAV Web Browser HTTP libsvn filesystem# curl --insecure --user testuser https://sandbox.ascii164.com/svn/repo/
    • v ersi oning vs backup
    • WHENshould I create a new version ?
    • Subversion ipe 3 Recautoversioning filesystem
    • Enable auto versioning# mkdir /var/lib/svn# svnadmin create /var/lib/svn/documents# chown -R www-data.www-data /var/lib/svn <Location /documents> DAV svn SVNPath /var/lib/svn/documents SVNAutoVersioning on ModMimeUsePathInfo on AuthBasicProvider file AuthType Basic AuthUserFile htpasswd AuthName "Documents" require valid-user Options +Indexes DirectoryIndex </Location>
    • EST autov ersioning T Delta-V Apache httpd WebDAV Client WebDAV HTTP libsvn filesystem# mkdir /mnt/docs# mount -t davfs https://sandbox.ascii164.com/documents/ /mnt/docs# mount# ls /mnt/docs
    • EST autov ersioning T SVN Client Delta-V Apache httpd WebDAV HTTP libsvn filesystem# svn ls https://sandbox.ascii164.com/documents/
    • MORE RESOUR Further ResourcesS CE● http://svnbook.red-bean.com/
    • CO ME W EL STI ONS Q UEALL
    • BCN S udoersjavier@rodriguez.org.mx @codehead
    • SVN Client Delta-V Apache httpd WebDAV HTTP libsvn filesystem
    • <Location /svn> DAV svn SVNParentPath /var/lib/svn AuthBasicProvider ldap AuthzLDAPAuthoritative off AuthType Basic AuthName "Document Repository" AuthLDAPURL ldap://localhost/ou=Users,dc=company,dc=com?uid?sub? require valid-user</Location>
    • SVN Client Delta-V Apache httpdWebDAV Client WebDAVWeb Browser HTTP libsvn filesystem
    • svn ls https://sandbox.company.com/svn/repo/
    • SVN Client Delta-VWebDAV Client WebDAV ApacheWeb Browser HTTP libsvn filesystem
    • curl https://sandbox.company.com/svn/repo/
    • ersioningAutov
    • SVN Client Delta-VWebDAV Client WebDAV ApacheWeb Browser HTTP libsvn filesystem
    • <Location /documents> DAV svn SVNPath /var/lib/svn/docrepo SVNAutoVersioning on ModMimeUsePathInfo on AuthBasicProvider ldap AuthzLDAPAuthoritative off AuthType Basic AuthName "Document Repository" AuthLDAPURL ldap://localhost/ou=Users,dc=company,dc=com?uid?sub? require valid-user</Location>
    • Client Software