Antspace Containers
Antspace worker supports Bitmain Antspace HK3 and Immersion models.
Install the Antspace Worker
1. Clone the Repository
Use the same working directory for all the workers.
Inside your working directory, run the following command to clone the (miningos-wrk-container-antspace) repository:
git clone https://github.com/tetherto/miningos-wrk-container-antspace.gitAfter cloning the repository, move into its directory:
cd miningos-wrk-container-antspace2. Install Dependencies
Inside the miningos-wrk-container-antspace directory, run the following command to install dependencies using npm:
npm ci3. Generate Configuration Files
Next, run the following script to scan the config/ directory,
copy each .example file into an active configuration file by removing the .example suffix.
sh setup-config.sh4. Configure the Worker
After generating the configuration files, edit the files in the config/ directory to match your environment:
- common.json - Worker-wide settings including worker identity
- base.thing.json - Device-specific configuration for your Antspace containers
5. Enable Debugging and Start the Workers
You can now start the workers by running the following commands:
# HK3
DEBUG="miningos:*" pm2 -s start worker.js --name 'hk3-1' -- --wtype wrk-container-rack-hk3 --env development --rack rack-1
# Immersion
DEBUG="miningos:*" pm2 -s start worker.js --name 'immersion-2' -- --wtype wrk-container-rack-immersion --env development --rack rack-26. Start Mock Servers (Development Only)
For development and testing without physical containers, use mock servers to simulate Antspace containers:
# HK3 mock
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-hk3-1' -- --type hk3 --env development --port 4012
# Immersion mock
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-immersion-2' -- --type immersion --env development --port 4013Mock servers are useful for testing the worker without connecting to actual container hardware.