Skip to content

Commit

Permalink
[CE-57] Add license header
Browse files Browse the repository at this point in the history
This not include src folder
This not include user-dashboard folder

Change-Id: I9ef8528f14408319e93130ea3735d4ff50848630
Signed-off-by: sally <lujjiang@cn.ibm.com>
  • Loading branch information
lujjiang committed Jun 23, 2017
1 parent 83b460d commit c0c307b
Show file tree
Hide file tree
Showing 45 changed files with 175 additions and 44 deletions.
2 changes: 2 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
|---|---|---|---|---|
| Baohua Yang | baohua | yeasy | baohua | yangbaohua@gmail.com |
| Haitao Yue | hightall | hightall | hightall | hightallyht@gmail.com |

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
GREEN := $(shell tput -Txterm setaf 2)
WHITE := $(shell tput -Txterm setaf 7)
YELLOW := $(shell tput -Txterm setaf 3)
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Cello is a blockchain provision and operational system, which helps provide Bloc

**Note:** This is a **read-only mirror** of the formal [Gerrit](https://gerrit.hyperledger.org/r/#/admin/projects/cello) repository. Find more details at [Cello Wiki](https://wiki.hyperledger.org/projects/cello).


## Introduction

Using Cello, everyone can:
Expand Down Expand Up @@ -50,5 +49,4 @@ Can you find anyone better at playing chains? :)
## Incubation Notice
This project is a Hyperledger project in _Incubation_. It was proposed to the community and documented [here](https://docs.google.com/document/d/1E2i5GRqWsIag7KTxjQ_jQdDiWcuikv3KqXeuw7NaceM/edit), and was approved by [Hyperledger TSC at 2017-01-07](https://lists.hyperledger.org/pipermail/hyperledger-tsc/2017-January/000535.html). Information on what _Incubation_ entails can be found in the [Hyperledger Project Lifecycle document](https://goo.gl/4edNRc).

## License <a name="license"></a>
The Hyperledger Cello project uses the [Apache License Version 2.0](LICENSE) software license.
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
5 changes: 5 additions & 0 deletions api/dashboard.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# this is an example of the Cello API
# as a demonstration of an API spec in YAML
swagger: '2.0'
Expand Down
3 changes: 2 additions & 1 deletion api/restserver_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ GET /v1/cluster_release?user_id=xxxxxxxx
```
The server will drop the corresponding cluster, recreate it and put into available pool for future requests.


## Admin
Those APIs should not be called by outside applications. Just for
information, please see [api-admin.yaml](api-admin.yaml)

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
5 changes: 5 additions & 0 deletions api/restserver_v1.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

# Copyright IBM Corp, All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# this is an example of the Cello API
# as a demonstration of an API spec in YAML
swagger: '2.0'
Expand Down
6 changes: 3 additions & 3 deletions api/restserver_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Or
GET /cluster_op?action=xxx&key=value
```

The supported actions can be
The supported actions can be
* `apply`: apply a chain
* `release`: release a chain, possibly only one peer
* `start`: start a chain, possibly only one peer
Expand Down Expand Up @@ -109,7 +109,6 @@ user_id:xxxxxxxx

The server will drop the corresponding cluster, recreate it and put into available pool for future requests.


#### Cluster Start, Stop or Restart

Take `start` for example, you can specify the node_id if to operate one node.
Expand Down Expand Up @@ -152,7 +151,6 @@ size:4,

Query the clusters for a user.


```
POST /clusters
{
Expand All @@ -167,3 +165,5 @@ GET /cluster/xxxxxxx
```

Will return the json object whose data may contain detailed information of cluster.

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
5 changes: 5 additions & 0 deletions docker-compose-build-js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# This compose file will deploy the services, and bootup a mongo server.

# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Local `/opt/cello/mongo` will be used for the db storage.
# dashboard: dashboard service of cello, listen on 8080
# app: app service of cello, listen on 80
Expand Down
5 changes: 5 additions & 0 deletions docker-compose-npm-install.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# This compose file will deploy the services, and bootup a mongo server.

# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Local `/opt/cello/mongo` will be used for the db storage.
# dashboard: dashboard service of cello, listen on 8080
# app: app service of cello, listen on 80
Expand Down
5 changes: 5 additions & 0 deletions docker-compose-watch-mode.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# This compose file will deploy the services, and bootup a mongo server.

# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Local `/opt/cello/mongo` will be used for the db storage.
# dashboard: dashboard service of cello, listen on 8080
# app: app service of cello, listen on 80
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# This compose file will deploy the services, and bootup a mongo server.

# Copyright IBM Corp., All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Local `/opt/cello/mongo` will be used for the db storage.
# dashboard: dashboard service of cello, listen on 8080
# app: app service of cello, listen on 80
Expand Down
4 changes: 3 additions & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The project employs [Gerrit](https://gerrit.hyperledger.org) as the code commit/

*Before committing code, please go to [Jira](https://jira.hyperledger.org/projects/CE) to create a new task or check if there's related existing one, then assign yourself as the assignee. Notice each task will get a Jira number like [CE-26](https://jira.hyperledger.org/browse/CE-26).

* Clone the project to your working directory with your `LFID`.
* Clone the project to your working directory with your `LFID`.

```sh
$ git clone ssh://LFID@gerrit.hyperledger.org:29418/cello && scp -p -P 29418 LFID@gerrit.hyperledger.org:hooks/commit-msg cello/.git/hooks/
Expand Down Expand Up @@ -105,3 +105,5 @@ Notice you will get a [gerrit item url](http://gerrit.hyperledger.org/r/7915), o
After the ci checking passed, add [reviewers](https://wiki.hyperledger.org/projects/cello#contributors) to the reviewer list and also post the gerrit item url at the [RocketChat channel](https://chat.hyperledger.org/channel/cello). The patch will be merged into the `master` branch after passing the review, then mark the Jira item as `Done`.

* If you need to refine the patch further as the reviewers may suggest, you can change on the same branch, and commit the new code with `git commit -a --amend`, and then use the `git review` command again.

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
6 changes: 3 additions & 3 deletions docs/arch.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

Here we discuss the architecture design for the mangement services on the Master node.



## Philosophy and principles
The architecture will follow the following principles:

* Micro-service: Means we decouple various functions to individual micro services. No service will crash others whatever it does.
* Fault-resilience: Means the service should be tolerant for fault, such as database crash.
* Fault-resilience: Means the service should be tolerant for fault, such as database crash.
* Scalability: Try best to distribute the services, to mitigate centralized bottle neck.

## Functional Layers
Expand Down Expand Up @@ -44,3 +42,5 @@ I choose it for:
* Good enough in performance
* Flexible for extending
* Stable in code

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
3 changes: 2 additions & 1 deletion docs/awsinstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

1. If you dont have an Amazon AWS account, create one.

2. After logging into AWS console, in the services section, select EC2.
2. After logging into AWS console, in the services section, select EC2.

3. Create atleast 2 instances.One for master node and one for host. Click launch instance. Select Ubuntu 14.04 image as shown in figure ![Select Image](imgs/AWS-setup/1-selectimage.JPG).

Expand Down Expand Up @@ -49,3 +49,4 @@ Server:
13. You should be able to open the link *http://MasternodeIP:8080* .You can login and add hosts. Once the hosts are added, you can create blockchains.


<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
12 changes: 3 additions & 9 deletions docs/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ The left panel gives quick link to various functions, including `overview`, `sys
| Inused Clusters | `/clusters?type=inused` | Operate on user occupied chains in the system |
| Released History | `/clusters?type=released` | See cluster releasing history data |


## Overview

![Dashboard Overview](imgs/dashboard_overview.png)


The default overview page show the overall status of the system, e.g., how many hosts are deployed within the system, how many clusters are running on those hosts. And there are status numbers for both hosts and clusters.


## System Status Page

![dashboard status](imgs/dashboard_status.png)
Expand All @@ -38,7 +35,7 @@ In the Action dropdown menu, you can

* Fillup: Fill a host with chains till it's full `capacity`.
* Clean: Clean all unused chains at the host.
* Config: Set configurations of the host, e.g., `name` or `capacity`.
* Config: Set configurations of the host, e.g., `name` or `capacity`.
* Reset: Reset everything on the host, useful when u meet problems of running chains on the host. Notice a host can be `reset` only when there's no inused chains on it.
* Delete: Remove the host from the pool, then the system will not care about it.

Expand All @@ -48,27 +45,24 @@ You can click the `Add Host` button to add more hosts into the pool.

![dashboard add-host](imgs/dashboard_add_host.png)


## Active Chains

The `Active Chains` page shows all existing running chains in the system, with their Name, Type, Status, Health, Size and Host. Those inused chains will have a grey line.


![dashboard clusters](imgs/dashboard_clusters.png)

In the Action dropdown menu, you can

* Start: Start a chain that is not running.
* Stop: Stop a running chain to stopped status.
* Restart: Restart a chain.
* Restart: Restart a chain.
* Delete: Delete the chain.
* Release: Release a user-occupuied chain back to the pool, which will be deleted later.

You can click the `Add Chain` button to add more chains into the pool if there are non-full hosts.

![dashboard add-cluster](imgs/dashboard_add_cluster.png)


## Inused Chains

Filter out those running chains that are occupied by users.
Expand All @@ -78,4 +72,4 @@ Filter out those running chains that are occupied by users.
Record all the user releasing chain history.



<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
6 changes: 4 additions & 2 deletions docs/db.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
We have several collections, as follows.

## Host
Track the information of a Host.
Track the information of a Host.

A typical host may look like:

Expand All @@ -22,7 +22,7 @@ xxx | host_0 | tcp://10.0.0.1:2375 | 20160430101010 | 20 | active | [c1,c2
* log_level (str): logging level for chains on the host, e.g., 'debug', 'info', 'warn', 'error'
* log_type (str): logging type for chains on the host, 'local' or 'syslog'
* log_server (str): log server address, only valid when `log_type` is 'syslog'
* autofill (str): whether to autofill the server to its capacity with chains, 'true' or 'false'
* autofill (str): whether to autofill the server to its capacity with chains, 'true' or 'false'
* schedulable (str): whether to schedule a chain request to that host, 'true' or 'false', useful when maintain the host

## Cluster
Expand All @@ -49,3 +49,5 @@ xxx | {} | cluster_A | "" | host_xx | tcp://10.0.0.1:2375 | pbft
* size (int): Peer nodes number of the chain
* containers (list): List of the ids of those containers for the chain
* health (str): 'OK' (healthy status) or 'Fail' (Not healthy)

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
4 changes: 1 addition & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Cello is a blockchain provision and operational system, which helps provide Bloc

**Note:** This is a **read-only mirror** of the formal [Gerrit](https://gerrit.hyperledger.org/r/#/admin/projects/cello) repository. Find more details at [Cello Wiki](https://wiki.hyperledger.org/projects/cello).


## Introduction

Using Cello, everyone can:
Expand Down Expand Up @@ -50,5 +49,4 @@ Can you find anyone better at playing chains? :)
## Incubation Notice
This project is a Hyperledger project in _Incubation_. It was proposed to the community and documented [here](https://docs.google.com/document/d/1E2i5GRqWsIag7KTxjQ_jQdDiWcuikv3KqXeuw7NaceM/edit), and was approved by [Hyperledger TSC at 2017-01-07](https://lists.hyperledger.org/pipermail/hyperledger-tsc/2017-January/000535.html). Information on what _Incubation_ entails can be found in the [Hyperledger Project Lifecycle document](https://goo.gl/4edNRc).

## License <a name="license"></a>
The Hyperledger Cello project uses the [Apache License Version 2.0](LICENSE) software license.
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
5 changes: 2 additions & 3 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Cello follows a typical Master-Worker architecture. Hence there will be two type

For each Node, it is suggested as a Linux-based (e.g., Ubuntu 14.04+) server/vm:


## Worker Node
Currently we support Docker Host or Swarm Cluster as Worker Node. More types will be added soon.

Expand Down Expand Up @@ -159,7 +158,6 @@ $ make start

To stop or restart the whole services, run `make stop` or `make restart`.


#### Redploy a service
To redeploy one specific service, e.g., dashboard, please run

Expand Down Expand Up @@ -191,6 +189,7 @@ The mongo container will use local `/opt/cello/mongo` directory for persistent s

Please keep it safe by backups or using more high-available solutions.


*Licensed under Creative Commons Attribution 4.0 International License
https://creativecommons.org/licenses/by/4.0/*

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
3 changes: 2 additions & 1 deletion docs/monitoring.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#Monitoring services
The monitoring services build in real time an archive of observations obtained from the analisys of the communication flows of the CELL application services.
The observations could be checked in real time (directly in memory) against attacks, anomalies or errors.
Expand All @@ -14,3 +13,5 @@ to the configuration file: /src/common/utils.py
Admin can add to the file /src/monitoring/config.py the following flags:
* MONITOR_DB=<file name or network path where to store the persistent archive>
* MONITOR_LEVEL=FULL | SIMPLE | NONE

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
4 changes: 3 additions & 1 deletion docs/production_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ Log
* Configuration: Set all parameters to production, including image, compose, and application.
* Security: Use firewall to filter traffic, enable TLS and authentication.
* Backup: Enable automatic data backup.
* Monitoring: Enable monitoring services.out and login, then check with `ulimit -n`.
* Monitoring: Enable monitoring services.out and login, then check with `ulimit -n`.

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
4 changes: 3 additions & 1 deletion docs/reactjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ In the production environment

```sh
$ make build-js
```
```

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
3 changes: 2 additions & 1 deletion docs/scenario.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,12 @@ User sends request to apply a cluster, Cello will try to find available chains i

If found one, construct the response, otherwise, construct an error response.


### release a cluster

User sends request to release a cluster, Cello will check if the request is valid.

If found applied chain, then release and recreate it with the same name, at the same host, and potentially move it to released db collections.

If not found, then just ignore or response.

<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
Loading

0 comments on commit c0c307b

Please sign in to comment.