Ceph objectstore test

From UVOO Tech Wiki
Revision as of 04:18, 22 February 2025 by Busk (talk | contribs) (Created page with "Install tool s5cmd - mc and aws cli are other options ``` curl -LO https://github.com/peak/s5cmd/releases/download/v2.3.0/s5cmd_2.3.0_linux_amd64.deb && sudo apt install -y ./...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Install tool s5cmd - mc and aws cli are other options

curl -LO https://github.com/peak/s5cmd/releases/download/v2.3.0/s5cmd_2.3.0_linux_amd64.deb && sudo apt install -y ./s5cmd_2.3.0_linux_amd64.deb

Test

#!/bin/bash
set -eu
export AWS_HOST="https://my-objectstore-ingress.example.com"
export PORT=443
export BUCKET_NAME=$(kubectl get cm my-bucket -o jsonpath='{.data.BUCKET_NAME}')
export AWS_ACCESS_KEY_ID=$(kubectl get secret my-bucket -o jsonpath='{.data.AWS_ACCESS_KEY_ID}' | base64 --decode)
export AWS_SECRET_ACCESS_KEY=$(kubectl get secret my-bucket -o jsonpath='{.data.AWS_SECRET_ACCESS_KEY}' | base64 --decode)

echo "This is the S3 storage test $(date)" > /tmp/myFile
s5cmd --endpoint-url $AWS_HOST:$PORT cp /tmp/myFile s3://$BUCKET_NAME
s5cmd --endpoint-url $AWS_HOST:$PORT cp s3://$BUCKET_NAME/myFile /tmp/myDownloadedFile
cat /tmp/myDownloadedFile

Example of helm deploy for

helm -n rook-ceph-cluster show values rook-release/rook-ceph-cluster > default.rook-ceph-cluster.values.yaml

helm upgrade --install rook-ceph-cluster \
  --set 'cephFileSystems[0].storageClass.enabled=false' \
  --set 'cephObjectStores[0].storageClass.enabled=true' \
  --set 'cephObjectStores[0].storageClass.parameters.region=us-west-1' \
  --set 'cephClusterSpec.dashboard.enabled=false' \
  --set 'cephObjectStores[0].ingress.enabled=true' \
  --set 'cephObjectStores[0].ingress.host.name=my-objectstore-ingress.example.com' \
  --set 'cephObjectStores[0].ingress.host.path=/' \
  --set 'cephObjectStores[0].ingress.tls[0].hosts[0]=my-objectstore-ingress.example.com' \
  --set 'cephObjectStores[0].ingress.tls[0].secretName=use-default' \
  --set 'cephObjectStores[0].ingress.ingressClassName=nginx' \
  --set operatorNamespace=rook-ceph \
  --set toolbox.enabled=true \
  rook-release/rook-ceph-cluster -f rook-ceph-cluster.vaules.yaml