Skip to content

Commit

Permalink
[CE-317] Keep one copy of setup_master.md
Browse files Browse the repository at this point in the history
remove developer/setup_master.md
add developer mode section in setup_master.md
make log bug

Change-Id: I025cddb253da565ca6ce7270edb1e53470315138
Signed-off-by: sally <[email protected]>
  • Loading branch information
lujjiang committed Mar 23, 2018
1 parent 833d2c0 commit 8397077
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 139 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ doc: ##@Create local online documentation and start serve

# Use like "make log service=dashboard"
log: ##@Log tail special service log, Use like "make log service=dashboard"
docker-compose logs -f ${service} --tail=200
docker-compose logs --tail=200 -f ${service}

logs: ##@Log tail for all service log
docker-compose logs -f --tail=200
Expand Down
133 changes: 0 additions & 133 deletions docs/developer/setup_master.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Cello follows a typical Master-Worker architecture. There are two types of Nodes

## Master Node

See [Setup a Master Node](setup_master.md), [Setup Master node in develop mode](developer/setup_master.md)
See [Setup a Master Node](setup_master.md)

## Worker Node

Expand Down
46 changes: 42 additions & 4 deletions docs/setup_master.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
The [Master Node](./terminology.md) 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.

Expand Down Expand Up @@ -45,16 +46,53 @@ Make sure there is no error during the setup. Otherwise, please check the log ms
To start the whole services, please run

```sh
$ make start
$ [environment variables] make start
```
Environment variables which you can use in the command:

To stop or restart the whole services, run `make stop` or `make restart`.
* `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
```sh
$ make stop
```
To restart the whole services, please run
```sh
$ 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](./dashboard_user.md) will watch and restart service if files change. And [operator dashboard](./dashboard_operator.md) will enalbe flask debug.

To start the whole services in developer mode, please run
```sh
$ DEV=True make start
```



To stop or restart the whole services, please run
```sh
$ DEV=True make stop
```
To restart the whole services, please run
```sh
$ DEV=True make restart
```
#### Redeploy a service
To redeploy one specific service, e.g., dashboard, please run
To redeploy one specific service, e.g., operator dashboard, please run

```sh
$ make redeploy service=dashboard
$ make redeploy service=operator-dashboard
```

#### Check Logs
Expand Down

0 comments on commit 8397077

Please sign in to comment.