Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade the AWS and GCP quickstarts along with the API doc #323

Merged
merged 3 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,9 @@ <h3 id="planetscale.com/v2.ClusterBackupSpec">ClusterBackupSpec
<a href="#planetscale.com/v2.VitessClusterSpec">VitessClusterSpec</a>)
</p>
<p>
<p>ClusterBackupSpec configures backups for a cluster.</p>
<p>ClusterBackupSpec configures backups for a cluster.
In addition to disaster recovery, Vitess currently depends on backups to support
provisioning of a new tablet in a shard with existing data, as an implementation detail.</p>
</p>
<table class="table table-striped">
<thead class="thead-dark">
Expand Down
30 changes: 15 additions & 15 deletions docs/aws-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ To deploy a Vitess cluster on EKS using the Vitess Operator, follow these steps:

Download the following files:

- [Operator installation file](https://storage.googleapis.com/vitess-operator/install/operator.yaml)
- [Database configuration file](https://storage.googleapis.com/vitess-operator/examples/exampledb_aws.yaml)
- [Example VSchema](https://storage.googleapis.com/vitess-operator/examples/vschema.json)
- [Example SQL schema](https://storage.googleapis.com/vitess-operator/examples/schema.sql)
- [Operator installation file](../test/endtoend/operator/operator-latest.yaml)
- [Database configuration file](../test/endtoend/operator/101_initial_cluster_vtorc_vtadmin.yaml)
- [Example VSchema](../test/endtoend/operator/vschema_commerce_initial.json)
- [Example SQL schema](../test/endtoend/operator/create_commerce_schema.sql)

This guide will assume that the above files are in your working directory.

## Step 2. Apply the operator installation file against your Kubernetes cluster.

This step assumes that `kubectl` is configured to access the GKE cluster.

Enter the following command:
Enter the following command, you should see a similar output:

```shell
$ kubectl apply -f operator.yaml
$ kubectl apply -f operator-latest.yaml
------
customresourcedefinition.apiextensions.k8s.io/etcdlockservers.planetscale.com created
customresourcedefinition.apiextensions.k8s.io/vitessbackups.planetscale.com created
Expand Down Expand Up @@ -100,7 +100,7 @@ vitesscluster.planetscale.com/example created
secret/example-cluster-config created
```

After a few minutes, you should see the pods for your keyspace using the following command:
After a few minutes, you should see the pods for your keyspace using the following command, the output should be similar:

```shell
$ kubectl get pods
Expand Down Expand Up @@ -130,31 +130,31 @@ Use the following command:
kubectl port-forward --address localhost deployment/$(kubectl get deployment --selector="planetscale.com/component=vtctld" -o=jsonpath="{.items..metadata.name}") 15999:15999
```

You should now be able to see all of your tablets using the following command:
You should now be able to see all of your tablets using the following command, the output should be similar:

```shell
$ vtctlclient -server localhost:15999 ListAllTablets
$ vtctldclient --server localhost:15999 GetTablets
------
uswest2a-0433486107 main -80 master 192.168.5.111:15000 192.168.5.111:3306 []
uswest2a-1016938354 main -80 replica 192.168.0.234:15000 192.168.0.234:3306 []
uswest2a-1990736494 main 80- replica 192.168.17.236:15000 192.168.17.236:3306 []
uswest2a-3169804963 main 80- master 192.168.3.15:15000 192.168.3.15:3306 []
uswest2a-0433486107 commerce -80 primary 192.168.5.111:15000 192.168.5.111:3306 []
uswest2a-1016938354 commerce -80 replica 192.168.0.234:15000 192.168.0.234:3306 []
uswest2a-1990736494 commerce 80- replica 192.168.17.236:15000 192.168.17.236:3306 []
uswest2a-3169804963 commerce 80- primary 192.168.3.15:15000 192.168.3.15:3306 []
```

## Step 6. Apply the VSchema to your Vitess database.

Apply the example [VSchema](https://vitess.io/docs/reference/vschema/) using the following command:

```shell
$ vtctlclient -server localhost:15999 ApplyVSchema -vschema "$(cat ./vschema.json)" main
$ vtctldclient --server localhost:15999 ApplyVSchema --vschema "$(cat ./vschema.json)" commerce
```

## Step 7. Apply the SQL schema to your Vitess database.

Apply the example SQL schema using the following command:

```shell
$ vtctlclient -server localhost:15999 ApplySchema -sql "$(cat ./schema.sql)" main
$ vtctldclient --server localhost:15999 ApplySchema --sql "$(cat ./schema.sql)" commerce
```

## Step 8. Expose the Vitess service.
Expand Down
32 changes: 16 additions & 16 deletions docs/gcp-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ To deploy a Vitess cluster on GCP using the Vitess Operator, follow these steps:

Download the following files:

- [Operator installation file](https://storage.googleapis.com/vitess-operator/install/operator.yaml)
- [Database configuration file](https://storage.googleapis.com/vitess-operator/examples/exampledb.yaml)
- [Example VSchema](https://storage.googleapis.com/vitess-operator/examples/vschema.json)
- [Example SQL schema](https://storage.googleapis.com/vitess-operator/examples/schema.sql)
- [Operator installation file](../test/endtoend/operator/operator-latest.yaml)
- [Database configuration file](../test/endtoend/operator/101_initial_cluster_vtorc_vtadmin.yaml)
- [Example VSchema](../test/endtoend/operator/vschema_commerce_initial.json)
- [Example SQL schema](../test/endtoend/operator/create_commerce_schema.sql)

This guide will assume that the above files are in your working directory.

## Step 2. Apply the operator installation file against your Kubernetes cluster.

This step assumes that `kubectl` is configured to access the GKE cluster.

Enter the following command:
Enter the following command, you should see a similar output:

```shell
$ kubectl apply -f operator.yaml
Expand Down Expand Up @@ -102,7 +102,7 @@ vitesscluster.planetscale.com/example created
secret/example-cluster-config created
```

After a few minutes, you should see the pods for your keyspace using the following command:
After a few minutes, you should see the pods for your keyspace using the following command, you should see a similar output:

```shell
$ kubectl get pods
Expand Down Expand Up @@ -132,33 +132,33 @@ Use the following command:
kubectl port-forward --address localhost deployment/$(kubectl get deployment --selector="planetscale.com/component=vtctld" -o=jsonpath="{.items..metadata.name}") 15999:15999
```

You should now be able to see all of your tablets using the following command:
You should now be able to see all of your tablets using the following command, you should see a similar output:

```shell
$ vtctlclient -server localhost:15999 ListAllTablets
$ vtctldclient --server localhost:15999 GetTablets
------
uscentral1a-0261268656 main -80 replica 10.16.1.16:15000 10.16.1.16:3306 []
uscentral1a-1579720563 main 80- replica 10.16.1.15:15000 10.16.1.15:3306 []
uscentral1a-2253629440 main -80 replica 10.16.0.18:15000 10.16.0.18:3306 []
uscentral1a-3067826231 main 80- replica 10.16.0.17:15000 10.16.0.17:3306 []
uscentral1a-3815197730 main 80- master 10.16.2.20:15000 10.16.2.20:3306 []
uscentral1a-3876690474 main -80 master 10.16.2.21:15000 10.16.2.21:3306 []
uscentral1a-0261268656 commerce -80 replica 10.16.1.16:15000 10.16.1.16:3306 []
uscentral1a-1579720563 commerce 80- replica 10.16.1.15:15000 10.16.1.15:3306 []
uscentral1a-2253629440 commerce -80 replica 10.16.0.18:15000 10.16.0.18:3306 []
uscentral1a-3067826231 commerce 80- replica 10.16.0.17:15000 10.16.0.17:3306 []
uscentral1a-3815197730 commerce 80- primary 10.16.2.20:15000 10.16.2.20:3306 []
uscentral1a-3876690474 commerce -80 primary 10.16.2.21:15000 10.16.2.21:3306 []
```

## Step 6. Apply the VSchema to your Vitess database.

Apply the example [VSchema](https://vitess.io/docs/reference/vschema/) using the following command:

```console
$ vtctlclient -server localhost:15999 ApplyVSchema -vschema "$(cat ./vschema.json)" main
$ vtctldclient --server localhost:15999 ApplyVSchema --vschema "$(cat ./vschema.json)" commerce
```

## Step 7. Apply the SQL schema to your Vitess database.

Apply the example SQL schema using the following command:

```shell
$ vtctlclient -server localhost:15999 ApplySchema -sql "$(cat ./schema.sql)" main
$ vtctldclient --server localhost:15999 ApplySchema --sql "$(cat ./schema.sql)" commerce
```

## Step 8. Expose the Vitess service.
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/planetscale/v2/vitesscluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ type VitessImagePullPolicies struct {
}

// ClusterBackupSpec configures backups for a cluster.
// In addition to disaster recovery, Vitess currently depends on backups to support
// provisioning of a new tablet in a shard with existing data, as an implementation detail.
type ClusterBackupSpec struct {
// Locations is a list of places where Vitess backup data for the cluster
// can be stored. At least one storage location must be specified.
Expand Down