Master:
- eth0: nat
- eht1: internal 192.168.0.2
Worker:
- eth0: nat
- eth1: internal 192.168.0.3
- (Both) Setup Docker CE. [https://docs.docker.com/install/linux/docker-ce/ubuntu/]
$ sudo apt-get remove docker docker-engine docker.io containerd runc
$ sudo apt-get update
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo apt-key fingerprint 0EBFCD88
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
- (Both) Add the user to docker group. add the current user, to the docker group at the last line in the file /etc/group
docker:x:999:<the_user_name>
- (Both) Test
$ docker run hello-world
- (Master) Setup Cello Master. [https://cello.readthedocs.io/en/latest/setup/setup_master/]
$ sudo apt install git make -y
$ git clone http://gerrit.hyperledger.org/r/cello && cd cello
$ make setup-master
$ SERVER_PUBLIC_IP=192.168.0.2 make start
- (Master) Now go to [http://192.168.0.2:8080] to see the admin dashboard and [http://192.168.0.2:8080] to set the user dashboard. Default username: admin, password: pass
- (Master) In case of login problem with ("uri_redirect") error, remove
/opt/cello/keycloak-mysql
and run themake start
command above again.
- (Worker) Setup Cello worker [https://cello.readthedocs.io/en/latest/setup/setup_worker_docker/]
- (Worker) Edit systemd service config file
/lib/systemd/system/docker.service
, update the ExecStart line under section[Service]
, as the following:
[Service]
ExecStart=/usr/bin/dockerd -H fd:// -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 --default-ulimit=nofile=8192:16384 --default-ulimit=nproc=8192:16384
- (Worker) Restart the docker
$ sudo systemctl daemon-reload; sudo systemctl restart docker.service
- (Master) To test the connection to the worker's docker
$ docker -H 192.168.0.3:2375 info
- (Worker)
$ sudo apt install git make nfs-common -y
$ git clone http://gerrit.hyperledger.org/r/cello && cd cello
- (Worker) edit the file
scripts/worker_node/setup_worker_node_docker.sh
# Empty string means no need to setup NFS
MASTER_NODE="192.168.0.2"
- (Worker)
$ make setup-worker
-
(Master) On the dashboard with port 8080, you should be able to add the host 192.168.0.3:2375. And create a chain allocated to the worker node
-
(Master) Create a new user
-
(Master) Logout of the dashboard with port 8080. Login to the user dashboard with port 8081 with the new user created. You now can create a chain and deploy the template smart contract.