# Getting started with venus-cluster
This guide will walk you through how to qiuckly get started with venus-cluster
# Preparation
Install 3rd party dependencies. Please refer to instrcutions here (opens new window).
Download source code.
$ git clone https://github.com/ipfs-force-community/venus-cluster.git
- Compile
venus-cluster
component.
$ cd venus-cluster
$ make all
TIP
After completion, you should be able to find binaries for both venus-worker
and venus-sector-manager
.
Copy the binaries to your machine(s).
Copy
./venus-worker/create-cgroup.sh
to allvenus-worker
machine and execute the script under same user which you are going to runvenus-worker
.
TIP
The script will generate cgroup
for the user, which allows venus-worker
to allocate hardware resources accordingly.
# Mock mode
By default, starting a set of mock
instance can be done by a series of commands.
# venus-sector-manager
For example, start venus-sector-manager
with a dummy miner actor t010000
and schedule sealing jobs with sector size of 2KiB.
$ ./dist/bin/venus-sector-manager mock --miner=10000 --sector-size=2KiB
TIP
./mock/start_smgr.sh
could also be used to do this.
# venus-worker
- Init both sealing and permanent storage.
$ ./dist/bin/venus-worker store sealing-init -l ./mock-tmp/store1 ./mock-tmp/store2 ./mock-tmp/store3
$ ./dist/bin/venus-worker store file-init -l ./mock-tmp/remote
TIP
./mock/cleanup_store.sh
could also be used to do this.
- Start
venus-worker
inmock
mode.
$ ./dist/bin/venus-worker daemon -c ./venus-worker/assets/venus-worker.mock.toml
TIP
./mock/start_worker.sh
could also be used to do this.
# Production mode
# venus-sector-manager
- Init working directories.
$ ./dist/bin/venus-sector-manager daemon init
- Configure
~/.venus-sector-manager/sector-manager.cfg
per your use case.
TIP
For more details on what each configuration does, please refer to this document (opens new window).
- Start
venus-sector-manager
.
$ ./dist/bin/venus-sector-manager --net="cali" daemon run
TIP
--net
defaults to mainnet
.
# venus-worker
- Init sealing path for unsealed sector(s).
$ ./dist/bin/venus-worker store sealing-init -l <dir1> <dir2> <dir3> <...>
- Init permanent storage path for sealed sector(s).
$ ./dist/bin/venus-worker store file-init -l <dir1>
- Configure your
venus-worker
according to your planning of CPU cores, numa, zone and etc for each sealing phases.
TIP
For more details on what each configuration does, please refer to this document (opens new window).
- Start
venus-worker
.
$ /path/to/venus-worker daemon -c /path/to/venus-worker.toml