vitess-gh/examples/local
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
..
backups Update vtctl help output to use double dashes for long flag names (#10405) 2022-06-01 21:15:15 -04:00
scripts [cli] [vtctl] Migrate all vtctl commands to `pflag` (#11320) 2022-10-03 10:21:31 -07:00
vtadmin [15.0] Add VTGate debug/status page link to VTAdmin (#11541) 2022-10-20 10:28:08 -07:00
vtexplain moving files 2021-08-20 13:19:13 -06: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_customer_tablets.sh Fix local example scripts (#11319) 2022-09-23 09:44:02 +05:30
201_newkeyspace_tablets.sh Fix local example scripts (#11319) 2022-09-23 09:44:02 +05:30
202_move_tables.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
203_switch_reads.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
204_switch_writes.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
205_clean_commerce.sh Change local example to use v2 vreplication flows 2021-07-27 22:01:06 +02:00
301_customer_sharded.sh Migrate remaining vtctldclient commands in local example (#9894) 2022-03-16 10:38:50 -04:00
302_new_shards.sh Fix local example scripts (#11319) 2022-09-23 09:44:02 +05:30
303_reshard.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
304_switch_reads.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
305_switch_writes.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
306_down_shard_0.sh Change local example to use v2 vreplication flows 2021-07-27 22:01:06 +02:00
307_delete_shard_0.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
401_teardown.sh feat: augment local example with vtorc (#11155) 2022-09-01 22:49:10 +05:30
README.md feat: fix commands in readme files to use double dashes for arguments (#10389) 2022-05-31 11:45:12 -07:00
ceph_backup_config.json Ceph changes (#2023) 2016-09-07 14:47:34 -07:00
create_commerce_schema.sql adapt helm example to run locally 2018-12-05 17:58:59 -08:00
create_commerce_seq.sql adapt helm example to run locally 2018-12-05 17:58:59 -08:00
create_customer_sharded.sql adapt helm example to run locally 2018-12-05 17:58:59 -08:00
create_test_table.sql add back files required for test 2018-12-06 18:06:39 -08:00
drop_commerce_tables.sql adapt helm example to run locally 2018-12-05 17:58:59 -08:00
env.sh Examples: fix warnings (#9875) 2022-03-14 10:27:27 -04:00
grpc_static_auth.json First pass at review feedback 2017-12-05 10:23:06 -08:00
grpc_static_client_auth.json First pass at review feedback 2017-12-05 10:23:06 -08:00
mysql_auth_server_static_creds.json add mysql naitve password to login 2018-05-03 10:59:54 +08:00
topo-etcd2.sh update license in example/ config/ data/ doc/ docker/ 2019-10-22 13:51:38 +08:00
topo-k8s.sh Add Kubernetes topo implementation 2020-03-14 09:49:37 -06:00
topo-zk2.sh update license in example/ config/ data/ doc/ docker/ 2019-10-22 13:51:38 +08:00
vschema.json Adds removed vschema 2018-12-08 12:08:07 -08:00
vschema_commerce_initial.json adapt helm example to run locally 2018-12-05 17:58:59 -08:00
vschema_commerce_seq.json adapt helm example to run locally 2018-12-05 17:58:59 -08:00
vschema_customer_sharded.json adapt helm example to run locally 2018-12-05 17:58:59 -08:00
vstream_client.go Run latest gofmt on everything & address linter warnings (#11008) 2022-08-16 13:53:42 -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.

# Setup environment and aliases
source env.sh

# Bring up initial cluster and commerce keyspace
./101_initial_cluster.sh

# Insert and verify data
mysql < ../common/insert_commerce_data.sql
mysql --table < ../common/select_commerce_data.sql

# Bring up customer keyspace
./201_customer_tablets.sh

# Initiate move tables
vtctlclient MoveTables -- --source commerce --tables 'customer,corder' Create customer.commerce2customer

# Validate
vtctlclient VDiff customer.commerce2customer

# Cut-over
vtctlclient MoveTables -- --tablet_types=rdonly,replica SwitchTraffic customer.commerce2customer
vtctlclient MoveTables -- --tablet_types=primary SwitchTraffic customer.commerce2customer

# Clean-up
vtctlclient MoveTables Complete customer.commerce2customer

# Prepare for resharding
./301_customer_sharded.sh
./302_new_shards.sh

# Reshard
vtctlclient Reshard -- --source_shards '0' --target_shards '-80,80-' Create customer.cust2cust

# Validate
vtctlclient VDiff customer.cust2cust

# Cut-over
vtctlclient Reshard -- --tablet_types=rdonly,replica SwitchTraffic customer.cust2cust
vtctlclient Reshard -- --tablet_types=primary SwitchTraffic customer.cust2cust

# Down shard 0
./306_down_shard_0.sh
vtctlclient DeleteShard -- --recursive customer/0

# Down cluster
./401_teardown.sh