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

*: add TiKV overview, installation, and client driver #472

Merged
merged 12 commits into from
May 31, 2018
Prev Previous commit
Next Next commit
tikv, readme: add Install TiKV Using Docker Compose
  • Loading branch information
lilin90 committed May 29, 2018
commit cd06eff043825280cd880484ac6a6c5625d55da6
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
- [Overview](tikv/tikv-overview.md)
+ Install TiKV
- [Prerequisites](op-guide/recommendation.md)
- [Install TiKV Using Docker Compose](tikv/install-tikv-docker-compose.md)
- [Install TiKV Using Binary Files](tikv/install-tikv-using-binary.md)
+ Client Drivers
- [Go](tikv/go-client-api.md)
Expand Down
57 changes: 57 additions & 0 deletions tikv/install-tikv-docker-compose.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Install TiKV Using Docker Compose
category: user guide
---

# Install TiKV Using Docker Compose

This guide describes how to quickly deploy a TiKV cluster using [Docker Compose](https://github.com/pingcap/tidb-docker-compose/). Currently, this installation method only supports the Linux system.

## Prerequisites

- Install Docker and Docker Compose.

```
sudo yum install docker docker-compose
```

- Install Helm.

```
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
```

## Install

1. Download `tidb-docker-compose`.

```
git clone https://github.com/pingcap/tidb-docker-compose.git
```

2. Edit the `compose/values.yaml` file to configure `networkMode` to `host` and comment the TiDB section out.

```
cd tidb-docker-compose/compose
networkMode: host
```

3. Generate the `generated-docker-compose.yml` file.

```
helm template compose > generated-docker-compose.yml
```

4. Create and start the cluster using the `generated-docker-compose.yml` file.

```
docker-compose -f generated-docker-compose.yml up -d
```

You can check whether the TiKV cluster has been successfully deployed using the following command:

```
curl localhost:2379/pd/api/v1/stores
```

If the state of all the TiKV instances is "Up", you have successfully deployed a TiKV cluster.
6 changes: 4 additions & 2 deletions tikv/install-tikv-using-binary.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Install TiKV Using Binary Files
category: overview
category: user guide
---

# Install TiKV Using Binary Files
Expand Down Expand Up @@ -67,6 +67,8 @@ You can use the [pd-ctl](https://github.com/pingcap/pd/tree/master/pdctl) tool t
./bin/pd-ctl store -d -u http://127.0.0.1:2379
```

If the state of all the TiKV instances is "Up", you have successfully deployed a TiKV cluster.

## Deploy the TiKV cluster on multiple nodes for test

This section describes how to deploy TiKV on multiple nodes. If you want to test TiKV with a limited number of nodes, you can use one PD instance to test the entire cluster.
Expand Down Expand Up @@ -143,4 +145,4 @@ You can use the [pd-ctl](https://github.com/pingcap/pd/tree/master/pdctl) tool t
./pd-ctl store -d -u http://192.168.199.113:2379
```

The result displays the store count and detailed information regarding each store.
The result displays the store count and detailed information regarding each store. If the state of all the TiKV instances is "Up", you have successfully deployed a TiKV cluster.