From ef8e77a1acdd11be06c4d3372718fe9ce069e602 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 20 Jan 2021 15:16:39 +0100 Subject: [PATCH] re-add the ELK stack hosts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ansible/inventory/test | 24 ++++++++++++++++++++++++ dash.tf | 33 +++++++++++++++++++++++++++++++++ logs.tf | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 dash.tf create mode 100644 logs.tf diff --git a/ansible/inventory/test b/ansible/inventory/test index a60002b..3a9f1d7 100644 --- a/ansible/inventory/test +++ b/ansible/inventory/test @@ -19,6 +19,10 @@ master-small-02.aws-eu-central-1a.nimbus.mainnet hostname=master-small-02.aws-eu 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 master-small-03.aws-eu-central-1a.nimbus.pyrmont hostname=master-small-03.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.192.39.165 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=master-small-03.aws-eu-central-1a.nimbus.pyrmont.statusim.net master-small-04.aws-eu-central-1a.nimbus.pyrmont hostname=master-small-04.aws-eu-central-1a.nimbus.pyrmont ansible_host=3.122.169.9 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=master-small-04.aws-eu-central-1a.nimbus.pyrmont.statusim.net +node-01.aws-eu-central-1a.dash.nimbus hostname=node-01.aws-eu-central-1a.dash.nimbus ansible_host=52.28.100.116 env=dash stage=nimbus data_center=aws-eu-central-1a region=eu-central-1a dns_entry=node-01.aws-eu-central-1a.dash.nimbus.statusim.net +node-01.aws-eu-central-1a.log-store.nimbus hostname=node-01.aws-eu-central-1a.log-store.nimbus ansible_host=35.157.196.157 env=log-store stage=nimbus data_center=aws-eu-central-1a region=eu-central-1a dns_entry=node-01.aws-eu-central-1a.log-store.nimbus.statusim.net +node-02.aws-eu-central-1a.log-store.nimbus hostname=node-02.aws-eu-central-1a.log-store.nimbus ansible_host=3.64.111.246 env=log-store stage=nimbus data_center=aws-eu-central-1a region=eu-central-1a dns_entry=node-02.aws-eu-central-1a.log-store.nimbus.statusim.net +node-03.aws-eu-central-1a.log-store.nimbus hostname=node-03.aws-eu-central-1a.log-store.nimbus ansible_host=18.156.65.18 env=log-store stage=nimbus data_center=aws-eu-central-1a region=eu-central-1a dns_entry=node-03.aws-eu-central-1a.log-store.nimbus.statusim.net stable-large-01.aws-eu-central-1a.nimbus.pyrmont hostname=stable-large-01.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.158.198.245 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=stable-large-01.aws-eu-central-1a.nimbus.pyrmont.statusim.net stable-small-01.aws-eu-central-1a.nimbus.pyrmont hostname=stable-small-01.aws-eu-central-1a.nimbus.pyrmont ansible_host=3.64.67.28 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=stable-small-01.aws-eu-central-1a.nimbus.pyrmont.statusim.net testing-large-01.aws-eu-central-1a.nimbus.pyrmont hostname=testing-large-01.aws-eu-central-1a.nimbus.pyrmont ansible_host=18.193.173.125 env=nimbus stage=pyrmont data_center=aws-eu-central-1a region=eu-central-1a dns_entry=testing-large-01.aws-eu-central-1a.nimbus.pyrmont.statusim.net @@ -53,6 +57,10 @@ master-small-02.aws-eu-central-1a.nimbus.mainnet master-small-02.aws-eu-central-1a.nimbus.pyrmont master-small-03.aws-eu-central-1a.nimbus.pyrmont master-small-04.aws-eu-central-1a.nimbus.pyrmont +node-01.aws-eu-central-1a.dash.nimbus +node-01.aws-eu-central-1a.log-store.nimbus +node-02.aws-eu-central-1a.log-store.nimbus +node-03.aws-eu-central-1a.log-store.nimbus stable-large-01.aws-eu-central-1a.nimbus.pyrmont stable-small-01.aws-eu-central-1a.nimbus.pyrmont testing-large-01.aws-eu-central-1a.nimbus.pyrmont @@ -68,6 +76,22 @@ unstable-small-02.aws-eu-central-1a.nimbus.pyrmont unstable-small-03.aws-eu-central-1a.nimbus.pyrmont unstable-small-04.aws-eu-central-1a.nimbus.pyrmont +[dash.nimbus] +node-01.aws-eu-central-1a.dash.nimbus + +[log-dash] +node-01.aws-eu-central-1a.dash.nimbus + +[log-store] +node-01.aws-eu-central-1a.log-store.nimbus +node-02.aws-eu-central-1a.log-store.nimbus +node-03.aws-eu-central-1a.log-store.nimbus + +[log-store.nimbus] +node-01.aws-eu-central-1a.log-store.nimbus +node-02.aws-eu-central-1a.log-store.nimbus +node-03.aws-eu-central-1a.log-store.nimbus + [nimbus-geth-goerli] goerli-01.aws-eu-central-1a.nimbus.geth diff --git a/dash.tf b/dash.tf new file mode 100644 index 0000000..2624372 --- /dev/null +++ b/dash.tf @@ -0,0 +1,33 @@ +module "nimbus_dashboard" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "node" + env = "dash" + group = "log-dash" + stage = "nimbus" + domain = var.domain + + /* Scaling */ + host_count = 1 + instance_type = "t3a.medium" /* 4GB RAM at least */ + + /* Firewall */ + open_tcp_ports = [ + "80", /* HTTP */ + "443", /* HTTPS */ + ] + + /* 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 +} + +resource "cloudflare_record" "nimbus_dashboard" { + zone_id = local.zones["status.im"] + name = "nimbus-logs.infra" + value = module.nimbus_dashboard.public_ips[0] + type = "A" + proxied = true +} diff --git a/logs.tf b/logs.tf new file mode 100644 index 0000000..7f89dd5 --- /dev/null +++ b/logs.tf @@ -0,0 +1,36 @@ +module "nimbus_log_store" { + source = "github.com/status-im/infra-tf-amazon-web-services" + + name = "node" + env = "log-store" + group = "log-store" + stage = "nimbus" + domain = var.domain + + /* Scaling */ + host_count = var.log_stores_count + instance_type = "t3a.medium" /* 4GB RAM at least */ + data_vol_size = 500 /* We'll be storing TRACE logs */ + data_vol_type = "st1" /* Change to gp2 for SSD */ + + /* Firewall */ + open_tcp_ports = [ + "80", /* HTTP */ + "443", /* HTTPS */ + ] + + /* 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 +} + +resource "cloudflare_record" "nimbus_log_store" { + zone_id = local.zones["status.im"] + name = "nimbus-es.infra" + value = module.nimbus_log_store.public_ips[count.index] + count = var.log_stores_count + type = "A" + proxied = true +}