Make your own S3 Object Storage

The best practice still to have dedicated machine to play the role of gateway.user@ceph ~ # ceph-deploy rgw create ceph01 ceph02 ceph03 ceph04 ceph05 ceph06Example of node clusterData PoolAll our data are divided into pools, we must create a pool divided into several blocks (64 kb), with a size of 2, which means that data will be written twice in our cluster and minimum once in case of availability failures.user@ceph ~ # ceph osd pool create my-userfiles 64user@ceph ~ # ceph osd pool set my-userfiles size 2 user@ceph ~ # ceph osd pool set my-userfiles min_size 1S3 API configuration (radosGW)Now that we have created our data store, we create a user linked to a bucket with 30 GB of quota.user@ceph ~ # sudo radosgw-admin user create –uid="my-api" –display-name="My API"If you are this message, it succeed:"user": "my-api","access_key": "XXXXXXXXXXXXX","secret_key": "XXXXXXXXXXXX"Now, we create permissions and quota:user@ceph ~ # sudo radosgw-admin caps add –uid="supfile-api" –caps="users=*;buckets=*;metadata=*;usage=*;zone=*" user@ceph ~ # sudo radosgw-admin quota set –uid="supfile-api" –quota-scope=bucket –max-size=30G user@ceph ~ # sudo radosgw-admin quota enable –quota-scope=bucket –uid="supfile-api"ConclusionFrom now on we can use our storage through the S3 Rest API.Ceph allows you to do a more lot of things as multisite replication, filesystem distribution, etc.This article shows the basics of Ceph but performance tunning and production usage are more complex, Ceph stays relatively complicated to install but offers a scalability and cost reduction in the long-term.Originally published at on October 17, 2018.. More details

Leave a Reply