Commit f3296f7c authored by John Jarvis's avatar John Jarvis

Add redis sentinel to gstg.

parent 1291449c
......@@ -306,7 +306,7 @@ module "redis-cache" {
project = "${var.project}"
public_ports = "${var.public_ports["redis-cache"]}"
region = "${var.region}"
redis_chef_run_list = "\"role[gprd-base-db-redis-server-cache]\""
redis_chef_run_list = "\"role[${var.environment}-base-db-redis-server-cache]\""
redis_count = "${var.node_count["redis-cache"]}"
redis_data_disk_size = 100
redis_data_disk_type = "pd-ssd"
......@@ -319,6 +319,7 @@ module "redis-cache" {
source = "../../modules/google/generic-stor-redis"
tier = "db"
vpc = "${module.network.self_link}"
service_account_email = "${var.service_account_email}"
}
##################################
......
......@@ -287,25 +287,29 @@ module "redis" {
}
module "redis-cache" {
allow_stopping_for_update = true
bootstrap_version = 4
chef_run_list = "\"role[${var.environment}-base-db-redis-server-cache]\""
data_disk_size = 100
data_disk_type = "pd-ssd"
chef_provision = "${var.chef_provision}"
dns_zone_name = "${var.dns_zone_name}"
environment = "${var.environment}"
ip_cidr_range = "${var.subnetworks["redis-cache"]}"
machine_type = "${var.machine_types["redis-cache"]}"
name = "redis-cache"
node_count = "${var.node_count["redis-cache"]}"
project = "${var.project}"
public_ports = "${var.public_ports["redis-cache"]}"
region = "${var.region}"
service_account_email = "${var.service_account_email}"
source = "../../modules/google/generic-stor"
tier = "db"
vpc = "${module.network.self_link}"
bootstrap_version = 4
chef_provision = "${var.chef_provision}"
dns_zone_name = "${var.dns_zone_name}"
environment = "${var.environment}"
ip_cidr_range = "${var.subnetworks["redis-cache"]}"
name = "redis-cache"
project = "${var.project}"
public_ports = "${var.public_ports["redis-cache"]}"
region = "${var.region}"
redis_chef_run_list = "\"role[gprd-base-db-redis-server-cache]\""
redis_count = "${var.node_count["redis-cache"]}"
redis_data_disk_size = 100
redis_data_disk_type = "pd-ssd"
redis_machine_type = "${var.machine_types["redis-cache"]}"
sentinel_chef_run_list = "\"role[${var.environment}-base-db-redis-sentinel-cache]\""
sentinel_count = "${var.node_count["redis-cache-sentinel"]}"
sentinel_data_disk_size = 100
sentinel_data_disk_type = "pd-ssd"
sentinel_machine_type = "${var.machine_types["redis-cache-sentinel"]}"
service_account_email = "${var.service_account_email}"
source = "../../modules/google/generic-stor-redis"
tier = "db"
vpc = "${module.network.self_link}"
}
##################################
......
......@@ -224,6 +224,7 @@ variable "machine_types" {
"monitoring" = "n1-standard-4"
"redis" = "n1-standard-8"
"redis-cache" = "n1-standard-4"
"redis-cache-sentinel" = "n1-standard-1"
"registry" = "n1-standard-2"
"sidekiq-asap" = "n1-standard-8"
"sidekiq-besteffort" = "n1-standard-8"
......@@ -261,7 +262,8 @@ variable "node_count" {
"pages" = 1
"pgb" = 1
"redis" = 1
"redis-cache" = 1
"redis-cache" = 3
"redis-cache-sentinel" = 3
"registry" = 1
"share" = 1
"sidekiq-asap" = 1
......
......@@ -52,7 +52,7 @@ resource "google_compute_instance" "instance_with_attached_disk" {
service_account {
// this should be the instance under which the instance should be running, rather than the one creating it...
email = "[email protected]"
email = "${var.service_account_email}"
// all the defaults plus cloudkms to access kms
scopes = [
......
......@@ -51,7 +51,7 @@ resource "google_compute_instance" "sentinel_instance_with_attached_disk" {
service_account {
// this should be the instance under which the instance should be running, rather than the one creating it...
email = "[email protected]"
email = "${var.service_account_email}"
// all the defaults plus cloudkms to access kms
scopes = [
......
......@@ -163,3 +163,8 @@ variable "zone" {
type = "string"
default = ""
}
variable "service_account_email" {
type = "string"
description = "Service account emails under which the instance is running"
}
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