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 asuri
ormnemonic
key in the keys list of theconfig.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.
docker compose up -d distributor
docker compose run --rm distributor operator --help
docker compose run --rm distributor leader --help
docker compose run --rm distributor node --help
Examples:
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/
docker compose run --rm distributor \
operator:accept-invitation -B 1:4 -w 3
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