Integrating openstack swift with rados backend to NextCloud

To read how to make openstack use ceph as object storage backend, visit:

https://www.neblogas.lt/2016/12/23/openstack-object-storage-ceph/

Create openstack user “NextCloud”. Create project “someproject” – this will be our tenant.

Add user to project and specify his role ‘swift_admin‘ (as defined in ceph.conf in post above). This is needed for user to be able to create container within object storage.

Login as newly created user. Create object storage container “somecontainer”.

Configure NextCloud:

Service name: swift

Region: RegionOne (this is default Openstack region, may differ on larger installations).

Bucket: somecontainer

Username: username

Passowrd: password

TenantName: someproject

http://keystoneurl:5000/v2.0/ (on openstack-ansible this would be a lb_vip address)

Note: Even if Service name and Region are marked as not required, they ARE.

You should see a green circle next to your config in NextCloud.

This creates “OpenstarckObjectStorage” folder in users directory. All files, copied to that directory will be uploaded to Ceph object storage.

To make all data to be stored in Ceph, you need to configure global storage in NextCloud.

Add following to config/config.php

[code language=”php”]
array (
‘class’ => ‘OC\\Files\\ObjectStore\\Swift’,
‘arguments’ =>
array (
‘username’ => ‘username’,
‘password’ => ‘password’,
‘bucket’ => ‘NextCloud’,
‘autocreate’ => false,
‘region’ => ‘RegionOne’,
‘url’ => ‘http://keystoneurl:5000/v2.0/’,
‘tenantName’ => ‘someproject’,
‘serviceName’ => ‘swift’,
‘urlType’ => ‘internalURL’,
),
),
[/code]

Tags :

About the Author

Leave a Reply

Your email address will not be published. Required fields are marked *