Skip to content

Instantly share code, notes, and snippets.

@yuvalif
Created August 6, 2024 18:37
Show Gist options
  • Save yuvalif/c05c3f3ad0272465fa904264a72e0676 to your computer and use it in GitHub Desktop.
Save yuvalif/c05c3f3ad0272465fa904264a72e0676 to your computer and use it in GitHub Desktop.

start a single zone cluster with a realm:

OSD=1 MON=1 MDS=0 MGR=0 ../src/test/rgw/test-rgw-multisite.sh 1

create a persistent topic with a bucket and notifications:

aws --region=zg1 --endpoint-url http://localhost:8001 sns create-topic --name=fishtopic --attributes='{"push-endpoint": "kafka://localhost", "persistent": "true"}'
aws --region=zg1 --endpoint-url http://localhost:8001 s3 mb s3://fish
aws --region=zg1 --endpoint-url http://localhost:8001 s3api put-bucket-notification-configuration --bucket fish --notification-configuration='{"TopicConfigurations": [{"Id": "notif1", "TopicArn": "arn:aws:sns:default::fishtopic", "Events": []}]}'

upload an object that would trigger a notification:

aws --endpoint-url http://localhost:8001 s3 cp myfile s3://fish

make sure that the persistent queue is created under the "log" pool in the "notif" namespace:

bin/rados -c run/c1/ceph.conf ls --pool zg1-1.rgw.log --namespace notif
bin/rados -c run/c1/ceph.conf stat fishtopic --pool zg1-1.rgw.log --namespace notif

verify that the persistent queue is not under the "meta" pool:

bin/rados -c run/c1/ceph.conf  ls --pool zg1-1.rgw.meta --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment