This guide describes how to quickly deploy a TiKV testing cluster using Docker Compose on a single machine.
Currently, this installation method only supports the Linux system.
Make sure you have installed the following items on your machine:
Docker (17.06.0 or later) and Docker Compose
sudo yum install docker docker-compose
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
sudo yum install git
git clone https://github.com/pingcap/tidb-docker-compose.git
compose/values.yaml file to configure
cd tidb-docker-compose vim compose/values.yaml
compose/values.yaml file to comment the TiDB section out.
Change the Prometheus and Pushgateway addresses for the
host network mode.
sed -i 's/pushgateway:9091/127.0.0.1:9091/g' config/* sed -i 's/prometheus:9090/127.0.0.1:9090/g' config/*
helm template compose > generated-docker-compose.yml
Create and start the cluster using the
docker-compose -f generated-docker-compose.yml pull # Get the latest Docker images docker-compose -f generated-docker-compose.yml up -d
You can check whether the TiKV cluster has been successfully deployed using the following command:
If the state of all the TiKV instances is “Up”, you have successfully deployed a TiKV cluster.
If you want to try the Go client, see Try Two Types of APIs.