= omgdav - Rack app for exposing MogileFS via WebDAV omgdav exposes an existing MogileFS domain over WebDAV. There is absolutely no commitment or modification needed to your existing MogileFS installation to try omgdav in read-only mode. omgdav uses its own database and can import key listings from with an existing MogileFS domain. omgdav (barely :P) meets class 1 WebDAV compliance according to litmus[1]. Class 2 compliance is planned. *** WARNING *** --------------- Locking of any type is not yet implemented. Thus: 1) Do not attempt concurrent invocations of COPY/MOVE commands. 2) Do not use PUT or DELETE while a COPY or MOVE command is running. If you are using fusedav, rmdir will remove directories due to the way DELETE works on both collections and files. Read-only operation is currently the safest way to use omgdav. Features -------- * Allows read-only access to existing MogileFS data with a WebDAV client. * Infers WebDAV collections based on existing MogileFS keys which look like path names (e.g. "/parts/separated/by/slashes"). * Implemented for Rack, so it is compatible with existing middlewares (for authentication, logging, etc...) and Rack web servers. Requirements ------------ * an existing MogileFS instance * Ruby 1.9.3 or later (any Ruby implementation compatible with C extensions) * a Free, Unix-like operating system (GNU/Linux preferred) * a Free database supported by Sequel[2] Install (via RubyGems) ---------------------- gem install omgdav Usage ----- 1. Setup your database: # You may substitute the sqlite:/// database for any other # Free database type Sequel supports. Be sure to have the # appropriate database driver installed (e.g. "sqlite3"). omgdav-setup sqlite://test.sqlite omgdav-setup runs idempotently. It will automatically upgrade your schema as new versions of omgdav may require database updates 2. Sync metadata from your existing MogileFS domain: omgdav-sync -t $TRACKER_HOST_PORT -d $DOMAIN sqlite://test.sqlite omgdav-sync runs idempotently. It may be used to resync changes to the omgdav database if keys are added/removed from MogileFS. 3. Configure your rackup config file, below is an example config.ru: ------------------------------------- 8<------------------------------------ require "omgdav/app" # replace hosts: and domain: with values suitable for your cluster mogc = MogileFS::MogileFS.new(hosts: %w(127.0.0.1:7001), domain: "test") db = Sequel.connect("sqlite://test.sqlite") # for the brave: :ro ("read-only") may be swapped for :rw ("read-write") # :worm is also supported ("write-once, read-many") run OMGDAV::App.new(db, mogc, methods: :ro) ------------------------------------- 8<------------------------------------ 4. Start your Rack HTTP server and point your WebDAV client at it. rackup -s webrick -p $PORT config.ru Code ---- Source code is available via git: git clone https://bogomips.org/omgdav.git git clone https://repo.or.cz/omgdav.git And viewable with a WWW browser: https://bogomips.org/omgdav.git https://repo.or.cz/w/omgdav.git (gitweb) Contact ------- Bug reports, user/development discussion, patches, pull requests are greatly appreciated via plain-text email. We may also piggy-back onto the public MogileFS mailing list at mailto:mogile@googlegroups.com for feedback. HTML email will be mercilessly rejected. License ------- omgdav is copyrighted Free Software by all contributors, see logs in revision control for names and email addresses of all of them. You can redistribute omgdav and/or modify it under the terms of the GNU Affero General Public License, version 3 or later as published by the Free Software Foundation. omgdav is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with omgdav; if not, see https://www.gnu.org/licenses/agpl.txt fusedav ------- Some testing and use of omgdav is done on fusedav[3]. Since fusedav upstream appears dormant, we have publicized some bug reports and patches on the Debian bug tracker[4]. Our fusedav patches are also available via various branches in our git repository: git clone https://bogomips.org/fusedav.git Links ----- MogileFS - http://mogilefs.org/ omgdav homepage - https://bogomips.org/omgdav/README omgdav Atom feed - https://bogomips.org/omgdav/NEWS.atom.xml References ---------- [1] litmus - http://www.webdav.org/neon/litmus/ [2] Sequel - http://sequel.jeremyevans.net/ [3] fusedav - http://0pointer.de/lennart/projects/fusedav/ [4] fusedav (Debian BTS) - https://bugs.debian.org/fusedav