Getting Started

This section covers how to install and configure blobber. In order to use blobber functionality, you will need to join the Züs network with the following prerequisites:

Storage : Required Free Space: 5 GB for blobber files and additional free storage space for renting it on Züs network. RAM: 4GB Minimum CPU: 4 Core CPU OS: Linux (Ubuntu Preferred) Version: 20.04 and Above Mac(Apple Silicon or Intel) Version: Big Sur and Above Windows(Requires WSL) Version: Windows 11 or 10 version 2004 and above

Required Software dependencies

Installing and running blobber requires deployment-specific dependencies to be preinstalled

Docker

Docker is available for Linux, macOS and Windows platforms. Find instructions for the preferred operating system here.

Clone the Blobber Repository

After installing Docker and Docker Compose:

  1. Clone the Blobber repository using the command

git clone https://github.com/0chain/blobber.git

2. Navigate into blobber directory

cd blobber

3. 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 :

Create and Configure Containers for Blobbers

To create containers for blobbers and allow interaction between them. You need to create a network using docker which connects them with each other.

  1. To set up a network, specify the network name(testnet0),subnet and gateway by using the below command.

2. Set up the block_worker URL

A block worker URL is a field in the blobber/config/0chain_validator.yaml and0chain_blobber.yamlconfiguration files that require the URL of network you want to connect to.

Since we are connecting to the network, we will replace the default URL in blobber/config/0chain_validator.yaml and0chain_blobber.yaml with the below-mentioned URL.

3. Navigate to the config directory using

You will see blobber and validation files listed

4. Use the nano editor to edit the block_worker field for both files using the command :

and

Note: Step 5 and 6 is an optional step and only required when you are setting up blobber on cloud computing instances. In case of a local blobber setup leave them as it is. 5. Navigate back to the blobber directory and modify the b0bnode1_keys.txt located in thedocker.local/keys_config by replacing localhost with public IP of your cloud VM/ instance.

Sample Screenshot:

6. In the b0docker-compose.yml file located in thedocker.local directory, edit the command field in the blobber section, the command field will look like this :

Here replace the localhost with < public ip here > of instance /VM IP

Build Blobbers

  1. Now go back to the blobber directory and build containers using the below command

This would take few minutes to set up install dependencies.

Install zboxcli and create wallet using zwalletcli

  1. Installation Instructions for zboxcli can be found here.

  2. Once the wallet is created , the wallet information will be stored in wallet.json located in the .zcn folder of the Linux home directory.

  3. Navigate back to the .zcn folder

  1. Open the wallet.json file. It should be similar to the output below:

11. Copy the client_id value and paste it into blobbers and validators settings. These are found in blobber/config directory. Navigate to the config directory :

You will see blobber and validation files listed

12. Open both the configuration files and edit the delegate_wallet value with client_id copied from wallet. Here is a sample configuration file below:

Run Blobbers

1. In blobber/docker.localdirectory there would be six blobbers created with different folder numbers. See the screenshot below:

2. Navigate to any of the blobber(for example blobber 2) directory using

3. Run the blobber container using the below command

Here is a sample output of blobber2 successfully running:

4. Now to check whether blobber is properly running by visit them at the following link localhost:blobber port number

For blobber 1 the port number is 5051 .In our case we started blobber2 so it would be 5052

Here is the sample output:

63KB
Open

5. You can repeat step 2 for start the other blobbers .

  1. Now to check whether blobbers has joined the network navigate to zboxcli directory and run the following command

Sample Response:

In the response you should see the locally running blobbers mentioned with their urls for example http://198.18.0.92:5052.

Last updated