HDD-based Ceph Cluster with Open Cache Acceleration Software (Open CAS)
Creating Object Storage
Object storage exposes an S3 API to the storage cluster for applications to put and get data.
Details in Object Storage Overview.
Create a local CephObjectStore:
kubectl create -f object.yaml # wait until it is ready kubectl -n rook-ceph get pod -l app=rook-ceph-rgw
Now that the object store is configured, next we need to create a bucket where a client can read and write objects.
kubectl create -f storageclass-bucket-delete.yaml
Based on this storage class, an object client can now request a bucket by creating an Object Bucket Claim.
kubectl create -f object-bucket-claim-delete.yaml
Clients can connect using the following information:
CM_NAME=ceph-delete-bucket BUCKET_HOST=$(kubectl get cm $CM_NAME -o jsonpath='{.data.BUCKET_HOST}') BUCKET_PORT=$(kubectl get cm $CM_NAME -o jsonpath='{.data.BUCKET_PORT}') BUCKET_NAME=$(kubectl get cm $CM_NAME -o jsonpath='{.data.BUCKET_NAME}') AWS_ACCESS_KEY_ID=$(kubectl get secret $CM_NAME -o jsonpath='{.data.AWS_ACCESS_KEY_ID}' | base64 --decode) AWS_SECRET_ACCESS_KEY=$(kubectl get secret $CM_NAME -o jsonpath='{.data.AWS_SECRET_ACCESS_KEY}' | base64 --decode) # get the cluster IP from kube-dns, so we can access from host machine BUCKET_IP=$(host ${BUCKET_HOST}.cluster.local 10.96.0.10 | tail -n1 | awk '{print $NF}')
Test with warp:
curl -sL https://github.com/minio/warp/releases/download/v0.6.8/warp_Linux_x86_64.tar.gz | tar xz ./warp mixed --host=$BUCKET_IP:$BUCKET_PORT --access-key=$AWS_ACCESS_KEY_ID --secret-key=$AWS_SECRET_ACCESS_KEY --bucket=$BUCKET_NAME