Serivce Builder is a GO tool that generates scafolding / boilerplate code for building a cloud native service
A Micro Service generated by service builder
- enables rapid development of gRPC based micro services
- exposes the gRPC services as REST / JSON via grpc gateway interface
- exposes metrics endpoint, which Prometheus could scrape from
- support tracing and metrics instrumentation using OpenCensus
- enables consistent logging
- exposes healthcheck endpoints for liveness and readiness probes
- defines state management interface and wraps them with metrics and tracing instrumentation automatically
- provides standard CLI
- build Docker container image
- enables Kubernetes based deployment
Getting Started
Pre-Req
Install
homebrew
MacOS
brew tap cnative/tap
brew install servicebuilder
go get
GOBIN=$HOME/bin go get -u github.com/cnative/servicebuilder
if your $HOME/bin
is not already in PATH
export $HOME/bin:$PATH
Note:
Service builder downloaded via go get
will download the latest version of service builder available at the time of execution. If a fixed version is needed download a pre-built binary
Pre-built binary
The easiest way to get servicebuilder
is to use one of the pre-built release binaries which are available for OSX, Linux, and Windows on the release page
for ex
export SEVICEBUILDER_VERSION=v0.8.2
tar zxvf servicebuilder_${SEVICEBUILDER_VERSION}_Darwin_x86_64.tar.gz
mkdir -p $HOME/bin
mv ./servicebuilder $HOME/bin
export $HOME/bin:$PATH
Building from source
To check out this repository:
- Create your own fork of
github.com/cnative/servicebuilder
- Clone it at some location on your host
git clone git@github.com:{YOUR_GITHUB_USERNAME}/servicebuilder
cd servicebuilder
git remote add upstream git@github.com:cnative/servicebuilder.git
git remote set-url --push upstream no_push
make install-deptools clean bulid