зеркало из https://github.com/github/vitess-gh.git
use auth=none for vtgate, move sql scripts to common location
Signed-off-by: deepthi <deepthi@planetscale.com>
This commit is contained in:
Родитель
66426a95ed
Коммит
06cb4f4ab7
|
@ -49,7 +49,7 @@ CELL=zone1 $script_root/vtgate-up.sh
|
|||
sleep 5
|
||||
|
||||
# insert rows into the tables. we are actually connecting to vtgate here, it will route the sql correctly
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user -pmysql_password < insert_commerce_data.sql
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user -pmysql_password --table < select_commerce_data.sql
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user < $script_root/../common/insert_commerce_data.sql
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user --table < $script_root/../common/select_commerce_data.sql
|
||||
|
||||
disown -a
|
||||
|
|
|
@ -32,6 +32,6 @@ $VTROOT/bin/vtworker \
|
|||
|
||||
sleep 2
|
||||
# check that customer and order data has been copied to customer keyspace
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user -pmysql_password --table < select_customer0_data.sql
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user --table < $script_root/../common/select_customer0_data.sql
|
||||
|
||||
disown -a
|
||||
|
|
|
@ -24,6 +24,6 @@ script_root=`dirname "${BASH_SOURCE}"`
|
|||
./lvtctl.sh MigrateServedFrom customer/0 master
|
||||
|
||||
# customer and order data cannot be accessed from commerce keyspace
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user -pmysql_password --table < select_commerce_data.sql
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user --table < $script_root/../common/select_commerce_data.sql
|
||||
|
||||
disown -a
|
||||
|
|
|
@ -27,6 +27,6 @@ script_root=`dirname "${BASH_SOURCE}"`
|
|||
./lvtctl.sh SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 master
|
||||
|
||||
# customer and order tables have now been deleted from commerce keyspace
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user -pmysql_password --table < select_commerce_data.sql
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user --table < $script_root/../common/select_commerce_data.sql
|
||||
|
||||
disown -a
|
||||
|
|
|
@ -31,7 +31,7 @@ sleep 15
|
|||
|
||||
sleep 15
|
||||
# new tables are empty
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user -pmysql_password --table < select_customer-80_data.sql
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user -pmysql_password --table < select_customer80-_data.sql
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user --table < $script_root/../common/select_customer-80_data.sql
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user --table < $script_root/../common/select_customer80-_data.sql
|
||||
|
||||
disown -a
|
||||
|
|
|
@ -23,7 +23,7 @@ script_root=`dirname "${BASH_SOURCE}"`
|
|||
./lvtctl.sh MigrateServedTypes customer/0 master
|
||||
|
||||
# data has been copied over to shards, and databases for the new shards are now available
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user -pmysql_password --table < select_customer-80_data.sql
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user -pmysql_password --table < select_customer80-_data.sql
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user --table < $script_root/../common/select_customer-80_data.sql
|
||||
mysql -h 127.0.0.1 -P 15306 -u mysql_user --table < $script_root/../common/select_customer80-_data.sql
|
||||
|
||||
disown -a
|
||||
|
|
|
@ -54,13 +54,19 @@ then
|
|||
optional_tls_args="-grpc_cert $cert_dir/server-cert.pem -grpc_key $cert_dir/server-key.pem -grpc_ca $cert_dir/ca-cert.pem"
|
||||
fi
|
||||
|
||||
optional_auth_args=''
|
||||
optional_auth_args='-mysql_auth_server_impl none'
|
||||
if [ "$1" = "--enable-grpc-static-auth" ];
|
||||
then
|
||||
echo "Enabling Auth with static authentication in grpc"
|
||||
optional_auth_args='-grpc_auth_static_client_creds ./grpc_static_client_auth.json'
|
||||
fi
|
||||
|
||||
if [ "$1" = "--enable-mysql-static-auth" ];
|
||||
then
|
||||
echo "Enabling Auth with mysql static authentication"
|
||||
optional_auth_args='-mysql_auth_server_static_file ./mysql_auth_server_static_creds.json'
|
||||
fi
|
||||
|
||||
# Start vtgate.
|
||||
# shellcheck disable=SC2086
|
||||
$VTROOT/bin/vtgate \
|
||||
|
@ -71,7 +77,6 @@ $VTROOT/bin/vtgate \
|
|||
-grpc_port $grpc_port \
|
||||
-mysql_server_port $mysql_server_port \
|
||||
-mysql_server_socket_path $mysql_server_socket_path \
|
||||
-mysql_auth_server_static_file "./mysql_auth_server_static_creds.json" \
|
||||
-cell $cell \
|
||||
-cells_to_watch $cell \
|
||||
-tablet_types_to_wait MASTER,REPLICA \
|
||||
|
|
Загрузка…
Ссылка в новой задаче