Master Node Setup

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.

System Requirement

  • 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

Clone Code

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

Run Setup

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.

Usage

Start/Stop/Restart

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 basic
  • NPM_REGISTRY: npm registry for install node packages
  • DEV: Start service in dev/product mode, options is True/False, default is False
  • ENABLE_EMAIL_ACTIVE: Whether register user in user-dashboard need to active manually
  • SMTP_SERVER: smtp server address for send active email to user
  • SMTP_PORT: smtp server port
  • SMTP_AUTH_USERNAME: Username for authenticate of smtp server
  • SMTP_AUTH_PASSWORD: Password for authenticate of smtp server
  • FROM_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

Start/Stop/Restart in Development mode

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

Check Logs

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.

Configuration

The application configuration can be imported from file named CELLO_CONFIG_FILE.

By default, it also loads the config.py file as the configurations.

Data Storage

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.

Work with MacOS

Local Path Mount

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 run make setup-master.
  • Add the path to File Sharing list in the preference of Docker for MacOS, to make it mountable by container.

Install envsubst

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

More Commands using make

To know more what the following make commands does please refer make_support page.

Cello Docker Images

Cello project also provide Docker images for quick adoptions, users can pull these images from dockerhub or build locally.

Docker Images

Pull from Dockerhub

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:

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

Local Building

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".

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.