Update blobber/validator image via cli

After the mainnet release, we will be continously monitoring the chain performance and will do releases over time. To update your blobbers, please follow the below steps:

  1. ssh into the blobber server using below command. Replace <SERVER-IP-ADDRESS> with ip address of blobber server. It will ask for password to ssh so, you need to input server password.

    ssh -o StrictHostKeyChecking=no root@<SERVER-IP-ADDRESS>
  2. Install yaml query tool

    sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 || true
    sudo chmod a+x /usr/local/bin/yq || true
  3. Run the following command to set the TAG

    export TAG=v1.20.1
    export PROJECT_ROOT=/var/0chain/blobber
  4. Proceed to updating images using command below:

    yq e -i ".services.validator.image = \"0chaindev/validator:${TAG}\"" ${PROJECT_ROOT}/docker-compose.yml
    yq e -i ".services.blobber.image = \"0chaindev/blobber:${TAG}\"" ${PROJECT_ROOT}/docker-compose.yml
  5. Start blobber/validator with updated image using command below:

    /usr/local/bin/docker-compose -f ${PROJECT_ROOT}/docker-compose.yml pull
    /usr/local/bin/docker-compose -f ${PROJECT_ROOT}/docker-compose.yml up -d

This will automatically pull the latest images and will restart the blobber/validator with the new image.

You can confirm the changes by running:

sudo docker ps -a | grep "0chaindev/blobber"

The above command should show 1 line of output with new tag. Also check your blobber should be reachable from url as well.

Last updated