Register Workers and Mock Devices

You need to register the worker's RPC keys to allow ork to fetch and aggregate data.

1. Get All Worker Keys

In CLI terminal, change directory to mining-os working directory you created, then run the following command that will:

  1. Iterate over each miningos-wrk-*/status directory.

  2. Print the current directory name.

  3. Read all .json files in the directory, extract lines containing rpcPublicKey, and display the first match.

for dir in miningos-wrk-*/status; do
  echo "=== $dir ==="
  cat $dir/*.json | grep rpcPublicKey | head -1
done

Register Racks With Ork

Next, update the following script to register the racks with the Ork service orchestrator.

  1. Replace ORK_RPC_KEY with the rpcPublicKey you generated when you started the Ork service orchestrator.

  2. For each worker listed in step 1, add the corresponding rpcPublicKey.

#antspace
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"container-as-hk3-shelf-0","type":"container-as-hk3","info":{"rpcPublicKey":""}}'

hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"container-as-immersion-shelf-1","type":"container-as-imm","info":{"rpcPublicKey":""}}'

#bitdeer
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"container-bd-d40-a1346-shelf-2","type":"container-bd-d40_a1346","info":{"rpcPublicKey":""}}'

hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"container-bd-d40-m30-shelf-1","type":"container-bd-d40_m30","info":{"rpcPublicKey":""}}'

hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"container-bd-d40-m56-shelf-0","type":"container-bd-d40","info":{"rpcPublicKey":""}}'

hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"container-bd-d40-s19xp-shelf-3","type":"container-bd-d40_s19xp","info":{"rpcPublicKey":""}}'

#microbt
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"container-mbt-kehua-shelf-0","type":"container-mbt-kehua","info":{"rpcPublicKey":""}}'

hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"container-mbt-wonderint-shelf-1","type":"container-mbt-wonderint","info":{"rpcPublicKey":""}}'

#antminer
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"miner-am-s19xp-shelf-0","type":"miner-am-s19xp","info":{"rpcPublicKey":""}}'

hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"miner-am-s19xp_h-shelf-1","type":"miner-am-s19xp_h","info":{"rpcPublicKey":""}}'

#avalon
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"miner-av-a1346-shelf-0","type":"miner-av-a1346","info":{"rpcPublicKey":""}}'

#whatsmminer
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"miner-wm-m30sp-shelf-1","type":"miner-wm-m30sp","info":{"rpcPublicKey":""}}'

hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"miner-wm-m53s-shelf-3","type":"miner-wm-m53s","info":{"rpcPublicKey":""}}'

hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"miner-wm-m56s-shelf-0","type":"miner-wm-m56s","info":{"rpcPublicKey":""}}'

#electricity
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"electricity-base-shelf-0","type":"electricity","info":{"rpcPublicKey":""}}'

#inventory
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"inventory-container_part-drycooler-shelf-0","type":"inventory-container_part","info":{"rpcPublicKey":""}}'
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"inventory-miner_part-controller-shelf-3","type":"inventory-miner_part","info":{"rpcPublicKey":""}}'
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"inventory-miner_part-hashboard-shelf-2","type":"inventory-miner_part","info":{"rpcPublicKey":""}}'
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"inventory-miner_part-psu-shelf-1","type":"inventory-miner_part","info":{"rpcPublicKey":""}}'

#f2pool
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"minerpool-f2pool-shelf-0","type":"minerpool-f2pool","info":{"rpcPublicKey":""}}'

#ocean pool
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"minerpool-ocean-shelf-0","type":"minerpool-ocean","info":{"rpcPublicKey":""}}'

#mempool
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"mempool-1","type":"mempool","info":{"rpcPublicKey":""}}'

#openweather
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"openweather-shelf-0","type":"openweather","info":{"rpcPublicKey":""}}'

#powermeters
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"powermeter-abb-b24-shelf-1","type":"powermeter-abb-b24","info":{"rpcPublicKey":""}}'
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"powermeter-abb-m1m20-shelf-2","type":"powermeter-abb-m1m20","info":{"rpcPublicKey":""}}'
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"powermeter-abb-m4m20-shelf-3","type":"powermeter-abb-m4m20","info":{"rpcPublicKey":""}}'
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"powermeter-satec-pm180-shelf-0","type":"powermeter-satec-pm180","info":{"rpcPublicKey":""}}'
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"powermeter-schneider-pm5340-shelf-0","type":"powermeter-schneider","info":{"rpcPublicKey":""}}'
hp-rpc-cli -s ORK_RPC_KEY -m registerRack -d '{"id":"sensor-temp-seneca-temp-seneca-shelf-0","type":"sensor-temp-seneca-temp-seneca","info":{"rpcPublicKey":""}}'

Register Mock Devices

Note: The following commands register a single device for each supported device type and model solely to demonstrate the registration process. For your actual deployment, execute only the commands relevant to your target devices and environment.

These example commands use a localhost IP address and mock ports to connect to mock servers. In a production environment, replace these values with the actual device IP addresses and ports, and provide the correct device-specific details, including serial numbers, MAC addresses, and the required authentication credentials (usernames and passwords).

Additionally, ensure that each registration command is updated to use the appropriate RPC key for the corresponding worker, as required for secure communication.

Containers

Miners

Powermeters

Temperature Sensor

circle-info

Once all the workers are running and devices are registered, open web UI link http://localhost:3000/signin and login with the super admin email.

Last updated