[tidb@tidb01 tidb-ansible-2.1.1]$ cat inventory.ini
TiDB Cluster Part
[tidb_servers]
192.168.1.26
192.168.1.27
192.168.1.21
[tikv_servers]
192.168.1.22
192.168.1.23
192.168.1.24
[pd_servers]
192.168.1.21
192.168.1.26
192.168.1.27
[spark_master]
[spark_slaves]
[lightning_server]
[importer_server]
Monitoring Part
prometheus and pushgateway servers
[monitoring_servers]
192.168.1.21
[grafana_servers]
192.168.1.21
node_exporter and blackbox_exporter servers
[monitored_servers]
192.168.1.21
192.168.1.22
192.168.1.23
192.168.1.26
192.168.1.27
192.168.1.24
[alertmanager_servers]
192.168.1.21
[kafka_exporter_servers]
192.168.1.26
192.168.1.27
192.168.1.21
Binlog Part
[pump_servers]
pump1 ansible_host=192.168.1.26 deploy_dir=/u01/pump1
pump2 ansible_host=192.168.1.27 deploy_dir=/u01/pump2
pump3 ansible_host=192.168.1.21 deploy_dir=/u01/pump3
[drainer_servers]
Group variables
[pd_servers:vars]
location_labels = [“zone”,“rack”,“host”]
Global variables
[all:vars]
deploy_dir = /u01
Connection
ssh via normal user
ansible_user = tidb
cluster_name = develop-cluster
tidb_version = latest
process supervision, [systemd, supervise]
process_supervision = systemd
timezone = Asia/Shanghai
enable_firewalld = False
check NTP service
enable_ntpd = False
set_hostname = False
binlog trigger
enable_binlog = True
kafka cluster address for monitoring, example:
kafka_addrs = “192.168.0.11:9092,192.168.0.12:9092,192.168.0.13:9092”
kafka_addrs = “192.168.1.21:9092,192.168.1.26:9092,192.168.1.27:9092”
zookeeper address of kafka cluster for monitoring, example:
zookeeper_addrs = “192.168.0.11:2181,192.168.0.12:2181,192.168.0.13:2181”
zookeeper_addrs = “192.168.1.21:2181,192.168.1.26:2181,192.168.1.27:2181”
store slow query log into seperate file
enable_slow_query_log = True
enable TLS authentication in the TiDB cluster
enable_tls = False
KV mode
deploy_without_tidb = False
Optional: Set if you already have a alertmanager server.
Format: alertmanager_host:alertmanager_port
alertmanager_target = “”
grafana_admin_user = “admin”
grafana_admin_password = “admin”
Collect diagnosis
collect_log_recent_hours = 2
enable_bandwidth_limit = True
default: 10Mb/s, unit: Kbit/s
collect_bandwidth_limit = 10000