-
Notifications
You must be signed in to change notification settings - Fork 118
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
Conversation
@@ -235,51 +278,6 @@ Terraform 自动加载和填充匹配 `terraform.tfvars` 或 `*.auto.tfvars` 文 | |||
helm ls | |||
``` | |||
|
|||
## 升级 TiDB 集群 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, updated
zh/deploy-on-gcp-gke.md
Outdated
{{< copyable "shell-regular" >}} | ||
|
||
```shell | ||
cp manifests/{db,db-monitor}.yaml . |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
zh/deploy-on-gcp-gke.md
Outdated
|
||
> **注意:** | ||
> | ||
> `namespace` 是[命名空间](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/),可以起一个方便记忆的名字,比如和 `default_cluster_name` 相同的名称。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default_tidb_cluster_name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
zh/deploy-on-gcp-gke.md
Outdated
1. 获取 tidb Internal LoadBalancer IP 地址: | ||
|
||
```shell | ||
kubectl --kubeconfig credentials/kubeconfig_<gke_name> get svc <cluster-name>-tidb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-n <namespace>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
zh/deploy-on-gcp-gke.md
Outdated
tikv_node_count = 2 | ||
tidb_node_count = 1 | ||
monitor_node_count = 1 | ||
providers = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too much indent here.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 集群。 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, updated.
Co-Authored-By: Ran <huangran@pingcap.com>
Co-Authored-By: Ran <huangran@pingcap.com>
zh/deploy-on-gcp-gke.md
Outdated
@@ -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/` 下例子。 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 . |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What is changed, added or deleted? (Required)
Which TiDB Operator version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?