Containers
MicroBT Containers
MicroBT worker supports Kehua and Wonderint container models.
Install the MicroBT 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-microbt) repository:
git clone https://github.com/tetherto/miningos-wrk-container-microbt.gitAfter cloning the repository, move into its directory:
cd miningos-wrk-container-microbt2. Install Dependencies
Inside the miningos-wrk-container-microbt 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. Enable Debugging and Start the Workers
You can now start the workers by running the following commands:
# Kehua
DEBUG="miningos:*" pm2 -s start worker.js --name 'kehua-1' -- --wtype wrk-container-rack-kehua --env development --rack rack-1
# Wonderint:**
DEBUG="miningos:*" pm2 -s start worker.js --name 'wonderint-2' -- --wtype wrk-container-rack-wonderint --env development --rack rack-25. Start Mock Servers
You can use the following commands to start a mock server:
# Kehua container mock
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-kehua-1' -- --type kehua --env development --port 4018
# Wonderint container mock
DEBUG="miningos:*" pm2 -s start mock/server.js --name 'mock-wonderint-2' -- --type wonderint --env development --port 4019