Skip to content

handy shell scripts for setting up tidb cluster(tidb/tikv/pd) in single machine.

License

Notifications You must be signed in to change notification settings

c4pt0r/tidb-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tidb-playground

Handy shell scripts for launcing tidb cluster(tidb/tikv/pd) in single machine.

Usage

  1. Modify tikvs file, specify the addresses of tikv-server.
  2. cluster.sh [start|stop|clean]

You can change endpoint of tidb-server/pd-server by setting environment variables. For example:

PD_ADDR=127.0.0.1:2380 cluster.sh start
PD_ADDR=127.0.0.1:2380 TIDB_ADDR=127.0.0.1:5000 cluster.sh start
dongxu:tidb-cluster/ (master) $ ./cluster.sh start
Lauching PD server...
Lauching TiKV servers...
Lauching TiDB server...
Start local cluster successfully...Enjoy it!

dongxu:tidb-cluster/ (master) $ echo store | ./bin/pd-ctl  | jq ".stores[].store"
{
  "id": 2,
  "address": "127.0.0.1:20161",
  "state": 0,
  "state_name": "Up"
}
{
  "id": 3,
  "address": "127.0.0.1:20162",
  "state": 0,
  "state_name": "Up"
}
{
  "id": 1,
  "address": "127.0.0.1:20160",
  "state": 0,
  "state_name": "Up"
}

TODO:

  1. Aliveness check
  2. Setup dashboard(grafana/prometheus)

About

handy shell scripts for setting up tidb cluster(tidb/tikv/pd) in single machine.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages