0CHAIN
Search…
Blobber
Blobber is a fully-featured interface service that enables storage providers(blobbers) to communicate with a 0Chain decentralized network for selling their storage space on the open market. With Blobber, storage providers are capable of performing storage transactions of any size while providing a single source of truth for storage data.

Powered with Docker

Blobber leverages docker containers for storage providers to ensure consistency and standardization across the entire network. Containers allow quick replications of blobber instances while reducing the amount of time required to set up environments and resolve debugging issues.

Reduced Complexity

With Blobber, changing and specifying the different configurations for storage providers can be done with few manual changes. In addition, the blobber information can be easily viewed through a browser dashboard which shows all the relevant information including used space, blobber id, capacity, and allocations.

SSL Secured

Blobber is securely developed to interact with the 0chain blockchain network for a reliable worldwide decentralized Cloud. All the communication is encrypted at rest and transit through https (Secure Socket Layer) to protect data relating to transactions, identity or privacy

Integrated Infrastructure Layer

Blobber services provide an integrated layer of infrastructure services including networking, storage, load balancer, DNS, and security to power storage transactions. These services can be deployed through docker-engine which can run on any Linux hosts or cloud.

Getting Started

This section covers how to install and configure blobber. In order to use blobber functionality, you will need to join the 0chain network with the following prerequisites-

System requirements

To properly deploy blobber , you must have a virtual Machine .physical computer or cloud computing instance setup with the following requirements:‌
    Linux with ubuntu 18.04 preferred
    4 vCPU, 8 Gb Memory at minimum
    50 GB of minimum space to store the initial container components. Expandable storage can be added later to provide services as a storage provider.

Required Software dependencies

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

Docker

Installing Docker will provide the ability to create containers for blobbers.
    1.
    To install Docker on Ubuntu, log in as root user in the terminal window and enter the command:
1
sudo apt install docker.io
Copied!
2.Start and enable docker by entering the following commands:
1
sudo systemctl start docker
2
sudo systemctl enable docker
Copied!
3.To verify the installed Docker version number, enter:
1
docker --version
Copied!
Successful Installation Output :
4. if you are not logged as a root user, add your Linux username{USER} to the docker group for running the docker commands as root.
4.1Add the user to the docker group using
1
sudo usermod -aG docker ${USER}
Copied!
4.2 Apply permissions by typing the following:
1
su - ${USER}
Copied!
4.3Enter your Linux user’s password to continue and confirm that the user added to the docker group by typing:
1
id -nG
Copied!
4.4 In the output you will see your Linux username(ubuntu) added to the docker group like this

Docker Compose

    1.
    Download the current docker-compose release using :
    1
    sudo curl -L "https://github.com/docker/compose/releases/download/1.29.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    Copied!
    2.
    Provide execution permissions using
    1
    sudo chmod +x /usr/local/bin/docker-compose
    Copied!
    3.
    Verify the installation with
1
$ docker-compose --version
Copied!
Output:

Clone the Blobber Repository

After installing Docker and Docker Compose
1..Clone the Blobber repository using:
1
git clone https://github.com/0chain/blobber.git
Copied!
2.Change directory to blobber
1
cd blobber
Copied!
3.Use the following command for running shell script located in the sub directory to initialize blobber components
1
./docker.local/bin/blobber.init.setup.sh
Copied!

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.
1
$ docker network create --driver=bridge --subnet=198.18.0.0/15 --gateway=198.18.0.255 testnet0
Copied!
2.Set up the block_worker URL
A block worker URL is a field in the blobber/config/0chain_validator.yaml and0chain_blobber.yaml configuration files that require the URL of network you want to connect to.
Since we are connecting to the 0chain network, we will replace the default URL in blobber/config/0chain_validator.yaml and0chain_blobber.yaml with the below-mentioned URL.
1
block_worker: http://beta.0chain.net/dns
Copied!
3.Navigate to the config directory using
1
cd blobber/config
Copied!
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
1
sudo nano 0chain_blobber.yaml
Copied!
and
1
sudo nano 0chain_validator.yaml
Copied!
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 VM/ instance.
1
nano /docker.local/keys_config/b0bnode1_keys.txt
Copied!
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 and Run Containers for Blobbers

1.Now go back to the blobber directory and build containers using the below command
1
./docker.local/bin/build.base.sh
2
./docker.local/bin/build.blobber.sh
3
./docker.local/bin/build.validator.sh
Copied!
This would take few minutes to set up install dependencies.
2. 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
1
cd blobber/docker.local/blobber2
Copied!
3.And run the container using the below command
1
$ ../bin/blobber.start_bls.sh
Copied!
Here is a sample output of blobber2 successfully running:
3.Now the blobber2 is part of the 0chain network which can be seen by visiting the http://beta.0chain.net/blobber
4.You can repeat step 2 for joining the the other five blobbers to the network.

💻 Troubleshooting

For support related to blobber installation check our community forum at [https://community.0chain.net/]
If you want to automate 0Chain deployment using Kubernetes please have a look at 0miner documentation here
You might also want to check our 0Chain blog here for additional information

Chat

Join our community chat directly on
Telegram
Twitter
Last modified 1d ago