Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
gitlab-com
gitlab-com-infrastructure
Commits
45280a12
Commit
45280a12
authored
Feb 01, 2018
by
Daniele Valeriani
Committed by
John Jarvis
Feb 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Google lbs
parent
f83c21c2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
154 additions
and
0 deletions
+154
-0
environments/gprd/load-balancers/fe-http.tf
environments/gprd/load-balancers/fe-http.tf
+34
-0
environments/gprd/load-balancers/fe-https.tf
environments/gprd/load-balancers/fe-https.tf
+34
-0
environments/gprd/load-balancers/fe-ssh.tf
environments/gprd/load-balancers/fe-ssh.tf
+35
-0
environments/gprd/load-balancers/ips.tf
environments/gprd/load-balancers/ips.tf
+8
-0
environments/gprd/load-balancers/variables.tf
environments/gprd/load-balancers/variables.tf
+30
-0
environments/gprd/main.tf
environments/gprd/main.tf
+9
-0
modules/google/generic-pet/outputs.tf
modules/google/generic-pet/outputs.tf
+4
-0
No files found.
environments/gprd/load-balancers/fe-http.tf
0 → 100644
View file @
45280a12
resource
"google_compute_forwarding_rule"
"fe_forwarding_rule_http"
{
name
=
"gitlab-frontend-http"
project
=
"
${
var
.
project
}
"
region
=
"
${
var
.
region
}
"
target
=
"
${
google_compute_target_pool
.
fe_lb_http_pool
.
self_link
}
"
load_balancing_scheme
=
"EXTERNAL"
ports
=
[
"80"
]
ip_address
=
"
${
google_compute_address
.
fe_external_ip
.
address
}
"
}
resource
"google_compute_target_pool"
"fe_lb_http_pool"
{
project
=
"
${
var
.
project
}
"
name
=
"gitlab-frontend-http-pool"
region
=
"
${
var
.
region
}
"
session_affinity
=
"NONE"
instances
=
[
"
${
var
.
fe_http_instances
}
"
]
health_checks
=
[
"
${
google_compute_http_health_check
.
fe_lb_http_health_check
.
name
}
"
,
]
}
resource
"google_compute_http_health_check"
"fe_lb_http_health_check"
{
project
=
"
${
var
.
project
}
"
name
=
"fe_lb_http_health_check"
host
=
"gitlab.com"
port
=
"80"
request_path
=
"/help"
timeout_sec
=
2
check_interval_sec
=
2
healthy_threshold
=
2
unhealthy_threshold
=
2
}
environments/gprd/load-balancers/fe-https.tf
0 → 100644
View file @
45280a12
resource
"google_compute_forwarding_rule"
"fe_forwarding_rule_https"
{
name
=
"gitlab-frontend-https"
project
=
"
${
var
.
project
}
"
region
=
"
${
var
.
region
}
"
target
=
"
${
google_compute_target_pool
.
fe_lb_https_pool
.
self_link
}
"
load_balancing_scheme
=
"EXTERNAL"
ports
=
[
"443"
]
ip_address
=
"
${
google_compute_address
.
fe_external_ip
.
address
}
"
}
resource
"google_compute_target_pool"
"fe_lb_https_pool"
{
project
=
"
${
var
.
project
}
"
name
=
"gitlab-frontend-https-pool"
region
=
"
${
var
.
region
}
"
session_affinity
=
"NONE"
instances
=
[
"
${
var
.
fe_https_instances
}
"
]
health_checks
=
[
"
${
google_compute_https_health_check
.
fe_lb_https_health_check
.
name
}
"
,
]
}
resource
"google_compute_https_health_check"
"fe_lb_https_health_check"
{
project
=
"
${
var
.
project
}
"
name
=
"fe_lb_https_health_check"
host
=
"gitlab.com"
port
=
"443"
request_path
=
"/help"
timeout_sec
=
2
check_interval_sec
=
2
healthy_threshold
=
2
unhealthy_threshold
=
2
}
environments/gprd/load-balancers/fe-ssh.tf
0 → 100644
View file @
45280a12
resource
"google_compute_forwarding_rule"
"fe_forwarding_rule_ssh"
{
name
=
"gitlab-frontend-ssh"
project
=
"
${
var
.
project
}
"
region
=
"
${
var
.
region
}
"
target
=
"
${
google_compute_target_pool
.
fe_lb_ssh_pool
.
self_link
}
"
load_balancing_scheme
=
"EXTERNAL"
ports
=
[
"22"
]
ip_address
=
"
${
google_compute_address
.
fe_external_ip
.
address
}
"
}
resource
"google_compute_target_pool"
"fe_lb_ssh_pool"
{
project
=
"
${
var
.
project
}
"
name
=
"gitlab-frontend-ssh-pool"
region
=
"
${
var
.
region
}
"
session_affinity
=
"NONE"
instances
=
[
"
${
var
.
fe_ssh_instances
}
"
]
health_checks
=
[
"
${
google_compute_health_check
.
fe_lb_ssh_health_check
.
name
}
"
,
]
}
resource
"google_compute_health_check"
"fe_lb_ssh_health_check"
{
project
=
"
${
var
.
project
}
"
name
=
"fe_lb_ssh_health_check"
timeout_sec
=
2
check_interval_sec
=
2
healthy_threshold
=
2
unhealthy_threshold
=
2
tcp_health_check
{
port
=
"22"
}
}
environments/gprd/load-balancers/ips.tf
0 → 100644
View file @
45280a12
resource
"google_compute_address"
"fe_external_ip"
{
name
=
"http"
project
=
"
${
var
.
project
}
"
region
=
"
${
var
.
region
}
"
address_type
=
"EXTERNAL"
# subnetwork = "${var.subnetwork}"
}
environments/gprd/load-balancers/variables.tf
0 → 100644
View file @
45280a12
variable
"fe_http_instances"
{
type
=
"list"
description
=
"The list of instances to add to the http backend pool"
}
variable
"fe_https_instances"
{
type
=
"list"
description
=
"The list of instances to add to the https backend pool"
}
variable
"fe_ssh_instances"
{
type
=
"list"
description
=
"The list of instances to add to the ssh backend pool"
}
variable
"region"
{
type
=
"string"
description
=
"The target region"
}
variable
"project"
{
type
=
"string"
description
=
"The target project"
}
# variable "subnetwork" {
# type = "string"
# description = "The target subnetwork"
# }
environments/gprd/main.tf
View file @
45280a12
...
...
@@ -435,6 +435,15 @@ module "external-lb" {
vpc
=
"
${module
.
network
.
self_link
}
"
}
module
"google_load_balancers"
{
source
=
"./load-balancers"
project
=
"
${
var
.
project
}
"
region
=
"
${
var
.
region
}
"
fe_http_instances
=
"
${module
.
external-lb
.
instances_self_link
}
"
fe_https_instances
=
"
${module
.
external-lb
.
instances_self_link
}
"
fe_ssh_instances
=
"
${module
.
external-lb
.
instances_self_link
}
"
}
##################################
#
# VPN connection to Azure
...
...
modules/google/generic-pet/outputs.tf
0 → 100644
View file @
45280a12
output
"instances_self_link"
{
# value = "${length(google_compute_instance.instance_without_attached_disk.*.self_link) > 0 ? google_compute_instance.instance_without_attached_disk.*.self_link : google_compute_instance.instance_with_attached_disk.*.self_link}"
value
=
"
${
google_compute_instance
.
instance_without_attached_disk
.
*
.
self_link
}
"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment