news_service

command module
v0.0.0-...-826b35a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2022 License: MIT Imports: 1 Imported by: 0

README

News Service

The news service is a gRPC microservice. Its gRPC contract lives in http:// Whenever you change the gRPC contract at service/pb/news.proto run these commands in the the service/pb directory:

protoc news.proto --go_out=plugins=grpc:.
python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. news.proto

The first command generates news.pb.go that the service imports.

The second command generates two Python modules for Python consumers of the service.

It uses a multi-stage Dockerfile to generate a lean and mean image from SCRATCH that just includes the Go binary. The system has a CI/CD pipeline, but you can also build and deploy it yourself.

Build Docker image

$ docker build . -t g1g1/delinkcious-news-manager:${VERSION}

Push to Registry

This will go by default to DockerHub. Make sure you're logged in:

$ docker login

Then push your image:

$ docker push g1g1/delinkcious-news-manager:${VERSION}

Deploy to active Kubernetes cluster

If you want to push to a local minikube make sure your kubectl is pointed to the right cluster and type:

$ kubectl create -f k8s

Exposing the NewsManager service locally

kubectl port-forward svc/news-manager 6060:6060

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL