Skip to content

[WIP] Go + gRPC + gRPC-Gateway + Bazel + Jsonnet + Tiltfile

License

Notifications You must be signed in to change notification settings

cloneable/go-microservice-template

Repository files navigation

go-microservice-template

Go + gRPC + gRPC-Gateway + Bazel + Tiltfile

Setup

go install github.com/bazelbuild/bazelisk@latest

brew install kubectl
brew install ctlptl
brew install kind
brew install tilt
brew install jsonnet
ctlptl create registry ctlptl-registry --port=5005
ctlptl create cluster kind --registry=ctlptl-registry

Commands

bazelisk build //...
bazelisk test //...
tilt up
^C

tilt down
bazelisk build -c opt --stamp --strip=always --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //container:image.tar
docker load -i bazel-bin/container/image.tar
jsonnetfmt --string-style d -i *.jsonnet

To-Do's

  • helm charts + jsonnet
  • Example unit/integration/e2e tests
  • Profiling
  • Coverage
  • OpenTelemetry?
  • Auth
  • GitHub Actions
  • Add Docker commands to Makefile?
  • Tracing/correlation ID plumbing
  • ORM: Ent?
  • Use upx for the binary?

MacOS/ARM64

TODO: --@io_bazel_rules_docker//transitions:enable=false