Add S3 Gate

Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
This commit is contained in:
Evgeniy Kulikov 2020-12-01 11:02:00 +03:00 committed by Stanislav Bogatyrev
parent 389e0dd62b
commit a3b2dfbff3
11 changed files with 123 additions and 0 deletions

4
.env
View file

@ -20,3 +20,7 @@ NODE_IMAGE=nspccdev/neofs-storage
# HTTP Gate # HTTP Gate
HTTP_GW_VERSION=0.12.0-rc.3 HTTP_GW_VERSION=0.12.0-rc.3
HTTP_GW_IMAGE=nspccdev/neofs-http-gate HTTP_GW_IMAGE=nspccdev/neofs-http-gate
# S3 Gate
S3_GW_VERSION=0.12.0-rc.2
S3_GW_IMAGE=nspccdev/neofs-s3-gate

View file

@ -6,3 +6,4 @@ morph_chain
ir ir
storage storage
http_gate http_gate
s3_gate

1
services/s3_gate/.env Symbolic link
View file

@ -0,0 +1 @@
../../.env

1
services/s3_gate/.hosts Normal file
View file

@ -0,0 +1 @@
IPV4_PREFIX.82 s3.LOCAL_DOMAIN

21
services/s3_gate/.s3.env Normal file
View file

@ -0,0 +1,21 @@
S3_GW_REBALANCE_TIMER = 15s
S3_GW_REQUEST_TIMEOUT = 15s
S3_GW_CONNECT_TIMEOUT = 30s
S3_GW_KEEPALIVE_PERMIT_WITHOUT_STREAM = true
S3_GW_KEEPALIVE_TIME = 10s
S3_GW_KEEPALIVE_TIMEOUT = 10s
S3_GW_LOGGER_FORMAT = console
S3_GW_LOGGER_LEVEL = debug
S3_GW_LOGGER_NO_DISCLAIMER = true
S3_GW_LOGGER_SAMPLING_INITIAL = 1000
S3_GW_LOGGER_SAMPLING_THEREAFTER = 1000
S3_GW_LOGGER_TRACE_LEVEL = panic
S3_GW_MAX_CLIENTS_COUNT = 100
S3_GW_MAX_CLIENTS_DEADLINE = 30s
S3_GW_METRICS = false
S3_GW_PPROF = false
S3_GW_VERBOSE = false

View file

@ -0,0 +1,43 @@
---
version: "2.4"
services:
http_gate:
image: ${S3_GW_IMAGE}:${S3_GW_VERSION}
domainname: ${LOCAL_DOMAIN}
hostname: s3_gate
container_name: s3_gate
restart: on-failure
networks:
s3_gate_int:
internet:
ipv4_address: ${IPV4_PREFIX}.82
volumes:
- ./user.key:/user.key
- ./hcs.pub.key:/hcs.pub.key
- ./hcs.sec.key:/hcs.sec.key
- ./tls.key:/tls.key
- ./tls.crt:/tls.crt
- ./../../vendor/hosts:/etc/hosts
stop_signal: SIGKILL
env_file: [ ".env", ".s3.env" ]
environment:
- S3_GW_AUTH-KEY=/hcs.sec.key
- S3_GW_NEOFS-KEY=/user.key
- S3_GW_TLS_KEY_FILE=/tls.key
- S3_GW_TLS_CERT_FILE=/tls.crt
- S3_GW_LISTEN_ADDRESS=s3.${LOCAL_DOMAIN}:8080
- S3_GW_PEERS_0_ADDRESS=s01.${LOCAL_DOMAIN}:8080
- S3_GW_PEERS_0_WEIGHT=0.2
- S3_GW_PEERS_1_ADDRESS=s02.${LOCAL_DOMAIN}:8080
- S3_GW_PEERS_1_WEIGHT=0.2
- S3_GW_PEERS_2_ADDRESS=s03.${LOCAL_DOMAIN}:8080
- S3_GW_PEERS_2_WEIGHT=0.2
- S3_GW_PEERS_3_ADDRESS=s04.${LOCAL_DOMAIN}:8080
- S3_GW_PEERS_3_WEIGHT=0.2
networks:
s3_gate_int:
internet:
external:
name: basenet_internet

View file

@ -0,0 +1 @@
╜d#╟╙BA≤\E╨кООКо╪-^r╙═=n╠ *

View file

@ -0,0 +1 @@
ηΘ 1νΊ&•θ,ΊνΠόΠ―½n‡-‰δ<01>Γ™0¬

22
services/s3_gate/tls.crt Normal file
View file

@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIDpDCCAowCCQDXZEH0aQRqFzANBgkqhkiG9w0BAQsFADCBkzELMAkGA1UEBhMC
UlUxFjAUBgNVBAgMDVN0LlBldGVyc2J1cmcxGTAXBgNVBAcMEFNhaW50IFBldGVy
c2J1cmcxDjAMBgNVBAoMBU5TUENDMREwDwYDVQQLDAhOZW8gU1BDQzERMA8G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WeqxK
-----END CERTIFICATE-----

27
services/s3_gate/tls.key Normal file
View file

@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAwqo2l4fS0U6wZCLh7VjQn1LXN8pZlVaA62C+g1SwoWV2Q5qM
8FDihWj3UBO3F+6vUVJl8N5S0JroxxU6L48Wmshei145SLSl/F28tsk7BbuzNOch
onlelW77Xr6l7cDJBWUWGkDoq6a/S6w6jjCGhZq+X0gyS5nZ4HTouVNv2oFKeeJG
tueLsS4zoVovrHdLSYdZH9/yC+E1WVCzQB+vdUF/vJLTuULgqncLV0sELmRl+xsn
nAV/REJswtCmKgrmAv9pMebBw5EEgROTGazdToWdD5X44xTlHjUb1bMuF9tLYtUM
dLxXceXZFhYhiTBO7ev9awKaNYslbxh+goJo1wIDAQABAoIBAEIp3mJEjPgNOdDf
NlEYpdfxLStOQIKMo0bdXAOBToOc28SAjDTGGSflFGIIQWwF+Vq3meRzfExgyouY
AG3XwYQcZF4USX4XwG71YUXzQXdiY7ewc3Mos2gxD4kVXYpgwzJtOET2GN72zwAm
asSXY7GXdesmu8mMYkxzEAKlhFgMj+bGE/4QQUBKG9ylGIdo07zmU6rAsVhnwQTb
LE3cf+AxCeTVA7OsJCUUR4S9qsgXUN1WeaV8LNg0lYx8UTu1xlbrpSjx7B4eYy6J
FGJWuT9b3X+cBLcGk3BzheUAfqBG2UFDxUCt0grqmmTBkB850MtCDhffhPjxxrD7
KrwAcpECgYEA6HApn2VtWI/tDYCbNix6yxeqq73fO3ng6yFry1u7EYvl8hJXBgR4
b6kAVc3y/9pZO/5D23dHl1PQtnU5401/j6dQrb8A2TMqZ1vA8XIdIMjOiVjZtYMF
nXzmf78PEbw9jWlDVARJdAwkJeuDI4/HVvgiDAh3zxx5F8uDVP16/r8CgYEA1mXS
9owfLIPtPSxyMJoGU0jP7OP+HVwlKkXpvg7uBtINKSDW4UU4rnpIGW5MohR3ACWO
ReFliOnGA5FXBp9GzkbJ+wIYovPIsG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