Prepare the Docker environment

To build and install OBP SDK, the latest Docker Engine and Docker Compose need to be installed:

  1. Docker Engine installation: The OBP SDK requires the latest version of Docker Engine. Execute the following command to find out the Docker Engine version:
docker --version
  1. If the version is not Docker version 17.05.0-ce or higher, then install/update the latest version of Docker with the following instructions.
  2. Use the following command to replace OS (operating system) version with your specific OS version using docker yum repo command :
$ sudo tee /etc/yum.repos.d/docker.repo <<-EOF 
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/oraclelinux/7
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
  1. Install Docker Engine:
$sudo yum install docker-engine-17.05.0.ce
  1. Check the Docker Engine version:
$docker –version

The following screenshot shows the version:

Docker version
  1. Start Docker Engine:
sudo systemctl restart docker
  1. Authenticate the user to the Docker daemon:
sudo usermod -a -G docker $USER
  1. Unpackage and deploy the blockchain cloud service (BCS) SDK and unpack it with the help of the following code fragment:
As opc user switch to 
/usr/localcd
/usr/localsudo
mkdir bcssdk
cd bcssdk
  1. Copy the OBP SDK from the web or a local source.
  2. Unzip the build package to the bcssdk directory by executing the following command:
sudo unzip obcs-sdk-19.1.3-20190129043733.zip -d /usr/local/bcssdk
This book used OBP SDK version 19.1.3 in which the Hyperledger Fabric version is 1.3.
  1. Now we need to install images and start provisioning the console. As root user, run the build command to load and install Docker images:
./build.sh

The following screenshot shows the output of build.sh:

run build.sh
  1. Wait until the docker loads:

docker load
  1. Confirm with Y, then the console will be started automatically after the images are installed:

Starting provisioning
There are certain points that you need to keep in mind:
  • If the firewall is active, build.sh will prompt the user to stop the firewall and restart the Docker daemon.
  • Please use build.sh to start provisioning the console. If the user doesn't choose to stop the firewall, there will be problems when provisioning or after provisioning. So, in this case, we recommend using the root user.
  • If the firewall is down, user oracle already exists, and the non-root user has Docker access permission, we can use this user to run this command.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset