{"id":21712583,"url":"https://github.com/mhausenblas/yages","last_synced_at":"2025-04-12T18:08:27.720Z","repository":{"id":140043703,"uuid":"126688457","full_name":"mhausenblas/yages","owner":"mhausenblas","description":"Yet another gRPC echo server (YAGES)","archived":false,"fork":false,"pushed_at":"2018-11-04T05:50:02.000Z","size":21,"stargazers_count":37,"open_issues_count":0,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T18:06:20.025Z","etag":null,"topics":["app","demo","grpc","kubernetes","protobuf"],"latest_commit_sha":null,"homepage":"http://mhausenblas.info/yages/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mhausenblas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-25T10:58:06.000Z","updated_at":"2025-03-11T15:27:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"eb7b9efd-6e17-4a03-9485-1a4075408f61","html_url":"https://github.com/mhausenblas/yages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhausenblas%2Fyages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhausenblas%2Fyages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhausenblas%2Fyages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhausenblas%2Fyages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhausenblas","download_url":"https://codeload.github.com/mhausenblas/yages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610345,"owners_count":21132921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app","demo","grpc","kubernetes","protobuf"],"created_at":"2024-11-25T23:40:20.379Z","updated_at":"2025-04-12T18:08:27.682Z","avatar_url":"https://github.com/mhausenblas.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Yet another gRPC echo server\n\nYAGES (yet another gRPC echo server) is an educational gRPC server implementation. The goal is to learn gRPC and communicate best practices around its deployment and usage in the context of Kubernetes.\n\n- [As an Kubernetes app](#as-an-kubernetes-app)\n  - [From inside the cluster](#from-inside-the-cluster)\n  - [From outside the cluster](#from-outside-the-cluster)\n- [As a local app](#as-a-local-app)\n  - [Install](#install)\n  - [Use](#use)\n  - [Develop](#develop)\n\n## As an Kubernetes app\n\nYou can install YAGES as an app in your Kubernetes cluster (tested with Kubernetes v1.9, v1.10, and v1.11) like so:\n\n```bash\n$ kubectl apply -f http://mhausenblas.info/yages/app.yaml\n```\n\nThen, in order to invoke the service you've got essentially two options: from inside the cluster or from the outside the cluster, by exposing the service.\n\n### From inside the cluster\n\nTo access the gRPC server from inside the cluster, you can for example use the [gump](https://quay.io/repository/mhausenblas/gump) container image that has [grpcurl](https://github.com/fullstorydev/grpcurl) installed:\n\n\n```bash\n$ kubectl run -it --rm grpcurl --restart=Never --image=quay.io/mhausenblas/gump:0.1 -- sh \nIf you don't see a command prompt, try pressing enter.\n/go $ grpcurl --plaintext yages:9000 yages.Echo.Ping\n{\n  \"text\": \"pong\"\n}\n```\n\n### From outside the cluster\n\nTBD: Using Ingress as shown in [ingress.yaml](ingress.yaml) or an OpenShift Route object with TLS passthrough set.\n\n## As a local app\n\n### Install\n\nRequires Go 1.9 or above, do:\n\n```bash\n$ go get -u github.com/mhausenblas/yages\n```\n\n\n### Use\n\nYou can run `go run main.go` in `$GOPATH/src/github.com/mhausenblas/yages` or if you've added `$GOPATH/bin` to your path, directly call the binary:\n\n```bash\n$ yages\n2018/03/25 16:23:42 YAGES in version dev serving on 0.0.0.0:9000 is ready for gRPC clients …\n```\n\nOpen up a second terminal session and using [grpcurl](https://github.com/fullstorydev/grpcurl) execute the following:\n\n```bash\n# invoke the ping method:\n$ grpcurl --plaintext localhost:9000 yages.Echo.Ping\n{\n  \"text\": \"pong\"\n}\n# invoke the reverse method with parameter:\n$ grpcurl --plaintext -d '{ \"text\" : \"some fun here\" }' localhost:9000 yages.Echo.Reverse\n{\n  \"text\": \"ereh nuf emos\"\n}\n# invoke the reverse method with parameter from JSON file:\n$ cat echo.json | grpcurl --plaintext -d @ localhost:9000 yages.Echo.Reverse\n{\n  \"text\": \"ohce\"\n}\n```\n\nNote that you can execute `grpcurl --plaintext localhost:9000 list` and `grpcurl --plaintext localhost:9000 describe` to get further details on the available services and their respective methods.\n\n### Develop\n\nFirst you want to generate the stubs based on the protobuf schema. Note that this requires the Go gRPC runtime and plug-in installed on your machine, including `protoc` in v3 set up, see [grpc.io](https://grpc.io/blog/installation) for the steps.\n\nDo the following:\n\n```bash\n$ protoc \\\n  --proto_path=$GOPATH/src/github.com/mhausenblas/yages \\\n  --go_out=plugins=grpc:yages \\\n  yages-schema.proto\n```\n\nExecuting above command results in the auto-generated file `yages/yages-schema.pb.go`. **Do not** manually edit this file, or put in other words: if you add a new message or service to the schema defined in `yages-schema.proto` just run above `protoc` command again and you'll get an updated version of `yages-schema.pb.go` in the `yages/` directory as a result.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhausenblas%2Fyages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhausenblas%2Fyages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhausenblas%2Fyages/lists"}