211 lines
12 KiB
Markdown
211 lines
12 KiB
Markdown
# FrostFS S3 Lifecycler configuration
|
|
|
|
This section contains detailed FrostFS S3 Lifecycler component configuration description.
|
|
|
|
# Structure
|
|
|
|
| Section | Description |
|
|
|---------------------|--------------------------------------------------------------|
|
|
| `wallet` | [Wallet configuration](#wallet-section) |
|
|
| `logger` | [Logger configuration](#logger-section) |
|
|
| `pprof` | [Pprof configuration](#pprof-section) |
|
|
| `prometheus` | [Prometheus configuration](#prometheus-section) |
|
|
| `morph` | [Morph configuration](#morph-section) |
|
|
| `credential_source` | [Credential source configuration](#credentialsource-section) |
|
|
| `lifecycle` | [Lifecycle configuration](#lifecycle-section) |
|
|
| `frostfs` | [FrostFS configuration](#frostfs-section) |
|
|
|
|
### Reload on SIGHUP
|
|
|
|
Some config values can be reloaded on SIGHUP signal.
|
|
Such parameters have special mark in tables below.
|
|
|
|
You can send SIGHUP signal to app using the following command:
|
|
|
|
```shell
|
|
$ kill -s SIGHUP <app_pid>
|
|
```
|
|
|
|
# `wallet` section
|
|
|
|
Configuration of key for lifecycle service.
|
|
|
|
```yaml
|
|
wallet:
|
|
path: /path/to/wallet.json
|
|
address: Nhfg3TbpwogLvDGVvAvqyThbsHgoSUKwtn
|
|
passphrase: ""
|
|
```
|
|
|
|
| Parameter | Type | Default value | Description |
|
|
|--------------|----------|---------------|--------------------------------------------------------------------------|
|
|
| `path` | `string` | | Path to wallet |
|
|
| `address` | `string` | | Account address to get from wallet. If omitted default one will be used. |
|
|
| `passphrase` | `string` | | Passphrase to decrypt wallet. |
|
|
|
|
# `logger` section
|
|
|
|
```yaml
|
|
logger:
|
|
level: debug
|
|
destination: stdout
|
|
```
|
|
|
|
| Parameter | Type | SIGHUP reload | Default value | Description |
|
|
|---------------|----------|---------------|---------------|--------------------------------------------------------------------------------------|
|
|
| `level` | `string` | yes | `info` | Logging level. Possible values: `debug`, `info`, `warn`, `dpanic`, `panic`, `fatal`. |
|
|
| `destination` | `string` | no | `stdout` | Destination for logger: `stdout` or `journald` |
|
|
|
|
# `pprof` section
|
|
|
|
Contains configuration for the `pprof` profiler.
|
|
|
|
```yaml
|
|
pprof:
|
|
enabled: false
|
|
address: localhost:8077
|
|
```
|
|
|
|
| Parameter | Type | SIGHUP reload | Default value | Description |
|
|
|-----------|----------|---------------|---------------|-----------------------------------------------|
|
|
| `enabled` | `bool` | yes | `false` | Flag to enable pprof service. |
|
|
| `address` | `string` | yes | | Address that pprof service listener binds to. |
|
|
|
|
# `prometheus` section
|
|
|
|
Contains configuration for the `prometheus` metrics service.
|
|
|
|
```yaml
|
|
prometheus:
|
|
enabled: false
|
|
address: localhost:8078
|
|
```
|
|
|
|
| Parameter | Type | SIGHUP reload | Default value | Description |
|
|
|-----------|----------|---------------|---------------|----------------------------------------------------|
|
|
| `enabled` | `bool` | yes | `false` | Flag to enable prometheus service. |
|
|
| `address` | `string` | yes | | Address that prometheus service listener binds to. |
|
|
|
|
# `morph` section
|
|
|
|
Contains configuration for the `morph` chain.
|
|
|
|
```yaml
|
|
morph:
|
|
rpc_endpoint:
|
|
- address: wss://rpc1.morph.frostfs.info:40341/ws
|
|
priority: 0
|
|
trusted_ca_list:
|
|
- "/path/to/ca.pem"
|
|
certificate: "/path/to/cert"
|
|
key: "/path/to/key"
|
|
- address: wss://rpc2.morph.frostfs.info:40341/ws
|
|
priority: 2
|
|
reconnect_clients_interval: 30s
|
|
dial_timeout: 5s
|
|
contract:
|
|
netmap: netmap.frostfs
|
|
frostfsid: frostfsid.frostfs
|
|
```
|
|
|
|
| Parameter | Type | SIGHUP reload | Default value | Description |
|
|
|--------------------------------|------------|---------------|---------------------|------------------------------------------------------------------------------------------------------------------|
|
|
| `rpc_endpoint.address` | `string` | no | | The address of the RPC host to connect. |
|
|
| `rpc_endpoint.priority` | `int` | no | | Priority of RPC endpoint. |
|
|
| `rpc_endpoint.trusted_ca_list` | `[]string` | no | | List of paths to CAs to use in mTLS configuration. |
|
|
| `rpc_endpoint.certificate` | `string` | no | | Path to certificate to use in mTLS configuration. |
|
|
| `rpc_endpoint.key` | `string` | no | | Path to key to use in mTLS configuration. |
|
|
| `reconnect_clients_interval` | `string` | no | `30s` | When all endpoints are failed. Overall connection be reinitialized. This value is time between retries. |
|
|
| `reconnect_clients_interval` | `string` | no | `5s` | Dial timeout to connect to morph endpoint. |
|
|
| `contract.netmap` | `string` | no | `netmap.frostfs` | Netmap contract hash (LE) or name in NNS. |
|
|
| `contract.frostfsid` | `string` | no | `frostfsid.frostfs` | FrostfsID contract hash (LE) or name in NNS. This contract is used to get all users to process their containers. |
|
|
| `contract.container` | `string` | no | `container.frostfs` | Container contract hash (LE) or name in NNS. |
|
|
|
|
# `credential_source` section
|
|
|
|
Contains configuration for the source of user private keys (credentials).
|
|
|
|
```yaml
|
|
credential_source:
|
|
wallets:
|
|
- path: /path/to/wallet.json
|
|
address: NfgHwwTi3wHAS8aFAN243C5vGbkYDpqLHP
|
|
passphrase: ""
|
|
```
|
|
|
|
| Parameter | Type | SIGHUP reload | Default value | Description |
|
|
|----------------------|----------|---------------|---------------|-----------------------------------------------------------------|
|
|
| `wallets` | | | | Source of user private keys as wallets files on filesystem. |
|
|
| `wallets.path` | `string` | no | | Path to wallet on filesystem. |
|
|
| `wallets.address` | `string` | no | | Account address in wallet. If omitted default one will be used. |
|
|
| `wallets.passphrase` | `string` | no | | Passphrase to decrypt wallet. |
|
|
|
|
# `lifecycle` section
|
|
|
|
Configuration for main lifecycle handling procedure.
|
|
|
|
```yaml
|
|
lifecycle:
|
|
job_fetcher_buffer: 1000
|
|
executor_pool_size: 100
|
|
services:
|
|
- 0313b1ac3a8076e155a7e797b24f0b650cccad5941ea59d7cfd51a024a8b2a06bf
|
|
```
|
|
|
|
| Parameter | Type | SIGHUP reload | Default value | Description |
|
|
|----------------------|------------|---------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| `job_fetcher_buffer` | `int` | no | `1000` | Size for buffered channel to fetch users/container and other data for lifecycle procedure. This param helps reduce number concurrent outgoing network requests. |
|
|
| `executor_pool_size` | `int` | no | `100` | Worker pool size to tidy container up (according to lifecycle configuration). |
|
|
| `services` | `[]string` | yes | | List of Lifecycle services public keys. Needs to split jobs. |
|
|
|
|
# `frostfs` section
|
|
|
|
Configuration for FrostFS storage.
|
|
|
|
```yaml
|
|
frostfs:
|
|
stream_timeout: 10s
|
|
connect_timeout: 10s
|
|
healthcheck_timeout: 5s
|
|
rebalance_interval: 1m
|
|
pool_error_threshold: 100
|
|
tree_pool_max_attempts: 4
|
|
|
|
peers:
|
|
0:
|
|
address: node1.frostfs:8080
|
|
priority: 1
|
|
weight: 1
|
|
1:
|
|
address: node2.frostfs:8080
|
|
priority: 2
|
|
weight: 0.1
|
|
2:
|
|
address: node3.frostfs:8080
|
|
priority: 2
|
|
weight: 0.9
|
|
```
|
|
|
|
| Parameter | Type | SIGHUP reload | Default value | Description |
|
|
|--------------------------|------------|---------------|---------------|---------------------------------------------------------------------------------------------------------------------------|
|
|
| `stream_timeout` | `duration` | no | `10s` | Timeout for individual operations in streaming RPC. |
|
|
| `connect_timeout` | `duration` | no | `10s` | Timeout to connect to a storage node. |
|
|
| `healthcheck_timeout` | `duration` | no | `15s` | Timeout to check storage node health during rebalance. |
|
|
| `rebalance_interval` | `duration` | no | `60s` | Interval to check storage node health. |
|
|
| `pool_error_threshold` | `uint32` | no | `100` | The number of errors on connection after which storage node is considered as unhealthy. |
|
|
| `tree_pool_max_attempts` | `uint32` | no | `0` | Sets max attempt to make successful tree request. Value 0 means the number of attempts equals to number of nodes in pool. |
|
|
|
|
## `peers` section
|
|
|
|
This configuration makes TO-IAM use the first node (node1.frostfs:8080)
|
|
while it's healthy. Otherwise, TO-IAM uses the second node (node2.frostfs:8080)
|
|
for 10% of requests and the third node (node3.frostfs:8080) for 90% of requests.
|
|
Until nodes with the same priority level are healthy
|
|
nodes with other priority are not used.
|
|
The lower the value, the higher the priority.
|
|
|
|
| Parameter | Type | Default value | Description |
|
|
|------------------|----------|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| `peers.address` | `string` | | Address of storage node. |
|
|
| `peers.priority` | `int` | `1` | It allows to group nodes and don't switch group until all nodes with the same priority will be unhealthy. The lower the value, the higher the priority. |
|
|
| `peers.weight` | `float` | `1` | Weight of node in the group with the same priority. Distribute requests to nodes proportionally to these values. |
|