The Master Node includes several services:
operator dashboard
: Provide Web UI for operators.user dashboard
: Provide Web UI for users.engine
: Provide RESTful APIs for chain consumers.watchdog
: Watch for health checking.
More details can be found at the Architecture Design.
- Hardware: 8c16g100g
- Linux Kernel >= 3.0.0
- Docker engine: 1.10.0+ (Docker 17.0+ support is experimental)
- docker-compose: 1.10.0+
The Master Node can be deployed by in 2 steps:
- Clone code
- Run setup script
You may check git
and make
are installed to clone the code.
$ sudo aptitude install git make -y
$ git clone http://gerrit.hyperledger.org/r/cello && cd cello
For the first time running, please setup the master node with the setup.sh.
Just run (safe to repeat it):
$ make setup-master
Make sure there is no error during the setup. Otherwise, please check the log msgs with make logs
.
To start the whole services, please run
$ [environment variables] make start
Environment variables which you can use in the command:
THEME
: Theme name for operator dashboard basic/vue/react, default is basicNPM_REGISTRY
: npm registry for install node packagesDEV
: Start service in dev/product mode, options is True/False, default is FalseENABLE_EMAIL_ACTIVE
: Whether register user in user-dashboard need to active manuallySMTP_SERVER
: smtp server address for send active email to userSMTP_PORT
: smtp server portSMTP_AUTH_USERNAME
: Username for authenticate of smtp serverSMTP_AUTH_PASSWORD
: Password for authenticate of smtp serverFROM_EMAIL
: Email address display to user
To stop or restart the whole services, please run
$ make stop
To restart the whole services, please run
$ make restart
As a developer, you can start/stop/restart services in development mode. In development mode, user dashboard will watch and restart service if files change. And operator dashboard will enalbe flask debug.
To start the whole services in developer mode, please run
$ DEV=True make start
To stop or restart the whole services, please run
$ DEV=True make stop
To restart the whole services, please run
$ DEV=True make restart
To check the logs for all the services, please run
$ make logs
To check the logs for one specific service, please run
$ make log service=watchdog
Now you can access the MASTER_NODE_IP:8080
to open the Web-based operation 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
path (Must exist locally) for persistent storage.
Please keep it safe by backups or using more high-available solutions.
In MacOS, Docker cannot mount local path from host by default. Hence for mongo container data volume, users need to:
- Make sure the
/opt/cello
path exists locally, and it is writable for the current user account. Simply just runmake setup-master
. - Add the path to
File Sharing
list in the preference of Docker for MacOS, to make it mountable by container.
macOS does not have envsubst command. In order to install it, need to use the Homebrew tool.
$ brew install gettext
$ brew link gettext
$ export PATH="/usr/local/opt/gettext/bin:$PATH"
$ echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
To know more what the following make commands does please refer make_support page.
Cello project also provide Docker images for quick adoptions, users can pull these images from dockerhub or build locally.
The build process is generally expensive so you may wanna just pull those images from Dockerhub.
Run make dockerhub-pull
will pull the following images:
- hyperledger/cello-baseimage: Base images for the service images.
- hyperledger/cello-engine: Docker images for the engine service.
- hyperledger/cello-mongo: Docker images for the Mongo DB service.
- hyperledger/cello-operator-dashboard: Docker images for the Operator Dashboard service.
- hyperledger/cello-user-dashboard: Docker images for the User Dashboard service.
By default, the latest
version of images will be pulled, and you may optionally specify the version of images to pull down:
$ VERSION=0.8.0-beta make dockerhub-pull
Run make docker
will build the docker images locally and commit with architecture and version tag; e.g. "hyperledger/cello-baseimage:x86_64-0.8.0-snapshot-7b7fab6".
This work is licensed under a Creative Commons Attribution 4.0 International License.