Here we describe the deployment setups for development usage. If you want to deploy Cello for production, please also refer to the Production Configuration.
Cell follows a typical Master-Worker architecture. Hence there will be two types of Nodes.
- Master Node: Manage (e.g., create/delete) the chains inside Work Nodes, with Web dashboard on port
8080and RESTful api on port80; - Worker Node: Chain providers, now support Docker Host or Swarm Cluster. The Docker service should be accessible from port
2375from the Master Node.
For each Node, it is suggested as a Linux-based (e.g., Ubuntu 14.04+) server/vm:
Currently we support Docker Host or Swarm Cluster as Worker Node. More types will be added soon.
For the Worker Node with meeting the system requirements, three steps are required:
- Hardware: 8c16g100g
- Docker engine:
- 1.12.0+
- aufs-tools (optional): Only required on ubuntu 14.04.
Let Docker daemon listen on port 2375, and make sure Master can reach Worker Node through this port.
Simple add this line into your Docker config file /etc/default/docker.
DOCKER_OPTS="$DOCKER_OPTS -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --api-cors-header='*' --default-ulimit=nofile=8192:16384 --default-ulimit=nproc=8192:16384"Then restart the docker daemon with:
$ sudo service docker restartUpdate /etc/systemd/system/docker.service.d/override.conf like
[Service]
DOCKER_OPTS="$DOCKER_OPTS -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --api-cors-header='*' --default-ulimit=nofile=8192:16384 --default-ulimit=nproc=8192:16384"
EnvironmentFile=-/etc/default/docker
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// $DOCKER_OPTS
Regenerate the docker service script and restart the docker engine:
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker.serviceAt last, run the follow test at Master node and get OK response, to make sure it can access Worker node successfully.
[Master] $ docker -H Worker_Node_IP:2375 versionPulling the following images.
$ docker pull hyperledger/fabric-peer:x86_64-0.6.1-preview \
&& docker pull hyperledger/fabric-membersrvc:x86_64-0.6.1-preview \
&& docker pull yeasy/blockchain-explorer:latest \
&& docker tag hyperledger/fabric-peer:x86_64-0.6.1-preview hyperledger/fabric-peer \
&& docker tag hyperledger/fabric-peer:x86_64-0.6.1-preview hyperledger/fabric-baseimage \
&& docker tag hyperledger/fabric-membersrvc:x86_64-0.6.1-preview hyperledger/fabric-membersrvcMake sure ip forward is enabled, you can simply run the follow command.
$ sysctl -w net.ipv4.ip_forward=1And check the os iptables config, to make sure host ports are open (e.g., 2375, 7050~10000)
The Master Node includes several services:
- dashboard: Provide Web UI for operators.
- restserver: Provide RESTful APIs for chain consumers.
- watchdog: Watch for health checking.
More details can be found at the architecture doc.
It can be deployed by in 3 steps.
- Clone code
- Pull Docker images
- Run setup script
- Hardware: 8c16g100g
- Docker engine: 1.12.0+
- docker-compose: 1.7.0+
You may check git and make are installed to clone the code.
$ sudo aptitude install git make -y
$ git clone https://github.com/yeasy/cello && cd celloPull the following images
$ docker pull python:3.5 \
&& docker pull mongo:3.2 \
&& docker pull yeasy/nginx:latest \
&& docker pull mongo-express:0.30Note: mongo-express:0.30 is for debugging the db, which is optional for basic setup.
For the first time running, please setup the master node with
$ make setupMake sure there is no error during the setup. Otherwise, please check the log msgs.
To (re)start the whole services, please run
$ make restartTo (re)deploy one specific service, e.g., dashboard, please run
$ make redeploy service=dashboardTo check the logs for all the services, please run
$ make logsTo check the logs for one specific service, please run
$ make log service=watchdogNow you can access the MASTER_NODE_IP:8080 to open the Web-based operational dashboard.
The application configuration can be imported from file named CELLO_CONFIG_FILE.
By default, it also loads the config.py file as the configurations.
The mongo container will use local /opt/cello/mongo directory for persistent storage.
Please keep it safe by backups or using more high-available solutions.
