Unverified Commit cf2dff82 authored by Yun Guo's avatar Yun Guo

add 2 prometheus-db in gstg

parent eeb04783
*.terraform/
*tfstate*
.*.sw[a-z]
private/*
\ No newline at end of file
......@@ -77,8 +77,8 @@ variable "monitoring_hosts" {
type = "map"
default = {
"names" = ["alerts", "prometheus", "prometheus-app"]
"ports" = [9093, 9090, 9090]
"names" = ["alerts", "prometheus", "prometheus-app", "prometheus-db"]
"ports" = [9093, 9090, 9090, 9090]
}
}
......@@ -409,6 +409,7 @@ variable "node_count" {
"registry-cny" = 1
"prometheus" = 2
"prometheus-app" = 2
"prometheus-db" = 2
"alerts" = 2
"influxdb" = 2
}
......
......@@ -1251,6 +1251,37 @@ module "prometheus-app" {
vpc = "${module.network.self_link}"
}
module "prometheus-db" {
attach_data_disk = true
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-prometheus-db]\""
data_disk_size = 2000
data_disk_type = "pd-standard"
dns_zone_name = "${var.dns_zone_name}"
environment = "${var.environment}"
fw_whitelist_subnets = "${concat(var.monitoring_whitelist_prometheus["subnets"], var.other_monitoring_subnets)}"
fw_whitelist_ports = "${var.monitoring_whitelist_prometheus["ports"]}"
kernel_version = "${var.default_kernel_version}"
machine_type = "${var.machine_types["monitoring"]}"
name = "prometheus-db"
node_count = "${var.node_count["prometheus-db"]}"
oauth2_client_id = "${var.oauth2_client_id_monitoring}"
oauth2_client_secret = "${var.oauth2_client_secret_monitoring}"
persistent_disk_path = "/opt/prometheus"
project = "${var.project}"
region = "${var.region}"
service_account_email = "${var.service_account_email}"
service_path = "/graph"
service_port = "${element(var.monitoring_hosts["ports"], index(var.monitoring_hosts["names"], "prometheus-db"))}"
source = "git::https://ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/monitoring-with-count.git"
subnetwork_name = "${google_compute_subnetwork.monitoring.name}"
tier = "inf"
use_external_ip = true
use_new_node_name = true
vpc = "${module.network.self_link}"
}
module "alerts" {
attach_data_disk = true
bootstrap_version = "${var.bootstrap_script_version}"
......
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