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

deploy: Modularize gcp terraform #717

Merged
merged 31 commits into from
Aug 15, 2019
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a079fb0
Adds gcp project-credentials and vpc terraform modules
jlerche Jul 29, 2019
cfac212
More progress
jlerche Jul 30, 2019
0646f9e
intermediate commit
jlerche Jul 30, 2019
a39858f
More refactoring of gcp terraform into modules
jlerche Jul 30, 2019
60492b0
Correctly passes module outputs to variables
jlerche Jul 31, 2019
9d485e1
Correctly set taints and selectors on node pools
jlerche Aug 1, 2019
d15a095
Adds base values for GCP
jlerche Aug 1, 2019
e1e8a21
Adds formatting pass
jlerche Aug 1, 2019
17629ab
Fixes to get the helm provider to work
jlerche Aug 2, 2019
ca71692
Removes local variable that was no longer necessary
jlerche Aug 2, 2019
cf89eae
Uncomments and fixes data.tf
jlerche Aug 2, 2019
b38f8d5
Merge branch 'master' into modularize_gcp_terraform
Aug 2, 2019
d825c03
Fixes formatting, removes unnecessary variables, refactors
jlerche Aug 2, 2019
bc229a8
Refactors some names and formats
jlerche Aug 2, 2019
7480cdd
Add maintenance time variable with default
jlerche Aug 6, 2019
c801a64
Changes bastion image to centos
jlerche Aug 6, 2019
2799672
Adds comment to bastion module explaining empty access_config block
jlerche Aug 6, 2019
df29390
Merge branch 'master' into modularize_gcp_terraform
Aug 6, 2019
1dd4b96
Removes empty data.tf
jlerche Aug 6, 2019
4258766
Merge branch 'modularize_gcp_terraform' of github.com:jlerche/tidb-op…
jlerche Aug 6, 2019
239918f
Removes tidb-cluster-values.yaml.tpl
jlerche Aug 7, 2019
284415f
helm doesn't install a release unless there's wait = false
jlerche Aug 8, 2019
a9cc9c4
Removes storage size override in default.yaml
jlerche Aug 8, 2019
cd4dacf
Refactors the tidb operator chart version variables
jlerche Aug 8, 2019
d8ba365
Moves pv reclaimpolicy=delete to tidb-cluster module
jlerche Aug 9, 2019
a87796c
fix create-service-account.sh
gregwebs Aug 9, 2019
886adbf
Removes destroy trigger for patching reclaimpolicy PV
jlerche Aug 14, 2019
93db57b
Adds bash script to change pv reclaimpolicy from Retain to Delete
jlerche Aug 14, 2019
9f32741
Formatting pass
jlerche Aug 14, 2019
adda73b
Formatting pass
jlerche Aug 14, 2019
c84d1d1
Merge branch 'master' into modularize_gcp_terraform
gregwebs Aug 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 8 additions & 23 deletions deploy/gcp/data.tf
Original file line number Diff line number Diff line change
@@ -1,35 +1,20 @@
data "template_file" "tidb_cluster_values" {
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 now just an empty file.

template = file("${path.module}/templates/tidb-cluster-values.yaml.tpl")

vars = {
cluster_version = var.tidb_version
pd_replicas = var.pd_replica_count
tikv_replicas = var.tikv_replica_count
tidb_replicas = var.tidb_replica_count
operator_version = var.tidb_operator_version
tidb_operator_registry = var.tidb_operator_registry
}
}

data "google_compute_zones" "available" {}

data "external" "tidb_ilb_ip" {
depends_on = [null_resource.deploy-tidb-cluster]
program = ["bash", "-c", "kubectl --kubeconfig ${local.kubeconfig} get svc -n tidb tidb-cluster-tidb -o json | jq '.status.loadBalancer.ingress[0]'"]
depends_on = [module.default-tidb-cluster]
program = ["bash", "-c", "kubectl --kubeconfig ${local.kubeconfig} get svc -n ${var.default_tidb_cluster_name} ${var.default_tidb_cluster_name}-tidb -o json | jq '.status.loadBalancer.ingress[0]'"]
}

data "external" "monitor_ilb_ip" {
jlerche marked this conversation as resolved.
Show resolved Hide resolved
depends_on = [null_resource.deploy-tidb-cluster]
program = ["bash", "-c", "kubectl --kubeconfig ${local.kubeconfig} get svc -n tidb tidb-cluster-grafana -o json | jq '.status.loadBalancer.ingress[0]'"]
depends_on = [module.default-tidb-cluster]
program = ["bash", "-c", "kubectl --kubeconfig ${local.kubeconfig} get svc -n ${var.default_tidb_cluster_name} ${var.default_tidb_cluster_name}-grafana -o json | jq '.status.loadBalancer.ingress[0]'"]
}

data "external" "tidb_port" {
depends_on = [null_resource.deploy-tidb-cluster]
program = ["bash", "-c", "kubectl --kubeconfig ${local.kubeconfig} get svc -n tidb tidb-cluster-tidb -o json | jq '.spec.ports | .[] | select( .name == \"mysql-client\") | {port: .port|tostring}'"]
depends_on = [module.default-tidb-cluster]
program = ["bash", "-c", "kubectl --kubeconfig ${local.kubeconfig} get svc -n ${var.default_tidb_cluster_name} ${var.default_tidb_cluster_name}-tidb -o json | jq '.spec.ports | .[] | select( .name == \"mysql-client\") | {port: .port|tostring}'"]
}

data "external" "monitor_port" {
depends_on = [null_resource.deploy-tidb-cluster]
program = ["bash", "-c", "kubectl --kubeconfig ${local.kubeconfig} get svc -n tidb tidb-cluster-grafana -o json | jq '.spec.ports | .[] | select( .name == \"grafana\") | {port: .port|tostring}'"]
depends_on = [module.default-tidb-cluster]
program = ["bash", "-c", "kubectl --kubeconfig ${local.kubeconfig} get svc -n ${var.default_tidb_cluster_name} ${var.default_tidb_cluster_name}-grafana -o json | jq '.spec.ports | .[] | select( .name == \"grafana\") | {port: .port|tostring}'"]
jlerche marked this conversation as resolved.
Show resolved Hide resolved
}

Loading