/typebook

An Avro Schema Registry with MySQL backend.

Primary LanguageScalaMIT LicenseMIT

typebook Build Status

Registry server for persisting and managing data schemas defined in Avro's schema format.

Features

  • Finagle/Finch based RestAPI implementation hosted on a Twitter HTTP Server
    • store and retrieve schemas
    • evolve schemas (supports semantic versioning, evolution rule definition and enforcement)
  • RDBMS storage backend
    • MySQL
    • MariaDB

Requirements

  • MySQL or MariaDB (Tested versions: MySQL 5.7 and MariaDB 10)

Quickstart

The easiest way to get started is running the service in a Docker container as follows:

$ docker-compose up -d

This will start the typebook server in a container with Twitter Server Admin and MySQL server, exposing the service on port 8888. Once the service is up, interact with typebook using curl or any other HTTP clients.

Configurations

You can configure the connection to the backend database via the following environment variables.

name description default
MYSQL_SERVERS comma-separated database hostname and port backend-db:3306
MYSQL_USER database username typebook
MYSQL_PASSWORD database user password
MYSQL_DATABASE database name registry

Deployment

Kubernetes

A helm chart is provided - please refer to chart/typebook for more details.

Marathon

An example marathon service spec file is available here. To deploy on DC/OS, use the following command:

$ dcos marathon app add examples/deploy/marathon/typebook.json

Please note that a backend database needs to be available and configured via environment variables beforehand.

API

API documentation for the typebook API are available here. A Swagger UI is provided as well - see here for more details.

Testing

To execute the test suite, run the following command in the directory containing build.sbt.

$ sbt test

Contributors

Thanks to all contributors!

License

typebook is Open Source and available under the MIT License.