# core-svc

The monorepo of platform layer for TiDB-service team.

# Directory structure

- idl: all IDL(Independent Define Language) files, use protobuf and managed by [buf](https://buf.build/)
- local: some tools to make you can easily run core-portal/core-svc locally.
- model: all db schema definition.
- portal: grpc-gateway based service as a portal of CM(Cluster Management), serve service by HTTP. In other words, it's
  a gateway for CM which convert
  traffic between HTTP/json and gRPC/protobuf. Get more detail, [click here](./portal/README.md).
- svc: gRPC based service for CM(Cluster Management), written
  with [onion architecture](https://pingcap.feishu.cn/docs/doccniBH2cTUuXw4lZd8TKLvXad). Get more
  detail, [click here](./svc/README.md)
- provider-cost: cloud provider cost query proxy, for example: query network/s3 fee from AWS/GCP

# Develop

> For locally run or fast deploy, please make sure you have right permission to **access base EKS** and
> you already got **infra-api kubeconfig** file.
>
> Read these articles to get help:
> * [infra Operation 101](https://github.com/tidbcloud/infra/blob/master/docs/operation-101.md)
> * [SSO Documentation](https://pingcap.feishu.cn/docx/doxcnylr5yZjtEVkI1xgEOhRXym)

- you can fast deploy your changes to nightly, just run `make fast-deploy` or `make fast-deploy-[svc,portal]`
- you can locally run core-svc/core-portal for fast verify, debug, integration test, just
  run `make local-run-[svc,portal]`
    - before enjoy with this way, please make sure you replace some configuration in
      [svc_conf](./local/svc_conf.yaml) and  [portal_conf](./local/portal_conf.yaml)  by YOUR OWN item which be
      annotated
      starts with `NOTE:`

# History

This repo is migrated from [here](https://github.com/tidbcloud/dbaas/tree/master/core).
