Compare commits
1 commit
master
...
feature/co
Author | SHA1 | Date | |
---|---|---|---|
81bdc3a775 |
15 changed files with 104 additions and 27 deletions
18
.env
18
.env
|
@ -8,23 +8,27 @@ BASTION_VERSION=10
|
|||
BASTION_IMAGE=debian
|
||||
|
||||
# NeoGo privnet
|
||||
NEOGO_VERSION=0.106.3
|
||||
NEOGO_VERSION=0.104.0
|
||||
NEOGO_IMAGE=nspccdev/neo-go
|
||||
|
||||
# FrostFS InnerRing nodes
|
||||
IR_VERSION=0.44.4
|
||||
IR_VERSION=0.42.9
|
||||
IR_IMAGE=git.frostfs.info/truecloudlab/frostfs-ir
|
||||
|
||||
# FrostFS Storage nodes
|
||||
NODE_VERSION=0.44.4
|
||||
NODE_VERSION=0.42.9
|
||||
NODE_IMAGE=git.frostfs.info/truecloudlab/frostfs-storage
|
||||
|
||||
# HTTP Gate
|
||||
HTTP_GW_VERSION=0.32.0
|
||||
HTTP_GW_VERSION=0.30.2
|
||||
HTTP_GW_IMAGE=truecloudlab/frostfs-http-gw
|
||||
|
||||
# REST Gate
|
||||
REST_GW_VERSION=c9c85e90
|
||||
REST_GW_IMAGE=truecloudlab/frostfs-rest-gw
|
||||
|
||||
# S3 Gate
|
||||
S3_GW_VERSION=0.32.0
|
||||
S3_GW_VERSION=0.31.0-rc.4
|
||||
S3_GW_IMAGE=truecloudlab/frostfs-s3-gw
|
||||
|
||||
# Lifecycler
|
||||
|
@ -40,11 +44,13 @@ FROSTFS_CLI_URL=https://git.frostfs.info/TrueCloudLab/frostfs-node/releases/down
|
|||
#FROSTFS_CLI_PATH=/path/to/frostfs-cli-binary
|
||||
|
||||
# FrostFS ADM tool binary
|
||||
FROSTFS_ADM_VERSION=498f9955ea
|
||||
FROSTFS_ADM_URL=https://git.frostfs.info/TrueCloudLab/frostfs-node/releases/download/v${NODE_VERSION}/frostfs-adm
|
||||
#FROSTFS_ADM_PATH=/path/to/frostfs-adm-binary
|
||||
|
||||
# Compiled FrostFS Smart Contracts
|
||||
FROSTFS_CONTRACTS_URL=https://git.frostfs.info/TrueCloudLab/frostfs-contract/releases/download/v0.21.1/frostfs-contract-v0.21.1.tar.gz
|
||||
FROSTFS_CONTRACTS_VERSION=694daebb19
|
||||
FROSTFS_CONTRACTS_URL=https://git.frostfs.info/TrueCloudLab/frostfs-contract/releases/download/v0.19.2/frostfs-contract-v0.19.2.tar.gz
|
||||
#FROSTFS_CONTRACTS_PATH=/path/to/unpacked/frostfs-contracts-dir
|
||||
|
||||
# Jaeger tracing
|
||||
|
|
|
@ -2,4 +2,5 @@
|
|||
# Will start from top to bottom and stop in reverse
|
||||
http_gate
|
||||
s3_gate
|
||||
rest_gate
|
||||
s3_lifecycler
|
||||
|
|
4
Makefile
4
Makefile
|
@ -85,8 +85,6 @@ up/bootstrap: get vendor/hosts
|
|||
echo "Transfer GAS to wallet $${f}" \
|
||||
&& ./vendor/frostfs-adm -c frostfs-adm.yml morph refill-gas --storage-wallet $${f} --gas 10.0 \
|
||||
|| die "Failed to transfer GAS to alphabet wallets"; \
|
||||
echo "Register storage wallet $${f} in proxy contract" \
|
||||
&& ./vendor/frostfs-adm morph proxy-add-account --config frostfs-adm.yml --account=`docker container exec morph_chain neo-go wallet dump-keys -w /wallets/storage/$${f##*/} | head -1 | awk '{print $1}'` || die "Couldn't set storage allet as proxy wallet"
|
||||
done
|
||||
@echo "Create frostfsid subject for ./wallets/wallet.json"; \
|
||||
if [ -n "$$(./vendor/frostfs-adm -c frostfs-adm.yml morph frostfsid list-subjects --namespace '')" ]; then \
|
||||
|
@ -159,7 +157,7 @@ clean:
|
|||
vols=`docker-compose -f services/$${svc}/docker-compose.yml config --volumes`
|
||||
if [[ ! -z "$${vols}" ]]; then
|
||||
for vol in $${vols}; do
|
||||
docker volume rm -f "$${svc}_$${vol}"
|
||||
docker volume rm -f "$${svc}_$${vol}" 2> /dev/null
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -143,7 +143,7 @@ Registers user wallet and issues s3 credentials.
|
|||
|
||||
Usage and default parameter values:
|
||||
```sh
|
||||
make s3cred [password=""] [contract_password=s3] [wallet=""] [gate_public_key=0313b1ac3a8076e155a7e797b24f0b650cccad5941ea59d7cfd51a024a8b2a06bf]
|
||||
make s3cred [password=""] [contract_password=s3] [wallet=/user_wallet.json] [gate_public_key=0313b1ac3a8076e155a7e797b24f0b650cccad5941ea59d7cfd51a024a8b2a06bf]
|
||||
```
|
||||
|
||||
As soon as the storage node is in the network map (see above) you can generate S3
|
||||
|
@ -159,9 +159,8 @@ $ make s3cred
|
|||
"container_id": "EXArWh8x1zeHG3851s1RtoCo7dowxF6rhLGA15nbMffT"
|
||||
}
|
||||
```
|
||||
Running without any parameters results in defaults which are based on the private key from
|
||||
`/wallets/wallet.json` user wallet and `/wallet.json` contract wallet.
|
||||
If `wallet` parameter is set, gate searches custom user wallet file in `/wallets` directory.
|
||||
Running without any parameters will result in defaults which are based on the private key from
|
||||
`/user-wallet.json` file and `/wallet.json` contract wallet.
|
||||
|
||||
Now let's configure an S3 client (AWS CLI will be used as example):
|
||||
|
||||
|
@ -173,7 +172,7 @@ Default region name []: us-east-1
|
|||
Default output format []: json
|
||||
```
|
||||
|
||||
If you need to create credentials for different users, put user wallet to `wallets` dir and specify it via `wallet` parameter.
|
||||
If you need to create credentials for different users, put user wallets to `wallets` dir and specify them via `wallet` parameter.
|
||||
Pass wallet password in `password` parameter if it's not default. The same is for `contract_wallet` and `gate_public_key` params.
|
||||
|
||||
```sh
|
||||
|
|
|
@ -4,16 +4,14 @@ A single-node N3 privnet deployment, running on
|
|||
|
||||
Contracts deployed:
|
||||
- Alphabet (AZ) [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/alphabet)
|
||||
- Audit [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/audit)
|
||||
- Balance [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/balance)
|
||||
- Container [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/container)
|
||||
- FrostFS [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/frostfs)
|
||||
- FrostFSID [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/frostfsid)
|
||||
- NNS [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/nns)
|
||||
- Netmap [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/netmap)
|
||||
- Policy [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/policy)
|
||||
- Processing [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/processing)
|
||||
- NeoFSID [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/neofsid)
|
||||
- Proxy [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/proxy)
|
||||
|
||||
- Reputation [contract](https://git.frostfs.info/TrueCloudLab/frostfs-contract/src/branch/master/reputation)
|
||||
|
||||
RPC available at `http://morph-chain.frostfs.devenv:30333`.
|
||||
|
||||
## .env settings
|
||||
|
|
|
@ -20,10 +20,6 @@ services:
|
|||
- ./../../vendor/hosts:/etc/hosts
|
||||
- ./../../wallets/wallet.json:/wallets/wallet.json
|
||||
- ./../s3_gate/wallet.json:/wallets/s3-wallet.json
|
||||
- ./../storage/wallet01.json:/wallets/storage/wallet01.json
|
||||
- ./../storage/wallet02.json:/wallets/storage/wallet02.json
|
||||
- ./../storage/wallet03.json:/wallets/storage/wallet03.json
|
||||
- ./../storage/wallet04.json:/wallets/storage/wallet04.json
|
||||
- chains:/chains
|
||||
|
||||
networks:
|
||||
|
|
|
@ -11,7 +11,6 @@ ProtocolConfiguration:
|
|||
VerifyTransactions: true
|
||||
StateRootInHeader: true
|
||||
P2PSigExtensions: true
|
||||
Hardforks: {}
|
||||
|
||||
ApplicationConfiguration:
|
||||
SkipBlockVerification: false
|
||||
|
|
1
services/rest_gate/.env
Symbolic link
1
services/rest_gate/.env
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../.env
|
1
services/rest_gate/.hosts
Normal file
1
services/rest_gate/.hosts
Normal file
|
@ -0,0 +1 @@
|
|||
IPV4_PREFIX.83 rest.LOCAL_DOMAIN
|
1
services/rest_gate/.int_test.env
Symbolic link
1
services/rest_gate/.int_test.env
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../.int_test.env
|
12
services/rest_gate/cfg/config.yml
Normal file
12
services/rest_gate/cfg/config.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
prometheus:
|
||||
enabled: true
|
||||
address: :9090
|
||||
|
||||
server:
|
||||
# The IP and port to listen on.
|
||||
listen-address: 0.0.0.0:8090
|
||||
|
||||
# Wallet settings
|
||||
wallet:
|
||||
path: /wallet.json # Path to wallet
|
||||
passphrase: one # Password to decrypt wallet
|
32
services/rest_gate/docker-compose.yml
Normal file
32
services/rest_gate/docker-compose.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
|
||||
services:
|
||||
rest_gate:
|
||||
image: ${REST_GW_IMAGE}:${REST_GW_VERSION}
|
||||
domainname: ${LOCAL_DOMAIN}
|
||||
hostname: rest
|
||||
container_name: rest_gate
|
||||
restart: on-failure
|
||||
networks:
|
||||
rest_gate_int:
|
||||
internet:
|
||||
ipv4_address: ${IPV4_PREFIX}.83
|
||||
volumes:
|
||||
- ./wallet.json:/wallet.json
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
- ./cfg:/etc/frostfs/rest
|
||||
stop_signal: SIGTERM
|
||||
stop_grace_period: 15s
|
||||
env_file: [ ".env", ".int_test.env" ]
|
||||
command: [ "frostfs-rest-gw", "--config", "/etc/frostfs/rest/config.yml" ]
|
||||
environment:
|
||||
- REST_GW_POOL_PEERS_0_ADDRESS=s01.${LOCAL_DOMAIN}:8080
|
||||
- REST_GW_POOL_PEERS_1_ADDRESS=s02.${LOCAL_DOMAIN}:8080
|
||||
- REST_GW_POOL_PEERS_2_ADDRESS=s03.${LOCAL_DOMAIN}:8080
|
||||
- REST_GW_POOL_PEERS_3_ADDRESS=s04.${LOCAL_DOMAIN}:8080
|
||||
|
||||
networks:
|
||||
rest_gate_int:
|
||||
internet:
|
||||
external: true
|
||||
name: basenet_internet
|
30
services/rest_gate/wallet.json
Normal file
30
services/rest_gate/wallet.json
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"version": "3.0",
|
||||
"accounts": [
|
||||
{
|
||||
"address": "NPFCqWHfi9ixCJRu7DABRbVfXRbkSEr9Vo",
|
||||
"key": "6PYTAGjdaeicUDPqGv9mmgwb9kTwimWJJmmfNqJSDGH9qM79zSRcL9oHiB",
|
||||
"label": "REST Gateway",
|
||||
"contract": {
|
||||
"script": "DCECcuPzZCZ2VyDsm2jKEOMnU6xEWO2bF1dvOvBWTDFYB1ZBVuezJw==",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "parameter0",
|
||||
"type": "Signature"
|
||||
}
|
||||
],
|
||||
"deployed": false
|
||||
},
|
||||
"lock": false,
|
||||
"isDefault": false
|
||||
}
|
||||
],
|
||||
"scrypt": {
|
||||
"n": 16384,
|
||||
"r": 8,
|
||||
"p": 8
|
||||
},
|
||||
"extra": {
|
||||
"Tokens": null
|
||||
}
|
||||
}
|
|
@ -14,8 +14,10 @@ services:
|
|||
volumes:
|
||||
# Gate wallet
|
||||
- ./wallet.json:/wallet.json
|
||||
# Folder for custom user wallets
|
||||
- ./../../wallets/:/wallets/
|
||||
# Custom user wallets
|
||||
- ./wallets:/wallets
|
||||
# Default user wallet
|
||||
- ./../../wallets/wallet.json:/wallets/wallet.json
|
||||
- ./tls.key:/tls.key
|
||||
- ./tls.crt:/tls.crt
|
||||
- ./../../vendor/hosts:/etc/hosts
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
|
||||
version: "2.4"
|
||||
services:
|
||||
s3_lifecycler:
|
||||
image: ${S3_LIFECYCLER_IMAGE}:${S3_LIFECYCLER_VERSION}
|
||||
|
|
Loading…
Reference in a new issue