Commit fa47e4ae authored by Ahmad Sherif's avatar Ahmad Sherif

Merge branch 'thanos-updates-2' into 'master'

Thanos updates #2

See merge request !736
parents f62582db 504abe1a
......@@ -774,7 +774,7 @@ module "thanos" {
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-thanos-store]\""
data_disk_size = 50
data_disk_size = 100
data_disk_type = "pd-ssd"
dns_zone_name = "${var.dns_zone_name}"
egress_ports = "${var.egress_ports}"
......@@ -782,6 +782,7 @@ module "thanos" {
ip_cidr_range = "${var.subnetworks["thanos"]}"
kernel_version = "${var.default_kernel_version}"
machine_type = "${var.machine_types["thanos"]}"
monitoring_whitelist = "${var.monitoring_whitelist_thanos}"
name = "thanos"
node_count = "${var.node_count["thanos"]}"
persistent_disk_path = "/opt/prometheus"
......
......@@ -286,7 +286,7 @@ variable "machine_types" {
"sidekiq-realtime" = "n1-highmem-16"
"sidekiq-traces" = "n1-standard-8"
"stor" = "n1-standard-32"
"thanos" = "n1-standard-8"
"thanos" = "n1-highmem-16"
"web" = "n1-standard-8"
# pages and share should eventually be upgraded
......
......@@ -357,7 +357,7 @@ variable "machine_types" {
"sidekiq-realtime" = "n1-highmem-16"
"sidekiq-traces" = "n1-standard-8"
"stor" = "n1-standard-32"
"thanos" = "n1-standard-8"
"thanos" = "n1-highmem-16"
"web" = "n1-standard-16"
"web-pages" = "n1-standard-8"
......
......@@ -261,6 +261,32 @@ module "alerts" {
use_new_node_name = true
}
module "thanos-query" {
attach_data_disk = true
bootstrap_version = 6
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-thanos-query]\""
data_disk_size = 100
data_disk_type = "pd-standard"
dns_zone_name = "${var.dns_zone_name}"
environment = "${var.environment}"
health_check = "tcp"
machine_type = "${var.machine_types["thanos-query"]}"
name = "thanos-query"
node_count = "${var.node_count["thanos-query"]}"
oauth2_client_id = "${var.oauth2_client_id_monitoring}"
oauth2_client_secret = "${var.oauth2_client_secret_monitoring}"
persistent_disk_path = "/opt"
project = "${var.project}"
region = "${var.region}"
service_account_email = "${var.service_account_email}"
service_port = "${element(var.monitoring_hosts["ports"], index(var.monitoring_hosts["names"], "thanos-query"))}"
source = "git::ssh://[email protected]/gitlab-com/gl-infra/terraform-modules/google/monitoring-with-count.git?ref=v1.0.1"
subnetwork_name = "${google_compute_subnetwork.monitoring.name}"
tier = "inf"
use_new_node_name = true
}
module "sd-exporter" {
additional_scopes = ["https://www.googleapis.com/auth/monitoring"]
allow_stopping_for_update = true
......@@ -312,7 +338,7 @@ module "thanos" {
bootstrap_version = "6"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-thanos-store]\""
data_disk_size = 50
data_disk_size = 100
data_disk_type = "pd-ssd"
dns_zone_name = "${var.dns_zone_name}"
environment = "${var.environment}"
......
......@@ -53,4 +53,20 @@ resource "google_compute_url_map" "monitoring-lb" {
service = "${module.alerts.google_compute_backend_service_self_link}"
}
}
###################################
host_rule {
hosts = ["thanos-query.ops.gitlab.net"]
path_matcher = "thanos-query"
}
path_matcher {
name = "thanos-query"
default_service = "${module.thanos-query.google_compute_backend_service_self_link}"
path_rule {
paths = ["/*"]
service = "${module.thanos-query.google_compute_backend_service_self_link}"
}
}
}
......@@ -49,7 +49,8 @@ variable "machine_types" {
"blackbox" = "n1-standard-1"
"sentry" = "n1-standard-16"
"sd-exporter" = "n1-standard-1"
"thanos" = "n1-standard-2"
"thanos" = "n1-highmem-16"
"thanos-query" = "n1-standard-1"
"gke-runner" = "n1-standard-2"
"nessus" = "n1-standard-1"
}
......@@ -59,8 +60,8 @@ variable "monitoring_hosts" {
type = "map"
default = {
"names" = ["alerts", "prometheus", "prometheus-app"]
"ports" = [9093, 9090, 9090]
"names" = ["alerts", "prometheus", "prometheus-app", "thanos-query"]
"ports" = [9093, 9090, 9090, 10902]
}
}
......@@ -133,6 +134,7 @@ variable "node_count" {
"sentry" = 1
"sd-exporter" = 1
"thanos" = 1
"thanos-query" = 1
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment