File sync and share services, such as Dropbox, Box, Google Drive, and many more, have become extremely popular in the last few years. With Ceph, you can deploy on-premise file sync and share services using any S3- or Swift-based frontend applications. In this recipe, we will demonstrate how to build up a file sync and share services based on Ceph and ownCloud.
To build this service, we would require a running Ceph cluster, a RGW instance that can access Ceph storage via S3, and an ownCloud frontend environment, as shown next:
In the last recipe, we configured the radosgw
instance, us-east-1
; we will use the same gateway instance in this section to build the file sync and share service. We will also use our DNS service, which is configured on rgw-node1
to support S3 subdomain calls for the us-east-1
RGW instance; however, you can also use any DNS server until it resolves subdomains for us-east-1
.
rgw-node1
, which is also our DNS server, and create a file, /var/named/us-east-1.cephcookbook.com
, with the following contents:@ 86400 IN SOA cephcookbook.com. root.cephcookbook.com. ( 20091028 ; serial yyyy-mm-dd 10800 ; refresh every 15 min 3600 ; retry every hour 3600000 ; expire after 1 month + 86400 ); min ttl of 1 day @ 86400 IN NS cephbookbook.com. @ 86400 IN A 192.168.1.107 * 86400 IN CNAME @
us-east-1
node to use the DNS server. Update /etc/resolve.conf
with the rgw-node1
address and ping any subdomain; it should resolve to the us-east-1
address.us-east-1
node can connect to the Ceph storage cluster over S3. We created a user in the last recipe with the name us-east
, and we will use its access and secret keys with s3cmd
:s3cmd
:# yum install -y s3cmd
s3cmd
and provide access_key
as XNK0ST8WXTMWZGN29NF9
and secret_key
as 7VJm8uAp71xKQZkjoPZmHu4sACA1SY8jTjay9dP5
:# s3cmd --configure
/root/.s3cmd
for host details:host_base = us-east-1.cephcookbook.com:7480 host_bucket = %(bucket)s.us-east-1.cephcookbook.com:7480
s3cmd
connection:# s3cmd ls
# s3cmd mb s3://owncloud
# vagrant up owncloud # vagrant ssh owncloud
# cd /etc/yum.repos.d/ # wget http://download.opensuse.org/repositories/isv:ownCloud:community/CentOS_CentOS-7/isv:ownCloud:community.repo
# yum install owncloud -y
# systemctl disable firewalld # systemctl stop firewalld
http://192.168.1.120/owncloud/
in your host web browser. Create an admin account called owncloud
with the password as owncloud
:radosgw
user detail with the access key, secret key, and hostname:XNK0ST8WXTMWZGN29NF9
7VJm8uAp71xKQZkjoPZmHu4sACA1SY8jTjay9dP5
"us-east-1.cephcookbook.com
7480
US
(optional)owncloud
(optional)ceph-s3
upload files or directory.us-east-1
node and performing the s3cmd ls s3://owncloud
command; you should get the file you uploaded from the ownCloud web user interface.For more information on ownCloud, visit https://owncloud.org/.
18.117.75.70