/rados

Use CEPH as primary storage via librados

Primary LanguagePHP

rados

This experimental app uses the php bindings for librados to directly interface with a Ceph cluster and use it as the primary storage for ownCloud.

Installation

Place this app into an owncloud apps folder. just like any other app. It does not need to be activated, since the objectstorage implementation is used by setting it up in the config.php.

This app requres you to install the php bindings for librados.

To start a demo ceph docker instance

# wipe any config, it will be created by docker. use move if you need the existing config
sudo rm -rf /etc/ceph/* 

# start the ceph/demo with docker. adjust MON_IP to your IP and CEPH_NETWORK to your subnet
sudo docker run -d --net=host -e MON_IP=192.168.1.105 -e CEPH_NETWORK=192.168.1.0/24 -v /etc/ceph:/etc/ceph -P ceph/demo 

# a quick hack to allow the webserver access to the cluster, you really shold not do this in your production environment ...
sudo chmod go+r /etc/ceph/ceph.client.admin.keyring

Set Up

Object storage can not yet be set up with the installation dialog. For now just leave the default data folder path and manually configure the objectstore after installation.

Configuration

To activate object store mode add an objectstore entry to the config.php like this:

  'objectstore' => array(
    'class' => 'OCA\Rados\RadosStore',
        'arguments' => array(
        ),
  ),

The objectstore kind of replaces the data directory. By default, the ownCloud log file and the sqlite db will be saved in the data directory. Even when objectstore is configured. However, sqlite is highly unlikely to be used in conjunction with objectstore and the log file path can be changed in config.php. So, in theory the data folder can be empty. However old apps might not use our stream wrappers to access their data and as a result a writable data folder might be needed to achieve backward compatibility.

Known issues

  • objectstore api in core is broken testsuite added in owncloud/core#19414
  • remaining fixes in owncloud/core#17641 still need to be merged
  • unit test this on travis ... needs investigation on how to install docker and then start ceph/demo
  • files are stored as a single object, which is not how librados should be used. When the above has been fixed and we have a testsuite for this app we can investigate #2