ChenhaoShen / bytebase

Database CI/CD for DevOps teams. https://www.bytebase.com

Home Page:https://demo.bytebase.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bytebase

go report Artifact Hub

Live DemoInstallHelpDevelopmentDesign DocDiscord


What is Bytebase?

Bytebase is a Database CI/CD solution for the Developers and DBAs. It's the only database CI/CD project included in the CNCF Landscape. The Bytebase family consists of these tools:

  • Bytebase Console: A web-based GUI for developers and DBAs to manage the database development lifecycle.
  • Bytebase CLI (bb): The CLI to help developers integrate MySQL and PostgreSQL schema change into the existing CI/CD workflow.
  • Bytebase GitHub App and SQL Review GitHub Action: The GitHub App and GitHub Action to detect SQL anti-patterns and enforce a consistent SQL style guide during Pull Request.

Supported Database

✅ MySQL ✅ PostgreSQL ✅ TiDB ✅ ClickHouse ✅ Snowflake

VCS Integration

GitOps workflow, database-as-Code, login with VCS account, project membership sync.

✅ GitLab CE/EE ✅ GitHub.com

Terraform Integration

Bytebase Terraform Provider enables team to manage Bytebase resources via Terraform. A typical setup involves teams using Terraform to provision database instances from Cloud vendors, followed by using Bytebase TF provider to prepare those instances ready for application use.

Features

  • Web-based database change and management workspace for teams
  • SQL Review
  • Built-in SQL Editor with read-only and admin mode
  • Detailed migration history
  • Multi-tenancy (rollout change to homogeneous databases belonged to different tenants)
  • Online schema change based on gh-ost
  • Backup and restore
  • Point-in-time recovery (PITR)
  • Anomaly center
  • Environment policy
    • Approval policy
    • Backup schedule enforcement
  • Schema drift detection
  • Backward compatibility schema change check
  • Data Anonymization
  • Role-based access control (RBAC)
  • Webhook integration for Slack, Discord, MS Teams, DingTalk(钉钉), Feishu(飞书), WeCom(企业微信)
  • External approval integration for Feishu(飞书)
Fig.1 - Dashboard

Screenshot

Fig.2 - SQL review issue pipeline

Screenshot

Fig.3 - GitLab based schema migration (Database-as-code)

Screenshot

Fig.4 - Built-in SQL Editor (read-only and admin mode)

Screenshot

Screenshot

📕 Docs

Installation

https://bytebase.com/docs/get-started/install/overview

User doc

https://bytebase.com/docs

In particular, get familiar with various product concept such as data model, roles and permissions and etc.

Testing doc

How to run all or a subset of tests

https://github.com/bytebase/bytebase/blob/main/docs/testing.md

Design doc

https://github.com/bytebase/bytebase/tree/main/docs/design

Version upgrade policy

https://github.com/bytebase/bytebase/tree/main/docs/version-management.md

🕊 Interested in contributing?

  1. Checkout issues tagged with good first issue.

  2. We are maintaining an online database glossary list, you can add/improve content there.

  3. Before creating a Pull Request, please follow the Development Guide for branch and commit message conventions.

Note: We are quite disciplined on tech stack. If you consider bringing a new programming language, framework and any non-trivial external dependency, please open a discussion first.

🏗 Development

Bytebase is built with a curated tech stack. It is optimized for developer experience and is very easy to start working on the code:

  1. It has no external dependency.
  2. It requires zero config.
  3. 1 command to start backend and 1 command to start frontend, both with live reload support.

Learn the codebase

Prerequisites

  • Go (1.19 or later)
  • pnpm
  • Air (our forked repo @87187cc with the proper signal handling). This is for backend live reload.
    go install github.com/bytebase/air@87187cc

Steps

  1. Pull source.

    git clone https://github.com/bytebase/bytebase
  2. Start backend using air (with live reload).

    air -c scripts/.air.toml

    Change the open file limit if you encounter "error: too many open files".

    ulimit -n 10240

    If you need additional runtime parameters such as --backup-bucket, please add them like this:

    air -c scripts/.air.toml -- --backup-region us-east-1 --backup-bucket s3:\\/\\/example-bucket --backup-credential ~/.aws/credentials
  3. Start frontend (with live reload).

    cd frontend && pnpm i && pnpm dev

    Bytebase should now be running at http://localhost:3000 and change either frontend or backend code would trigger live reload.

Star History

Star History Chart

Jobs

Check out our jobs page for openings.

About

Database CI/CD for DevOps teams. https://www.bytebase.com

https://demo.bytebase.com

License:Other


Languages

Language:Go 57.5%Language:Vue 27.3%Language:TypeScript 12.1%Language:PLpgSQL 2.1%Language:CSS 0.5%Language:Shell 0.2%Language:JavaScript 0.2%Language:Dockerfile 0.1%Language:BitBake 0.0%Language:HTML 0.0%Language:Smarty 0.0%