vitess-gh/examples/region_sharding
Manan Gupta e18bec45ca
[15.0] Add VTGate debug/status page link to VTAdmin (#11541)
* feat: add hyperlink using fqdn in vtgates

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: provide correct vtgate web address in examples

Signed-off-by: Manan Gupta <manan@planetscale.com>

* refactor: fix prettier errors

Signed-off-by: Manan Gupta <manan@planetscale.com>

Signed-off-by: Manan Gupta <manan@planetscale.com>
2022-10-20 10:28:08 -07:00
..
scripts VTOrc Cleanup - Configs, APIs and old UI (#11356) 2022-09-30 22:11:02 +05:30
vtadmin [15.0] Add VTGate debug/status page link to VTAdmin (#11541) 2022-10-20 10:28:08 -07:00
vtorc VTOrc Cleanup - Configs, APIs and old UI (#11356) 2022-09-30 22:11:02 +05:30
101_initial_cluster.sh Fix local example scripts (#11319) 2022-09-23 09:44:02 +05:30
201_main_sharded.sh Update vtctl help output to use double dashes for long flag names (#10405) 2022-06-01 21:15:15 -04:00
202_new_tablets.sh Fix local example scripts (#11319) 2022-09-23 09:44:02 +05:30
203_reshard.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
204_switch_reads.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
205_switch_writes.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
206_down_shard_0.sh region_sharding: working resharding example 2020-08-14 06:09:20 -07:00
207_delete_shard_0.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
301_teardown.sh feat: add vtorc and vtadmin region example (#11172) 2022-09-07 19:00:23 +05:30
README.md Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
countries.json region sharding example 2020-05-20 17:24:31 -07:00
create_lookup_schema.sql region_sharding: create lookup table is optional 2020-08-17 08:53:17 -07:00
create_main_schema.sql region_sharding: working resharding example 2020-08-14 06:09:20 -07:00
env.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
insert_customers.sql region sharding example 2020-05-20 17:24:31 -07:00
lookup_vindex.json region_sharding: working resharding example 2020-08-14 06:09:20 -07:00
main_vschema_initial.json region_sharding: working resharding example 2020-08-14 06:09:20 -07:00
main_vschema_sharded.json CI: run failing tests in docker, temporarily delete mariadb102 unit test 2021-04-14 12:58:04 -07:00
show_data.sql region sharding example 2020-05-20 17:24:31 -07:00
show_initial_data.sql region_sharding: working resharding example 2020-08-14 06:09:20 -07:00
topo-etcd2.sh region sharding example 2020-05-20 17:24:31 -07:00
topo-k8s.sh region sharding example 2020-05-20 17:24:31 -07:00
topo-zk2.sh region sharding example 2020-05-20 17:24:31 -07:00

README.md

Instructions

Detailed instructions for running this example can be found at https://vitess.io. This document contains the summary of the commands to be run.

# Edit main_vschema_sharded.json and set region_map to full path of countries.json file
# Example:
	    "region_map": "/home/user/vitess/examples/region_sharding/countries.json",

# setup environment and aliases
source env.sh

# Bring up initial cluster and main keyspace (unsharded)
./101_initial_cluster.sh

# Insert and verify data
mysql < insert_customers.sql
mysql --table < show_initial_data.sql

# create schema and vschema for sharding (+lookup vindex)
./201_main_sharded.sh

# bring up shards and tablets
./202_new_tablets.sh

# reshard
./203_reshard.sh

# SwitchReads
./204_switch_reads.sh

# run script to create traffic before switching writes
#./client.sh

# SwitchWrites
./205_switch_writes.sh
# show no / minimal write errors during switch

# verify sharded data
mysql --table < show_data.sql

# down shard
./206_down_shard_0.sh

# delete shard 0
./207_delete_shard_0.sh

# Down cluster
./301_teardown.sh