-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathorcpf.sh
executable file
·20 lines (18 loc) · 1.05 KB
/
orcpf.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
kubectl -n voip port-forward --address localhost "$(kubectl -n voip get service --selector="planetscale.com/component=vtctld" -o name | head -n1)" 15000 15999 &
process_id1=$!
kubectl -n voip port-forward --address localhost "$(kubectl -n voip get service --selector="planetscale.com/component=vtgate,!planetscale.com/cell" -o name | head -n1)" 15306:3306 &
process_id2=$!
kubectl -n voip port-forward --address localhost "$(kubectl -n voip get pod --selector="planetscale.com/component=vtorc" -o name | head -n1)" 3000 &
process_id3=$!
sleep 2
echo "You may point your browser to http://localhost:15000 for vtctld, http://localhost:3000 for orchestrator, and use the following aliases as shortcuts:"
echo 'alias vtctlclient="vtctlclient -server=localhost:15999 -logtostderr"'
echo 'alias mysql="mysql -h 127.0.0.1 -P 15306 -u user"'
echo "Hit Ctrl-C to stop the port forwards"
wait $process_id1
wait $process_id2
wait $process_id3
# create table testing (`test` int(11));
# insert into testing (test) values (10);
# update testing set test = 18 where test = 10;