From 38fcc725d9d5379926833e38ff00cc84454bb045 Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Tue, 14 May 2019 18:34:12 +0800 Subject: [PATCH 1/5] docs/aws: update AWS deploy doc after testing --- deploy/aliyun/README.md | 2 ++ deploy/aws/README.md | 23 +++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/deploy/aliyun/README.md b/deploy/aliyun/README.md index 15ce2426f5..f7e774a492 100644 --- a/deploy/aliyun/README.md +++ b/deploy/aliyun/README.md @@ -52,6 +52,8 @@ $ terraform apply `terraform apply` will take 5 to 10 minutes to create the whole stack, once complete, basic cluster information will be printed: +> **Note:** You can use `terraform output` command to get these information again. + ``` Apply complete! Resources: 3 added, 0 changed, 1 destroyed. diff --git a/deploy/aws/README.md b/deploy/aws/README.md index f232fc3284..bd0d670344 100644 --- a/deploy/aws/README.md +++ b/deploy/aws/README.md @@ -5,7 +5,7 @@ * [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl) >= 1.11 * [helm](https://github.com/helm/helm/blob/master/docs/install.md#installing-the-helm-client) >= 2.9.0 * [jq](https://stedolan.github.io/jq/download/) -* [aws-iam-authenticator](https://github.com/kubernetes-sigs/aws-iam-authenticator#4-set-up-kubectl-to-use-authentication-tokens-provided-by-aws-iam-authenticator-for-kubernetes) +* [aws-iam-authenticator](https://github.com/kubernetes-sigs/aws-iam-authenticator) installed in `PATH` ## Configure awscli @@ -20,26 +20,29 @@ The default setup will create a new VPC and a t2.micro instance as bastion machi * 2 c4.4xlarge instances for TiDB * 1 c5.xlarge instance for monitor +You can change default values in `variables.tf` (like cluster name and versions) as needed. The default `cluster_name` is `my-cluster`. ``` shell -$ git clone https://github.com/pingcap/tidb-operator +$ git clone --depth=1 https://github.com/pingcap/tidb-operator $ cd tidb-operator/deploy/aws $ terraform init $ terraform apply ``` -After `terraform apply` is executed successfully, you can access the `monitor_endpoint` using your web browser. +It might take 10 minutes or more for the process to finish. After `terraform apply` is executed successfully, some basic information will be printed to the console, you can access the `monitor_endpoint` using your web browser. + +> **Note:** You can use `terraform output` command to get those information again. To access TiDB cluster, use the following command to first ssh into the bastion machine, and then connect it via MySQL client: ``` shell -ssh -i credentials/k8s-prod-my-cluster.pem ec2-user@ +ssh -i credentials/k8s-prod-.pem ec2-user@ mysql -h -P -u root ``` If the DNS name is not resolvable, be patient and wait a few minutes. -You can interact with the EKS cluster using `kubectl` and `helm` with the kubeconfig file `credentials/kubeconfig_`. The default `cluster_name` is `my-cluster`, you can change it in the variables.tf. +You can interact with the EKS cluster using `kubectl` and `helm` with the kubeconfig file `credentials/kubeconfig_`. ``` shell # By specifying --kubeconfig argument @@ -52,7 +55,15 @@ kubectl get po -n tidb helm ls ``` -> **NOTE:** You have to manually delete the EBS volumes after running `terraform destroy` if you don't need the data on the volumes any more. +# Destory + +It may take some while to finish destroying the cluster. + +```shell +$ terraform destroy +``` + +> **NOTE:** You have to manually delete the EBS volumes in AWS console after running `terraform destroy` if you don't need the data on the volumes any more. ## Upgrade TiDB cluster From e23f481df720a2f2d3d26b32fb9b5ce97b1869e8 Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Tue, 14 May 2019 18:37:26 +0800 Subject: [PATCH 2/5] docs/aws: add a pointer to the old doc --- docs/aws-eks-tutorial.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/aws-eks-tutorial.md b/docs/aws-eks-tutorial.md index 9097170ed2..0d02bb6c20 100644 --- a/docs/aws-eks-tutorial.md +++ b/docs/aws-eks-tutorial.md @@ -4,6 +4,8 @@ summary: Tutorial for deploying TiDB on Kubernetes via AWS EKS. category: operations --- +> **Note:** This documentation is outdated and might not work, please see the latest version in the [deploy directory](deploy/aws/README.md). + # Deploy TiDB, a distributed MySQL compatible database, on Kubernetes via AWS EKS ## Requirements: From 02b652fd535d11f49b605732a962f7f80483e24b Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Wed, 15 May 2019 16:37:19 +0800 Subject: [PATCH 3/5] Update deploy/aliyun/README.md Co-Authored-By: Lilian Lee --- deploy/aliyun/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/aliyun/README.md b/deploy/aliyun/README.md index f7e774a492..172befa88a 100644 --- a/deploy/aliyun/README.md +++ b/deploy/aliyun/README.md @@ -52,7 +52,7 @@ $ terraform apply `terraform apply` will take 5 to 10 minutes to create the whole stack, once complete, basic cluster information will be printed: -> **Note:** You can use `terraform output` command to get these information again. +> **Note:** You can use the `terraform output` command to get this information again. ``` Apply complete! Resources: 3 added, 0 changed, 1 destroyed. From 8469242eb60f6d3b4bd56bbc985a0d83427a6795 Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Wed, 15 May 2019 16:40:19 +0800 Subject: [PATCH 4/5] Apply suggestions from code review Co-Authored-By: Lilian Lee --- deploy/aws/README.md | 8 ++++---- docs/aws-eks-tutorial.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy/aws/README.md b/deploy/aws/README.md index bd0d670344..1d447bcffe 100644 --- a/deploy/aws/README.md +++ b/deploy/aws/README.md @@ -20,7 +20,7 @@ The default setup will create a new VPC and a t2.micro instance as bastion machi * 2 c4.4xlarge instances for TiDB * 1 c5.xlarge instance for monitor -You can change default values in `variables.tf` (like cluster name and versions) as needed. The default `cluster_name` is `my-cluster`. +You can change default values in `variables.tf` (like the cluster name and versions) as needed. The default value of `cluster_name` is `my-cluster`. ``` shell $ git clone --depth=1 https://github.com/pingcap/tidb-operator @@ -29,9 +29,9 @@ $ terraform init $ terraform apply ``` -It might take 10 minutes or more for the process to finish. After `terraform apply` is executed successfully, some basic information will be printed to the console, you can access the `monitor_endpoint` using your web browser. +It might take 10 minutes or more for the process to finish. After `terraform apply` is executed successfully, some basic information is printed to the console. You can access the `monitor_endpoint` using your web browser. -> **Note:** You can use `terraform output` command to get those information again. +> **Note:** You can use the `terraform output` command to get that information again. To access TiDB cluster, use the following command to first ssh into the bastion machine, and then connect it via MySQL client: @@ -63,7 +63,7 @@ It may take some while to finish destroying the cluster. $ terraform destroy ``` -> **NOTE:** You have to manually delete the EBS volumes in AWS console after running `terraform destroy` if you don't need the data on the volumes any more. +> **Note:** You have to manually delete the EBS volumes in AWS console after running `terraform destroy` if you do not need the data on the volumes anymore. ## Upgrade TiDB cluster diff --git a/docs/aws-eks-tutorial.md b/docs/aws-eks-tutorial.md index 0d02bb6c20..0ced207c54 100644 --- a/docs/aws-eks-tutorial.md +++ b/docs/aws-eks-tutorial.md @@ -4,7 +4,7 @@ summary: Tutorial for deploying TiDB on Kubernetes via AWS EKS. category: operations --- -> **Note:** This documentation is outdated and might not work, please see the latest version in the [deploy directory](deploy/aws/README.md). +> **Note:** This documentation is outdated and might not work, so it is recommended to see the latest version in the [deploy directory](deploy/aws/README.md). # Deploy TiDB, a distributed MySQL compatible database, on Kubernetes via AWS EKS From 71639430af7aa5ce1a437bce10c4e28f39b3b67d Mon Sep 17 00:00:00 2001 From: Allen Zhong Date: Wed, 15 May 2019 16:43:20 +0800 Subject: [PATCH 5/5] Update docs/aws-eks-tutorial.md Co-Authored-By: Lilian Lee --- docs/aws-eks-tutorial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/aws-eks-tutorial.md b/docs/aws-eks-tutorial.md index 0ced207c54..88dae6f4d9 100644 --- a/docs/aws-eks-tutorial.md +++ b/docs/aws-eks-tutorial.md @@ -4,7 +4,7 @@ summary: Tutorial for deploying TiDB on Kubernetes via AWS EKS. category: operations --- -> **Note:** This documentation is outdated and might not work, so it is recommended to see the latest version in the [deploy directory](deploy/aws/README.md). +> **Note:** This documentation is outdated and might not work, so it is recommended to see the latest version in the [deploy directory](/deploy/aws/README.md). # Deploy TiDB, a distributed MySQL compatible database, on Kubernetes via AWS EKS