Manage OceanBase instances with Bytebase

2024-06-28 05:30:29  Updated

Bytebase is an open-source database change management and collaboration tool that provides both SaaS services and a self-hosted version. This topic will use the OceanBase tenant of the MySQL mode as an example to demonstrate how to manage OceanBase instances using Bytebase.

Prerequisites

  1. Deploy Bytebase. For specific instructions, refer to the GitHub repository.

  2. Obtain the connection information for the OceanBase cluster, including the instance name, IP address, port, the user for connecting, and the user’s password. Here is an example:

    obclient -h10.10.10.1 -uusername@obtenant#obdemo -P2883 -p****** -c -A oceanbase
    

    If you need to create a new user, grant the account permissions based on Bytebase’s authorization requirements and your actual business needs. For more details, refer to Create a user.

Procedure

  1. Log in to the Bytebase platform, follow the prompts to create a workspace and enter your workspace.

    Bytebase

  2. Click Add Instance and select OceanBase (MySQL) in the pop-up box.

    Add Instance

    Field Description
    Instance Name Specify your instance name. For example, obdemo.
    Environment Select the Test or Pro environment based on your needs.
    Host or Socket Enter the address obtained from the -h parameter of the connection string. For example, 10.10.10.1.
    Port Enter the port number obtained from the -p parameter of the connection string. For example, 2883.
    Username Enter the username obtained from the -u parameter of the connection string. For example, username@obtenant.
    Password Enter the password obtained from the -p parameter of the connection string. For example, ******.
  3. Click Test Connection.

    After the connection is successful, click Create.

  4. After the creation is complete, you can integrate with GitOps.

    • If you need to enable the GitOps workflow, you can integrate with your code repository service, such as GitHub, GitLab, or Bitbucket Cloud, in Bytebase.

    • Configure Git repositories to store database change scripts and submit changes to the corresponding branches. Bytebase will automatically pull changes and execute the approval and release process.

  5. Manage database changes.

    • Create SQL migration scripts and submit change requests through the Bytebase interface.
    • Participate in the review process and collaborate with other team members to review SQL changes.
    • After approval, execute the approved changes, and Bytebase will automatically apply them to the target database within the preset time window.

Contact Us