From 343c6a5fc070a4d2adcc8a8546703052ab1df80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 15 Feb 2022 15:57:58 +0100 Subject: [PATCH] deploy 1 host in each DC for status.test fleet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ansible/inventory/test | 26 ++++++++++++++++++++++++++ hosts.tf | 22 ++++++++++++++++++++++ workspaces.tf | 3 +-- 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 ansible/inventory/test create mode 100644 hosts.tf diff --git a/ansible/inventory/test b/ansible/inventory/test new file mode 100644 index 0000000..cbde285 --- /dev/null +++ b/ansible/inventory/test @@ -0,0 +1,26 @@ +# NOTE: This file is generated by terraform.py +# For emergency use when Consul fails +[all] +node-01.ac-cn-hongkong-c.status.test hostname=node-01.ac-cn-hongkong-c.status.test ansible_host=47.242.233.36 env=status stage=test data_center=ac-cn-hongkong-c region=cn-hongkong-c dns_entry=node-01.ac-cn-hongkong-c.status.test.statusim.net +node-01.do-ams3.status.test hostname=node-01.do-ams3.status.test ansible_host=64.225.81.237 env=status stage=test data_center=do-ams3 region=ams3 dns_entry=node-01.do-ams3.status.test.statusim.net +node-01.gc-us-central1-a.status.test hostname=node-01.gc-us-central1-a.status.test ansible_host=34.122.252.118 env=status stage=test data_center=gc-us-central1-a region=us-central1-a dns_entry=node-01.gc-us-central1-a.status.test.statusim.net + +[ac-cn-hongkong-c] +node-01.ac-cn-hongkong-c.status.test + +[do-ams3] +node-01.do-ams3.status.test + +[gc-us-central1-a] +node-01.gc-us-central1-a.status.test + +[status-test] +node-01.ac-cn-hongkong-c.status.test +node-01.do-ams3.status.test +node-01.gc-us-central1-a.status.test + +[status.test] +node-01.ac-cn-hongkong-c.status.test +node-01.do-ams3.status.test +node-01.gc-us-central1-a.status.test + diff --git a/hosts.tf b/hosts.tf new file mode 100644 index 0000000..e5e26b2 --- /dev/null +++ b/hosts.tf @@ -0,0 +1,22 @@ +module "hosts" { + source = "github.com/status-im/infra-tf-multi-provider" + + /* node type */ + env = local.ws.env + stage = local.ws.stage + group = "${local.ws.env}-${local.ws.stage}" + domain = var.domain + + /* scaling */ + host_count = local.ws["hosts_count"] + + /* instance sizes */ + do_type = local.ws["do_type"] /* DigitalOcean */ + ac_type = local.ws["ac_type"] /* Alibaba Cloud */ + gc_type = local.ws["gc_type"] /* Google Cloud */ + + /* firewall */ + open_tcp_ports = [ + "30303", /* p2p main */ + ] +} diff --git a/workspaces.tf b/workspaces.tf index 8cc9ee9..e0cdf30 100644 --- a/workspaces.tf +++ b/workspaces.tf @@ -21,8 +21,7 @@ locals { } # Inherits defaults. - test = {} - prod = {} + test = { hosts_count = 1 } } }