From d0f852adce8326fa619e015067f82d34bd23185d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Fri, 20 Nov 2020 13:51:38 +0100 Subject: [PATCH] implement new layout and naming of pyrmont hosts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is done in advance of resizing andlayout changes. Signed-off-by: Jakub SokoĊ‚owski --- ansible/inventory/test | 82 +++++++++++++++-------------- pyrmont.tf | 117 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 156 insertions(+), 43 deletions(-) diff --git a/ansible/inventory/test b/ansible/inventory/test index 4f03155..874cd22 100644 --- a/ansible/inventory/test +++ b/ansible/inventory/test @@ -1,7 +1,17 @@ # NOTE: This file is generated by terraform.py # For emergency use when Consul fails [all] +devel-large-01.aws-eu-central-1a.nimbus.pyrmont hostname=devel-large-01.aws-eu-central-1a.nimbus.pyrmont ansible_host=3.125.107.176 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=devel-large-01.aws-eu-central-1a.nimbus.pyrmont.statusim.net +devel-large-02.aws-eu-central-1a.nimbus.pyrmont hostname=devel-large-02.aws-eu-central-1a.nimbus.pyrmont ansible_host=35.156.239.243 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=devel-large-02.aws-eu-central-1a.nimbus.pyrmont.statusim.net +devel-small-01.aws-eu-central-1a.nimbus.pyrmont hostname=devel-small-01.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.192.164.99 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=devel-small-01.aws-eu-central-1a.nimbus.pyrmont.statusim.net +devel-small-02.aws-eu-central-1a.nimbus.pyrmont hostname=devel-small-02.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.198.163.2 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=devel-small-02.aws-eu-central-1a.nimbus.pyrmont.statusim.net +libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont hostname=libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.158.168.125 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont.statusim.net +libp2p-small-02.aws-eu-central-1a.nimbus.pyrmont hostname=libp2p-small-02.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.193.16.58 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=libp2p-small-02.aws-eu-central-1a.nimbus.pyrmont.statusim.net master-01.aws-eu-central-1a.nimbus.test hostname=master-01.aws-eu-central-1a.nimbus.test ansible_host=18.159.242.199 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=master-01.aws-eu-central-1a.nimbus.test.statusim.net +master-large-01.aws-eu-central-1a.nimbus.pyrmont hostname=master-large-01.aws-eu-central-1a.nimbus.pyrmont ansible_host=3.127.208.1 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=master-large-01.aws-eu-central-1a.nimbus.pyrmont.statusim.net +master-large-02.aws-eu-central-1a.nimbus.pyrmont hostname=master-large-02.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.198.94.42 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=master-large-02.aws-eu-central-1a.nimbus.pyrmont.statusim.net +master-small-01.aws-eu-central-1a.nimbus.pyrmont hostname=master-small-01.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.193.255.204 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=master-small-01.aws-eu-central-1a.nimbus.pyrmont.statusim.net +master-small-02.aws-eu-central-1a.nimbus.pyrmont hostname=master-small-02.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.158.57.49 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=master-small-02.aws-eu-central-1a.nimbus.pyrmont.statusim.net node-01.aws-eu-central-1a.nimbus.test hostname=node-01.aws-eu-central-1a.nimbus.test ansible_host=18.158.230.15 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=node-01.aws-eu-central-1a.nimbus.test.statusim.net node-02.aws-eu-central-1a.nimbus.test hostname=node-02.aws-eu-central-1a.nimbus.test ansible_host=18.158.10.46 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=node-02.aws-eu-central-1a.nimbus.test.statusim.net node-03.aws-eu-central-1a.nimbus.test hostname=node-03.aws-eu-central-1a.nimbus.test ansible_host=18.159.166.17 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=node-03.aws-eu-central-1a.nimbus.test.statusim.net @@ -11,21 +21,21 @@ node-06.aws-eu-central-1a.nimbus.test hostname=node-06.aws-eu-central-1a.nimbus. node-07.aws-eu-central-1a.nimbus.test hostname=node-07.aws-eu-central-1a.nimbus.test ansible_host=18.158.142.165 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=node-07.aws-eu-central-1a.nimbus.test.statusim.net node-08.aws-eu-central-1a.nimbus.test hostname=node-08.aws-eu-central-1a.nimbus.test ansible_host=18.159.24.222 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=node-08.aws-eu-central-1a.nimbus.test.statusim.net node-09.aws-eu-central-1a.nimbus.test hostname=node-09.aws-eu-central-1a.nimbus.test ansible_host=18.195.193.55 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=node-09.aws-eu-central-1a.nimbus.test.statusim.net -pyrmont-01.aws-eu-central-1a.nimbus.test hostname=pyrmont-01.aws-eu-central-1a.nimbus.test ansible_host=3.127.208.1 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=pyrmont-01.aws-eu-central-1a.nimbus.test.statusim.net -pyrmont-02.aws-eu-central-1a.nimbus.test hostname=pyrmont-02.aws-eu-central-1a.nimbus.test ansible_host=18.198.94.42 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=pyrmont-02.aws-eu-central-1a.nimbus.test.statusim.net -pyrmont-03.aws-eu-central-1a.nimbus.test hostname=pyrmont-03.aws-eu-central-1a.nimbus.test ansible_host=18.193.255.204 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=pyrmont-03.aws-eu-central-1a.nimbus.test.statusim.net -pyrmont-04.aws-eu-central-1a.nimbus.test hostname=pyrmont-04.aws-eu-central-1a.nimbus.test ansible_host=18.158.57.49 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=pyrmont-04.aws-eu-central-1a.nimbus.test.statusim.net -pyrmont-05.aws-eu-central-1a.nimbus.test hostname=pyrmont-05.aws-eu-central-1a.nimbus.test ansible_host=3.125.107.176 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=pyrmont-05.aws-eu-central-1a.nimbus.test.statusim.net -pyrmont-06.aws-eu-central-1a.nimbus.test hostname=pyrmont-06.aws-eu-central-1a.nimbus.test ansible_host=35.156.239.243 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=pyrmont-06.aws-eu-central-1a.nimbus.test.statusim.net -pyrmont-07.aws-eu-central-1a.nimbus.test hostname=pyrmont-07.aws-eu-central-1a.nimbus.test ansible_host=18.192.164.99 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=pyrmont-07.aws-eu-central-1a.nimbus.test.statusim.net -pyrmont-08.aws-eu-central-1a.nimbus.test hostname=pyrmont-08.aws-eu-central-1a.nimbus.test ansible_host=18.198.163.2 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=pyrmont-08.aws-eu-central-1a.nimbus.test.statusim.net -pyrmont-09.aws-eu-central-1a.nimbus.test hostname=pyrmont-09.aws-eu-central-1a.nimbus.test ansible_host=18.158.168.125 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=pyrmont-09.aws-eu-central-1a.nimbus.test.statusim.net -pyrmont-10.aws-eu-central-1a.nimbus.test hostname=pyrmont-10.aws-eu-central-1a.nimbus.test ansible_host=18.193.16.58 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=pyrmont-10.aws-eu-central-1a.nimbus.test.statusim.net toledo-01.aws-eu-central-1a.nimbus.test hostname=toledo-01.aws-eu-central-1a.nimbus.test ansible_host=3.124.147.227 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=toledo-01.aws-eu-central-1a.nimbus.test.statusim.net toledo-02.aws-eu-central-1a.nimbus.test hostname=toledo-02.aws-eu-central-1a.nimbus.test ansible_host=18.196.164.28 env=nimbus stage=test data_center=aws-eu-central-1a region=eu-central-1a dns_entry=toledo-02.aws-eu-central-1a.nimbus.test.statusim.net [aws-eu-central-1a] +devel-large-01.aws-eu-central-1a.nimbus.pyrmont +devel-large-02.aws-eu-central-1a.nimbus.pyrmont +devel-small-01.aws-eu-central-1a.nimbus.pyrmont +devel-small-02.aws-eu-central-1a.nimbus.pyrmont +libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont +libp2p-small-02.aws-eu-central-1a.nimbus.pyrmont master-01.aws-eu-central-1a.nimbus.test +master-large-01.aws-eu-central-1a.nimbus.pyrmont +master-large-02.aws-eu-central-1a.nimbus.pyrmont +master-small-01.aws-eu-central-1a.nimbus.pyrmont +master-small-02.aws-eu-central-1a.nimbus.pyrmont node-01.aws-eu-central-1a.nimbus.test node-02.aws-eu-central-1a.nimbus.test node-03.aws-eu-central-1a.nimbus.test @@ -35,16 +45,6 @@ node-06.aws-eu-central-1a.nimbus.test node-07.aws-eu-central-1a.nimbus.test node-08.aws-eu-central-1a.nimbus.test node-09.aws-eu-central-1a.nimbus.test -pyrmont-01.aws-eu-central-1a.nimbus.test -pyrmont-02.aws-eu-central-1a.nimbus.test -pyrmont-03.aws-eu-central-1a.nimbus.test -pyrmont-04.aws-eu-central-1a.nimbus.test -pyrmont-05.aws-eu-central-1a.nimbus.test -pyrmont-06.aws-eu-central-1a.nimbus.test -pyrmont-07.aws-eu-central-1a.nimbus.test -pyrmont-08.aws-eu-central-1a.nimbus.test -pyrmont-09.aws-eu-central-1a.nimbus.test -pyrmont-10.aws-eu-central-1a.nimbus.test toledo-01.aws-eu-central-1a.nimbus.test toledo-02.aws-eu-central-1a.nimbus.test @@ -63,21 +63,33 @@ node-08.aws-eu-central-1a.nimbus.test node-09.aws-eu-central-1a.nimbus.test [nimbus-slaves-pyrmont] -pyrmont-01.aws-eu-central-1a.nimbus.test -pyrmont-02.aws-eu-central-1a.nimbus.test -pyrmont-03.aws-eu-central-1a.nimbus.test -pyrmont-04.aws-eu-central-1a.nimbus.test -pyrmont-05.aws-eu-central-1a.nimbus.test -pyrmont-06.aws-eu-central-1a.nimbus.test -pyrmont-07.aws-eu-central-1a.nimbus.test -pyrmont-08.aws-eu-central-1a.nimbus.test -pyrmont-09.aws-eu-central-1a.nimbus.test -pyrmont-10.aws-eu-central-1a.nimbus.test +devel-large-01.aws-eu-central-1a.nimbus.pyrmont +devel-large-02.aws-eu-central-1a.nimbus.pyrmont +devel-small-01.aws-eu-central-1a.nimbus.pyrmont +devel-small-02.aws-eu-central-1a.nimbus.pyrmont +libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont +libp2p-small-02.aws-eu-central-1a.nimbus.pyrmont +master-large-01.aws-eu-central-1a.nimbus.pyrmont +master-large-02.aws-eu-central-1a.nimbus.pyrmont +master-small-01.aws-eu-central-1a.nimbus.pyrmont +master-small-02.aws-eu-central-1a.nimbus.pyrmont [nimbus-slaves-toledo] toledo-01.aws-eu-central-1a.nimbus.test toledo-02.aws-eu-central-1a.nimbus.test +[nimbus.pyrmont] +devel-large-01.aws-eu-central-1a.nimbus.pyrmont +devel-large-02.aws-eu-central-1a.nimbus.pyrmont +devel-small-01.aws-eu-central-1a.nimbus.pyrmont +devel-small-02.aws-eu-central-1a.nimbus.pyrmont +libp2p-small-01.aws-eu-central-1a.nimbus.pyrmont +libp2p-small-02.aws-eu-central-1a.nimbus.pyrmont +master-large-01.aws-eu-central-1a.nimbus.pyrmont +master-large-02.aws-eu-central-1a.nimbus.pyrmont +master-small-01.aws-eu-central-1a.nimbus.pyrmont +master-small-02.aws-eu-central-1a.nimbus.pyrmont + [nimbus.test] master-01.aws-eu-central-1a.nimbus.test node-01.aws-eu-central-1a.nimbus.test @@ -89,16 +101,6 @@ node-06.aws-eu-central-1a.nimbus.test node-07.aws-eu-central-1a.nimbus.test node-08.aws-eu-central-1a.nimbus.test node-09.aws-eu-central-1a.nimbus.test -pyrmont-01.aws-eu-central-1a.nimbus.test -pyrmont-02.aws-eu-central-1a.nimbus.test -pyrmont-03.aws-eu-central-1a.nimbus.test -pyrmont-04.aws-eu-central-1a.nimbus.test -pyrmont-05.aws-eu-central-1a.nimbus.test -pyrmont-06.aws-eu-central-1a.nimbus.test -pyrmont-07.aws-eu-central-1a.nimbus.test -pyrmont-08.aws-eu-central-1a.nimbus.test -pyrmont-09.aws-eu-central-1a.nimbus.test -pyrmont-10.aws-eu-central-1a.nimbus.test toledo-01.aws-eu-central-1a.nimbus.test toledo-02.aws-eu-central-1a.nimbus.test diff --git a/pyrmont.tf b/pyrmont.tf index 1255d84..6db4000 100644 --- a/pyrmont.tf +++ b/pyrmont.tf @@ -1,17 +1,128 @@ -module "nimbus_nodes_pyrmont" { +module "nimbus_nodes_pyrmont_master_large" { source = "github.com/status-im/infra-tf-amazon-web-services" - name = "pyrmont" + name = "master-large" env = "nimbus" + stage = "pyrmont" group = "nimbus-slaves-pyrmont" domain = var.domain /* Scaling */ + #instance_type = "z1d.large" instance_type = "t3a.medium" root_vol_size = 20 data_vol_size = 150 data_vol_type = "gp2" - host_count = 10 + 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 +} + +module "nimbus_nodes_pyrmont_master_small" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "master-small" + env = "nimbus" + stage = "pyrmont" + group = "nimbus-slaves-pyrmont" + 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 +} + +module "nimbus_nodes_pyrmont_devel_large" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "devel-large" + env = "nimbus" + stage = "pyrmont" + group = "nimbus-slaves-pyrmont" + domain = var.domain + + /* Scaling */ + #instance_type = "z1d.large" + 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 +} + +module "nimbus_nodes_pyrmont_devel_small" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "devel-small" + env = "nimbus" + stage = "pyrmont" + group = "nimbus-slaves-pyrmont" + 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 +} + +module "nimbus_nodes_pyrmont_libp2p_small" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "libp2p-small" + env = "nimbus" + stage = "pyrmont" + group = "nimbus-slaves-pyrmont" + domain = var.domain + + /* Scaling */ + instance_type = "t3.medium" + root_vol_size = 20 + data_vol_size = 150 + data_vol_type = "gp2" + host_count = 2 /* Firewall */ open_udp_ports = local.nimbus_ports