Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates.
TiDB-Ansible is a TiDB cluster deployment tool developed by PingCAP, based on Ansible playbook. TiDB-Ansible enables you to quickly deploy a new TiDB cluster which includes PD, TiDB, TiKV, and the cluster monitoring modules.
You can use the TiDB-Ansible configuration file to set up the cluster topology, completing all operation tasks with one click, including:
- Initializing the system, including creating user for deployment, setting up hostname, etc.
- Deploying the components
- Rolling upgrade, including module survival detection
- Cleaning data
- Cleaning environment
- Configuring monitoring modules
- http://download.pingcap.org/tidb-latest-linux-amd64.tar.gz
- http://download.pingcap.org/tidb-latest-linux-amd64-centos6.tar.gz
- http://download.pingcap.org/tidb-binlog-latest-linux-amd64.tar.gz
- http://download.pingcap.org/tidb-tools-latest-linux-amd64.tar.gz
- http://download.pingcap.org/sysbench-static-linux-amd64.tar.gz
- http://download.pingcap.org/mydumper-linux-amd64.tar.gz
- http://download.pingcap.org/opbin.tar.gz
Above binaries will be automatically downloaded by:
ansible-playbook local_prepare.yml
ansible all -m user -a 'name=tidb shell=/bin/bash groups=wheel append=yes'
ansible-playbook deploy.yml --list-hosts
ansible-playbook deploy.yml -k -K
ansible-playbook rolling_update.yml -k
Rolling update TiKV only:
ansible-playbook rolling_update.yml --tags tikv
TiDB-Ansible is under the Apache 2.0 license.