From d671c5512169efba0b229eead6da85ce51f175cb Mon Sep 17 00:00:00 2001 From: Sugu Sougoumarane Date: Wed, 15 Apr 2020 16:54:55 -0700 Subject: [PATCH] examples: vclient->vtctlclient Signed-off-by: Sugu Sougoumarane --- examples/helm/README.md | 28 ++++++++++++++-------------- examples/helm/alias.source | 8 ++++---- examples/local/README.md | 26 +++++++++++++------------- examples/local/alias.source | 4 ++-- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/examples/helm/README.md b/examples/helm/README.md index 350e8ce2236..11af8cc427c 100644 --- a/examples/helm/README.md +++ b/examples/helm/README.md @@ -6,7 +6,7 @@ This document contains the summary of the commands to be run. ``` # Start minikube -minikube start --kubernetes-version v1.15.0 --cpus=4 --memory=5000 +minikube start --cpus=4 --memory=8000 # Bring up initial cluster and commerce keyspace helm install vitess ../../helm/vitess -f 101_initial_cluster.yaml @@ -22,30 +22,30 @@ mysql --table < ../common/select_commerce_data.sql helm upgrade vitess ../../helm/vitess/ -f 201_customer_tablets.yaml # Initiate move tables -vclient MoveTables -workflow=commerce2customer commerce customer '{"customer":{}, "corder":{}}' +vtctlclient MoveTables -workflow=commerce2customer commerce customer '{"customer":{}, "corder":{}}' # Cut-over -vclient SwitchReads -tablet_type=rdonly customer.commerce2customer -vclient SwitchReads -tablet_type=replica customer.commerce2customer -vclient SwitchWrites customer.commerce2customer +vtctlclient SwitchReads -tablet_type=rdonly customer.commerce2customer +vtctlclient SwitchReads -tablet_type=replica customer.commerce2customer +vtctlclient SwitchWrites customer.commerce2customer # Clean-up -vclient SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 rdonly -vclient SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 replica -vclient SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 master -vclient ApplyRoutingRules -rules='{}' +vtctlclient SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 rdonly +vtctlclient SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 replica +vtctlclient SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 master +vtctlclient ApplyRoutingRules -rules='{}' # Prepare for resharding helm upgrade vitess ../../helm/vitess/ -f 301_customer_sharded.yaml helm upgrade vitess ../../helm/vitess/ -f 302_new_shards.yaml # Reshard -vclient Reshard customer.cust2cust '0' '-80,80-' -vclient SwitchReads -tablet_type=rdonly customer.cust2cust -vclient SwitchReads -tablet_type=replica customer.cust2cust -vclient SwitchWrites customer.cust2cust +vtctlclient Reshard customer.cust2cust '0' '-80,80-' +vtctlclient SwitchReads -tablet_type=rdonly customer.cust2cust +vtctlclient SwitchReads -tablet_type=replica customer.cust2cust +vtctlclient SwitchWrites customer.cust2cust # Down shard 0 helm upgrade vitess ../../helm/vitess/ -f 306_down_shard_0.yaml -vclient DeleteShard -recursive customer/0 +vtctlclient DeleteShard -recursive customer/0 ``` diff --git a/examples/helm/alias.source b/examples/helm/alias.source index c94b19a33b8..f10a5d6a47d 100644 --- a/examples/helm/alias.source +++ b/examples/helm/alias.source @@ -21,15 +21,15 @@ function vsetmysql() { alias mysql="mysql -h $vhost -P $vport" } -function vsetvclient() { +function vsetvtctlclient() { vhostport vtctld if [ -z $vport ]; then echo "Error: failed to: obtain [host:port] minikube or kubectl." return 1 fi - echo "Setting alias vclient to vtctlclient -server=$vhost:$vport" - alias vclient="vtctlclient -server=$vhost:$vport" + echo "Setting alias vtctlclient to vtctlclient -server=$vhost:$vport" + alias vtctlclient="vtctlclient -server=$vhost:$vport" } vsetmysql -vsetvclient +vsetvtctlclient diff --git a/examples/local/README.md b/examples/local/README.md index b98e10730ca..46f647e7aff 100644 --- a/examples/local/README.md +++ b/examples/local/README.md @@ -19,32 +19,32 @@ mysql --table < ../common/select_commerce_data.sql ./201_customer_tablets.sh # Initiate move tables -vclient MoveTables -workflow=commerce2customer commerce customer '{"customer":{}, "corder":{}}' +vtctlclient MoveTables -workflow=commerce2customer commerce customer '{"customer":{}, "corder":{}}' # Cut-over -vclient SwitchReads -tablet_type=rdonly customer.commerce2customer -vclient SwitchReads -tablet_type=replica customer.commerce2customer -vclient SwitchWrites customer.commerce2customer +vtctlclient SwitchReads -tablet_type=rdonly customer.commerce2customer +vtctlclient SwitchReads -tablet_type=replica customer.commerce2customer +vtctlclient SwitchWrites customer.commerce2customer # Clean-up -vclient SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 rdonly -vclient SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 replica -vclient SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 master -vclient ApplyRoutingRules -rules='{}' +vtctlclient SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 rdonly +vtctlclient SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 replica +vtctlclient SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 master +vtctlclient ApplyRoutingRules -rules='{}' # Prepare for resharding ./301_customer_sharded.sh ./302_new_shards.sh # Reshard -vclient Reshard customer.cust2cust '0' '-80,80-' -vclient SwitchReads -tablet_type=rdonly customer.cust2cust -vclient SwitchReads -tablet_type=replica customer.cust2cust -vclient SwitchWrites customer.cust2cust +vtctlclient Reshard customer.cust2cust '0' '-80,80-' +vtctlclient SwitchReads -tablet_type=rdonly customer.cust2cust +vtctlclient SwitchReads -tablet_type=replica customer.cust2cust +vtctlclient SwitchWrites customer.cust2cust # Down shard 0 ./306_down_shard_0.sh -vclient DeleteShard -recursive customer/0 +vtctlclient DeleteShard -recursive customer/0 # Down cluster ./401_teardown.sh diff --git a/examples/local/alias.source b/examples/local/alias.source index 8f468f6a385..7bdc9cb130b 100644 --- a/examples/local/alias.source +++ b/examples/local/alias.source @@ -1,4 +1,4 @@ echo "Setting alias mysql to mysql -h 127.0.0.1 -P 15306" alias mysql="mysql -h 127.0.0.1 -P 15306" -echo "Setting alias vclient to vtctlclient -server localhost:15999 -log_dir $VTDATAROOT/tmp -alsologtostderr" -alias vclient="vtctlclient -server localhost:15999 -log_dir $VTDATAROOT/tmp -alsologtostderr" +echo "Setting alias vtctlclient to vtctlclient -server localhost:15999 -log_dir $VTDATAROOT/tmp -alsologtostderr" +alias vtctlclient="vtctlclient -server localhost:15999 -log_dir $VTDATAROOT/tmp -alsologtostderr"