Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprint 1.11 #81

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d83f734
update gosdk
boddumanohar Nov 7, 2023
11c7318
resolve conflicts
boddumanohar Nov 7, 2023
7c0bcb1
update gosdk
Hitenjain14 Nov 9, 2023
0e24f35
use multi op
Hitenjain14 Nov 9, 2023
801aa35
Merge pull request #74 from 0chain/fix/download-obj
dabasov Nov 9, 2023
c22617f
set chunkNumber
Hitenjain14 Nov 11, 2023
9e6053d
update gosdk
Hitenjain14 Nov 14, 2023
e9dab84
Merge pull request #76 from 0chain/feat/upload-optimization
dabasov Nov 15, 2023
45c776c
Merge pull request #75 from 0chain/fix/download-obj
dabasov Nov 15, 2023
62405ac
update gosdk version
boddumanohar Nov 15, 2023
9bd9194
update gosdk
boddumanohar Nov 15, 2023
7baf416
Adding cmd to use mc with zs3server.
sunilmhta Nov 16, 2023
389c4f3
add aws cli info too
sunilmhta Nov 17, 2023
742f166
minor nit
sunilmhta Nov 17, 2023
8f1ada1
Merge pull request #77 from 0chain/sunilmhta/update-mc-info-readme
boddumanohar Nov 17, 2023
f5f23ce
disable multi part in client-api layer.
sunilmhta Nov 23, 2023
1f61cf3
Merge branch 'sprint-1.11' into sunilmhta/disable-multipart-client
dabasov Nov 23, 2023
23372af
Merge pull request #80 from 0chain/sunilmhta/disable-multipart-client
dabasov Nov 23, 2023
3aa708d
Merge branch 'sprint-1.11' into update-gosdkv3
boddumanohar Nov 26, 2023
9bba112
update gosdk
boddumanohar Nov 26, 2023
483f2db
go mod tidy
boddumanohar Nov 26, 2023
9c001b6
Merge pull request #72 from 0chain/update-gosdkv3
boddumanohar Nov 26, 2023
6ac7854
update gosdk
Hitenjain14 Dec 1, 2023
bcc177c
Revert go work sum
Jayashsatolia403 Dec 1, 2023
874ed2b
Install Herumi in base image
peterlimg Dec 2, 2023
1d34cb2
Merge branch 'fix/base-herum-install' into fix/mem-usage
peterlimg Dec 2, 2023
6466117
Merge pull request #83 from 0chain/fix/mem-usage
dabasov Dec 2, 2023
af5d1f8
upgrade GoSDK to sprint-1.11
boddumanohar Dec 3, 2023
8ed255e
Merge pull request #85 from 0chain/gosdk-upgrade-sprint-1.11
dabasov Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 126 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,136 @@ docker-compose -f environment/docker-compose.yaml up -d
```
3. Make sure allocation.txt file exist in the default folder ``~/.zcn``

## Test MinIO Client
4. Now you can interact with the clint API follow this [doc](/client-api/README.md)

MinIO client `mc` provides a modern alternative to UNIX commands such as ls, cat, cp, mirror, diff, etc. It supports filesystems and Amazon S3-compatible cloud storage services. To interact with the client API follow this [doc](/client-api/README.md). You can also interact with the log search API by following this [doc.](/logsearchapi/README.md)
5. You can also interact with the logsearch API by following this [doc](/logsearchapi/README.md)


## Test using AWS Client `aws`
### Installation
Install from here: https://aws.amazon.com/cli/

### Configuration
Fetch the access key and secret from your deployed zs3server. To configure `aws cli`, type `aws configure` and
specify the zs3server key information like below:
```
aws configure
AWS Access Key ID [None]: miniouser
AWS Secret Access Key [None]: miniopassword
Default region name [None]: us-east-1
Default output format [None]: ENTER
```

Additionally enable AWS Signature Version ‘4’ for zs3server.

`aws configure set default.s3.signature_version s3v4`

### Examples
#### To list your buckets
```
aws --endpoint-url https://localhost:9000 s3 ls
2016-03-27 02:06:30 deebucket
2016-03-28 21:53:49 guestbucket
2016-03-29 13:34:34 mbtest
2016-03-26 22:01:36 mybucket
2016-03-26 15:37:02 testbucket
```

#### To list contents inside bucket
```
aws --endpoint-url https://localhost:9000 s3 ls s3://mybucket
2016-03-30 00:26:53 69297 argparse-1.2.1.tar.gz
2016-03-30 00:35:37 67250 simplejson-3.3.0.tar.gz
```

#### To make a bucket
```
aws --endpoint-url https://localhost:9000 s3 mb s3://mybucket
make_bucket: s3://mybucket/
```

#### To add an object to a bucket
```
aws --endpoint-url https://localhost:9000 s3 cp simplejson-3.3.0.tar.gz s3://mybucket
upload: ./simplejson-3.3.0.tar.gz to s3://mybucket/simplejson-3.3.0.tar.gz
```

#### To delete an object from a bucket
```
aws --endpoint-url https://localhost:9000 s3 rm s3://mybucket/argparse-1.2.1.tar.gz
delete: s3://mybucket/argparse-1.2.1.tar.gz
```

#### To remove a bucket
```
aws --endpoint-url https://localhost:9000 s3 rb s3://mybucket
remove_bucket: s3://mybucket/
```



## Test using MinIO Client `mc`
`mc` provides a modern alternative to UNIX commands such as ls, cat, cp, mirror, diff etc. It supports filesystems
and Amazon S3 compatible cloud storage services.

### Installation
Install from here for your os: https://min.io/docs/minio/macos/index.html

## Configure MinIO Client
```
mc config host add zcn http://localhost:9000 miniouser miniopassword
mc ls zcn //List your buckets
```

### Examples
#### To list your buckets
```
mc ls zcn/
2016-03-27 02:06:30 deebucket
2016-03-28 21:53:49 guestbucket
2016-03-29 13:34:34 mbtest
2016-03-26 22:01:36 mybucket
2016-03-26 15:37:02 testbucket
```

#### To list contents inside bucket
```
mc ls zcn/mybucket
2016-03-30 00:26:53 69297 argparse-1.2.1.tar.gz
2016-03-30 00:35:37 67250 simplejson-3.3.0.tar.gz
```

#### To make a bucket
```
mc mb zcn/mybucket
make_bucket: zcn/mybucket
```

#### To add an object to a bucket
```
mc cp simplejson-3.3.0.tar.gz zcn/mybucket
upload: ./simplejson-3.3.0.tar.gz to zcn/mybucket/simplejson-3.3.0.tar.gz
```

#### To delete an object from a bucket
```
mc rm zcn/mybucket/argparse-1.2.1.tar.gz
delete: zcn/mybucket/argparse-1.2.1.tar.gz
```

[2017-02-22 01:50:43 PST] 0B user/
[2017-02-26 21:43:51 PST] 0B datasets/
[2017-02-26 22:10:11 PST] 0B assets/
#### To remove a bucket
```
mc rb zcn/mybucket
remove_bucket: zcn/mybucket/
```

Check `mc --help` for the exhaustive list of cmds available.


## Test using Postman Using REST APIs
- Add the following authorization settings
![](./assets/postman-auth.png "Authorization settings")
- The `AccessKey` would be the MINIO_ROOT_USER which you set earlier during zs3server deployment and `SecretKey` would be the MINIO_ROOT_PASSWORD.
- If you do not want to share the MINIO_ROOT_USER and MINIO_ROOT_PASSWORD, you can also create a user from minio console and share their access key and secret instead.
- Use the REST APIs to interact with the server.
- Postman collection for the same is provided below:
[Postman Collection](./assets/Zs3ServerCollection.postman_collection.json)
Loading