SEBA-964 Remove hardcoded hostnames and replace with config system;
Move code to canonical golang directory structure;
Update licensing;
Update README.md

Change-Id: I4b00301eef4e87e81fc731a5af20cf7b7ed68678
53 files changed
tree: 1bbc5ace40acb99b2bf86d713386bb5a53643926
  1. .gitreview
  2. Makefile
  3. README.md
  4. VERSION
  5. cmd/
  6. compose/
  7. docker/
  8. go.mod
  9. go.sum
  10. internal/
  11. kubernetes/
  12. protos/
  13. vendor/
README.md

Nem-OnDemand-Proxy


Building

To build and publish the docker image, issue the following commands:

make docker-build
make docker-push

You may preface the above commands with DOCKER_REPOSITORY= and/or DOCKER_TAG= to specify a custom docker repository and/or tag.

Deployment

Nem-ondemand-proxy is deployed as a container and may be deployed using either docker-compose or kubernetes. Kubernetes is the recommended method and may be done by executing the following command:

cd kubernetes
kubectl apply -f nem-ondemand-proxy.yaml

To teardown the proxy, use the following:

cd kubernetes
kubectl delete -f nem-ondemand-proxy.yaml

In addition to deploying the container, you may also want to setup a Kubernetes port-forward. Scripts in the kubernetes directory are provided as an example.

Usage

You will need to know the device id of the ONU you wish to query. This may be done with voltctl device list.

There is no dedicated client yet, and it is recommended to use grpcurl. For example,

# perform on-demand query on device with id 2910b26bbb29521d93fab21b
grpcurl -plaintext -d '{"id": "2910b26bbb29521d93fab21b"}' localhost:50052 on_demand_api.NemService/OmciTest