2020-01-28 15:56:16 +00:00
|
|
|
/* NETWORK --------------------------------------*/
|
2020-01-27 14:09:21 +00:00
|
|
|
|
2020-02-21 22:50:09 +00:00
|
|
|
locals {
|
|
|
|
nimbus_ports = [
|
|
|
|
"9000-9010", /* Nimbus ports */
|
|
|
|
"9100-9110", /* Nimbus ports */
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2020-01-28 15:56:16 +00:00
|
|
|
module "nimbus_network" {
|
2020-05-18 15:11:39 +00:00
|
|
|
source = "github.com/status-im/infra-tf-aws-vpc"
|
2020-01-28 15:56:16 +00:00
|
|
|
|
|
|
|
name = "nimbus"
|
|
|
|
stage = "test"
|
2020-05-19 12:42:44 +00:00
|
|
|
zones = [ "eu-central-1a" ]
|
2020-01-28 15:56:16 +00:00
|
|
|
|
|
|
|
/* Firewall */
|
2020-02-21 22:50:09 +00:00
|
|
|
open_udp_ports = local.nimbus_ports
|
|
|
|
open_tcp_ports = concat(local.nimbus_ports, [ "22", "80", "443" ])
|
2020-01-28 15:56:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* HOSTS ----------------------------------------*/
|
|
|
|
|
|
|
|
module "nimbus_master" {
|
2020-01-27 14:09:21 +00:00
|
|
|
source = "github.com/status-im/infra-tf-amazon-web-services"
|
|
|
|
|
|
|
|
name = "master"
|
|
|
|
env = "nimbus"
|
|
|
|
group = "nimbus-master"
|
|
|
|
domain = var.domain
|
|
|
|
|
|
|
|
/* Scaling */
|
2020-11-05 17:18:56 +00:00
|
|
|
instance_type = "t3a.large"
|
2020-11-02 16:53:01 +00:00
|
|
|
root_vol_size = 20
|
2020-08-21 16:08:52 +00:00
|
|
|
data_vol_size = 150
|
2020-11-04 11:01:25 +00:00
|
|
|
data_vol_type = "gp2"
|
2020-01-27 14:09:21 +00:00
|
|
|
host_count = 1
|
|
|
|
|
|
|
|
/* Firewall */
|
2020-02-21 22:50:09 +00:00
|
|
|
open_udp_ports = local.nimbus_ports
|
|
|
|
open_tcp_ports = concat(local.nimbus_ports, [ "80", "443" ])
|
2020-01-27 14:09:21 +00:00
|
|
|
|
|
|
|
/* Plumbing */
|
2020-05-19 12:42:44 +00:00
|
|
|
vpc_id = module.nimbus_network.vpc.id
|
|
|
|
subnet_id = module.nimbus_network.subnets[0].id
|
|
|
|
secgroup_id = module.nimbus_network.secgroup.id
|
2020-01-27 14:09:21 +00:00
|
|
|
keypair_name = aws_key_pair.jakubgs.key_name
|
|
|
|
}
|
|
|
|
|
2020-01-28 15:56:16 +00:00
|
|
|
module "nimbus_nodes" {
|
2020-01-27 14:09:21 +00:00
|
|
|
source = "github.com/status-im/infra-tf-amazon-web-services"
|
|
|
|
|
|
|
|
name = "node"
|
|
|
|
env = "nimbus"
|
|
|
|
group = "nimbus-slaves"
|
|
|
|
domain = var.domain
|
|
|
|
|
|
|
|
/* Scaling */
|
|
|
|
instance_type = "t3a.medium"
|
2020-11-02 16:53:01 +00:00
|
|
|
root_vol_size = 20
|
2020-08-21 16:08:52 +00:00
|
|
|
data_vol_size = 150
|
2020-11-04 11:01:25 +00:00
|
|
|
data_vol_type = "gp2"
|
2020-01-27 14:09:21 +00:00
|
|
|
host_count = var.hosts_count
|
|
|
|
|
|
|
|
/* Firewall */
|
2020-02-21 22:50:09 +00:00
|
|
|
open_udp_ports = local.nimbus_ports
|
|
|
|
open_tcp_ports = local.nimbus_ports
|
|
|
|
|
2020-01-27 14:09:21 +00:00
|
|
|
/* Plumbing */
|
2020-05-19 12:42:44 +00:00
|
|
|
vpc_id = module.nimbus_network.vpc.id
|
|
|
|
subnet_id = module.nimbus_network.subnets[0].id
|
|
|
|
secgroup_id = module.nimbus_network.secgroup.id
|
2020-01-27 14:09:21 +00:00
|
|
|
keypair_name = aws_key_pair.jakubgs.key_name
|
|
|
|
}
|
|
|
|
|
2020-11-10 10:14:49 +00:00
|
|
|
module "nimbus_nodes_toledo" {
|
|
|
|
source = "github.com/status-im/infra-tf-amazon-web-services"
|
|
|
|
|
|
|
|
name = "toledo"
|
|
|
|
env = "nimbus"
|
|
|
|
group = "nimbus-slaves-toledo"
|
|
|
|
domain = var.domain
|
|
|
|
|
|
|
|
/* Scaling */
|
|
|
|
instance_type = "t3a.medium"
|
|
|
|
root_vol_size = 20
|
|
|
|
data_vol_size = 150
|
|
|
|
data_vol_type = "gp2"
|
|
|
|
host_count = 2
|
|
|
|
|
|
|
|
/* Firewall */
|
|
|
|
open_udp_ports = local.nimbus_ports
|
|
|
|
open_tcp_ports = local.nimbus_ports
|
|
|
|
|
|
|
|
/* Plumbing */
|
|
|
|
vpc_id = module.nimbus_network.vpc.id
|
|
|
|
subnet_id = module.nimbus_network.subnets[0].id
|
|
|
|
secgroup_id = module.nimbus_network.secgroup.id
|
|
|
|
keypair_name = aws_key_pair.jakubgs.key_name
|
|
|
|
}
|
|
|
|
|
2020-01-27 14:09:21 +00:00
|
|
|
/* DNS ------------------------------------------*/
|
|
|
|
|
2020-01-28 15:56:16 +00:00
|
|
|
resource "cloudflare_record" "nimbus_test_stats" {
|
2020-01-27 14:09:21 +00:00
|
|
|
zone_id = local.zones["status.im"]
|
|
|
|
name = "nimbus-test-stats"
|
|
|
|
type = "A"
|
|
|
|
proxied = true
|
2020-01-28 15:56:16 +00:00
|
|
|
value = module.nimbus_master.public_ips[count.index]
|
|
|
|
count = length(module.nimbus_master.public_ips)
|
2020-01-27 14:09:21 +00:00
|
|
|
}
|
|
|
|
|
2020-01-28 15:56:16 +00:00
|
|
|
resource "cloudflare_record" "serenity_testnets" {
|
2020-01-27 14:09:21 +00:00
|
|
|
zone_id = local.zones["status.im"]
|
|
|
|
name = "serenity-testnets"
|
|
|
|
type = "A"
|
|
|
|
proxied = true
|
2020-01-28 15:56:16 +00:00
|
|
|
value = module.nimbus_master.public_ips[count.index]
|
|
|
|
count = length(module.nimbus_master.public_ips)
|
2020-01-27 14:09:21 +00:00
|
|
|
}
|