You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bytebase offers multiple features to simplify batch change management. In this tutorial, we will guide you on how to configure**Environment** and **Database Group** to batch change databases for various scenarios.
14
+
Bytebase simplifies deploying changes across multiple databases simultaneously. This tutorial demonstrates how to use**Environments** and **Database Groups** to efficiently manage batch changes across your database fleet.
1. Make sure you have [Docker](https://www.docker.com/) installed, and if you don’t have important existing Bytebase data locally, you can start over from scratch by `rm -rf ~/.bytebase/data`.
21
-
22
-
1.**Environment** is a **Community Plan** feature and **Database group** is an **Pro Plan** feature, you need to have a valid license to enable it. You can request a trial license key from [here](https://www.bytebase.com/pricing).
20
+
-**Environment**: Available in all plans
21
+
-**Database Groups**: Requires Pro Plan or higher ([request trial](https://www.bytebase.com/pricing))
23
22
24
23
## Procedure
25
24
26
-
### Step 1 - Start Bytebase and prepare the environments
27
-
28
-
To demonstrate the batch change, we need to prepare some databases first.
25
+
## Step 1 - Start Bytebase with sample data
29
26
30
-
1. Copy and paste the commands to start one Bytebase via Docker.
27
+
<PreparationWithSampleData />
31
28
32
-
<TerminalDockerRunVolume />
29
+
## Step 2 - Set up environments and databases
33
30
34
-
1. Regsiter an admin account and it will be granted the `workspace admin` role automatically.
35
-
36
-
1. Go to **Environments**, update the existing `Prod` environment to `ProdAsia` and then create two new environments `ProdEU` and `ProdNA`.
31
+
1. Navigate to **Environments**. Rename `Prod` to `ProdAsia`, then create two new environments: `ProdEU` and `ProdNA`.
1. Bytebase provides two sample PostgreSQL instances. Click `Select Project` on the top bar, and click **New Project** on the popup. Fill it with a name `batch project` and create **Create**.
35
+
1. Click **Select Project** in the top bar, then **New Project**. Name it `Batch Change Project` and click **Create**.
43
36
44
-
1.Go into project `batch change`, click **Database > Databases**on the left side bar. There is no databases belonging to this project yet. Click **New DB**. To mimic the real-world scenario, firstly, create `demo-test`which should be created on sample test instance. An issue will be created automatically, click **Rollout**. After the issue is done, the database is created.
37
+
1.In the new project, navigate to **Database > Databases**and click **+ New DB**. Create `demo-test` on the Test instance. Click **Rollout** when the issue appears.
1. In the same way, create `demo-prod-1` and `demo-prod-2` which should be created on `ProdAsia` environment. `demo-prod-3` and `demo-prod-4` should be created on `ProdEU` environment. `demo-prod-5` and `demo-prod-6` should be created on `ProdNA` environment.
1.Fill in a SQL and click **Create**. You can see the pipeline has four stages - Test, ProdAsia, ProdEU, and ProdNA. You may select the stage and choose either rollout change to the current database or the current stage.
52
+
1.Enter the following SQL, then click **Create**and **Ready for review**:
1. The **Overview** and **Rollout** tabs display four stages: Test, ProdAsia, ProdEU, and ProdNA. You can deploy changes to individual databases or entire stages.
68
59
69
-
1. After all the databases are rolled out, you can see the issue is done.
1.Go to **Database > Groups** in the project, click**New database group**, fill the fields as follows, when you scroll down, you will see there's an option **Multitennancy**, keep it unchecked for now and click **Save**.
77
+
1.Navigate to **Database > Groups** in your project. Click**+ New database group**and configure:
1. Go to **CI/CD > Plans**, click **+ New Plan**, select **Schema Migration**. Switch to the **Database Group** tab, select `demo-prod-all`, and click **Confirm**.
93
85
94
-
1.You many see the six databases in three stages. Fill in the SQLs and click **Create**.
86
+
1.Enter the following SQL, then click **Create**and **Ready for review**:
0 commit comments