Skip to content

Commit

Permalink
*: unify ansible names for v2.1 (#2110)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomShawn committed Mar 27, 2020
1 parent 6fdbb7d commit eac3c44
Show file tree
Hide file tree
Showing 22 changed files with 62 additions and 62 deletions.
4 changes: 2 additions & 2 deletions _index.md
Expand Up @@ -10,8 +10,8 @@ TiDB ("Ti" stands for Titanium) is an open-source NewSQL database that supports

TiDB can be deployed on-premise or in-cloud. The following deployment options are officially supported by PingCAP:

- [Ansible Deployment](/how-to/deploy/orchestrated/ansible.md): This guide describes how to deploy TiDB using Ansible. It is strongly recommended for production deployment.
- [Ansible Offline Deployment](/how-to/deploy/orchestrated/offline-ansible.md): If your environment has no access to the internet, you can follow this guide to see how to deploy a TiDB cluster offline using Ansible.
- [Ansible Deployment](/how-to/deploy/orchestrated/ansible.md): This guide describes how to deploy TiDB using TiDB Ansible. It is strongly recommended for production deployment.
- [Ansible Offline Deployment](/how-to/deploy/orchestrated/offline-ansible.md): If your environment has no access to the internet, you can follow this guide to see how to deploy a TiDB cluster offline using TiDB Ansible.
- [Docker Deployment](/how-to/deploy/orchestrated/docker.md): This guide describes how to deploy TiDB using Docker.
- [Binary Tarball Deployment](/how-to/deploy/from-tarball/production-environment.md): This guide describes how to deploy TiDB from a binary tarball in production. Guides for [development](/how-to/get-started/deploy-tidb-from-binary.md) and [testing](/how-to/deploy/from-tarball/testing-environment.md) environments are also available.

Expand Down
14 changes: 7 additions & 7 deletions faq/tidb.md
Expand Up @@ -203,7 +203,7 @@ For details, see [Software and Hardware Recommendations](/how-to/deploy/hardware

### Install and deploy

#### Deploy TiDB using Ansible (recommended)
#### Deploy TiDB using TiDB Ansible (recommended)

See [Ansible Deployment](/how-to/deploy/orchestrated/ansible.md).

Expand Down Expand Up @@ -245,9 +245,9 @@ Check the time difference between the machine time of the monitor and the time w
| enable_slow_query_log | to record the slow query log of TiDB into a single file: ({{ deploy_dir }}/log/tidb_slow_query.log). False by default, to record it into the TiDB log |
| deploy_without_tidb | the Key-Value mode, deploy only PD, TiKV and the monitoring service, not TiDB; set the IP of the tidb_servers host group to null in the `inventory.ini` file |

#### Deploy TiDB offline using Ansible
#### Deploy TiDB offline using TiDB Ansible

It is not recommended to deploy TiDB offline using Ansible. If the Control Machine has no access to external network, you can deploy TiDB offline using Ansible. For details, see [Offline Deployment Using Ansible](/how-to/deploy/orchestrated/offline-ansible.md).
It is not recommended to deploy TiDB offline using TiDB Ansible. If the Control Machine has no access to external network, you can deploy TiDB offline using TiDB Ansible. For details, see [Offline Deployment Using TiDB Ansible](/how-to/deploy/orchestrated/offline-ansible.md).

#### How to deploy TiDB quickly using Docker Compose on a single machine?

Expand Down Expand Up @@ -302,7 +302,7 @@ Two possible reasons and solutions:

### Upgrade

#### How to perform rolling updates using Ansible?
#### How to perform rolling updates using TiDB Ansible?

- Apply rolling updates to the TiKV node (only update the TiKV service).

Expand All @@ -322,7 +322,7 @@ When you apply rolling updates to the TiDB services, the running application is

#### How to upgrade when I deploy TiDB using Binary?

It is not recommended to deploy TiDB using Binary. The support for upgrading using Binary is not as friendly as using Ansible. It is recommended to deploy TiDB using Ansible.
It is not recommended to deploy TiDB using Binary. The support for upgrading using Binary is not as friendly as using TiDB Ansible. It is recommended to deploy TiDB using TiDB Ansible.

#### Should I upgrade TiKV or all components generally?

Expand Down Expand Up @@ -385,7 +385,7 @@ By default, TiDB/PD/TiKV outputs standard error in the logs. If a log file is sp

#### How to safely stop TiDB?

If the cluster is deployed using Ansible, you can use the `ansible-playbook stop.yml` command to stop the TiDB cluster. If the cluster is not deployed using Ansible, `kill` all the services directly. The components of TiDB will do `graceful shutdown`.
If the cluster is deployed using TiDB Ansible, you can use the `ansible-playbook stop.yml` command to stop the TiDB cluster. If the cluster is not deployed using TiDB Ansible, `kill` all the services directly. The components of TiDB will do `graceful shutdown`.

#### Can `kill` be executed in TiDB?

Expand Down Expand Up @@ -493,7 +493,7 @@ The offline node usually indicates the TiKV node. You can determine whether the

1. Manually stop the relevant services on the offline node.
2. Delete the `node_exporter` data of the corresponding node from the Prometheus configuration file.
3. Delete the data of the corresponding node from Ansible `inventory.ini`.
3. Delete the data of the corresponding node from TiDB Ansible `inventory.ini`.

#### Why couldn't I connect to the PD server using `127.0.0.1` when I was using the PD Control?

Expand Down
2 changes: 1 addition & 1 deletion how-to/deploy/geographic-redundancy/location-awareness.md
Expand Up @@ -10,7 +10,7 @@ category: how-to

PD schedules according to the topology of the TiKV cluster to maximize the TiKV's capability for disaster recovery.

Before you begin, see [Deploy TiDB Using Ansible (Recommended)](/how-to/deploy/orchestrated/ansible.md) and [Deploy TiDB Using Docker](/how-to/deploy/orchestrated/docker.md).
Before you begin, see [Deploy TiDB Using TiDB Ansible (Recommended)](/how-to/deploy/orchestrated/ansible.md) and [Deploy TiDB Using Docker](/how-to/deploy/orchestrated/docker.md).

## TiKV reports the topological information

Expand Down
28 changes: 14 additions & 14 deletions how-to/deploy/orchestrated/ansible.md
@@ -1,12 +1,12 @@
---
title: Deploy TiDB Using Ansible
summary: Use Ansible to deploy a TiDB cluster.
title: Deploy TiDB Using TiDB Ansible
summary: Use TiDB Ansible to deploy a TiDB cluster.
category: how-to
---

# Deploy TiDB Using Ansible
# Deploy TiDB Using TiDB Ansible

This guide describes how to deploy a TiDB cluster using Ansible. For the production environment, it is recommended to deploy TiDB using Ansible.
This guide describes how to deploy a TiDB cluster using TiDB Ansible. For the production environment, it is recommended to deploy TiDB using TiDB Ansible.

## Overview

Expand Down Expand Up @@ -42,7 +42,7 @@ Before you start, make sure you have:

> **Note:**
>
> When you deploy TiDB using Ansible, **use SSD disks for the data directory of TiKV and PD nodes**. Otherwise, it cannot pass the check. If you only want to try TiDB out and explore the features, it is recommended to [deploy TiDB using Docker Compose](https://pingcap.com/docs/dev/how-to/get-started/deploy-tidb-from-docker-compose/) on a single machine.
> When you deploy TiDB using TiDB Ansible, **use SSD disks for the data directory of TiKV and PD nodes**. Otherwise, it cannot pass the check. If you only want to try TiDB out and explore the features, it is recommended to [deploy TiDB using Docker Compose](https://pingcap.com/docs/dev/how-to/get-started/deploy-tidb-from-docker-compose/) on a single machine.
2. A Control Machine that meets the following requirements:

Expand Down Expand Up @@ -173,13 +173,13 @@ Make sure you have logged in to the Control Machine using the `root` user accoun
If you have questions regarding which version to use, email to info@pingcap.com for more information or [file an issue](https://github.com/pingcap/tidb-ansible/issues/new).

## Step 4: Install Ansible and its dependencies on the Control Machine
## Step 4: Install TiDB Ansible and its dependencies on the Control Machine

Make sure you have logged in to the Control Machine using the `tidb` user account.

It is required to use `pip` to install Ansible and its dependencies, otherwise a compatibility issue occurs. Currently, the release-2.0, release-2.1, and master branches of TiDB Ansible are compatible with Ansible 2.4 ~ 2.7.11 (2.4 ≤ Ansible ≤ 2.7.11).
It is required to use `pip` to install TiDB Ansible and its dependencies, otherwise a compatibility issue occurs. Currently, the release-2.0, release-2.1, and master branches of TiDB Ansible are compatible with Ansible 2.4 ~ 2.7.11 (2.4 ≤ Ansible ≤ 2.7.11).

1. Install Ansible and the dependencies on the Control Machine:
1. Install TiDB Ansible and the dependencies on the Control Machine:

{{< copyable "shell-regular" >}}

Expand All @@ -188,9 +188,9 @@ It is required to use `pip` to install Ansible and its dependencies, otherwise a
sudo pip install -r ./requirements.txt
```

The version information of Ansible and dependencies is in the `tidb-ansible/requirements.txt` file.
The version information of TiDB Ansible and dependencies is in the `tidb-ansible/requirements.txt` file.

2. View the version of Ansible:
2. View the version of TiDB Ansible:

{{< copyable "shell-regular" >}}

Expand Down Expand Up @@ -341,7 +341,7 @@ You can use either of the following two methods to change the governor mode. In

Log in to the target machines using the `root` user account.

Format your data disks to the ext4 filesystem and add the `nodelalloc` and `noatime` mount options to the filesystem. It is required to add the `nodelalloc` option, or else the Ansible deployment cannot pass the test. The `noatime` option is optional.
Format your data disks to the ext4 filesystem and add the `nodelalloc` and `noatime` mount options to the filesystem. It is required to add the `nodelalloc` option, or else the TiDB Ansible deployment cannot pass the test. The `noatime` option is optional.

> **Note:**
>
Expand Down Expand Up @@ -638,7 +638,7 @@ To enable the following control variables, use the capitalized `True`. To disabl
| deploy_without_tidb | the Key-Value mode, deploy only PD, TiKV and the monitoring service, not TiDB; set the IP of the tidb_servers host group to null in the `inventory.ini` file |
| alertmanager_target | optional: If you have deployed `alertmanager` separately, you can configure this variable using the `alertmanager_host:alertmanager_port` format |
| grafana_admin_user | the username of Grafana administrator; default `admin` |
| grafana_admin_password | the password of Grafana administrator account; default `admin`; used to import Dashboard and create the API key using Ansible; update this variable if you have modified it through Grafana web |
| grafana_admin_password | the password of Grafana administrator account; default `admin`; used to import Dashboard and create the API key using TiDB Ansible; update this variable if you have modified it through Grafana web |
| collect_log_recent_hours | to collect the log of recent hours; default the recent 2 hours |
| enable_bandwidth_limit | to set a bandwidth limit when pulling the diagnostic data from the target machines to the Control Machine; used together with the `collect_bandwidth_limit` variable |
| collect_bandwidth_limit | the limited bandwidth when pulling the diagnostic data from the target machines to the Control Machine; unit: Kbit/s; default 10000, indicating 10Mb/s; for the cluster topology of multiple TiKV instances on each TiKV node, you need to divide the number of the TiKV instances on each TiKV node |
Expand Down Expand Up @@ -743,7 +743,7 @@ Because TiDB is compatible with MySQL, you must use the MySQL client to connect

## Deployment FAQs

This section lists the common questions about deploying TiDB using Ansible.
This section lists the common questions about deploying TiDB using TiDB Ansible.

### How to customize the port?

Expand Down Expand Up @@ -947,7 +947,7 @@ ansible-playbook start.yml

### Error: You need to install jmespath prior to running json_query filter

1. See [Install Ansible and its dependencies on the Control Machine](#step-4-install-ansible-and-its-dependencies-on-the-control-machine) and use `pip` to install Ansible and the corresponding dependencies in the Control Machine. The `jmespath` dependent package is installed by default.
1. See [Install TiDB Ansible and its dependencies on the Control Machine](#step-4-install-tidb-ansible-and-its-dependencies-on-the-control-machine) and use `pip` to install Ansible and the corresponding dependencies in the Control Machine. The `jmespath` dependent package is installed by default.

2. Run the following command to check whether `jmespath` is successfully installed:

Expand Down
20 changes: 10 additions & 10 deletions how-to/deploy/orchestrated/offline-ansible.md
@@ -1,12 +1,12 @@
---
title: Deploy TiDB Offline Using Ansible
summary: Use Ansible to deploy a TiDB cluster offline.
title: Deploy TiDB Offline Using TiDB Ansible
summary: Use TiDB Ansible to deploy a TiDB cluster offline.
category: how-to
---

# Deploy TiDB Offline Using Ansible
# Deploy TiDB Offline Using TiDB Ansible

This guide describes how to deploy a TiDB cluster offline using Ansible.
This guide describes how to deploy a TiDB cluster offline using TiDB Ansible.

## Prepare

Expand Down Expand Up @@ -57,19 +57,19 @@ Take the following steps to install system dependencies on the Control Machine i

> **Note:**
>
> If `pip` is already installed to your system, make sure that the version is 8.1.2 or later. Otherwise, compatibility error occurs when you install Ansible and its dependencies offline.
> If `pip` is already installed to your system, make sure that the version is 8.1.2 or later. Otherwise, compatibility error occurs when you install TiDB Ansible and its dependencies offline.
## Step 2: Create the `tidb` user on the Control Machine and generate the SSH key

See [Create the `tidb` user on the Control Machine and generate the SSH key](/how-to/deploy/orchestrated/ansible.md#step-2-create-the-tidb-user-on-the-control-machine-and-generate-the-ssh-key).

## Step 3: Install Ansible and its dependencies offline on the Control Machine
## Step 3: Install TiDB Ansible and its dependencies offline on the Control Machine

Currently, all the versions of Ansible from 2.4 to 2.7.11 are supported. The versions of Ansible and the related dependencies are listed in the `tidb-ansible/requirements.txt` file. The following installation steps take Ansible 2.5 as an example.

1. Download [Ansible 2.5 offline installation package](https://download.pingcap.org/ansible-2.5.0-pip.tar.gz) on the download machine and then upload it to the Control Machine.

2. Install Ansible and its dependencies offline.
2. Install TiDB Ansible and its dependencies offline.

{{< copyable "shell-root" >}}

Expand All @@ -80,9 +80,9 @@ Currently, all the versions of Ansible from 2.4 to 2.7.11 are supported. The ver
./install_ansible.sh
```

3. View the version of Ansible.
3. View the version of TiDB Ansible.

After Ansible is installed, you can view the version using `ansible --version`.
After TiDB Ansible is installed, you can view the version using `ansible --version`.

{{< copyable "shell-root" >}}

Expand All @@ -107,7 +107,7 @@ The relationship between the `tidb-ansible` version and the TiDB version is as f
>
> If you have questions regarding which version to use, email to info@pingcap.com for more information or [file an issue](https://github.com/pingcap/tidb-ansible/issues/new).
1. Install Ansible on the download machine.
1. Install TiDB Ansible on the download machine.

Use the following method to install Ansible online on the download machine installed with the CentOS 7 system. After Ansible is installed, you can view the version using `ansible --version`.

Expand Down
2 changes: 1 addition & 1 deletion how-to/monitor/monitor-a-cluster.md
Expand Up @@ -76,7 +76,7 @@ curl http://127.0.0.1:2379/pd/api/v1/stores
The metrics interface monitors the state and performance of the entire TiDB cluster.
- If you use Ansible to deploy the TiDB cluster, the monitoring system (Prometheus and Grafana) is deployed at the same time.
- If you use TiDB Ansible to deploy the TiDB cluster, the monitoring system (Prometheus and Grafana) is deployed at the same time.
- If you use other deployment ways, [deploy Prometheus and Grafana](#deploy-prometheus-and-grafana) before using this interface.
After Prometheus and Grafana are successfully deployed, [configure Grafana](#configure-grafana).
Expand Down
2 changes: 1 addition & 1 deletion how-to/scale/horizontally.md
Expand Up @@ -12,7 +12,7 @@ The capacity of a TiDB cluster can be increased or reduced without affecting onl

> **Note:**
>
> If your TiDB cluster is deployed using Ansible, see [Scale the TiDB Cluster Using TiDB Ansible](/how-to/scale/with-ansible.md).
> If your TiDB cluster is deployed using TiDB Ansible, see [Scale the TiDB Cluster Using TiDB Ansible](/how-to/scale/with-ansible.md).
The following part shows you how to add or delete PD, TiKV or TiDB nodes.

Expand Down
10 changes: 5 additions & 5 deletions how-to/upgrade/from-previous-version.md
Expand Up @@ -13,7 +13,7 @@ This document describes how to upgrade from TiDB 2.0 to 2.1 versions, or from an
>
> TiDB 2.1 is not compatible with the Kafka version of TiDB Binlog. If your current TiDB cluster has already been using the [Kafka version of TiDB Binlog](/reference/tidb-binlog/tidb-binlog-kafka.md), you need to [upgrade it to the cluster version of TiDB Binlog](/reference/tidb-binlog/upgrade.md).
For details about using Ansible to perform a rolling update to components, see [Perform a rolling update to TiDB cluster components](/how-to/upgrade/from-previous-version.md#step-5-perform-a-rolling-update-to-tidb-cluster-components).
For details about using TiDB Ansible to perform a rolling update to components, see [Perform a rolling update to TiDB cluster components](/how-to/upgrade/from-previous-version.md#step-5-perform-a-rolling-update-to-tidb-cluster-components).

## Upgrade caveat

Expand All @@ -29,15 +29,15 @@ For details about using Ansible to perform a rolling update to components, see [
>
> Do not execute any DDL statements during the upgrading process, otherwise the undefined behavior error might occur.
## Step 1: Install Ansible and dependencies on the Control Machine
## Step 1: Install TiDB Ansible and dependencies on the Control Machine

> **Note:**
>
> If you have installed Ansible and its dependencies, you can skip this step.
> If you have installed TiDB Ansible and its dependencies, you can skip this step.
TiDB Ansible release-2.1 depends on Ansible 2.4.2 ~ 2.7.11 (`2.4.2 ≦ ansible < 2.7.11`) and the Python modules of `jinja2 ≧ 2.9.6` and `jmespath ≧ 0.9.0`.

To make it easy to manage dependencies, use `pip` to install Ansible and its dependencies. For details, see [Install Ansible and its dependencies on the Control Machine](/how-to/deploy/orchestrated/ansible.md#step-4-install-ansible-and-its-dependencies-on-the-control-machine). For offline environment, see [Install Ansible and its dependencies offline on the Control Machine](/how-to/deploy/orchestrated/offline-ansible.md#step-3-install-ansible-and-its-dependencies-offline-on-the-control-machine).
To make it easy to manage dependencies, use `pip` to install TiDB Ansible and its dependencies. For details, see [Install TiDB Ansible and its dependencies on the Control Machine](/how-to/deploy/orchestrated/ansible.md#step-4-install-tidb-ansible-and-its-dependencies-on-the-control-machine). For offline environment, see [Install TiDB Ansible and its dependencies offline on the Control Machine](/how-to/deploy/orchestrated/offline-ansible.md#step-3-install-tidb-ansible-and-its-dependencies-offline-on-the-control-machine).

After the installation is finished, you can view the version information using the following command:

Expand Down Expand Up @@ -75,7 +75,7 @@ Version: 0.9.3

> **Note:**
>
> - You must install Ansible and its dependencies following the above procedures.
> - You must install TiDB Ansible and its dependencies following the above procedures.
> - Make sure that the Jinja2 version is correct, otherwise an error occurs when you start Grafana.
> - Make sure that the jmespath version is correct, otherwise an error occurs when you perform a rolling update to TiKV.
Expand Down

0 comments on commit eac3c44

Please sign in to comment.