Add protocol gateway docs
Brief descriptions for http and s3 protocol gateways. Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
64ec80db58
commit
d5ad9f6df5
3 changed files with 77 additions and 1 deletions
|
@ -16,7 +16,8 @@ Tools to set up local NeoFS network and Neo 3 privnet. Devenv, for short.
|
|||
$ make up
|
||||
```
|
||||
When all services are up, you need to make GAS deposit for test wallet to be
|
||||
able to pay for NeoFS operations. Test wallet is located in `wallet/wallet.json`.
|
||||
able to pay for NeoFS operations. Test wallet is located in `wallet/wallet.json`
|
||||
with the corresponding key in `wallet/wallet.key`
|
||||
|
||||
```
|
||||
$ make prepare.ir
|
||||
|
|
57
docs/http_gate.md
Normal file
57
docs/http_gate.md
Normal file
|
@ -0,0 +1,57 @@
|
|||
# HTTP Protocol gateway
|
||||
|
||||
Protocol Gateway to access data in NeoFS using HTTP protocol.
|
||||
|
||||
Source code and more information can be found in [project's GitHub repository](https://github.com/nspcc-dev/neofs-http-gate)
|
||||
|
||||
## .env settings
|
||||
|
||||
### HTTP_GW_VERSION=0.12.0
|
||||
|
||||
Image version label to use for containers.
|
||||
|
||||
If you want to use locally built image, just set it's label here. Instead of
|
||||
pulling from DockerHub, the local image will be used.
|
||||
|
||||
### HTTP_GW_IMAGE=nspccdev/neofs-http-gate
|
||||
|
||||
Image label prefix to use for containers.
|
||||
|
||||
## Usage example
|
||||
|
||||
- Create a new container
|
||||
```
|
||||
$ neofs-cli --rpc-endpoint s01.neofs.devenv:8080 \
|
||||
--key wallets/wallet.key \
|
||||
container create --basic-acl readonly --await \
|
||||
--policy "REP 1 SELECT 1 FROM *"
|
||||
container ID: 4LfREK1cetL4PUji5fqj9SgRTSmaC5jExEDK9HKCDjdP
|
||||
awaiting...
|
||||
container has been persisted on sidechain
|
||||
|
||||
```
|
||||
- Put an object into the newly created container
|
||||
```
|
||||
$ neofs-cli --rpc-endpoint s01.neofs.devenv:8080 \
|
||||
--key wallets/wallet.key \
|
||||
object put --file /tmp/backup.jpeg \
|
||||
--cid 4LfREK1cetL4PUji5fqj9SgRTSmaC5jExEDK9HKCDjdP
|
||||
[/tmp/backup.jpeg] Object successfully stored
|
||||
ID: 6EPpYqSFMGWrNLvYE9mNnut1CPKuPBKyi1ixHakzqsSB
|
||||
CID: 4LfREK1cetL4PUji5fqj9SgRTSmaC5jExEDK9HKCDjdP
|
||||
```
|
||||
- Call `curl -sSI -XGET http://http.neofs.devenv/get/<cid>/<oid>`
|
||||
```
|
||||
$ curl -sSI -XGET http://http.neofs.devenv/get/4LfREK1cetL4PUji5fqj9SgRTSmaC5jExEDK9HKCDjdP/6EPpYqSFMGWrNLvYE9mNnut1CPKuPBKyi1ixHakzqsSB
|
||||
HTTP/1.1 200 OK
|
||||
Date: Thu, 03 Dec 2020 10:34:26 GMT
|
||||
Content-Type: image/jpeg
|
||||
Content-Length: 144017
|
||||
x-object-id: 6EPpYqSFMGWrNLvYE9mNnut1CPKuPBKyi1ixHakzqsSB
|
||||
x-owner-id: NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx
|
||||
x-container-id: 4LfREK1cetL4PUji5fqj9SgRTSmaC5jExEDK9HKCDjdP
|
||||
x-FileName: backup.jpeg
|
||||
x-Timestamp: 1606983284
|
||||
Last-Modified: Thu, 03 Dec 2020 08:14:44 UTC
|
||||
Content-Disposition: inline; filename=backup.jpeg
|
||||
```
|
18
docs/s3_gate.md
Normal file
18
docs/s3_gate.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# S3 Protocol gateway
|
||||
|
||||
Protocol Gateway to access data in NeoFS using AWS S3 protocol
|
||||
|
||||
Source code and more information can be found in [project's GitHub repository](https://github.com/nspcc-dev/neofs-s3-gate)
|
||||
|
||||
## .env settings
|
||||
|
||||
### S3_GW_VERSION=0.12.0
|
||||
|
||||
Image version label to use for containers.
|
||||
|
||||
If you want to use locally built image, just set it's label here. Instead of
|
||||
pulling from DockerHub, the local image will be used.
|
||||
|
||||
### S3_GW_IMAGE=nspccdev/neofs-s3-gate
|
||||
|
||||
Image label prefix to use for containers.
|
Loading…
Reference in a new issue