Commit e28cdeff authored by Alejandro Rodríguez's avatar Alejandro Rodríguez

Add modules to move aptly.gitlab.com to GCP

parent 50f248d3
......@@ -81,7 +81,7 @@ module "proxy-iap" {
}
module "proxy" {
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-proxy]\""
dns_zone_name = "${var.dns_zone_name}"
......@@ -120,7 +120,7 @@ module "proxy" {
##################################
module "pubsubbeat" {
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
dns_zone_name = "${var.dns_zone_name}"
environment = "${var.environment}"
......@@ -183,7 +183,7 @@ module "monitoring-lb" {
#######################
module "prometheus" {
attach_data_disk = true
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-prometheus]\""
data_disk_size = 1000
......@@ -210,7 +210,7 @@ module "prometheus" {
module "prometheus-app" {
attach_data_disk = true
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-prometheus-app]\""
data_disk_size = 1000
......@@ -237,7 +237,7 @@ module "prometheus-app" {
module "alerts" {
attach_data_disk = true
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-alerts]\""
data_disk_size = 100
......@@ -263,7 +263,7 @@ module "alerts" {
module "thanos-query" {
attach_data_disk = true
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-thanos-query]\""
data_disk_size = 100
......@@ -311,7 +311,7 @@ module "sd-exporter" {
}
module "blackbox" {
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-base-blackbox]\""
dns_zone_name = "${var.dns_zone_name}"
......@@ -431,7 +431,7 @@ module "dashboards-internal" {
}
module "dashboards" {
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-dashboards]\""
data_disk_size = 100
......@@ -479,7 +479,7 @@ module "dashboards-com-lb" {
}
module "dashboards-com" {
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-public-dashboards]\""
data_disk_size = 100
......@@ -530,7 +530,7 @@ resource "aws_route53_record" "ops-registry" {
module "gitlab-ops" {
backend_protocol = "HTTPS"
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-gitlab-primary]\""
data_disk_size = 5000
......@@ -575,7 +575,7 @@ resource "aws_route53_record" "gitlab-ops-geo" {
module "gitlab-ops-geo" {
backend_protocol = "HTTPS"
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-gitlab-secondary]\""
data_disk_size = 5000
......@@ -628,7 +628,7 @@ module "gcp-tcp-lb-bastion" {
}
module "bastion" {
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-base-bastion]\""
dns_zone_name = "${var.dns_zone_name}"
......@@ -656,7 +656,7 @@ module "bastion" {
##################################
module "runner" {
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-base-runner-build]\""
dns_zone_name = "${var.dns_zone_name}"
......@@ -685,7 +685,7 @@ module "runner" {
##################################
module "runner-chatops" {
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-base-runner-chatops]\""
dns_zone_name = "${var.dns_zone_name}"
......@@ -714,7 +714,7 @@ module "runner-chatops" {
##################################
module "runner-release" {
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-base-runner-release]\""
dns_zone_name = "${var.dns_zone_name}"
......@@ -745,7 +745,7 @@ module "runner-release" {
# stages where there are many jobs in parallel.
module "runner-release-single" {
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-base-runner-release-single]\""
dns_zone_name = "${var.dns_zone_name}"
......@@ -775,7 +775,7 @@ module "runner-release-single" {
##################################
module "runner-snapshots" {
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-base-runner-snapshots]\""
dns_zone_name = "${var.dns_zone_name}"
......@@ -821,7 +821,7 @@ module "sentry-lb" {
}
module "sentry" {
bootstrap_version = 6
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[${var.environment}-infra-sentry]\""
data_disk_size = 2000
......@@ -844,6 +844,50 @@ module "sentry" {
vpc = "${module.network.self_link}"
}
##################################
#
# Aptly
#
##################################
module "aptly-lb" {
environment = "${var.environment}"
forwarding_port_ranges = "${var.tcp_lbs_aptly["forwarding_port_ranges"]}"
fqdns = ["aptly.gitlab.com"]
gitlab_zone_id = "${var.gitlab_net_zone_id}"
health_check_ports = "${var.tcp_lbs_aptly["health_check_ports"]}"
instances = ["${module.aptly.instances_self_link}"]
lb_count = "${length(var.tcp_lbs_aptly["names"])}"
name = "ops-gcp-tcp-lb-aptly"
names = "${var.tcp_lbs_aptly["names"]}"
project = "${var.project}"
region = "${var.region}"
source = "git::ssh://[email protected]/gitlab-com/gl-infra/terraform-modules/google/tcp-lb.git?ref=v1.0.0"
targets = ["aptly"]
}
module "aptly" {
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
chef_run_list = "\"role[aptly-gitlab-com]\""
dns_zone_name = "${var.dns_zone_name}"
environment = "${var.environment}"
ip_cidr_range = "${var.subnetworks["aptly"]}"
machine_type = "${var.machine_types["aptly"]}"
name = "aptly"
node_count = 1
persistent_disk_path = "/opt"
project = "${var.project}"
public_ports = "${var.public_ports["aptly"]}"
region = "${var.region}"
service_account_email = "${var.service_account_email}"
source = "git::ssh://[email protected]/gitlab-com/gl-infra/terraform-modules/google/generic-stor.git?ref=v1.0.1"
tier = "sv"
use_external_ip = true
use_new_node_name = true
vpc = "${module.network.self_link}"
}
##################################
#
# Google storage buckets
......
......@@ -18,6 +18,10 @@ variable "default_kernel_version" {
default = "4.15.0-1015"
}
variable "bootstrap_script_version" {
default = 6
}
variable "oauth2_client_id_log_proxy" {}
variable "oauth2_client_secret_log_proxy" {}
variable "oauth2_client_id_dashboards" {}
......@@ -33,6 +37,7 @@ variable "machine_types" {
default = {
"alerts" = "n1-standard-1"
"aptly" = "n1-standard-1"
"log-proxy" = "n1-standard-1"
"proxy" = "n1-standard-1"
"bastion" = "n1-standard-1"
......@@ -98,6 +103,7 @@ variable "subnetworks" {
"runner-snapshots" = "10.250.17.0/24"
"thanos-store" = "10.250.18.0/24"
"thanos-compact" = "10.250.19.0/24"
"aptly" = "10.250.20.0/24"
}
}
......@@ -117,6 +123,7 @@ variable "public_ports" {
"sd-exporter" = []
"thanos" = []
"nessus" = [8834]
"aptly" = [80]
}
}
......@@ -207,6 +214,16 @@ variable "tcp_lbs_sentry" {
}
}
variable "tcp_lbs_aptly" {
type = "map"
default = {
"names" = ["http", "https"]
"forwarding_port_ranges" = ["80", "443"]
"health_check_ports" = ["80", "80"]
}
}
variable "log_gitlab_net_cert_link" {
default = "projects/gitlab-ops/global/sslCertificates/log-gitlab-net"
}
......
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