Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
17 changes: 7 additions & 10 deletions doc/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ If you run into issues or have questions, please post on our

## Docker Build

To run Vitess in Docker, you can either use our pre-built images on [Docker Hub]
(https://hub.docker.com/u/vitess/), or build them yourself.
To run Vitess in Docker, you can either use our pre-built images on [Docker Hub](https://hub.docker.com/u/vitess/), or build them yourself.

### Docker Hub Images

Expand Down Expand Up @@ -165,7 +164,7 @@ In addition, Vitess requires the software and libraries listed below.
```

2. On OS X, MySQL 5.6 has to be used, MariaDB doesn't work for some reason yet. It should be installed from Homebrew
(install steps are below).
(`install steps are below`).

3. If Xcode is installed (with Console tools, which should be bundled automatically since the 7.1 version), all
the dev dependencies should be satisfied in this step. If no Xcode is present, it is necessary to install pkg-config.
Expand Down Expand Up @@ -361,7 +360,7 @@ lock service. ZooKeeper is included in the Vitess distribution.

Some Linux distributions ship with default file descriptor limits
that are too low for database servers. This issue could show up
as the database crashing with the message "too many open files".
as the database crashing with the message `too many open files`.

Check the system-wide `file-max` setting as well as user-specific
`ulimit` values. We recommend setting them above 100K to be safe.
Expand Down Expand Up @@ -463,9 +462,8 @@ lock service. ZooKeeper is included in the Vitess distribution.
1. **Start vttablets**

The `vttablet-up.sh` script brings up three vttablets, and assigns them to
a [keyspace]({% link overview/concepts.md %}#keyspace) and [shard]
({% link overview/concepts.md %}#shard) according to the variables
set at the top of the script file.
a [keyspace]({% link overview/concepts.md %}#keyspace) and [shard]({% link overview/concepts.md %}#shard)
according to the variables set at the top of the script file.

``` sh
vitess/examples/local$ ./vttablet-up.sh
Expand All @@ -485,9 +483,8 @@ lock service. ZooKeeper is included in the Vitess distribution.
see a keyspace named `test_keyspace` with a single shard named `0`.
This is what an unsharded keyspace looks like.

If you click on the shard box, you'll see a list of [tablets]
({% link overview/concepts.md %}#tablet) in that shard.
Note that it's normal for the tablets to be unhealthy at this point, since
If you click on the shard box, you'll see a list of [tablets]({% link overview/concepts.md %}#tablet)
in that shard. Note that it's normal for the tablets to be unhealthy at this point, since
you haven't initialized them yet.

You can also click the **STATUS** link on each tablet to be taken to its
Expand Down
40 changes: 15 additions & 25 deletions doc/GettingStartedKubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ you must have a GCE account with billing enabled. The instructions
below explain how to enable billing and how to associate a billing
account with a project in the Google Developers Console.

1. Log in to the Google Developers Console to [enable billing]
(https://console.developers.google.com/billing).
1. Log in to the Google Developers Console to [enable billing](https://console.developers.google.com/billing).
1. Click the **Billing** pane if you are not there already.
1. Click **New billing account**.
1. Assign a name to the billing account -- e.g. "Vitess on
Expand All @@ -80,17 +79,15 @@ account with a project in the Google Developers Console.
(Both should be listed under "Google Cloud APIs".)
For each, click on it, then click the **"Enable API"** button.

1. Follow the [Google Cloud SDK quickstart instructions]
(https://cloud.google.com/sdk/#Quick_Start) to set up
and test the Google Cloud SDK. You will also set your default project
1. Follow the [Google Cloud SDK quickstart instructions](https://cloud.google.com/sdk/#Quick_Start)
to set up and test the Google Cloud SDK. You will also set your default project
ID while completing the quickstart.

**Note:** If you skip the quickstart guide because you've previously set up
the Google Cloud SDK, just make sure to set a default project ID by running
the following command. Replace `PROJECT` with the project ID assigned to
your [Google Developers Console](https://console.developers.google.com/)
project. You can [find the ID]
(https://cloud.google.com/compute/docs/projects#projectids)
project. You can [find the ID](https://cloud.google.com/compute/docs/projects#projectids)
by navigating to the **Overview** page for the project in the Console.

``` sh
Expand Down Expand Up @@ -196,8 +193,7 @@ $ export KUBECTL=/example/path/to/google-cloud-sdk/bin/kubectl
Then provide the mount path to the configure script here.

Direct support for other cloud blob stores like Amazon S3 can be added by
implementing the Vitess [BackupStorage plugin interface]
(https://github.com/vitessio/vitess/blob/master/go/vt/mysqlctl/backupstorage/interface.go).
implementing the Vitess [BackupStorage plugin interface](https://github.com/vitessio/vitess/blob/master/go/vt/mysqlctl/backupstorage/interface.go).
Let us know on the [discussion forum](https://groups.google.com/forum/#!forum/vitess)
if you have any specific plugin requests.

Expand Down Expand Up @@ -277,8 +273,7 @@ $ export KUBECTL=/example/path/to/google-cloud-sdk/bin/kubectl

1. **Access vtctld web UI**

To access vtctld from outside Kubernetes, use [kubectl proxy]
(https://kubernetes.io/docs/tasks/access-kubernetes-api/http-proxy-access-api/)
To access vtctld from outside Kubernetes, use [kubectl proxy](https://kubernetes.io/docs/tasks/access-kubernetes-api/http-proxy-access-api/)
to create an authenticated tunnel on your workstation:

**Note:** The proxy command runs in the foreground,
Expand All @@ -294,8 +289,7 @@ $ export KUBECTL=/example/path/to/google-cloud-sdk/bin/kubectl

http://localhost:8001/api/v1/namespaces/default/services/vtctld:web/proxy

You can also use this proxy to access the [Kubernetes Dashboard]
(https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/),
You can also use this proxy to access the [Kubernetes Dashboard](https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/),
where you can monitor nodes, pods, and services:

http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/.
Expand All @@ -307,8 +301,7 @@ $ export KUBECTL=/example/path/to/google-cloud-sdk/bin/kubectl

To enable RPC access into the Kubernetes cluster, we'll again use
`kubectl` to set up an authenticated tunnel. Unlike the HTTP proxy
we used for the web UI, this time we need raw [port forwarding]
(https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)
we used for the web UI, this time we need raw [port forwarding](https://kubernetes.io/docs/tasks/access-application-cluster/port-forward-access-application-cluster/)
for vtctld's [gRPC](https://grpc.io) port.

Since the tunnel needs to target a particular vtctld pod name,
Expand Down Expand Up @@ -387,8 +380,8 @@ $ export KUBECTL=/example/path/to/google-cloud-sdk/bin/kubectl
initialized the databases on them yet.

It can take some time for the tablets to come up for the first time if a pod
was scheduled on a node that hasn't downloaded the [Vitess Docker image]
(https://hub.docker.com/u/vitess/) yet. You can also check the status of the
was scheduled on a node that hasn't downloaded the [Vitess Docker image](https://hub.docker.com/u/vitess/)
yet. You can also check the status of the
tablets from the command line using `kvtctl.sh`:

``` sh
Expand Down Expand Up @@ -529,8 +522,7 @@ $ export KUBECTL=/example/path/to/google-cloud-sdk/bin/kubectl
Vitess uses [vtgate]({% link overview/index.md %}#vtgate) to route each client
query to the correct `vttablet`. In Kubernetes, a `vtgate` service
distributes connections to a pool of `vtgate` pods. The pods are curated by
a [replication controller]
(https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/).
a [replication controller](https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/).

``` sh
vitess/examples/kubernetes$ ./vtgate-up.sh
Expand Down Expand Up @@ -566,8 +558,7 @@ which tells Kubernetes to create a public
[load balancer](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/)
using the API for whatever platform your Kubernetes cluster is in.

You also need to [allow access through your platform's firewall]
(https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/).
You also need to [allow access through your platform's firewall](https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/).

``` sh
# For example, to open port 80 in the GCE firewall:
Expand Down Expand Up @@ -614,8 +605,7 @@ vitess/examples/kubernetes$ ./kvtctl.sh ExecuteFetchAsDba test-0000000100 "SELEC
# +------+---------------------+---------+
```

The [GuestBook source code]
(https://github.com/vitessio/vitess/tree/master/examples/kubernetes/guestbook)
The [GuestBook source code](https://github.com/vitessio/vitess/tree/master/examples/kubernetes/guestbook)
provides more detail about how the app server interacts with Vitess.

## Try Vitess resharding
Expand Down Expand Up @@ -745,8 +735,8 @@ vitess/examples/kubernetes$ ./kvtctl.sh ExecuteFetchAsDba test-0000000100 "SELEC
# +------------+
```

If you need a truly direct connection to mysqld, you can [launch a shell]
(#shell-access) inside the mysql container, and then connect with the `mysql`
If you need a truly direct connection to mysqld, you can [launch a shell](#shell-access)
inside the mysql container, and then connect with the `mysql`
command-line client:

``` sh
Expand Down