Public | Automated Build

Last pushed: 3 years ago
Short Description
A http/nginx frontend to CephFS in a container.
Full Description

##A http/nginx frontend to CephFS in a container.

This docker container mounts a ceph filesystem and then exposes the mount via HTTP (nginx) for download and upload (PUT).

Tested on CoreOS on a 8 node Ceph cluster. Ceph setup based on

Build from Dockerfile:
docker build -t mbessler/cephfs-nginx .


docker run -d --rm --net host --volumes-from cephdata --privileged -v /lib/modules:/lib/modules -e CEPHFS=<CLUSTER>:/<VOLUME> mbessler/cephfs-nginx

where <CLUSTER> is a comma separated list of hostnames/IPs, and <VOLUME> is a Ceph Volume.

For example: docker run -d --rm --net host --volumes-from cephdata --privileged -v /lib/modules:/lib/modules -e CEPHFS=,,,, mbessler/cephfs-nginx

Upload via
curl --upload dir/file_to_upload http://<SERVER>/some/directory/
curl -X PUT --data-binary @dir/file_to_upload http://<SERVER>/some/directory/file_to_upload
where <SERVER> is any IP/hostname in the Ceph cluster running this docker image.

Since nginx inside the container runs as user 'www-data', uploads require the appropriate directory on your Ceph volume to be writable by that user, eg:
docker exec -it <container> chown www-data /ceph/<dir>

WARNING: As-is, this image does not limit uploads or downloads in any way, there is no authentication, intended to show concepts only.
Do not use in production, do not expose to public networks.

Docker Pull Command
Source Repository