Skip to content

Instantly share code, notes, and snippets.

@yuvalif
Created May 4, 2022 05:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuvalif/5f8f2a0c88dce1d35ba93c94874e1ec5 to your computer and use it in GitHub Desktop.
Save yuvalif/5f8f2a0c88dce1d35ba93c94874e1ec5 to your computer and use it in GitHub Desktop.

start cluster:

MON=1 OSD=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh -n -d 

start HTTP endpoint:

wget https://gist.githubusercontent.com/mdonkers/63e115cc0c79b4f6b8b3a6b797e485c7/raw/a6a1d090ac8549dac8f2bd607bd64925de997d40/server.py
python server.py 10900

configure the RGW:

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

create a file, and upload it:

head -c 512 </dev/urandom > myfile
aws --endpoint-url http://localhost:8000 s3 cp myfile s3://fish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment