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

Separate aws/gcp/alibaba terraform scripts into infrastructure module and tidb-cluster module #494

Closed
aylei opened this issue May 16, 2019 · 3 comments
Assignees

Comments

@aylei
Copy link
Contributor

aylei commented May 16, 2019

follow up: #492 (comment)

Currently, aws/gcp/alibaba terraform scripts provision the infrastructure (VMs and Kubernetes) and tidb-cluster in one module, which facilitate the overall setup procedure (a.k.a. on-click deployment). However, it is worthwhile to separate it into two modules, and integrates these two modules in the main module to provide the "on-click deployment & management" functionality.

This structure can help us narrow down the cluster management tools we maintain without breaking anything (Current documentations about terraform still works exactly the same way, which is great for quick-start and presentation). We just have to concentrate on 1 or 2 cluster management mechanisms like helm or kustomize in development and documentation. Moreover, users have more flexibility to customize their setup, e.g. multiple tidb-cluster in one managed kubernetes cluster even if we don't have official support now.

A possible use case: when a user investigate the documentations, he/she will find many operation guides and tutorials about certain feature written for the helm chart, and a documentation about deploy tidb-cluster to EKS. He/she may have a hard time figuring out how to apply the guides and tutorials written for helm to the tidb-cluster in EKS.

Another solution is to guide users to modify the tidb-cluster-values.yaml.tpl file, and tell user that the helm operations, modification of values.yaml and helm upgrade, are mapping to the modification of tidb-cluster-values.yaml.tpl and terraform apply in the terraform context, which is sub-optimal because we are exposing the implementation details of our terraform module this way.

@gregwebs
Copy link
Contributor

I think the best way to do this in terraform is to have two modules: infrastructure & helm. We would provide a configuration that binds them together.

@aylei aylei self-assigned this May 20, 2019
@aylei aylei changed the title Add an option for terraform scripts to just provision the infrastructure Separate aws/gcp/alibaba terraform scripts into infrastructure module and tidb-cluster module May 30, 2019
@gregwebs
Copy link
Contributor

gregwebs commented Aug 7, 2019

@aylei is this completed now?

@aylei
Copy link
Contributor Author

aylei commented Aug 9, 2019

@gregwebs Yes, thank you for your notice!

closed via #650 #658

@aylei aylei closed this as completed Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants