Skip to content

Commit

Permalink
Update branch docs (#603)
Browse files Browse the repository at this point in the history
* chore: update branch doc

* chore: update branch doc

* chore: update branch doc

* chore: update branch doc

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml

* chore: add branch_example.yml
  • Loading branch information
earayu authored Dec 17, 2024
1 parent c8d799c commit 7a6ee72
Show file tree
Hide file tree
Showing 3 changed files with 235 additions and 141 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/branch_example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Branch Example

on:
workflow_dispatch:
inputs:
source_host:
description: 'Source host address'
required: true
type: string
source_port:
description: 'Source port'
required: false
type: string
default: '3306'
source_user:
description: 'Source user'
required: false
type: string
default: 'root'
source_password:
description: 'Source password'
required: true
type: string
default: ''
include_databases:
description: 'Databases to include'
required: false
type: string
default: '*'
exclude_databases:
description: 'Databases to exclude'
required: false
type: string
default: 'information_schema,mysql,performance_schema,sys'
wescale_image:
description: 'WeScale image tag'
required: false
type: string
default: 'apecloud/apecloud-mysql-scale:0.3.8'

jobs:
setup-mysql:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Create MySQL Branch
uses: wesql/[email protected]
with:
source_host: ${{inputs.source_host}}
source_port: ${{inputs.source_port}}
source_user: ${{inputs.source_user}}
source_password: ${{inputs.source_password}}
include_databases: ${{inputs.include_databases}}
exclude_databases: ${{inputs.exclude_databases}}
wescale_image: ${{inputs.wescale_image}}

- name: Do Your Schema Migration
run: |
mysql -h127.0.0.1 -P15306 -e "create database if not exists foobar"
mysql -h127.0.0.1 -P15306 -e "create table if not exists foobar.account (id int primary key, name varchar(255))"
- name: Branch Diff
run: |
mysql -h127.0.0.1 -P15306 -e "Branch diff"
- name: Branch Prepare Merge Back
run: |
mysql -h127.0.0.1 -P15306 -e "Branch prepare_merge_back"
- name: Branch Merge Back
run: |
mysql -h127.0.0.1 -P15306 -e "Branch merge_back"
- name: Branch Show
run: |
mysql -h127.0.0.1 -P15306 -e "Branch show"
4 changes: 2 additions & 2 deletions doc-chinese/toturial/08-Branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ docker run -itd --network wescale-network --name wescale \
-e MYSQL_PORT=3306 \
-e MYSQL_HOST=mysql-server \
-e CONFIG_PATH=/vt/config/wescale/default \
apecloud/apecloud-mysql-scale:0.3.8-alpha4 \
apecloud/apecloud-mysql-scale:0.3.8 \
/vt/examples/wesql-server/init_single_node_cluster.sh

# Target集群
Expand All @@ -98,7 +98,7 @@ docker run -itd --network wescale-network --name wescale15307 \
-e MYSQL_HOST=mysql-server3307 \
-e VTGATE_MYSQL_PORT=15307 \
-e CONFIG_PATH=/vt/config/wescale/default \
apecloud/apecloud-mysql-scale:0.3.8-alpha4 \
apecloud/apecloud-mysql-scale:0.3.8 \
/vt/examples/wesql-server/init_single_node_cluster.sh
```

Expand Down
Loading

0 comments on commit 7a6ee72

Please sign in to comment.