Skip to content

Latest commit

 

History

History
96 lines (57 loc) · 3.02 KB

README.md

File metadata and controls

96 lines (57 loc) · 3.02 KB

Free-Forever Open-Source Protobuf Registry

Status

The registry provides a central place to store and manage your protobuf files.

Motivation

The protobuf files are usually stored in the same repository as the code that uses them. This approach works well for small projects, but it becomes a problem when you have multiple repositories that use the same protobuf files. In this case, you have to copy manually the files to each repository, which is not only tedious but also error-prone.

The registry solves this problem by providing a central place to store and manage your protobuf files and sync the files with your repositories.

Installation

Docker Compose

Prerequisites

Steps

  1. Clone the repository
  2. Generate certificates with make certs-gen command (they will appear in gen/certs folder) or put your own certificates in the folder
  3. Export SERVER_STATIC_TOKEN with static authorization token
  4. Run make run-prod to start the registry
  5. Run make stop-prod to stop the running registry

Configuration

The registry can be configured with environment variables that overrides values in the config/config.yaml file. For instance, to change the database DSN you can set DATA_DATABASE_DSN environment variable that is reflect to data.database.dsn yaml property.

Helm Chart

Prerequisites

  • Helm
  • Postgres database should be provisioned separately

Installation

Add repository to Helm:

helm repo add pbuf https://pbufio.github.io/helm-charts

To install the chart with the release name my-pbuf-registry:

helm install my-pbuf-registry pbuf/pbuf-registry --set secrets.databaseDSN=<databaseDSN>

More information about the chart can be found in the chart repository

Usage

CLI

We recommend to use the CLI to interact with the registry.

API

HTTP

The registry provides a REST API (:8080 port by default). You can find the swagger documentation here.

gRPC

The registry provides a gRPC API (:6777 port by default). You can find the protobuf definition here

Development and Contributing

Prerequisites

Build

  • Run make build to build the registry
  • Run make build-in-docker to build linux binaries in docker

Test

  • Run make test to run the tests.

Test the Registry

  • Run make run to start the registry and test it.
  • Run make stop to stop the running registry.