Using the Ceph Object Store

The Ceph Object Gateway is compatible with the S3 and Swift APIs. Various open-source tools are available that implement these interfaces.

Obtaining Keystone Credentials

openstack ec2 credentials list

Returns a list of your available credentials. If you have multiple credentials, refer to the ‘project’ field and examine the Project ID to choose the correct one:

openstack project show $PROJECT_ID

To use the object store, you will need the Access Key and Secret for this project.

Minio Client

The Minio Client (mc) is a simple, open-source S3 interface tool written in go. Configuration and basic usage is documented below. For full usage, refer to the minio client documentation.

Configuring mc

Have mc create its config file with the following command:

mc config host add my_project $ACCESS_KEY $SECRET_KEY

mc basic usage

In an S3-compatible object store, the abstraction of a root-level folder is a “bucket.”

List buckets:

mc ls my_project

Create a bucket:

mc mb my_project/my_bucket

Upload a file:

mc cp foo.txt my_project/my_bucket

Pipe to a file:

my_command | mc pipe my_project/my_bucket/bar.log

Create a public link to a file: 1

mc share download my_project/my_bucket/foo.txt

Create an endpoint for public uploads: 1

mc share upload my_project/my_upload_bucket

Full documentation: minio client documentation.

  1. Public links default to an expiration of 7 days. Custom timeframes can be specified by adding the –expire flag:

    --expire value, -E value      set expiry in NN[h|m|s] (default: "168h")