2023-01-10 12:59:39 +00:00
|
|
|
# FrostFS Admin Tool
|
2021-10-11 10:49:21 +00:00
|
|
|
|
|
|
|
## Overview
|
|
|
|
|
|
|
|
Admin tool provides an easier way to deploy and maintain private installation
|
2023-03-02 10:56:11 +00:00
|
|
|
of FrostFS. Private installation provides a set of N3 consensus nodes, FrostFS
|
|
|
|
Alphabet, and Storage nodes. Admin tool generates consensus keys, initializes
|
2022-04-21 11:28:05 +00:00
|
|
|
the sidechain, and provides functions to update the network and register new
|
2021-10-11 10:49:21 +00:00
|
|
|
Storage nodes.
|
|
|
|
|
|
|
|
## Build
|
|
|
|
|
2023-03-02 10:56:11 +00:00
|
|
|
To build binary locally, use `make bin/frostfs-adm` command.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
2023-03-02 10:56:11 +00:00
|
|
|
For clean build inside a docker container, use `make docker/bin/frostfs-adm`.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
|
|
|
Build docker image with `make image-adm`.
|
|
|
|
|
2023-03-02 10:56:11 +00:00
|
|
|
At FrostFS private install deployment, frostfs-adm requires compiled FrostFS
|
|
|
|
contracts. Find them in the latest release of
|
2023-03-07 13:38:26 +00:00
|
|
|
[frostfs-contract repository](https://git.frostfs.info/TrueCloudLab/frostfs-contract/releases).
|
2021-10-11 10:49:21 +00:00
|
|
|
|
|
|
|
## Commands
|
|
|
|
|
|
|
|
### Config
|
|
|
|
|
2022-04-21 11:28:05 +00:00
|
|
|
Config section provides `init` command that creates a configuration file for
|
2021-10-11 10:49:21 +00:00
|
|
|
private installation deployment and updates. Config file is optional, all
|
2023-03-02 10:56:11 +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
|
2022-04-21 11:28:05 +00:00
|
|
|
rpc-endpoint: https://address:port # sidechain RPC node endpoint
|
2021-10-11 10:49:21 +00:00
|
|
|
alphabet-wallets: /path # path to consensus node / alphabet wallets storage
|
|
|
|
network:
|
2023-01-11 14:26:49 +00:00
|
|
|
max_object_size: 67108864 # max size of a single FrostFS object, bytes
|
|
|
|
epoch_duration: 240 # duration of a FrostFS epoch in blocks, consider block generation frequency in the sidechain
|
2021-10-11 10:49:21 +00:00
|
|
|
fee:
|
|
|
|
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
|
|
|
|
|
2023-03-02 10:56:11 +00:00
|
|
|
- `generate-alphabet` generates a set of wallets for consensus and
|
2024-06-26 14:10:27 +00:00
|
|
|
Alphabet nodes. The list of the name for alphabet wallets(no gaps between names allowed, order is important):
|
|
|
|
- az, buky, vedi, glagoli, dobro, yest, zhivete, dzelo, zemlja, izhe, izhei, gerv, kako, ljudi, mislete, nash, on, pokoj, rtsi, slovo, tverdo, uk
|
2021-10-11 10:49:21 +00:00
|
|
|
|
2022-04-21 11:28:05 +00:00
|
|
|
- `init` initializes the sidechain by deploying smart contracts and
|
2023-01-11 14:26:49 +00:00
|
|
|
setting provided FrostFS network configuration.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
2023-03-02 10:56:11 +00:00
|
|
|
- `generate-storage-wallet` generates a wallet for the Storage node that
|
|
|
|
is ready for deployment. It also transfers a bit of sidechain GAS, so this
|
2023-01-11 14:26:49 +00:00
|
|
|
wallet can be used for FrostFS bootstrap.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
|
|
|
#### Network maintenance
|
|
|
|
|
2022-05-11 18:35:49 +00:00
|
|
|
- `set-config` add/update configuration values in the Netmap contract.
|
|
|
|
|
2023-01-11 14:26:49 +00:00
|
|
|
- `force-new-epoch` increments FrostFS epoch number and executes new epoch
|
|
|
|
handlers in FrostFS nodes.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
2023-03-02 10:56:11 +00:00
|
|
|
- `refill-gas` transfers sidechain 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
|
|
|
|
|
2022-04-21 11:28:05 +00:00
|
|
|
If a 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.
|
|
|
|
|
2023-03-02 10:56:11 +00:00
|
|
|
- `restore-containers` restores previously saved containers by their repeated registration in
|
2022-04-21 11:28:05 +00:00
|
|
|
the container contract.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
2022-10-26 10:58:11 +00:00
|
|
|
- `list-containers` output all containers ids.
|
|
|
|
|
2021-10-11 10:49:21 +00:00
|
|
|
#### Network info
|
|
|
|
|
2023-01-11 14:26:49 +00:00
|
|
|
- `dump-config` prints FrostFS network configuration.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
2023-01-11 14:26:49 +00:00
|
|
|
- `dump-hashes` prints FrostFS contract addresses stored in NNS.
|
2021-10-11 10:49:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Private network deployment
|
|
|
|
|
|
|
|
Read step-by-step guide of private storage deployment [in docs](./docs/deploy.md).
|