small update to grpc docs
This commit is contained in:
parent
18e5598203
commit
c0ab9ea4cc
1 changed files with 2 additions and 51 deletions
53
docs/grpc.md
53
docs/grpc.md
|
@ -1,60 +1,11 @@
|
||||||
# Using the gRPC API
|
# Using the gRPC API
|
||||||
|
|
||||||
By default the gRPC API is currently not turned on by default. There are a couple ways that this can be enabled
|
gRPC is the main API for interfacing with CORE.
|
||||||
to use.
|
|
||||||
|
|
||||||
## Enabling gRPC
|
## HTTP Proxy
|
||||||
|
|
||||||
### HTTP Proxy
|
|
||||||
|
|
||||||
Since gRPC is HTTP2 based, proxy configurations can cause issue. Clear out your proxy when running if needed.
|
Since gRPC is HTTP2 based, proxy configurations can cause issue. Clear out your proxy when running if needed.
|
||||||
|
|
||||||
### Daemon Options
|
|
||||||
|
|
||||||
The gRPC API is enabled through options provided to the **core-daemon**.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
usage: core-daemon [-h] [-f CONFIGFILE] [-p PORT] [-n NUMTHREADS] [--ovs]
|
|
||||||
[--grpc] [--grpc-port GRPCPORT]
|
|
||||||
[--grpc-address GRPCADDRESS]
|
|
||||||
|
|
||||||
CORE daemon v.5.3.0 instantiates Linux network namespace nodes.
|
|
||||||
|
|
||||||
optional arguments:
|
|
||||||
-h, --help show this help message and exit
|
|
||||||
-f CONFIGFILE, --configfile CONFIGFILE
|
|
||||||
read config from specified file; default =
|
|
||||||
/etc/core/core.conf
|
|
||||||
-p PORT, --port PORT port number to listen on; default = 4038
|
|
||||||
-n NUMTHREADS, --numthreads NUMTHREADS
|
|
||||||
number of server threads; default = 1
|
|
||||||
--ovs enable experimental ovs mode, default is false
|
|
||||||
--grpc enable grpc api, default is false
|
|
||||||
--grpc-port GRPCPORT grpc port to listen on; default 50051
|
|
||||||
--grpc-address GRPCADDRESS
|
|
||||||
grpc address to listen on; default localhost
|
|
||||||
```
|
|
||||||
|
|
||||||
### Enabling in Service Files
|
|
||||||
|
|
||||||
Modify service files to append the --grpc options as desired.
|
|
||||||
|
|
||||||
For sysv services /etc/init.d/core-daemon
|
|
||||||
```shell
|
|
||||||
CMD="PYTHONPATH=/usr/lib/python3.6/site-packages python3 /usr/bin/$NAME --grpc"
|
|
||||||
```
|
|
||||||
|
|
||||||
For systemd service /lib/systemd/system/core-daemon.service
|
|
||||||
```shell
|
|
||||||
ExecStart=@PYTHON@ @bindir@/core-daemon --grpc
|
|
||||||
```
|
|
||||||
|
|
||||||
### Enabling from Command Line
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo core-daemon --grpc
|
|
||||||
```
|
|
||||||
|
|
||||||
## Python Client
|
## Python Client
|
||||||
|
|
||||||
A python client wrapper is provided at **core.api.grpc.client.CoreGrpcClient**.
|
A python client wrapper is provided at **core.api.grpc.client.CoreGrpcClient**.
|
||||||
|
|
Loading…
Add table
Reference in a new issue