vitess.io/vitess@v0.16.2/examples/local/README.md (about) 1 # Instructions 2 3 Detailed instructions for running this example can be found at https://vitess.io. 4 This document contains the summary of the commands to be run. 5 6 7 ``` 8 # Setup environment and aliases 9 source ../common/env.sh 10 11 # Bring up initial cluster and commerce keyspace 12 ./101_initial_cluster.sh 13 14 # Insert and verify data 15 mysql < ../common/insert_commerce_data.sql 16 mysql --table < ../common/select_commerce_data.sql 17 18 # Bring up customer keyspace 19 ./201_customer_tablets.sh 20 21 # Initiate move tables 22 vtctlclient MoveTables -- --source commerce --tables 'customer,corder' Create customer.commerce2customer 23 24 # Validate 25 vtctlclient VDiff customer.commerce2customer 26 27 # Cut-over 28 vtctlclient MoveTables -- --tablet_types=rdonly,replica SwitchTraffic customer.commerce2customer 29 vtctlclient MoveTables -- --tablet_types=primary SwitchTraffic customer.commerce2customer 30 31 # Clean-up 32 vtctlclient MoveTables Complete customer.commerce2customer 33 34 # Prepare for resharding 35 ./301_customer_sharded.sh 36 ./302_new_shards.sh 37 38 # Reshard 39 vtctlclient Reshard -- --source_shards '0' --target_shards '-80,80-' Create customer.cust2cust 40 41 # Validate 42 vtctlclient VDiff customer.cust2cust 43 44 # Cut-over 45 vtctlclient Reshard -- --tablet_types=rdonly,replica SwitchTraffic customer.cust2cust 46 vtctlclient Reshard -- --tablet_types=primary SwitchTraffic customer.cust2cust 47 48 # Down shard 0 49 ./306_down_shard_0.sh 50 vtctlclient DeleteShard -- --force --recursive customer/0 51 52 # Down cluster 53 ./401_teardown.sh 54 ```