Initial Commit for try-rustfs
Looking for a minio alternative and trying out rustfs
This commit is contained in:
commit
cfb1afd560
5 changed files with 43 additions and 0 deletions
5
.env
Normal file
5
.env
Normal file
|
|
@ -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
|
||||
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
data/
|
||||
logs/
|
||||
3
README.md
Normal file
3
README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# try-rustfs
|
||||
|
||||
Looking for a minio alternative and trying out rustfs
|
||||
1
hello.txt
Normal file
1
hello.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
hello
|
||||
32
justfile
Normal file
32
justfile
Normal file
|
|
@ -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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue