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

Add NeoFS S3 Gateway image #40

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
NEOGO_VERSION=0.99.3
AIO_VERSION=0.32.0
AIO_VERSION=0.34.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we wait for #39?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to mark as draft.

HTTPGW_VERSION=0.24.0
RESTGW_VERSION=0.5.0
S3GW_VERSION=0.25.0
20 changes: 20 additions & 0 deletions docker-compose.cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,26 @@ services:
depends_on:
- http_gw

s3_gw:
image: nspccdev/neofs-s3-gw:${S3GW_VERSION}
domainname: neofs
hostname: s3_gw
container_name: s3_gw
restart: on-failure
stop_signal: SIGKILL
env_file: [ "./s3/s3.env" ]
environment:
- S3_GW_LISTEN_ADDRESS=:9000
- S3_GW_PEERS_0_ADDRESS=sn:8080
- S3_GW_RPC_ENDPOINT=http://morph:30333
- S3_GW_TREE_SERVICE=sn:8080
volumes:
- ./s3/wallet.json:/config/wallet.json
ports:
- "9000:9000" # S3 Gateway endpoint
depends_on:
- sn

volumes:
data:
cache:
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
- ./vendor/morph_chain.gz:/config/morph_chain.gz
- ./morph/protocol.privnet.yml:/config/protocol.privnet.yml
- ./morph/node-wallet.json:/config/node-wallet.json
- sidechain:/chain
healthcheck:
test: [ "CMD-SHELL", "neo-go query committee -r http://127.0.0.1:30333 | grep 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2" ]
interval: 2s
Expand Down Expand Up @@ -115,6 +116,21 @@ services:
depends_on:
- http_gw

s3_gw:
image: nspccdev/neofs-s3-gw:${S3GW_VERSION}
domainname: neofs
hostname: s3_gw
container_name: s3_gw
restart: on-failure
network_mode: host
volumes:
- ./s3/wallet.json:/config/wallet.json
stop_signal: SIGKILL
env_file: [ "./s3/s3.env" ]
depends_on:
- sn

volumes:
data:
cache:
sidechain:
24 changes: 24 additions & 0 deletions s3/s3.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
S3_GW_LISTEN_ADDRESS=localhost:9000
S3_GW_RPC_ENDPOINT=http://localhost:30333

S3_GW_LOGGER_LEVEL=debug

S3_GW_REBALANCE_INTERVAL=5m
S3_GW_CONNECT_TIMEOUT=1m
S3_GW_HEALTHCHECK_TIMEOUT=5m

S3_GW_RESOLVE_ORDER=nns dns

S3_GW_DEFAULT_POLICY=REP 1

S3_GW_PPROF_ENABLED=false
S3_GW_PROMETHEUS_ENABLED=false

S3_GW_WALLET_PATH=/config/wallet.json
S3_GW_WALLET_ADDRESS=NUUb82KR2JrVByHs2YSKgtK29gKnF5q6Vt
S3_GW_WALLET_PASSPHRASE=s3

S3_GW_TREE_SERVICE=localhost:8080

S3_GW_PEERS_0_ADDRESS=localhost:8080
S3_GW_PEERS_0_PRIORITY=1
32 changes: 32 additions & 0 deletions s3/wallet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": "3.0",
"name": null,
"accounts": [
{
"address": "NUUb82KR2JrVByHs2YSKgtK29gKnF5q6Vt",
"key": "6PYSPET41jKtqie2cfkqgy7q9ueeucH8bX9Gotm2HwdNEDptj6aBe8dDg8",
"label": "NeoFS S3 Gate",
"contract": {
"script": "DCEDE7GsOoB24VWn55eyTwtlDMytWUHqWdfP1RoCSosqBr9BVuezJw==",
"parameters": [
{
"name": "parameter0",
"type": "Signature"
}
],
"deployed": false
},
"lock": false,
"extra": null,
"isDefault": false
}
],
"scrypt": {
"n": 16384,
"r": 8,
"p": 8
},
"extra": {
"Tokens": null
}
}
9 changes: 8 additions & 1 deletion sn/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ grpc:
tls:
enables: false

tree:
enabled: true

logger:
level: debug

Expand All @@ -46,11 +49,15 @@ storage:
perm: 0770
blobstor:
- type: blobovnicza
path: /data/blob
path: /data/blob/blobovniczas
perm: 0660
opened_cache_capacity: 32
depth: 1
width: 1
- type: fstree
path: /data/blob
pilorama:
path: /data/blob/pilorama.db
gc:
remover_batch_size: 100
remover_sleep_interval: 5m
Expand Down