Züs
Search…
⌃K

Step 3: Initialize and Build the Züs components

Initialize the Sharder and Miner directories

  1. 1.
    Navigate to 0chain directory
cd 0chain
2. Run the init.setup.sh script located in the docker.local/bin directory using the command
./docker.local/bin/init.setup.sh
After running the script you will see the sharder and miner directories populated in docker.local folder.
3. Lets verify whether the directories exist by navigating to docker.local folder and running
ls docker.local/
The output should be similar to this:
Makefile build.benchmarks build.sc_unit_test build.unit_test miner2 miner6 sharder2
benchmarks build.genkeys build.sharder config miner3 miner7 sharder3
bin build.magicBlock build.swagger docker-clean miner4 miner8 sharder4
build.base build.miner build.test.multisigsc miner1 miner5 sharder1 sql_script

Build the miner and sharder containers

1. Navigate to 0chain directory
cd 0chain
2. First build the base containers using the script.(This may take few minutes)
./docker.local/bin/build.base.sh
Screenshot after successful build:
Base Build
Note: Before building sharders and miners, install Homebrew and mockery for Linux and Mac from here.
3.For building the sharder containers, first build mocks using
./generate_mocks.sh
then build sharders using
./docker.local/bin/build.sharders.sh
Screenshot of successful sharder build:
Sharder Build
4. Build the miner containers using
./docker.local/bin/build.miners.sh
Screenshot of a successful miner build:
Miner Build

Initialize the blobber directories

  1. 1.
    Navigate to blobber directory
cd blobber
2. Inside blobber directory, run the commands below .The first command makes the shell script executable and while the next ones execute the shell script to create blobber directories.
chmod +x ./docker.local/bin/blobber.init.setup.sh
./docker.local/bin/blobber.init.setup.sh
NOTE: For Mac :
chmod +x ./docker.local/bin/blobber.init.setup-mac.sh
./docker.local/bin/blobber.init.setup-mac.sh
After running the script you will see the blobber directories populated in docker.local folder
3. Let's verify whether the directories exist by navigating to docker.local folder and running
ls docker.local/
The output should be like this:
b0docker-compose.yml blobber4 Dockerfile
bin blobber5 IntegrationTestsBlobberDockerfile
blobber1 blobber6 keys_config
blobber2 docker-clean p0docker-compose.yml
blobber3 docker-compose.yml ValidatorDockerfilecd blobber/config
  1. 4.
    Navigate to the config directory using
cd blobber/config
Use the nano editor to edit the block_worker field for both files :
nano 0chain_blobber.yaml
and
nano 0chain_validator.yaml
Note : Change the default value of block_worker field with the following: http://198.18.0.98:9091/ for the local chain.

Build the blobber containers

  1. 1.
    Go back to blobber directory
cd blobber
2. Now run the following scripts located in the docker.local/bin directory .
./docker.local/bin/build.base.sh
./docker.local/bin/build.blobber.sh
./docker.local/bin/build.validator.sh
Screenshot after a successful blobber build:
Blobber Build