From cfb1afd560db1ebc809bc2fd4fccf04dec9b9eee Mon Sep 17 00:00:00 2001 From: "Waylon S. Walker" Date: Sun, 2 Nov 2025 20:47:20 -0600 Subject: [PATCH] Initial Commit for try-rustfs Looking for a minio alternative and trying out rustfs --- .env | 5 +++++ .gitignore | 2 ++ README.md | 3 +++ hello.txt | 1 + justfile | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 43 insertions(+) create mode 100644 .env create mode 100644 .gitignore create mode 100644 README.md create mode 100644 hello.txt create mode 100644 justfile diff --git a/.env b/.env new file mode 100644 index 0000000..8889e74 --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +AWS_REGION=us-east-1 +AWS_ENDPOINT_URL=http://localhost:9000 +AWS_ACCESS_KEY_ID=Te276kFUgzySL5mnRpKh +AWS_SECRET_ACCESS_KEY=M7Wr9ChB5tzaXRDqcVUSwH20fiduFAnI8v63lZge +AWS_BUCKET_NAME=dropper diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5eb6531 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +data/ +logs/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..d6274ad --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# try-rustfs + +Looking for a minio alternative and trying out rustfs diff --git a/hello.txt b/hello.txt new file mode 100644 index 0000000..ce01362 --- /dev/null +++ b/hello.txt @@ -0,0 +1 @@ +hello diff --git a/justfile b/justfile new file mode 100644 index 0000000..1574e74 --- /dev/null +++ b/justfile @@ -0,0 +1,32 @@ +set dotenv-load + +start: + mkdir -p data + mkdir -p logs + podman run -d -p 9000:9000 -v $(pwd)/data:/data -v $(pwd)/logs:/logs docker.io/rustfs/rustfs:alpha + +make-bucket: + #!/bin/bash + set +e + uv run --with awscli aws s3 mb s3://learn-rustfs || true + uv run --with awscli aws s3 mb s3://dropper || true + +list-buckets: + uv run --with awscli aws s3 ls + +sync-dropper: + uv run --with awscli aws s3 sync ../dropper/data s3://dropper + +list-dropper: + uv run --with awscli aws s3 ls s3://dropper + +get-presigned-url: + uv run --with awscli aws s3 presign s3://learn-rustfs/hello.txt + +post-presigned-url: + #!/bin/bash + echo "hello" > hello.txt + URL=$(uv run --with awscli aws s3 presign "s3://learn-rustfs/hello.txt" --expires-in 600 --http-method PUT) + echo $URL + curl -X PUT -T hello.txt $URL +