From 001eaab79bc73f8b9618daad264c914a3867dd81 Mon Sep 17 00:00:00 2001 From: Anton Iakimov Date: Fri, 29 Sep 2023 12:26:01 +0200 Subject: [PATCH] store-db: add hosts --- ansible/inventory/test | 13 +++++++++++++ hosts_store_db.tf | 24 ++++++++++++++++++++++++ workspaces.tf | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 hosts_store_db.tf diff --git a/ansible/inventory/test b/ansible/inventory/test index 8a5b3f0..6198979 100644 --- a/ansible/inventory/test +++ b/ansible/inventory/test @@ -13,12 +13,16 @@ store-01.gc-us-central1-a.shards.test hostname=store-01.gc-us-central1-a.shards. store-02.ac-cn-hongkong-c.shards.test hostname=store-02.ac-cn-hongkong-c.shards.test ansible_host=8.218.121.232 env=shards stage=test data_center=ac-cn-hongkong-c region=cn-hongkong-c dns_entry=store-02.ac-cn-hongkong-c.shards.test.statusim.net store-02.do-ams3.shards.test hostname=store-02.do-ams3.shards.test ansible_host=159.223.242.154 env=shards stage=test data_center=do-ams3 region=ams3 dns_entry=store-02.do-ams3.shards.test.statusim.net store-02.gc-us-central1-a.shards.test hostname=store-02.gc-us-central1-a.shards.test ansible_host=34.170.154.2 env=shards stage=test data_center=gc-us-central1-a region=us-central1-a dns_entry=store-02.gc-us-central1-a.shards.test.statusim.net +store-db-01.ac-cn-hongkong-c.shards.test hostname=store-db-01.ac-cn-hongkong-c.shards.test ansible_host=47.243.139.240 env=shards stage=test data_center=ac-cn-hongkong-c region=cn-hongkong-c dns_entry=store-db-01.ac-cn-hongkong-c.shards.test.statusim.net +store-db-01.do-ams3.shards.test hostname=store-db-01.do-ams3.shards.test ansible_host=161.35.247.243 env=shards stage=test data_center=do-ams3 region=ams3 dns_entry=store-db-01.do-ams3.shards.test.statusim.net +store-db-01.gc-us-central1-a.shards.test hostname=store-db-01.gc-us-central1-a.shards.test ansible_host=34.71.57.210 env=shards stage=test data_center=gc-us-central1-a region=us-central1-a dns_entry=store-db-01.gc-us-central1-a.shards.test.statusim.net [ac-cn-hongkong-c] boot-01.ac-cn-hongkong-c.shards.test boot-02.ac-cn-hongkong-c.shards.test store-01.ac-cn-hongkong-c.shards.test store-02.ac-cn-hongkong-c.shards.test +store-db-01.ac-cn-hongkong-c.shards.test [boot] boot-01.ac-cn-hongkong-c.shards.test @@ -33,12 +37,14 @@ boot-01.do-ams3.shards.test boot-02.do-ams3.shards.test store-01.do-ams3.shards.test store-02.do-ams3.shards.test +store-db-01.do-ams3.shards.test [gc-us-central1-a] boot-01.gc-us-central1-a.shards.test boot-02.gc-us-central1-a.shards.test store-01.gc-us-central1-a.shards.test store-02.gc-us-central1-a.shards.test +store-db-01.gc-us-central1-a.shards.test [shards.test] boot-01.ac-cn-hongkong-c.shards.test @@ -53,6 +59,9 @@ store-01.gc-us-central1-a.shards.test store-02.ac-cn-hongkong-c.shards.test store-02.do-ams3.shards.test store-02.gc-us-central1-a.shards.test +store-db-01.ac-cn-hongkong-c.shards.test +store-db-01.do-ams3.shards.test +store-db-01.gc-us-central1-a.shards.test [store] store-01.ac-cn-hongkong-c.shards.test @@ -62,3 +71,7 @@ store-02.ac-cn-hongkong-c.shards.test store-02.do-ams3.shards.test store-02.gc-us-central1-a.shards.test +[store-db] +store-db-01.ac-cn-hongkong-c.shards.test +store-db-01.do-ams3.shards.test +store-db-01.gc-us-central1-a.shards.test diff --git a/hosts_store_db.tf b/hosts_store_db.tf new file mode 100644 index 0000000..845fc80 --- /dev/null +++ b/hosts_store_db.tf @@ -0,0 +1,24 @@ +module "store-db" { + source = "github.com/status-im/infra-tf-multi-provider" + + /* node type */ + name = "store-db" + group = "store-db" + env = "shards" + stage = terraform.workspace + domain = var.domain + + /* scaling */ + host_count = local.ws["store_db_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 */ + + /* data volumes */ + ac_data_vol_size = local.ws["store_db_data_vol_size"] + do_data_vol_size = local.ws["store_db_data_vol_size"] + gc_data_vol_size = local.ws["store_db_data_vol_size"] +} + diff --git a/workspaces.tf b/workspaces.tf index 4111bdf..f2f096d 100644 --- a/workspaces.tf +++ b/workspaces.tf @@ -13,6 +13,8 @@ locals { boot_hosts_count = 1 store_hosts_count = 2 + store_db_hosts_count = 1 + store_db_data_vol_size = 40 do_type = "s-1vcpu-2gb" /* DigitalOcean */ ac_type = "ecs.t5-lc1m2.small" /* Alibaba Cloud */