Skip to content

Latest commit

 

History

History
72 lines (51 loc) · 1.93 KB

DISTRIBUTOR.md

File metadata and controls

72 lines (51 loc) · 1.93 KB

Instructions For Distributor node operators

Setup

mkdir -p ./distributor/config
mkdir -p ./distributor/keystore
mkdir -p ./distributor/scratch

cp distributor.example.config.yml ./distributor/config/config.yml
  • Copy your distributor role key to the keystore as ./distributor/keystore/distributor-role-key.json, or set a suri or mnemonic key in the keys list of the config.yml file if you intend to run lead/operator commands from this instance.

  • Edit your config.yml file and set the correct workerId, and any other settings the lead might ask for.

Startup your node

docker compose up -d distributor

Running operator, lead and node commands

docker compose run --rm distributor operator --help
docker compose run --rm distributor leader --help
docker compose run --rm distributor node --help

Examples:

Starting/Stopping the public api.

Notice we use the docker service name to reach the endpoint:

docker compose run --rm distributor \
  node:stop-public-api --url http://distributor:3335/
docker compose run --rm distributor \
  node:start-public-api --url http://distributor:3335/

Accepting invitation

docker compose run --rm distributor \
  operator:accept-invitation -B 1:4 -w 3

Setting operator metadata

Remember the commands are running within the container, so if you are passing any arguments such as a path to an input file it should be on a reachable volume like the /scratch volume.

Say you have the metadata file in your home directory ~/metadata.json.

You copy it to the scratch volume path:

cp ~/metadata.json ./distributor/scratch/metadata.json
docker compose run --rm distributor \
  operator:set-metadata -B 0:1 -w 13 --input /scratch/metadata.json

Or you can mount the file directly:

docker compose run --rm \
  -v ~/metadata.json:/metadata.json \
  distributor operator:set-metadata -B 0:1 -w 13 --input /metadata.json