Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
74 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
core | ||
core.yaml | ||
core.yml | ||
.ropeproject | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,50 @@ | ||
Core | ||
==== | ||
|
||
## INSTALL | ||
## setup dev environment | ||
|
||
```shell | ||
git config --global url."git@gitlab.ricebook.net:".insteadOf "https://gitlab.ricebook.net/" | ||
go get gitlab.ricebook.net/platform/core.git | ||
mv $GOPATH/src/gitlab.ricebook.net/platform/core.git $GOPATH/src/gitlab.ricebook.net/platform/core | ||
cd $GOPATH/src/gitlab.ricebook.net/platform/core && go install | ||
ln -s $GOPATH/src/gitlab.ricebook.net/platform/core $MY_WORK_SPACE/eru-core2 | ||
``` | ||
|
||
### GRPC | ||
|
||
Generate golang & python code | ||
|
||
```shell | ||
cd rpc/gen | ||
protoc --go_out=plugins=grpc:. core.proto | ||
protoc -I . --python_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_python_plugin` core.proto | ||
``` | ||
|
||
### deploy core on local environment | ||
|
||
* create `core.yaml` like this | ||
|
||
``` | ||
to generate golang code | ||
bind: ":5000" | ||
agent_port: "12345" | ||
permdir: "/mnt/mfs/permdirs" | ||
etcd: | ||
- "http://127.0.0.1:2379" | ||
$ cd rpc/gen | ||
$ protoc --go_out=plugins=grpc:. core.proto | ||
git: | ||
public_key: "[path_to_pub_key]" | ||
private_key: "[path_to_pri_key]" | ||
to generate python code | ||
docker: | ||
log_driver: "json-file" | ||
network_mode: "bridge" | ||
cert_path: "[cert_file_dir]" | ||
hub: "hub.ricebook.net" | ||
``` | ||
|
||
* start eru core | ||
|
||
$ cd rpc/gen | ||
$ protoc -I . --python_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_python_plugin` core.proto | ||
``` | ||
core --config core.yaml | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
click == 6.6 | ||
six == 1.10.0 | ||
protobuf == 3.0.0b3 | ||
grpcio |