Mokhtar Naamani 2f05da0c6d types v0.17.2 %!s(int64=2) %!d(string=hai) anos
..
bin cde3623cf0 Distributor node - initial commit %!s(int64=3) %!d(string=hai) anos
config d3e0d343b5 distributor-node: converge on single config file %!s(int64=3) %!d(string=hai) anos
docs 47355260ef Update all autogenerated files %!s(int64=2) %!d(string=hai) anos
scripts c78bbad8f1 Fix test-commands and docker-compose example %!s(int64=3) %!d(string=hai) anos
src 2d8324c18d Merge branch 'giza_staging' into distributor-node-staging %!s(int64=2) %!d(string=hai) anos
.eslintignore d42f98bc02 Address https://github.com/Joystream/joystream/pull/2582 review comments %!s(int64=3) %!d(string=hai) anos
.eslintrc.js 1b6ac27d41 Improve error handling (mostly query-node-related) %!s(int64=3) %!d(string=hai) anos
.gitignore dc38b96d3d Request queue, improved downloads & storage node proxying, error handling, bug fixes %!s(int64=3) %!d(string=hai) anos
.prettierignore 623562fb08 Prettier - include autogenerated files %!s(int64=3) %!d(string=hai) anos
README.md 968ab458ae Update docs %!s(int64=3) %!d(string=hai) anos
config.yml ac2a1ec5e8 Query node: Undeterministic ids fix %!s(int64=2) %!d(string=hai) anos
docker-compose.yml cde3623cf0 Distributor node - initial commit %!s(int64=3) %!d(string=hai) anos
openapitools.json cde3623cf0 Distributor node - initial commit %!s(int64=3) %!d(string=hai) anos
package.json 2f05da0c6d types v0.17.2 %!s(int64=2) %!d(string=hai) anos
tsconfig.json d42f98bc02 Address https://github.com/Joystream/joystream/pull/2582 review comments %!s(int64=3) %!d(string=hai) anos

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 or oneOf objects (ie. keys), the values must be provided as json string, for example JOYSTREAM_DISTRIBUTOR__KEYS="[{\"suri\":\"//Bob\"}]".

In order to unset a value you can use one of the following strings as env variable value: "off" "null", "undefined", for example: JOYSTREAM_DISTRIBUTOR__LOGS__FILE="off".

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.