2021-10-11 10:49:21 +00:00
|
|
|
# NeoFS Admin Tool
|
|
|
|
|
|
|
|
## Overview
|
|
|
|
|
|
|
|
Admin tool provides an easier way to deploy and maintain private installation
|
2021-10-11 15:29:00 +00:00
|
|
|
of NeoFS. Private installation provides a set of N3 consensus nodes, NeoFS
|
2021-10-11 10:49:21 +00:00
|
|
|
Alphabet, and Storage nodes. Admin tool generates consensus keys, initializes
|
2021-10-11 14:26:28 +00:00
|
|
|
side chain, and provides functions to update the network and register new
|
2021-10-11 10:49:21 +00:00
|
|
|
Storage nodes.
|
|
|
|
|
|
|
|
## Build
|
|
|
|
|
2021-10-11 14:26:28 +00:00
|
|
|
To build binary locally, use `make bin/neofs-adm` command.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
2021-10-11 14:26:28 +00:00
|
|
|
For clean build inside a docker container use `make docker/bin/neofs-adm`.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
|
|
|
Build docker image with `make image-adm`.
|
|
|
|
|
|
|
|
At NeoFS private install deployment, neofs-adm requires compiled NeoFS
|
|
|
|
contracts. Find them in the latest release of
|
|
|
|
[neofs-contract repository](https://github.com/nspcc-dev/neofs-contract/releases).
|
|
|
|
|
|
|
|
|
|
|
|
## Commands
|
|
|
|
|
|
|
|
### Config
|
|
|
|
|
|
|
|
Config section provides `init` command that creates configuration file for the
|
|
|
|
private installation deployment and updates. Config file is optional, all
|
2021-10-11 14:26:28 +00:00
|
|
|
parameters can be passed by arguments or read from standard input (wallet
|
2021-10-11 10:49:21 +00:00
|
|
|
passwords).
|
|
|
|
|
|
|
|
Config example:
|
|
|
|
```yaml
|
|
|
|
rpc-endpoint: https://address:port # side chain RPC node endpoint
|
|
|
|
alphabet-wallets: /path # path to consensus node / alphabet wallets storage
|
|
|
|
network:
|
|
|
|
max_object_size: 67108864 # max size of single NeoFS object, bytes
|
|
|
|
epoch_duration: 240 # duration of NeoFS epoch in blocks, consider block generation frequency in side chain
|
|
|
|
basic_income_rate: 0 # basic income rate, for private consider 0
|
|
|
|
fee:
|
|
|
|
audit: 0 # network audit fee, for private installation consider 0
|
|
|
|
candidate: 0 # inner ring candidate registration fee, for private installation consider 0
|
|
|
|
container: 0 # container creation fee, for private installation consider 0
|
2021-10-18 12:01:38 +00:00
|
|
|
container_alias: 0 # container nice-name registration fee, for private installation consider 0
|
2021-10-11 10:49:21 +00:00
|
|
|
withdraw: 0 # withdraw fee, for private installation consider 0
|
|
|
|
credentials: # passwords for consensus node / alphabet wallets
|
2021-10-11 15:29:00 +00:00
|
|
|
az: password1
|
|
|
|
buky: password2
|
|
|
|
vedi: password3
|
|
|
|
glagoli: password4
|
|
|
|
dobro: password5
|
|
|
|
yest: password6
|
|
|
|
zhivete: password7
|
2021-10-11 10:49:21 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Morph
|
|
|
|
|
|
|
|
#### Network deployment
|
|
|
|
|
2021-10-11 15:29:00 +00:00
|
|
|
- `generate-alphabet` generates a set of wallets for consensus and
|
2021-10-11 10:49:21 +00:00
|
|
|
Alphabet nodes.
|
|
|
|
|
2021-10-11 15:29:00 +00:00
|
|
|
- `init` initializes side chain by deploying smart contracts and
|
2021-10-11 10:49:21 +00:00
|
|
|
setting provided NeoFS network configuration.
|
|
|
|
|
|
|
|
- `generate-storage-wallet` generates wallet for the Storage node that
|
2021-10-11 14:26:28 +00:00
|
|
|
is ready for deployment. It also transfers a bit of side chain GAS, so this
|
2021-10-11 10:49:21 +00:00
|
|
|
wallet can be used for NeoFS bootstrap.
|
|
|
|
|
|
|
|
#### Network maintenance
|
|
|
|
|
2021-10-11 15:29:00 +00:00
|
|
|
- `force-new-epoch` increments NeoFS epoch number and executes new epoch
|
2021-10-11 10:49:21 +00:00
|
|
|
handlers in NeoFS nodes.
|
|
|
|
|
2021-10-11 14:26:28 +00:00
|
|
|
- `refill-gas` transfers side chain GAS to the specified wallet.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
2021-10-11 15:29:00 +00:00
|
|
|
- `update-contracts` updates contracts to a new version.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
|
|
|
#### Container migration
|
|
|
|
|
2021-10-11 14:26:28 +00:00
|
|
|
If the network has to be redeployed, these commands will migrate all container meta
|
2021-10-11 10:49:21 +00:00
|
|
|
info. These commands **do not migrate actual objects**.
|
|
|
|
|
2021-10-11 14:26:28 +00:00
|
|
|
- `dump-containers` saves all containers and metadata registered in the container
|
2021-10-11 10:49:21 +00:00
|
|
|
contract to a file.
|
|
|
|
|
2021-10-11 14:26:28 +00:00
|
|
|
- `restore-containers` restores previously saved containers by their repeated registration in
|
|
|
|
container contract.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
|
|
|
#### Network info
|
|
|
|
|
|
|
|
- `dump-config` prints NeoFS network configuration.
|
|
|
|
|
|
|
|
- `dump-hashes` prints NeoFS contract addresses stored in NNS.
|
|
|
|
|
|
|
|
|
|
|
|
## Private network deployment
|
|
|
|
|
|
|
|
Read step-by-step guide of private storage deployment [in docs](./docs/deploy.md).
|