Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zh: Update GKE terraform deployment docs #42

Merged
merged 6 commits into from
Mar 26, 2020
Merged

Conversation

cofyc
Copy link
Contributor

@cofyc cofyc commented Mar 25, 2020

What is changed, added or deleted? (Required)

Which TiDB Operator version(s) do your changes apply to? (Required)

  • master (the latest development version, including v1.1 changes for now)
  • v1.0 (TiDB Operator 1.0 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

@@ -235,51 +278,6 @@ Terraform 自动加载和填充匹配 `terraform.tfvars` 或 `*.auto.tfvars` 文
helm ls
```

## 升级 TiDB 集群
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the same in all k8s environments, we don't need to doc it here.

description = "Number of TiDB nodes per availability zone"
default = 2
}
tidb_count = 2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recommend users to configure via .tfvars file

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, can we make it clear above this block that users can set this in .tfvars?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, updated

@ran-huang ran-huang added priority/P2 The second priority. translation/welcome Waits for a contributor to translate this PR to docs-tidb-operator/zh or docs-tidb-operator/en. labels Mar 25, 2020
zh/deploy-on-gcp-gke.md Outdated Show resolved Hide resolved
zh/deploy-on-gcp-gke.md Outdated Show resolved Hide resolved
zh/deploy-on-gcp-gke.md Show resolved Hide resolved
zh/deploy-on-gcp-gke.md Outdated Show resolved Hide resolved
zh/deploy-on-gcp-gke.md Outdated Show resolved Hide resolved
zh/deploy-on-gcp-gke.md Outdated Show resolved Hide resolved
zh/deploy-on-gcp-gke.md Outdated Show resolved Hide resolved
zh/deploy-on-gcp-gke.md Outdated Show resolved Hide resolved
{{< copyable "shell-regular" >}}

```shell
cp manifests/{db,db-monitor}.yaml .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The files have suffix example in the repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


> **注意:**
>
> `namespace` 是[命名空间](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/),可以起一个方便记忆的名字,比如和 `default_cluster_name` 相同的名称。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default_tidb_cluster_name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

1. 获取 tidb Internal LoadBalancer IP 地址:

```shell
kubectl --kubeconfig credentials/kubeconfig_<gke_name> get svc <cluster-name>-tidb
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-n <namespace>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

tikv_node_count = 2
tidb_node_count = 1
monitor_node_count = 1
providers = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too much indent here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

description = "Number of TiDB nodes per availability zone"
default = 2
}
tidb_count = 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, can we make it clear above this block that users can set this in .tfvars?

@@ -580,7 +557,6 @@ terraform destroy
在 TiDB 的案例中,Terraform 模块通常结合了几个子模块:

- `tidb-operator`:为 TiDB 集群提供 [Kubernetes Control Plane](https://kubernetes.io/docs/concepts/#kubernetes-control-plane) 并部署 TiDB Operator。
- `tidb-cluster`:在目标 Kubernetes 集群中创建资源池并部署 TiDB 集群。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep it and change to - tidb-cluster:在目标 Kubernetes 集群中创建资源池。, is it OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, updated.

cofyc and others added 2 commits March 25, 2020 18:51
Co-Authored-By: Ran <huangran@pingcap.com>
zh/deploy-on-gcp-gke.md Outdated Show resolved Hide resolved
Co-Authored-By: Ran <huangran@pingcap.com>
@@ -132,6 +132,8 @@ Terraform 自动加载和填充匹配 `terraform.tfvars` 或 `*.auto.tfvars` 文

如上所述,生产环境的部署需要 91 个 CPU,超过了 GCP 项目的默认配额。可以参考[配额](https://cloud.google.com/compute/quotas)来增加项目配额。扩容同样需要更多 CPU。

- 默认创建的是 Regional 集群,会在 3 个可用区里都创建节点数量。比如配置 `pd_count = 1`,实际为 PD 创建的节点数为 3 个。可以通过配置 `location` 来创建 Zonal 集群,具体可参见 `examples/` 下例子。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we combine this with the note in L139?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved it to 注意

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

```shell
cp manifests/{db,db-monitor}.yaml.example .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May also rename the files here, the following procedures refer to the files without example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, add some instructions to replace CLUSTER_NAME and rename the files


2. 修改完成后,执行以下命令来创建集群。

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

```bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required since we add a new module in the above step.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@DanielZhangQD DanielZhangQD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ran-huang ran-huang merged commit cd247f8 into pingcap:master Mar 26, 2020
@ran-huang ran-huang self-assigned this Mar 29, 2020
@ran-huang ran-huang added translation/doing This PR’s assignee is translating this PR. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/welcome Waits for a contributor to translate this PR to docs-tidb-operator/zh or docs-tidb-operator/en. translation/doing This PR’s assignee is translating this PR. labels Mar 29, 2020
@ran-huang ran-huang mentioned this pull request Mar 30, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/P2 The second priority. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants