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