Commit ead7a33b authored by Alex Hanselka's avatar Alex Hanselka

add ops server to us-central1

parent 715df6c8
......@@ -716,6 +716,84 @@ provider "google" {
region = "us-central1"
}
module "gitlab-ops-central" {
providers = {
google = google.us-central
}
backend_protocol = "HTTPS"
bootstrap_version = var.bootstrap_script_version
chef_provision = var.chef_provision
chef_run_list = "\"role[${var.environment}-infra-gitlab-primary]\""
data_disk_size = 100
data_disk_type = "pd-ssd"
dns_zone_name = var.dns_zone_name
environment = var.environment
health_check = "http"
health_check_port = 8887
ip_cidr_range = var.subnetworks["ops-central"]
machine_type = var.machine_types["gitlab-ops"]
name = "gitlab-central"
node_count = 1
oauth2_client_id = var.oauth2_client_id_gitlab_ops
oauth2_client_secret = var.oauth2_client_secret_gitlab_ops
persistent_disk_path = "/mnt/data_disk"
project = var.project
public_ports = var.public_ports["gitlab-ops"]
region = "us-central1"
service_account_email = var.service_account_email
service_path = "/-/liveness"
service_port = 443
source = "git::ssh://[email protected]/gitlab-com/gl-infra/terraform-modules/google/monitoring-with-count.git?ref=v3.0.0"
tier = "inf"
use_external_ip = true
use_new_node_name = true
vpc = module.network.self_link
}
module "ops-cloudsql" {
providers = {
google = google.us-central
}
name = "ops-gitlab-net"
availability_type = "REGIONAL"
tier = "custom-4-15360"
network_link = module.network.self_link
zone = "b"
project_id = var.project
database_version = "POSTGRES_11"
source = "git::ssh://[email protected]/gitlab-com/gl-infra/terraform-modules/google/cloud-sql.git?ref=v1.0.1"
}
resource "google_redis_instance" "ops-gitlab-net-redis" {
provider = google.us-central
name = "ops-gitlab-net-redis"
tier = "STANDARD_HA"
memory_size_gb = 1
authorized_network = module.network.self_link
redis_version = "REDIS_4_0"
display_name = "ops-gitlab-net redis"
}
resource "google_filestore_instance" "ops-gitlab-net-filestore" {
provider = google.us-central
name = "ops-gitlab-net-filestore"
zone = "us-central1-b"
tier = "PREMIUM"
file_shares {
capacity_gb = 2660
name = "gitlab"
}
networks {
network = module.network.name
modes = ["MODE_IPV4"]
}
}
###############################################
#
# Load balancer and VM for the ops bastion
......
......@@ -125,6 +125,7 @@ variable "subnetworks" {
# us-central1
"chef" = "10.253.5.0/24"
"ops-central" = "10.253.4.0/24"
}
}
......
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