Leszek Wiesner b13bd5b76b Merge branch 'distributor-node' into distributor-node-staging-2 3 gadi atpakaļ
..
bin 1a65e808d4 Distributor node - initial commit 3 gadi atpakaļ
config 98f04864b3 Support different ways of providing keys 3 gadi atpakaļ
docs 56049cd87c Update autogenerated docs 3 gadi atpakaļ
scripts c4e46463ff Add new groups to test-commands script 3 gadi atpakaļ
src b13bd5b76b Merge branch 'distributor-node' into distributor-node-staging-2 3 gadi atpakaļ
test 1a65e808d4 Distributor node - initial commit 3 gadi atpakaļ
.eslintignore 1a65e808d4 Distributor node - initial commit 3 gadi atpakaļ
.eslintrc.js 1b6ac27d41 Improve error handling (mostly query-node-related) 3 gadi atpakaļ
.gitignore 4c1681309c Request queue, improved downloads & storage node proxying, error handling, bug fixes 3 gadi atpakaļ
.prettierignore 2ad5fc275a Add md files to prettierignore 3 gadi atpakaļ
README.md 98f04864b3 Support different ways of providing keys 3 gadi atpakaļ
config.yml 98f04864b3 Support different ways of providing keys 3 gadi atpakaļ
docker-compose.yml 1a65e808d4 Distributor node - initial commit 3 gadi atpakaļ
openapitools.json 1a65e808d4 Distributor node - initial commit 3 gadi atpakaļ
package.json 0223e44c1d Docs: commands topics 3 gadi atpakaļ
tsconfig.json e8fc3d70d5 Graceful exit, downloads concurrency limit, more logs, cache logic fixes 3 gadi atpakaļ

README.md

Joystream Distributor CLI

The Joystream Distributor CLI package contains a set of commands that allow:

  • running the actual distributor node,
  • performing the node operator on-chain duties (like setting the node metadata)
  • performing the distribution working group leader on-chain duties (like setting the distribution system limits, assigning distribution bags and buckets)

To see the list of all available commands and their flags / arguments, check out the commands documentation.

Configuration

Config file

All the configuration values required by Joystream Distributor CLI are provided via a single configuration file (either yml or json).

The path to the configuration will be (ordered from highest to lowest priority):

  • The value of --configPath flag provided when running a command, or
  • The value of CONFIG_PATH environment variable, or
  • config.yml in the current working directory by default

ENV variables

All configuration values can be overriden using environment variables, which may be useful when running the distributor node as docker service.

To determine environment variable name based on a config key, for example intervals.cacheCleanup, use the following formula:

  • convert pascalCase fieldnames to SCREAMING_SNAKE_CASE: intervals.cacheCleanup => INTERVALS.CACHE_CLEANUP
  • replace all dots with __: INTERVALS.CACHE_CLEANUP => INTERVALS__CACHE_CLEANUP
  • add JOYSTREAM_DISTRIBUTOR__ prefix: INTERVALS__CACHE_CLEANUP => JOYSTREAM_DISTRIBUTOR__INTERVALS__CACHE_CLEANUP

In case of arrays, the values must be provided as json string, for example JOYSTREAM_DISTRIBUTOR__KEYS="[{\"suri\":\"//Bob\"}]".

For more envirnoment variable examples see the distributor-node service configuration in docker-compose.yml.

For detailed configuration reference, checkout the config schema documentation.

Distributor Node

To understand how the distributor node works in detail, checkout the node documentation.