TiUP
https://tikv.org/docs/7.1/deploy/install/production/
prepare
1 2 3
| curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
source .bash_profile
|
cluster component
1 2 3 4 5 6 7 8
| # install cluster component tiup cluster
# update cluster component tiup update --self && tiup update cluster
# verify version tiup --binary cluster
|
Initialize cluster topology file
1 2
| # init template tiup cluster template > topology.yaml
|
topoloy.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| global: user: "tikv" ssh_port: 22 deploy_dir: "/tikv-deploy" data_dir: "/tikv-data" server_configs: {} pd_servers: - host: 10.0.1.1 - host: 10.0.1.2 - host: 10.0.1.3 tikv_servers: - host: 10.0.1.4 - host: 10.0.1.5 - host: 10.0.1.6 monitoring_servers: - host: 10.0.1.7 grafana_servers: - host: 10.0.1.7
|
precheck environment
1 2 3 4 5 6 7 8 9
| # Dry-run first (see failures) tiup cluster check ./topology.yaml
# tiup cluster check ./topology.yaml --apply
# or tiup cluster check ./topology.yaml --user <userName> -i ~/.ssh/id_rsa tiup cluster check ./topology.yaml --apply --user <userName> -i ~/.ssh/id_rsa
|
deploy
1 2 3 4 5 6 7 8 9 10 11
| # list tikv version tiup list tikv
# optional: enable writeable .ssh/authorized_keys, TiUP stores its own key pair in ~/.tiup/storage/cluster/clusters/<cluster_name>/ssh/ (id_rsa + id_rsa.pub). sudo chattr -i authorized_keys
# deploy tiup cluster deploy <clusterName> <tikvVersion> ./topology.yaml
# or e.g. tiup cluster deploy tikv-test v5.0.1 ./topology.yaml --user root -i ~/.ssh/id_rsa
|
status
1 2 3 4 5
| # list tiup cluster list
# status tiup cluster display <clusterName>
|
start
1 2 3 4
| tiup cluster start <clusterName>
# e.g. tiup cluster start tikv-dingofs --init
|
monitor
1 2
| # grafana, default login admin/admin ${Grafana-ip}:3000
|