GRPC inference service for logistic regression
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
go get -u github.com/grpc-ecosystem/go-grpc-prometheus
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
go get -u github.com/golang/protobuf/protoc-gen-go
go get -u github.com/chapsuk/wait
go get -u golang.org/x/sync
- Prometheus
- Grafana
Enter goinfer/api folder!
export GOPATH=$(go env GOPATH)
export PATH=$PATH:$GOPATH/bin
protoc -I/usr/local/include -I. -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --go_out=plugins=grpc:. api.proto
protoc -I/usr/local/include -I. -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --grpc-gateway_out=logtostderr=true:. api.proto
go tool pprof localhost:8080/debug/pprof/profile?seconds=<NUM_SECONDS>`
go tool pprof -http=:9090 /path/to/profile/pprof.pb.gz
- Download and install Prometheus. See instalation guide
- Run Prometheus server
prometheus --config.file ./config/prometheus.yaml
from your terminal - Download and install Grafana. See installation guide
- Run grafana (default address
localhost:3000
) with the following commands- sudo systemctl daemon-reload
- sudo systemctl start grafana-server
- sudo systemctl status grafana-server
- Open grafana UI, create prometheus date source, create dashboard (or use already configured one from this repository)
- logging
- dockerization