forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request vitessio#4427 from planetscale/ds-local-example
WIP: adapt helm/k8s example to run locally
- Loading branch information
Showing
30 changed files
with
464 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 The Vitess Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# this scripts brings up zookeeper and all the vitess components | ||
# required for a single shard deployment. | ||
|
||
set -e | ||
|
||
script_root=`dirname "${BASH_SOURCE}"` | ||
|
||
CELL=zone1 $script_root/zk-up.sh | ||
CELL=zone1 $script_root/vtctld-up.sh | ||
CELL=zone1 KEYSPACE=commerce UID_BASE=100 $script_root/vttablet-up.sh | ||
sleep 15 | ||
./lvtctl.sh InitShardMaster -force commerce/0 zone1-100 | ||
./lvtctl.sh ApplySchema -sql-file create_commerce_schema.sql commerce | ||
./lvtctl.sh ApplyVSchema -vschema_file vschema_commerce_initial.json commerce | ||
CELL=zone1 $script_root/vtgate-up.sh | ||
|
||
disown -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 The Vitess Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# this scripts brings up zookeeper and all the vitess components | ||
# required for a single shard deployment. | ||
|
||
set -e | ||
|
||
./lvtctl.sh CreateKeyspace -served_from='master:commerce,replica:commerce,rdonly:commerce' customer | ||
|
||
disown -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 The Vitess Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# this scripts brings up zookeeper and all the vitess components | ||
# required for a single shard deployment. | ||
|
||
set -e | ||
|
||
script_root=`dirname "${BASH_SOURCE}"` | ||
|
||
CELL=zone1 KEYSPACE=customer UID_BASE=200 $script_root/vttablet-up.sh | ||
sleep 15 | ||
./lvtctl.sh InitShardMaster -force customer/0 zone1-200 | ||
./lvtctl.sh CopySchemaShard -tables customer,corder commerce/0 customer/0 | ||
./lvtctl.sh ApplyVSchema -vschema_file vschema_commerce_vsplit.json commerce | ||
./lvtctl.sh ApplyVSchema -vschema_file vschema_customer_vsplit.json customer | ||
|
||
disown -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 The Vitess Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# this scripts brings up zookeeper and all the vitess components | ||
# required for a single shard deployment. | ||
|
||
set -e | ||
|
||
script_root=`dirname "${BASH_SOURCE}"` | ||
|
||
./lvtctl.sh ApplySchema -sql-file drop_commerce_tables.sql commerce | ||
./lvtctl.sh SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 rdonly | ||
./lvtctl.sh SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 replica | ||
./lvtctl.sh SetShardTabletControl -blacklisted_tables=customer,corder -remove commerce/0 master | ||
|
||
disown -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 The Vitess Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# this scripts brings up zookeeper and all the vitess components | ||
# required for a single shard deployment. | ||
|
||
set -e | ||
|
||
script_root=`dirname "${BASH_SOURCE}"` | ||
|
||
./lvtctl.sh ApplySchema -sql-file create_commerce_seq.sql commerce | ||
./lvtctl.sh ApplyVSchema -vschema_file vschema_commerce_seq.json commerce | ||
./lvtctl.sh ApplySchema -sql-file create_customer_sharded.sql customer | ||
./lvtctl.sh ApplyVSchema -vschema_file vschema_customer_sharded.json customer | ||
|
||
disown -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 The Vitess Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# this scripts brings up zookeeper and all the vitess components | ||
# required for a single shard deployment. | ||
|
||
set -e | ||
|
||
script_root=`dirname "${BASH_SOURCE}"` | ||
|
||
SHARD=-80 CELL=zone1 KEYSPACE=customer UID_BASE=300 $script_root/vttablet-up.sh | ||
SHARD=80- CELL=zone1 KEYSPACE=customer UID_BASE=400 $script_root/vttablet-up.sh | ||
sleep 15 | ||
./lvtctl.sh InitShardMaster -force customer/-80 zone1-300 | ||
./lvtctl.sh InitShardMaster -force customer/80- zone1-400 | ||
./lvtctl.sh CopySchemaShard customer/0 customer/-80 | ||
./lvtctl.sh CopySchemaShard customer/0 customer/80- | ||
|
||
disown -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 The Vitess Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# this scripts brings up zookeeper and all the vitess components | ||
# required for a single shard deployment. | ||
|
||
set -e | ||
|
||
script_root=`dirname "${BASH_SOURCE}"` | ||
source $script_root/env.sh | ||
|
||
$VTROOT/bin/vtworker \ | ||
$TOPOLOGY_FLAGS \ | ||
-cell zone1 \ | ||
-log_dir $VTDATAROOT/tmp \ | ||
-alsologtostderr \ | ||
-use_v3_resharding_mode \ | ||
SplitClone -min_healthy_rdonly_tablets=1 customer/0 | ||
|
||
disown -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 The Vitess Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# this scripts brings up zookeeper and all the vitess components | ||
# required for a single shard deployment. | ||
|
||
set -e | ||
|
||
script_root=`dirname "${BASH_SOURCE}"` | ||
|
||
./lvtctl.sh MigrateServedTypes customer/0 rdonly | ||
./lvtctl.sh MigrateServedTypes customer/0 replica | ||
|
||
|
||
disown -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 The Vitess Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# this scripts brings up zookeeper and all the vitess components | ||
# required for a single shard deployment. | ||
|
||
set -e | ||
|
||
script_root=`dirname "${BASH_SOURCE}"` | ||
|
||
./lvtctl.sh MigrateServedTypes customer/0 master | ||
|
||
disown -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2018 The Vitess Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# this scripts brings up zookeeper and all the vitess components | ||
# required for a single shard deployment. | ||
|
||
set -e | ||
|
||
script_root=`dirname "${BASH_SOURCE}"` | ||
|
||
./lvtctl.sh DeleteShard -recursive customer/0 | ||
|
||
disown -a |
Oops, something went wrong.