Skip to content
ca-riskenPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

638 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RISKEN Gateway

Build Status

RISKEN is a monitoring tool for your cloud platforms, web-site, source-code... RISKEN Gateway is a API-Gateway layer for RISKEN backend APIs. Gateway is responsible for authentication & authorization control and request routing.

Please check RISKEN Documentation.

Installation

Requirements

This module requires the following modules:

Install packages

This module is developed in the Go language, please run the following command after installing the Go.

$ make install

Building

Build the containers on your machine with the following command

$ make build

Running Apps

Deploy the pre-built containers to the Kubernetes environment on your local machine.

  • Follow the documentation to download the Kubernetes manifest sample.
  • Fix the Kubernetes object specs of the manifest file as follows and deploy it.

k8s-sample/overlays/local/gateway.yaml

service spec before (public images) after (pre-build images on your machine)
gateway spec.template.spec.containers.image public.ecr.aws/risken/gateway/gateway:latest gateway/gateway:latest

Implements services

After change proto files in other repository, you must apply it to this repository. And you can do most of these easily.

Case: only proxy HTTP to gRPC

Generate boilerplate code from proto files

make generate-service

Add routing code to router.go

func newRouter(svc *gatewayService) *chi.Mux {
// ... 
r.Get("<routing path>", svc.<generated method>) // append
// ...
}

Case: others, need most complex process

Add exclude configuration to hack/protoc-gen-service.yml

excludes:
  # Ignore
  ## core
  - AlertService.AnalyzeAlertAll
  - FindingService.BatchListFinding
  - FindingService.PutFindingBatch
  - <ServiceName>.<MethodName> # append

Implements request handler and add it to router

Community

Info on reporting bugs, getting help, finding roadmaps, and more can be found in the RISKEN Community.

License

MIT.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

⌂ 换网址