Skip to content

Commit

Permalink
Merge pull request #67 from dandi/gh-66
Browse files Browse the repository at this point in the history
Add benchmarking of various mounting strategies
  • Loading branch information
yarikoptic authored Jun 11, 2024
2 parents fd1b53f + e331c4c commit c51d691
Show file tree
Hide file tree
Showing 10 changed files with 746 additions and 184 deletions.
70 changes: 70 additions & 0 deletions WEBDAV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Required Setup for WebDAV Mounts
================================

davfs2
------

- Install [davfs2](https://savannah.nongnu.org/projects/davfs2/). This code
was initially tested against davfs2, version 1.6.1-1, installed via APT on
Debian 12 (bookworm).

- Create a directory to use as the mount point; `tools/bench.sh` uses
`/mnt/backup/dandi/dandisets-healthstatus/dandisets-fuse` by default, and
this path will be used throughout the following instructions.

- Add the following to `/etc/davfs2/davfs2.conf`:

```
[/mnt/backup/dandi/dandisets-healthstatus/dandisets-fuse]
ask_auth 0
follow_redirect 1
```
- Grant the user who will be running `dandisets-healthstatus` permission to run
the following commands with `sudo` without entering a password:
```
mount -t davfs https://webdav.dandiarchive.org /mnt/backup/dandi/dandisets-healthstatus/dandisets-fuse
umount /mnt/backup/dandi/dandisets-healthstatus/dandisets-fuse
```
This can be done by adding the following lines to `/etc/sudoers`, where
`username` is replaced by the name of the user account:
```
username ALL=(ALL:ALL) NOPASSWD: /usr/bin/mount -t davfs https\://webdav.dandiarchive.org /mnt/backup/dandi/dandisets-healthstatus/dandisets-fuse
username ALL=(ALL:ALL) NOPASSWD: /usr/bin/umount /mnt/backup/dandi/dandisets-healthstatus/dandisets-fuse
```
- Ensure that the `dandidav` instance at webdav.dandiarchive.org is being run
with the `--prefer-s3-redirects` option
<!--
webdavfs
--------
- Install [webdavfs](https://github.com/miquels/webdavfs). The
`mount.webdavfs` binary must be installed in `/sbin` so that `mount` can find
it.
- Create a directory to use as the mount point; `tools/bench.sh` uses
`/mnt/backup/dandi/dandisets-healthstatus/dandisets-fuse` by default, and
this path will be used throughout the following instructions.
- Grant the user who will be running `dandisets-healthstatus` permission to run
the following commands with `sudo` without entering a password:
```
mount -t webdavfs -o allow_other https://webdav.dandiarchive.org /mnt/backup/dandi/dandisets-healthstatus/dandisets-fuse
umount /mnt/backup/dandi/dandisets-healthstatus/dandisets-fuse
```
This can be done by adding the following lines to `/etc/sudoers`, where
`username` is replaced by the name of the user account:
```
username ALL=(ALL:ALL) NOPASSWD: /usr/bin/mount -t webdavfs -o allow_other https\://webdav.dandiarchive.org /mnt/backup/dandi/dandisets-healthstatus/dandisets-fuse
username ALL=(ALL:ALL) NOPASSWD: /usr/bin/umount /mnt/backup/dandi/dandisets-healthstatus/dandisets-fuse
```
-->
5 changes: 5 additions & 0 deletions code/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ install_requires =
pyyaml
requests ~= 2.20

[options.extras_require]
dandi =
# Needed for timing `dandi ls` runs
dandi

[options.packages.find]
where = src

Expand Down
Loading

0 comments on commit c51d691

Please sign in to comment.