From c5e91420cccc2d856a3bae79bff233a86a95bcbd Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Wed, 5 Jan 2022 16:19:47 -0600 Subject: [PATCH 01/12] make sure gauntlet does not run unless scheduled --- .gitlab/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index c32893e8c..8a88cab74 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -281,8 +281,8 @@ gauntlet: TF_VAR_cluster_prefix: "" TF_VAR_branch: "" rules: - - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - if: '$CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"' + - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' before_script: - apt-get update && apt-get install -y gnupg software-properties-common curl git - curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - From e550925fbaf56211fef1c45f4ac633d9acf1a408 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Thu, 6 Jan 2022 19:00:00 -0600 Subject: [PATCH 02/12] changes --- qa/testcases/smoketest/test_smoke.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/testcases/smoketest/test_smoke.py b/qa/testcases/smoketest/test_smoke.py index ba45124ff..954dbfd26 100644 --- a/qa/testcases/smoketest/test_smoke.py +++ b/qa/testcases/smoketest/test_smoke.py @@ -4,4 +4,4 @@ def inc(x): def test_answer(): - assert inc(3) == 5 \ No newline at end of file + assert inc(3) == 6 \ No newline at end of file From 56cf9f43f536796bc1d39a9a4e95b258af3870c4 Mon Sep 17 00:00:00 2001 From: Fletcher Haynes Date: Thu, 6 Jan 2022 17:07:14 -0800 Subject: [PATCH 03/12] Added in connecting the gauntlet VPC to a VPC that can be reached via the VPN --- qa/tf/.modules/featurebase-cluster/outputs.tf | 4 ++++ qa/tf/gauntlet/samsung/main.tf | 7 +++++++ qa/tf/gauntlet/samsung/outputs.tf | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/qa/tf/.modules/featurebase-cluster/outputs.tf b/qa/tf/.modules/featurebase-cluster/outputs.tf index e52e7344c..c60374eee 100644 --- a/qa/tf/.modules/featurebase-cluster/outputs.tf +++ b/qa/tf/.modules/featurebase-cluster/outputs.tf @@ -4,4 +4,8 @@ output "ingest_ips" { output "data_node_ips" { value = aws_instance.fb_cluster_nodes.*.private_ip +} + +output "vpc_id" { + value = module.vpc.vpc_id } \ No newline at end of file diff --git a/qa/tf/gauntlet/samsung/main.tf b/qa/tf/gauntlet/samsung/main.tf index 8a5101d7c..4d899dae1 100644 --- a/qa/tf/gauntlet/samsung/main.tf +++ b/qa/tf/gauntlet/samsung/main.tf @@ -12,3 +12,10 @@ module "samsung-cluster" { gitlab_token = var.gitlab_token branch = var.branch } + +resource "aws_vpc_peering_connection" "gauntlet-to-vpn" { + peer_vpc_id = aws_vpc.bar.id + vpc_id = module.samsung-cluster.vpc_id + peer_vpc_id = "vpc-0cb7cf76f2079aa0e" + auto_accept = true +} \ No newline at end of file diff --git a/qa/tf/gauntlet/samsung/outputs.tf b/qa/tf/gauntlet/samsung/outputs.tf index 0c405bed0..9caf49db3 100644 --- a/qa/tf/gauntlet/samsung/outputs.tf +++ b/qa/tf/gauntlet/samsung/outputs.tf @@ -6,4 +6,9 @@ output "ingest_ips" { output "data_node_ips" { description = "List of data node IPs" value = module.samsung-cluster.data_node_ips +} + +output "vpc_id" { + description = "ID of the gauntlet VPC" + value = module.samsung-cluster.vpc_id } \ No newline at end of file From 574be963ec450073b549be1c854a18d4b9632720 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Thu, 6 Jan 2022 20:13:52 -0600 Subject: [PATCH 04/12] follow up changes to get vpn working - still no dice --- qa/tf/ci/smoketest/main.tf | 7 +++++++ qa/tf/ci/smoketest/outputs.tf | 5 +++++ qa/tf/gauntlet/samsung/main.tf | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/qa/tf/ci/smoketest/main.tf b/qa/tf/ci/smoketest/main.tf index 80753a1f9..6818806c9 100644 --- a/qa/tf/ci/smoketest/main.tf +++ b/qa/tf/ci/smoketest/main.tf @@ -9,3 +9,10 @@ module "ci-cluster" { gitlab_token = var.gitlab_token branch = var.branch } + +resource "aws_vpc_peering_connection" "smoketest-to-vpn" { +# peer_vpc_id = aws_vpc.bar.id + vpc_id = module.ci-cluster.vpc_id + peer_vpc_id = "vpc-0cb7cf76f2079aa0e" + auto_accept = true +} \ No newline at end of file diff --git a/qa/tf/ci/smoketest/outputs.tf b/qa/tf/ci/smoketest/outputs.tf index adcc96dc9..529c64914 100644 --- a/qa/tf/ci/smoketest/outputs.tf +++ b/qa/tf/ci/smoketest/outputs.tf @@ -6,4 +6,9 @@ output "ingest_ips" { output "data_node_ips" { description = "List of data node IPs" value = module.ci-cluster.data_node_ips +} + +output "vpc_id" { + description = "ID of the VPC" + value = module.ci-cluster.vpc_id } \ No newline at end of file diff --git a/qa/tf/gauntlet/samsung/main.tf b/qa/tf/gauntlet/samsung/main.tf index 4d899dae1..04759be02 100644 --- a/qa/tf/gauntlet/samsung/main.tf +++ b/qa/tf/gauntlet/samsung/main.tf @@ -14,7 +14,7 @@ module "samsung-cluster" { } resource "aws_vpc_peering_connection" "gauntlet-to-vpn" { - peer_vpc_id = aws_vpc.bar.id +# peer_vpc_id = aws_vpc.bar.id vpc_id = module.samsung-cluster.vpc_id peer_vpc_id = "vpc-0cb7cf76f2079aa0e" auto_accept = true From 70833218b1cf3ca983525d1495bc6be7e966eec2 Mon Sep 17 00:00:00 2001 From: Fletcher Haynes Date: Fri, 7 Jan 2022 06:58:02 -0800 Subject: [PATCH 05/12] Added in auto-peering of smoketest VPC --- qa/tf/ci/smoketest/main.tf | 6 ++++++ qa/tf/ci/smoketest/outputs.tf | 5 +++++ qa/tf/gauntlet/samsung/main.tf | 1 - 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/qa/tf/ci/smoketest/main.tf b/qa/tf/ci/smoketest/main.tf index 80753a1f9..6baed6889 100644 --- a/qa/tf/ci/smoketest/main.tf +++ b/qa/tf/ci/smoketest/main.tf @@ -9,3 +9,9 @@ module "ci-cluster" { gitlab_token = var.gitlab_token branch = var.branch } + +resource "aws_vpc_peering_connection" "gauntlet-to-vpn" { + vpc_id = module.ci-cluster.vpc_id + peer_vpc_id = "vpc-0cb7cf76f2079aa0e" + auto_accept = true +} \ No newline at end of file diff --git a/qa/tf/ci/smoketest/outputs.tf b/qa/tf/ci/smoketest/outputs.tf index adcc96dc9..711c6ae13 100644 --- a/qa/tf/ci/smoketest/outputs.tf +++ b/qa/tf/ci/smoketest/outputs.tf @@ -6,4 +6,9 @@ output "ingest_ips" { output "data_node_ips" { description = "List of data node IPs" value = module.ci-cluster.data_node_ips +} + +output "vpc_id" { + description = "ID of the gauntlet VPC" + value = module.samsung-cluster.vpc_id } \ No newline at end of file diff --git a/qa/tf/gauntlet/samsung/main.tf b/qa/tf/gauntlet/samsung/main.tf index 4d899dae1..6cc08bd31 100644 --- a/qa/tf/gauntlet/samsung/main.tf +++ b/qa/tf/gauntlet/samsung/main.tf @@ -14,7 +14,6 @@ module "samsung-cluster" { } resource "aws_vpc_peering_connection" "gauntlet-to-vpn" { - peer_vpc_id = aws_vpc.bar.id vpc_id = module.samsung-cluster.vpc_id peer_vpc_id = "vpc-0cb7cf76f2079aa0e" auto_accept = true From 369c91daf980922c19b7102a52d70fec44b120e3 Mon Sep 17 00:00:00 2001 From: Fletcher Haynes Date: Fri, 7 Jan 2022 07:04:01 -0800 Subject: [PATCH 06/12] Fixed a few more things --- qa/tf/ci/smoketest/main.tf | 5 ----- qa/tf/ci/smoketest/outputs.tf | 5 ----- qa/tf/ci/smoketest/tf.auto.tfvars | 3 ++- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/qa/tf/ci/smoketest/main.tf b/qa/tf/ci/smoketest/main.tf index 15076a4c0..88f6f4565 100644 --- a/qa/tf/ci/smoketest/main.tf +++ b/qa/tf/ci/smoketest/main.tf @@ -10,12 +10,7 @@ module "ci-cluster" { branch = var.branch } -<<<<<<< HEAD -resource "aws_vpc_peering_connection" "gauntlet-to-vpn" { -======= resource "aws_vpc_peering_connection" "smoketest-to-vpn" { -# peer_vpc_id = aws_vpc.bar.id ->>>>>>> 574be963ec450073b549be1c854a18d4b9632720 vpc_id = module.ci-cluster.vpc_id peer_vpc_id = "vpc-0cb7cf76f2079aa0e" auto_accept = true diff --git a/qa/tf/ci/smoketest/outputs.tf b/qa/tf/ci/smoketest/outputs.tf index 74085b7c4..529c64914 100644 --- a/qa/tf/ci/smoketest/outputs.tf +++ b/qa/tf/ci/smoketest/outputs.tf @@ -9,11 +9,6 @@ output "data_node_ips" { } output "vpc_id" { -<<<<<<< HEAD - description = "ID of the gauntlet VPC" - value = module.samsung-cluster.vpc_id -======= description = "ID of the VPC" value = module.ci-cluster.vpc_id ->>>>>>> 574be963ec450073b549be1c854a18d4b9632720 } \ No newline at end of file diff --git a/qa/tf/ci/smoketest/tf.auto.tfvars b/qa/tf/ci/smoketest/tf.auto.tfvars index ac6de62a6..6c88b644d 100644 --- a/qa/tf/ci/smoketest/tf.auto.tfvars +++ b/qa/tf/ci/smoketest/tf.auto.tfvars @@ -1,2 +1,3 @@ region = "us-east-2" -profile = "service-terraform" \ No newline at end of file +profile = "terraform_fbci" +branch = "cicd-smoketest" \ No newline at end of file From 3b2ee2a15c61f6762f64c6df090db547b97a5917 Mon Sep 17 00:00:00 2001 From: Fletcher Haynes Date: Fri, 7 Jan 2022 07:17:00 -0800 Subject: [PATCH 07/12] .gitlab/.gitlab-ci.yml --- .gitlab/.gitlab-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index 8a88cab74..0aad2f9b9 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -226,6 +226,10 @@ smoke test: AWS_SECRET_ACCESS_KEY: $AWS_FBCI_SECRET_ACCESS_KEY TF_VAR_cluster_prefix: "" TF_VAR_branch: "" + tags: + - aws + - docker + - fbsmoke rules: - if: '$CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "web"' before_script: From b864d6b6f176f4ed3b80577c198dc3ea04a1de0c Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Fri, 7 Jan 2022 13:40:35 -0600 Subject: [PATCH 08/12] un-broke some stuff --- qa/tf/ci/smoketest/tf.auto.tfvars | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qa/tf/ci/smoketest/tf.auto.tfvars b/qa/tf/ci/smoketest/tf.auto.tfvars index 6c88b644d..ac6de62a6 100644 --- a/qa/tf/ci/smoketest/tf.auto.tfvars +++ b/qa/tf/ci/smoketest/tf.auto.tfvars @@ -1,3 +1,2 @@ region = "us-east-2" -profile = "terraform_fbci" -branch = "cicd-smoketest" \ No newline at end of file +profile = "service-terraform" \ No newline at end of file From bb434639ad8a8a61a4d4283e85a5fc56c3a2f000 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Fri, 7 Jan 2022 17:25:48 -0600 Subject: [PATCH 09/12] cleaning up terraform to put in pre-prepared VPC --- qa/tf/.modules/featurebase-cluster/main.tf | 51 +- qa/tf/.modules/featurebase-cluster/outputs.tf | 2 +- .../.modules/featurebase-cluster/variables.tf | 20 + qa/tf/.modules/featurebase-cluster/vpc.tf | 16 - qa/tf/ci/smoketest/main.tf | 10 +- qa/tf/ci/smoketest/outputs.tf | 5 - qa/tf/ci/smoketest/terraform.tfstate.backup | 1104 ++--------------- qa/tf/gauntlet/samsung/main.tf | 10 +- qa/tf/gauntlet/samsung/outputs.tf | 5 - .../gauntlet/samsung/terraform.tfstate.backup | 938 ++++++++++++++ 10 files changed, 1107 insertions(+), 1054 deletions(-) delete mode 100644 qa/tf/.modules/featurebase-cluster/vpc.tf create mode 100644 qa/tf/gauntlet/samsung/terraform.tfstate.backup diff --git a/qa/tf/.modules/featurebase-cluster/main.tf b/qa/tf/.modules/featurebase-cluster/main.tf index 133226e75..79f574266 100644 --- a/qa/tf/.modules/featurebase-cluster/main.tf +++ b/qa/tf/.modules/featurebase-cluster/main.tf @@ -24,7 +24,7 @@ resource "aws_instance" "fb_cluster_nodes" { key_name = aws_key_pair.gitlab-featurebase-ci.key_name vpc_security_group_ids = [aws_security_group.featurebase.id] monitoring = true - subnet_id = var.subnet != "" ? var.subnet : module.vpc.private_subnets[count.index % length(module.vpc.private_subnets)] + subnet_id = var.subnet != "" ? var.subnet : var.vpc_private_subnets[count.index % length(var.vpc_private_subnets)] availability_zone = var.zone != "" ? var.zone : var.azs[count.index % length(var.azs)] iam_instance_profile = "${aws_iam_instance_profile.fb_cluster_node_profile.name}" @@ -57,7 +57,7 @@ resource "aws_instance" "fb_ingest" { instance_type = var.fb_ingest_type associate_public_ip_address = true monitoring = true - subnet_id = var.subnet != "" ? var.subnet : module.vpc.public_subnets[count.index % length(module.vpc.public_subnets)] + subnet_id = var.subnet != "" ? var.subnet : var.vpc_public_subnets[count.index % length(var.vpc_public_subnets)] availability_zone = var.zone != "" ? var.zone : var.azs[count.index % length(var.azs)] iam_instance_profile = "${aws_iam_instance_profile.fb_cluster_node_profile.name}" @@ -83,30 +83,37 @@ resource "aws_instance" "fb_ingest" { } resource "aws_key_pair" "gitlab-featurebase-ci" { - key_name = "gitlab-featurebase-ci" + key_name = "${var.cluster_prefix}-gitlab-ci" public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC91hhpVHNonAG7ku2ugpxEskf9KHeyHJPQJT26OHrMUw7R+T5A8TjqSzTau07sXQ/E9SO3ebV8SJ5PqeaQOnQB8VEvVNK0DjQH7ppvNg1Rfs42FZT9ttzTMvOjsSbK3vZTHXdoKQEdC9NxBwSkFIRGQojK1HUOq9xGrw31fA1OjSwlpLcbx7yyg18lcqW6UOptnVR8U9Yy9qQ5jZF1HtkQ6L9J+gv4o1UyNAUK2bopeGiXpBc3PQ/CFaFT2h/aqLBP66qAHsHVyAFD3PIRtplC5EHa8jXDgLacEls0uF7Q3kRPxvzcuo4g4VkOn1rDy9qH3vd2hT3aKVnM73FIDUiL" } resource "aws_security_group" "featurebase" { - name = "allow_featurebase" + name = "${var.cluster_prefix}-allow_featurebase" description = "Allow featurebase inbound traffic" - vpc_id = module.vpc.vpc_id + vpc_id = var.vpc_id ingress { - description = "TLS from Internal" - from_port = 10101 - to_port = 10101 - protocol = "tcp" - cidr_blocks = [module.vpc.vpc_cidr_block] + description = "icmp from Anywhere" + from_port = -1 + to_port = -1 + protocol = "icmp" + cidr_blocks = ["0.0.0.0/0"] } ingress { + description = "HTTP from Internal" + from_port = 10101 + to_port = 10101 + protocol = "tcp" + cidr_blocks = ["10.0.0.0/8", "172.31.0.0/16"] + } + ingress { description = "GRPC from Internal" from_port = 20101 to_port = 20101 protocol = "tcp" - cidr_blocks = [module.vpc.vpc_cidr_block] + cidr_blocks = ["10.0.0.0/8", "172.31.0.0/16"] } ingress { @@ -114,7 +121,7 @@ resource "aws_security_group" "featurebase" { from_port = 55432 to_port = 55432 protocol = "tcp" - cidr_blocks = [module.vpc.vpc_cidr_block] + cidr_blocks = ["10.0.0.0/8", "172.31.0.0/16"] } ingress { @@ -122,7 +129,7 @@ resource "aws_security_group" "featurebase" { from_port = 10301 to_port = 10301 protocol = "tcp" - cidr_blocks = [module.vpc.vpc_cidr_block] + cidr_blocks = [var.vpc_cidr_block] } ingress { @@ -130,7 +137,7 @@ resource "aws_security_group" "featurebase" { from_port = 10401 to_port = 10401 protocol = "tcp" - cidr_blocks = [module.vpc.vpc_cidr_block] + cidr_blocks = [var.vpc_cidr_block] } ingress { @@ -156,9 +163,17 @@ resource "aws_security_group" "featurebase" { } resource "aws_security_group" "ingest" { - name = "allow_ingest" + name = "${var.cluster_prefix}-allow_ingest" description = "Allow ingest inbound traffic" - vpc_id = module.vpc.vpc_id + vpc_id = var.vpc_id + + ingress { + description = "icmp from Anywhere" + from_port = -1 + to_port = -1 + protocol = "icmp" + cidr_blocks = ["0.0.0.0/0"] + } ingress { from_port = 10101 @@ -191,12 +206,12 @@ resource "aws_security_group" "ingest" { } resource "aws_iam_instance_profile" "fb_cluster_node_profile" { - name = "fb_cluster_node_profile" + name = "${var.cluster_prefix}-fb_cluster_node_profile" role = aws_iam_role.fb_cluster_node_role.name } resource "aws_iam_role" "fb_cluster_node_role" { - name = "fb_cluster_node" + name = "${var.cluster_prefix}-fb_cluster_node" assume_role_policy = jsonencode({ Version = "2012-10-17" diff --git a/qa/tf/.modules/featurebase-cluster/outputs.tf b/qa/tf/.modules/featurebase-cluster/outputs.tf index c60374eee..fd8847bc2 100644 --- a/qa/tf/.modules/featurebase-cluster/outputs.tf +++ b/qa/tf/.modules/featurebase-cluster/outputs.tf @@ -7,5 +7,5 @@ output "data_node_ips" { } output "vpc_id" { - value = module.vpc.vpc_id + value = var.vpc_id } \ No newline at end of file diff --git a/qa/tf/.modules/featurebase-cluster/variables.tf b/qa/tf/.modules/featurebase-cluster/variables.tf index dcb159820..01957116f 100644 --- a/qa/tf/.modules/featurebase-cluster/variables.tf +++ b/qa/tf/.modules/featurebase-cluster/variables.tf @@ -96,3 +96,23 @@ variable "branch" { description = "The branch we are on" type = string } + +variable "vpc_id" { + description = "The VPC in which we will build the cluster" + type = string +} + +variable "vpc_cidr_block" { + description = "A delicious crisp cider associated with the VPC in which we will build the cluster" + type = string +} + +variable "vpc_public_subnets" { + description = "A public net underneath in the VPC in which we will build the cluster" + type = list(string) +} + +variable "vpc_private_subnets" { + description = "A private net underneath in the VPC in which we will build the cluster" + type = list(string) +} diff --git a/qa/tf/.modules/featurebase-cluster/vpc.tf b/qa/tf/.modules/featurebase-cluster/vpc.tf deleted file mode 100644 index 4a09c9275..000000000 --- a/qa/tf/.modules/featurebase-cluster/vpc.tf +++ /dev/null @@ -1,16 +0,0 @@ -module "vpc" { - source = "terraform-aws-modules/vpc/aws" - - name = "${var.cluster_prefix}" - cidr = var.vpc_cidr - azs = var.azs - private_subnets = var.private_subnets - public_subnets = var.public_subnets - - enable_nat_gateway = true - enable_vpn_gateway = false - - tags = { - Name = "${var.cluster_prefix}" - } -} \ No newline at end of file diff --git a/qa/tf/ci/smoketest/main.tf b/qa/tf/ci/smoketest/main.tf index 88f6f4565..a358080fd 100644 --- a/qa/tf/ci/smoketest/main.tf +++ b/qa/tf/ci/smoketest/main.tf @@ -8,10 +8,8 @@ module "ci-cluster" { fb_data_node_count = 1 gitlab_token = var.gitlab_token branch = var.branch -} - -resource "aws_vpc_peering_connection" "smoketest-to-vpn" { - vpc_id = module.ci-cluster.vpc_id - peer_vpc_id = "vpc-0cb7cf76f2079aa0e" - auto_accept = true + vpc_id = "vpc-05a26a122f961dc2b" + vpc_cidr_block = "10.0.0.0/16" + vpc_public_subnets = ["subnet-066b4b922b54e51a2","subnet-037b8884269a69025","subnet-08482631514426210",] + vpc_private_subnets = ["subnet-050b1219d78f2db1b","subnet-07155281789c6d33b","subnet-0d623c769e086e46e",] } \ No newline at end of file diff --git a/qa/tf/ci/smoketest/outputs.tf b/qa/tf/ci/smoketest/outputs.tf index 529c64914..adcc96dc9 100644 --- a/qa/tf/ci/smoketest/outputs.tf +++ b/qa/tf/ci/smoketest/outputs.tf @@ -6,9 +6,4 @@ output "ingest_ips" { output "data_node_ips" { description = "List of data node IPs" value = module.ci-cluster.data_node_ips -} - -output "vpc_id" { - description = "ID of the VPC" - value = module.ci-cluster.vpc_id } \ No newline at end of file diff --git a/qa/tf/ci/smoketest/terraform.tfstate.backup b/qa/tf/ci/smoketest/terraform.tfstate.backup index f2f74f7a8..1827d6cfa 100644 --- a/qa/tf/ci/smoketest/terraform.tfstate.backup +++ b/qa/tf/ci/smoketest/terraform.tfstate.backup @@ -1,12 +1,12 @@ { "version": 4, "terraform_version": "1.1.2", - "serial": 255, - "lineage": "bf91272c-d504-5c98-ce46-2ced1888bf74", + "serial": 64, + "lineage": "0f5e8a05-0e94-e86f-f384-26086bd40585", "outputs": { "data_node_ips": { "value": [ - "10.0.1.152" + "10.0.1.92" ], "type": [ "tuple", @@ -17,7 +17,7 @@ }, "ingest_ips": { "value": [ - "3.128.203.136" + "18.119.132.64" ], "type": [ "tuple", @@ -25,6 +25,10 @@ "string" ] ] + }, + "vpc_id": { + "value": "vpc-05a26a122f961dc2b", + "type": "string" } }, "resources": [ @@ -126,8 +130,8 @@ { "schema_version": 0, "attributes": { - "arn": "arn:aws:iam::941206295814:instance-profile/fb_cluster_node_profile", - "create_date": "2022-01-05T19:35:38Z", + "arn": "arn:aws:iam::977373308795:instance-profile/fb_cluster_node_profile", + "create_date": "2022-01-07T22:01:54Z", "id": "fb_cluster_node_profile", "name": "fb_cluster_node_profile", "name_prefix": null, @@ -135,7 +139,7 @@ "role": "fb_cluster_node", "tags": null, "tags_all": {}, - "unique_id": "AIPA5WJCEKUDB6OWYZPTW" + "unique_id": "AIPA6HD75E55U4UWVZABB" }, "sensitive_attributes": [], "private": "bnVsbA==", @@ -155,9 +159,9 @@ { "schema_version": 0, "attributes": { - "arn": "arn:aws:iam::941206295814:role/fb_cluster_node", + "arn": "arn:aws:iam::977373308795:role/fb_cluster_node", "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ec2.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}", - "create_date": "2022-01-05T19:35:35Z", + "create_date": "2022-01-07T22:01:52Z", "description": "", "force_detach_policies": false, "id": "fb_cluster_node", @@ -175,7 +179,7 @@ "permissions_boundary": null, "tags": null, "tags_all": {}, - "unique_id": "AROA5WJCEKUDN4ZISIR3N" + "unique_id": "AROA6HD75E55VPUUN47EM" }, "sensitive_attributes": [], "private": "bnVsbA==" @@ -194,7 +198,7 @@ "schema_version": 1, "attributes": { "ami": "ami-0b09f36be67d32fff", - "arn": "arn:aws:ec2:us-east-2:941206295814:instance/i-08ac53ed9d7ac2ac1", + "arn": "arn:aws:ec2:us-east-2:977373308795:instance/i-018646ae2723b9266", "associate_public_ip_address": false, "availability_zone": "us-east-2a", "capacity_reservation_specification": [ @@ -217,7 +221,7 @@ "snapshot_id": "", "tags": {}, "throughput": 125, - "volume_id": "vol-0041b5d58bde3da13", + "volume_id": "vol-064dca608db210bf4", "volume_size": 100, "volume_type": "gp3" } @@ -233,7 +237,7 @@ "hibernation": false, "host_id": null, "iam_instance_profile": "fb_cluster_node_profile", - "id": "i-08ac53ed9d7ac2ac1", + "id": "i-018646ae2723b9266", "instance_initiated_shutdown_behavior": "stop", "instance_state": "running", "instance_type": "m6g.large", @@ -254,9 +258,9 @@ "password_data": "", "placement_group": "", "placement_partition_number": null, - "primary_network_interface_id": "eni-0b00c3636cad95ae5", - "private_dns": "ip-10-0-1-152.us-east-2.compute.internal", - "private_ip": "10.0.1.152", + "primary_network_interface_id": "eni-013fb4dd776a4ca48", + "private_dns": "ip-10-0-1-92.us-east-2.compute.internal", + "private_ip": "10.0.1.92", "public_dns": "", "public_ip": "", "root_block_device": [ @@ -268,7 +272,7 @@ "kms_key_id": "", "tags": null, "throughput": 125, - "volume_id": "vol-0f12ff15c510db547", + "volume_id": "vol-008d2b71268dd84e3", "volume_size": 20, "volume_type": "gp3" } @@ -276,7 +280,7 @@ "secondary_private_ips": [], "security_groups": [], "source_dest_check": true, - "subnet_id": "subnet-0dcb2339122bafc95", + "subnet_id": "subnet-050b1219d78f2db1b", "tags": { "Name": "smoke-X8A0attf2zz6EhnV-featurebase-cluster-0", "Prefix": "smoke-X8A0attf2zz6EhnV", @@ -293,7 +297,7 @@ "user_data_base64": null, "volume_tags": null, "vpc_security_group_ids": [ - "sg-0580fa9cbc0493d77" + "sg-014eb096b1eee30a5" ] }, "sensitive_attributes": [], @@ -303,10 +307,7 @@ "module.ci-cluster.aws_iam_role.fb_cluster_node_role", "module.ci-cluster.aws_key_pair.gitlab-featurebase-ci", "module.ci-cluster.aws_security_group.featurebase", - "module.ci-cluster.data.aws_ami.amazon_linux_2", - "module.ci-cluster.module.vpc.aws_subnet.private", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" + "module.ci-cluster.data.aws_ami.amazon_linux_2" ] } ] @@ -323,7 +324,7 @@ "schema_version": 1, "attributes": { "ami": "ami-0b09f36be67d32fff", - "arn": "arn:aws:ec2:us-east-2:941206295814:instance/i-07f30af63526e9a6b", + "arn": "arn:aws:ec2:us-east-2:977373308795:instance/i-013fde620a82c4102", "associate_public_ip_address": true, "availability_zone": "us-east-2a", "capacity_reservation_specification": [ @@ -346,7 +347,7 @@ "snapshot_id": "", "tags": {}, "throughput": 125, - "volume_id": "vol-0a7270e5a68789fbb", + "volume_id": "vol-0bd5eaddda4e19de5", "volume_size": 100, "volume_type": "gp3" } @@ -362,7 +363,7 @@ "hibernation": false, "host_id": null, "iam_instance_profile": "fb_cluster_node_profile", - "id": "i-07f30af63526e9a6b", + "id": "i-013fde620a82c4102", "instance_initiated_shutdown_behavior": "stop", "instance_state": "running", "instance_type": "c6g.2xlarge", @@ -383,11 +384,11 @@ "password_data": "", "placement_group": "", "placement_partition_number": null, - "primary_network_interface_id": "eni-0c855451ce29250c9", - "private_dns": "ip-10-0-101-214.us-east-2.compute.internal", - "private_ip": "10.0.101.214", + "primary_network_interface_id": "eni-0bfb2b924677bd7bd", + "private_dns": "ip-10-0-101-31.us-east-2.compute.internal", + "private_ip": "10.0.101.31", "public_dns": "", - "public_ip": "3.128.203.136", + "public_ip": "18.119.132.64", "root_block_device": [ { "delete_on_termination": true, @@ -397,7 +398,7 @@ "kms_key_id": "", "tags": null, "throughput": 125, - "volume_id": "vol-021c14b5593bdd999", + "volume_id": "vol-0f2c177cb0a77aecc", "volume_size": 20, "volume_type": "gp3" } @@ -405,7 +406,7 @@ "secondary_private_ips": [], "security_groups": [], "source_dest_check": true, - "subnet_id": "subnet-09f6ef1380254341b", + "subnet_id": "subnet-066b4b922b54e51a2", "tags": { "Name": "smoke-X8A0attf2zz6EhnV-featurebase-ingest-0", "Prefix": "smoke-X8A0attf2zz6EhnV", @@ -422,7 +423,7 @@ "user_data_base64": null, "volume_tags": null, "vpc_security_group_ids": [ - "sg-08089f99e02a87452" + "sg-04e315d7b9ace5146" ] }, "sensitive_attributes": [], @@ -432,10 +433,7 @@ "module.ci-cluster.aws_iam_role.fb_cluster_node_role", "module.ci-cluster.aws_key_pair.gitlab-featurebase-ci", "module.ci-cluster.aws_security_group.ingest", - "module.ci-cluster.data.aws_ami.amazon_linux_2", - "module.ci-cluster.module.vpc.aws_subnet.public", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" + "module.ci-cluster.data.aws_ami.amazon_linux_2" ] } ] @@ -450,12 +448,12 @@ { "schema_version": 1, "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:key-pair/gitlab-featurebase-ci", + "arn": "arn:aws:ec2:us-east-2:977373308795:key-pair/gitlab-featurebase-ci", "fingerprint": "69:e5:4b:15:8d:1f:22:61:de:08:a9:ee:f3:29:5c:69", "id": "gitlab-featurebase-ci", "key_name": "gitlab-featurebase-ci", "key_name_prefix": "", - "key_pair_id": "key-0a36382ce2a87c44e", + "key_pair_id": "key-059c3d744adf3c048", "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC91hhpVHNonAG7ku2ugpxEskf9KHeyHJPQJT26OHrMUw7R+T5A8TjqSzTau07sXQ/E9SO3ebV8SJ5PqeaQOnQB8VEvVNK0DjQH7ppvNg1Rfs42FZT9ttzTMvOjsSbK3vZTHXdoKQEdC9NxBwSkFIRGQojK1HUOq9xGrw31fA1OjSwlpLcbx7yyg18lcqW6UOptnVR8U9Yy9qQ5jZF1HtkQ6L9J+gv4o1UyNAUK2bopeGiXpBc3PQ/CFaFT2h/aqLBP66qAHsHVyAFD3PIRtplC5EHa8jXDgLacEls0uF7Q3kRPxvzcuo4g4VkOn1rDy9qH3vd2hT3aKVnM73FIDUiL", "tags": null, "tags_all": {} @@ -475,7 +473,7 @@ { "schema_version": 1, "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:security-group/sg-0580fa9cbc0493d77", + "arn": "arn:aws:ec2:us-east-2:977373308795:security-group/sg-014eb096b1eee30a5", "description": "Allow featurebase inbound traffic", "egress": [ { @@ -494,7 +492,7 @@ "to_port": 0 } ], - "id": "sg-0580fa9cbc0493d77", + "id": "sg-014eb096b1eee30a5", "ingress": [ { "cidr_blocks": [ @@ -513,42 +511,16 @@ }, { "cidr_blocks": [ - "10.0.0.0/16" + "0.0.0.0/0" ], - "description": "GRPC from Internal", - "from_port": 20101, + "description": "icmp from Anywhere", + "from_port": -1, "ipv6_cidr_blocks": [], "prefix_list_ids": [], - "protocol": "tcp", + "protocol": "icmp", "security_groups": [], "self": false, - "to_port": 20101 - }, - { - "cidr_blocks": [ - "10.0.0.0/16" - ], - "description": "PostgreSQL from Internal", - "from_port": 55432, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 55432 - }, - { - "cidr_blocks": [ - "10.0.0.0/16" - ], - "description": "TLS from Internal", - "from_port": 10101, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 10101 + "to_port": -1 }, { "cidr_blocks": [ @@ -575,11 +547,53 @@ "security_groups": [], "self": false, "to_port": 10301 + }, + { + "cidr_blocks": [ + "10.0.0.0/8", + "172.31.0.0/16" + ], + "description": "GRPC from Internal", + "from_port": 20101, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 20101 + }, + { + "cidr_blocks": [ + "10.0.0.0/8", + "172.31.0.0/16" + ], + "description": "HTTP from Internal", + "from_port": 10101, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 10101 + }, + { + "cidr_blocks": [ + "10.0.0.0/8", + "172.31.0.0/16" + ], + "description": "PostgreSQL from Internal", + "from_port": 55432, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 55432 } ], "name": "allow_featurebase", "name_prefix": "", - "owner_id": "941206295814", + "owner_id": "977373308795", "revoke_rules_on_delete": false, "tags": { "Name": "allow_featurebase" @@ -588,13 +602,10 @@ "Name": "allow_featurebase" }, "timeouts": null, - "vpc_id": "vpc-035fcf75548026b23" + "vpc_id": "vpc-05a26a122f961dc2b" }, "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this" - ] + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=" } ] }, @@ -608,7 +619,7 @@ { "schema_version": 1, "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:security-group/sg-08089f99e02a87452", + "arn": "arn:aws:ec2:us-east-2:977373308795:security-group/sg-04e315d7b9ace5146", "description": "Allow ingest inbound traffic", "egress": [ { @@ -627,7 +638,7 @@ "to_port": 0 } ], - "id": "sg-08089f99e02a87452", + "id": "sg-04e315d7b9ace5146", "ingress": [ { "cidr_blocks": [ @@ -658,11 +669,24 @@ "security_groups": [], "self": false, "to_port": 22 + }, + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "icmp from Anywhere", + "from_port": -1, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "icmp", + "security_groups": [], + "self": false, + "to_port": -1 } ], "name": "allow_ingest", "name_prefix": "", - "owner_id": "941206295814", + "owner_id": "977373308795", "revoke_rules_on_delete": false, "tags": { "Name": "allow_ingest" @@ -671,924 +695,10 @@ "Name": "allow_ingest" }, "timeouts": null, - "vpc_id": "vpc-035fcf75548026b23" + "vpc_id": "vpc-05a26a122f961dc2b" }, "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this" - ] - } - ] - }, - { - "module": "module.ci-cluster.module.vpc", - "mode": "managed", - "type": "aws_eip", - "name": "nat", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "address": null, - "allocation_id": "eipalloc-099cedbe3c5820bbe", - "associate_with_private_ip": null, - "association_id": "", - "carrier_ip": "", - "customer_owned_ip": "", - "customer_owned_ipv4_pool": "", - "domain": "vpc", - "id": "eipalloc-099cedbe3c5820bbe", - "instance": "", - "network_border_group": "us-east-2", - "network_interface": "", - "private_dns": null, - "private_ip": "", - "public_dns": "ec2-3-17-85-138.us-east-2.compute.amazonaws.com", - "public_ip": "3.17.85.138", - "public_ipv4_pool": "amazon", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc": true - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxODAwMDAwMDAwMDAsInJlYWQiOjkwMDAwMDAwMDAwMCwidXBkYXRlIjozMDAwMDAwMDAwMDB9fQ==" - }, - { - "index_key": 1, - "schema_version": 0, - "attributes": { - "address": null, - "allocation_id": "eipalloc-0fca65223cdfd313a", - "associate_with_private_ip": null, - "association_id": "", - "carrier_ip": "", - "customer_owned_ip": "", - "customer_owned_ipv4_pool": "", - "domain": "vpc", - "id": "eipalloc-0fca65223cdfd313a", - "instance": "", - "network_border_group": "us-east-2", - "network_interface": "", - "private_dns": null, - "private_ip": "", - "public_dns": "ec2-3-135-112-2.us-east-2.compute.amazonaws.com", - "public_ip": "3.135.112.2", - "public_ipv4_pool": "amazon", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc": true - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxODAwMDAwMDAwMDAsInJlYWQiOjkwMDAwMDAwMDAwMCwidXBkYXRlIjozMDAwMDAwMDAwMDB9fQ==" - }, - { - "index_key": 2, - "schema_version": 0, - "attributes": { - "address": null, - "allocation_id": "eipalloc-09323e2a47e394df7", - "associate_with_private_ip": null, - "association_id": "", - "carrier_ip": "", - "customer_owned_ip": "", - "customer_owned_ipv4_pool": "", - "domain": "vpc", - "id": "eipalloc-09323e2a47e394df7", - "instance": "", - "network_border_group": "us-east-2", - "network_interface": "", - "private_dns": null, - "private_ip": "", - "public_dns": "ec2-3-128-36-233.us-east-2.compute.amazonaws.com", - "public_ip": "3.128.36.233", - "public_ipv4_pool": "amazon", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc": true - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjoxODAwMDAwMDAwMDAsInJlYWQiOjkwMDAwMDAwMDAwMCwidXBkYXRlIjozMDAwMDAwMDAwMDB9fQ==" - } - ] - }, - { - "module": "module.ci-cluster.module.vpc", - "mode": "managed", - "type": "aws_internet_gateway", - "name": "this", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:internet-gateway/igw-069e52ef204598fdd", - "id": "igw-069e52ef204598fdd", - "owner_id": "941206295814", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "vpc_id": "vpc-035fcf75548026b23" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ci-cluster.module.vpc", - "mode": "managed", - "type": "aws_nat_gateway", - "name": "this", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "allocation_id": "eipalloc-099cedbe3c5820bbe", - "connectivity_type": "public", - "id": "nat-01960cd93ff94dc13", - "network_interface_id": "eni-0da9e0562c5e62a35", - "private_ip": "10.0.101.138", - "public_ip": "3.17.85.138", - "subnet_id": "subnet-09f6ef1380254341b", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_eip.nat", - "module.ci-cluster.module.vpc.aws_internet_gateway.this", - "module.ci-cluster.module.vpc.aws_subnet.public", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 0, - "attributes": { - "allocation_id": "eipalloc-0fca65223cdfd313a", - "connectivity_type": "public", - "id": "nat-03883494dfdfcc234", - "network_interface_id": "eni-0f234f97b35663c64", - "private_ip": "10.0.102.238", - "public_ip": "3.135.112.2", - "subnet_id": "subnet-063459780d5b84c86", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_eip.nat", - "module.ci-cluster.module.vpc.aws_internet_gateway.this", - "module.ci-cluster.module.vpc.aws_subnet.public", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 0, - "attributes": { - "allocation_id": "eipalloc-09323e2a47e394df7", - "connectivity_type": "public", - "id": "nat-05bbd0bcd20938896", - "network_interface_id": "eni-0a36a85d8383cac8e", - "private_ip": "10.0.103.228", - "public_ip": "3.128.36.233", - "subnet_id": "subnet-0eae785053155c08b", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - } - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_eip.nat", - "module.ci-cluster.module.vpc.aws_internet_gateway.this", - "module.ci-cluster.module.vpc.aws_subnet.public", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ci-cluster.module.vpc", - "mode": "managed", - "type": "aws_route", - "name": "private_nat_gateway", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "carrier_gateway_id": "", - "destination_cidr_block": "0.0.0.0/0", - "destination_ipv6_cidr_block": "", - "destination_prefix_list_id": "", - "egress_only_gateway_id": "", - "gateway_id": "", - "id": "r-rtb-06122e232dba3e71d1080289494", - "instance_id": "", - "instance_owner_id": "", - "local_gateway_id": "", - "nat_gateway_id": "nat-01960cd93ff94dc13", - "network_interface_id": "", - "origin": "CreateRoute", - "route_table_id": "rtb-06122e232dba3e71d", - "state": "active", - "timeouts": { - "create": "5m", - "delete": null, - "update": null - }, - "transit_gateway_id": "", - "vpc_endpoint_id": "", - "vpc_peering_connection_id": "" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_eip.nat", - "module.ci-cluster.module.vpc.aws_internet_gateway.this", - "module.ci-cluster.module.vpc.aws_nat_gateway.this", - "module.ci-cluster.module.vpc.aws_route_table.private", - "module.ci-cluster.module.vpc.aws_subnet.public", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 0, - "attributes": { - "carrier_gateway_id": "", - "destination_cidr_block": "0.0.0.0/0", - "destination_ipv6_cidr_block": "", - "destination_prefix_list_id": "", - "egress_only_gateway_id": "", - "gateway_id": "", - "id": "r-rtb-0757c96161330927f1080289494", - "instance_id": "", - "instance_owner_id": "", - "local_gateway_id": "", - "nat_gateway_id": "nat-03883494dfdfcc234", - "network_interface_id": "", - "origin": "CreateRoute", - "route_table_id": "rtb-0757c96161330927f", - "state": "active", - "timeouts": { - "create": "5m", - "delete": null, - "update": null - }, - "transit_gateway_id": "", - "vpc_endpoint_id": "", - "vpc_peering_connection_id": "" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_eip.nat", - "module.ci-cluster.module.vpc.aws_internet_gateway.this", - "module.ci-cluster.module.vpc.aws_nat_gateway.this", - "module.ci-cluster.module.vpc.aws_route_table.private", - "module.ci-cluster.module.vpc.aws_subnet.public", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 0, - "attributes": { - "carrier_gateway_id": "", - "destination_cidr_block": "0.0.0.0/0", - "destination_ipv6_cidr_block": "", - "destination_prefix_list_id": "", - "egress_only_gateway_id": "", - "gateway_id": "", - "id": "r-rtb-0584788728d6485171080289494", - "instance_id": "", - "instance_owner_id": "", - "local_gateway_id": "", - "nat_gateway_id": "nat-05bbd0bcd20938896", - "network_interface_id": "", - "origin": "CreateRoute", - "route_table_id": "rtb-0584788728d648517", - "state": "active", - "timeouts": { - "create": "5m", - "delete": null, - "update": null - }, - "transit_gateway_id": "", - "vpc_endpoint_id": "", - "vpc_peering_connection_id": "" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_eip.nat", - "module.ci-cluster.module.vpc.aws_internet_gateway.this", - "module.ci-cluster.module.vpc.aws_nat_gateway.this", - "module.ci-cluster.module.vpc.aws_route_table.private", - "module.ci-cluster.module.vpc.aws_subnet.public", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ci-cluster.module.vpc", - "mode": "managed", - "type": "aws_route", - "name": "public_internet_gateway", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "carrier_gateway_id": "", - "destination_cidr_block": "0.0.0.0/0", - "destination_ipv6_cidr_block": "", - "destination_prefix_list_id": "", - "egress_only_gateway_id": "", - "gateway_id": "igw-069e52ef204598fdd", - "id": "r-rtb-08768a10ff241df961080289494", - "instance_id": "", - "instance_owner_id": "", - "local_gateway_id": "", - "nat_gateway_id": "", - "network_interface_id": "", - "origin": "CreateRoute", - "route_table_id": "rtb-08768a10ff241df96", - "state": "active", - "timeouts": { - "create": "5m", - "delete": null, - "update": null - }, - "transit_gateway_id": "", - "vpc_endpoint_id": "", - "vpc_peering_connection_id": "" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_internet_gateway.this", - "module.ci-cluster.module.vpc.aws_route_table.public", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ci-cluster.module.vpc", - "mode": "managed", - "type": "aws_route_table", - "name": "private", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:route-table/rtb-06122e232dba3e71d", - "id": "rtb-06122e232dba3e71d", - "owner_id": "941206295814", - "propagating_vgws": [], - "route": [], - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc_id": "vpc-035fcf75548026b23" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:route-table/rtb-0757c96161330927f", - "id": "rtb-0757c96161330927f", - "owner_id": "941206295814", - "propagating_vgws": [], - "route": [], - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc_id": "vpc-035fcf75548026b23" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:route-table/rtb-0584788728d648517", - "id": "rtb-0584788728d648517", - "owner_id": "941206295814", - "propagating_vgws": [], - "route": [], - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc_id": "vpc-035fcf75548026b23" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ci-cluster.module.vpc", - "mode": "managed", - "type": "aws_route_table", - "name": "public", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:route-table/rtb-08768a10ff241df96", - "id": "rtb-08768a10ff241df96", - "owner_id": "941206295814", - "propagating_vgws": [], - "route": [], - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc_id": "vpc-035fcf75548026b23" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6MzAwMDAwMDAwMDAwLCJ1cGRhdGUiOjEyMDAwMDAwMDAwMH19", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ci-cluster.module.vpc", - "mode": "managed", - "type": "aws_route_table_association", - "name": "private", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-0e02368a84fbc483d", - "route_table_id": "rtb-06122e232dba3e71d", - "subnet_id": "subnet-0dcb2339122bafc95" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_route_table.private", - "module.ci-cluster.module.vpc.aws_subnet.private", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-03a94dc33d8ce77ee", - "route_table_id": "rtb-0757c96161330927f", - "subnet_id": "subnet-0981f7f434ca09e8e" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_route_table.private", - "module.ci-cluster.module.vpc.aws_subnet.private", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-0bc6944b6e56191de", - "route_table_id": "rtb-0584788728d648517", - "subnet_id": "subnet-0353db6d8c1c7ad43" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_route_table.private", - "module.ci-cluster.module.vpc.aws_subnet.private", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ci-cluster.module.vpc", - "mode": "managed", - "type": "aws_route_table_association", - "name": "public", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-03dfd5b74f16f8cd8", - "route_table_id": "rtb-08768a10ff241df96", - "subnet_id": "subnet-09f6ef1380254341b" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_route_table.public", - "module.ci-cluster.module.vpc.aws_subnet.public", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-0628c1dc5f82384f6", - "route_table_id": "rtb-08768a10ff241df96", - "subnet_id": "subnet-063459780d5b84c86" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_route_table.public", - "module.ci-cluster.module.vpc.aws_subnet.public", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 0, - "attributes": { - "gateway_id": "", - "id": "rtbassoc-0b730b5a81f9e2de4", - "route_table_id": "rtb-08768a10ff241df96", - "subnet_id": "subnet-0eae785053155c08b" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_route_table.public", - "module.ci-cluster.module.vpc.aws_subnet.public", - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ci-cluster.module.vpc", - "mode": "managed", - "type": "aws_subnet", - "name": "private", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:subnet/subnet-0dcb2339122bafc95", - "assign_ipv6_address_on_creation": false, - "availability_zone": "us-east-2a", - "availability_zone_id": "use2-az1", - "cidr_block": "10.0.1.0/24", - "customer_owned_ipv4_pool": "", - "id": "subnet-0dcb2339122bafc95", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "941206295814", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc_id": "vpc-035fcf75548026b23" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:subnet/subnet-0981f7f434ca09e8e", - "assign_ipv6_address_on_creation": false, - "availability_zone": "us-east-2b", - "availability_zone_id": "use2-az2", - "cidr_block": "10.0.2.0/24", - "customer_owned_ipv4_pool": "", - "id": "subnet-0981f7f434ca09e8e", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "941206295814", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc_id": "vpc-035fcf75548026b23" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:subnet/subnet-0353db6d8c1c7ad43", - "assign_ipv6_address_on_creation": false, - "availability_zone": "us-east-2c", - "availability_zone_id": "use2-az3", - "cidr_block": "10.0.3.0/24", - "customer_owned_ipv4_pool": "", - "id": "subnet-0353db6d8c1c7ad43", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": false, - "outpost_arn": "", - "owner_id": "941206295814", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc_id": "vpc-035fcf75548026b23" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ci-cluster.module.vpc", - "mode": "managed", - "type": "aws_subnet", - "name": "public", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:subnet/subnet-09f6ef1380254341b", - "assign_ipv6_address_on_creation": false, - "availability_zone": "us-east-2a", - "availability_zone_id": "use2-az1", - "cidr_block": "10.0.101.0/24", - "customer_owned_ipv4_pool": "", - "id": "subnet-09f6ef1380254341b", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": true, - "outpost_arn": "", - "owner_id": "941206295814", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc_id": "vpc-035fcf75548026b23" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 1, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:subnet/subnet-063459780d5b84c86", - "assign_ipv6_address_on_creation": false, - "availability_zone": "us-east-2b", - "availability_zone_id": "use2-az2", - "cidr_block": "10.0.102.0/24", - "customer_owned_ipv4_pool": "", - "id": "subnet-063459780d5b84c86", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": true, - "outpost_arn": "", - "owner_id": "941206295814", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc_id": "vpc-035fcf75548026b23" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - }, - { - "index_key": 2, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:subnet/subnet-0eae785053155c08b", - "assign_ipv6_address_on_creation": false, - "availability_zone": "us-east-2c", - "availability_zone_id": "use2-az3", - "cidr_block": "10.0.103.0/24", - "customer_owned_ipv4_pool": "", - "id": "subnet-0eae785053155c08b", - "ipv6_cidr_block": "", - "ipv6_cidr_block_association_id": "", - "map_customer_owned_ip_on_launch": false, - "map_public_ip_on_launch": true, - "outpost_arn": "", - "owner_id": "941206295814", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "timeouts": null, - "vpc_id": "vpc-035fcf75548026b23" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMH0sInNjaGVtYV92ZXJzaW9uIjoiMSJ9", - "dependencies": [ - "module.ci-cluster.module.vpc.aws_vpc.this", - "module.ci-cluster.module.vpc.aws_vpc_ipv4_cidr_block_association.this" - ] - } - ] - }, - { - "module": "module.ci-cluster.module.vpc", - "mode": "managed", - "type": "aws_vpc", - "name": "this", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:941206295814:vpc/vpc-035fcf75548026b23", - "assign_generated_ipv6_cidr_block": false, - "cidr_block": "10.0.0.0/16", - "default_network_acl_id": "acl-0db479d99cf0759f8", - "default_route_table_id": "rtb-0a264d3195bef2a21", - "default_security_group_id": "sg-025b70c95323fd7e6", - "dhcp_options_id": "dopt-0398725faf4f782c8", - "enable_classiclink": null, - "enable_classiclink_dns_support": null, - "enable_dns_hostnames": false, - "enable_dns_support": true, - "id": "vpc-035fcf75548026b23", - "instance_tenancy": "default", - "ipv4_ipam_pool_id": null, - "ipv4_netmask_length": null, - "ipv6_association_id": "", - "ipv6_cidr_block": "", - "ipv6_ipam_pool_id": null, - "ipv6_netmask_length": null, - "main_route_table_id": "rtb-0a264d3195bef2a21", - "owner_id": "941206295814", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV" - } - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=" } ] } diff --git a/qa/tf/gauntlet/samsung/main.tf b/qa/tf/gauntlet/samsung/main.tf index 6cc08bd31..0c9831626 100644 --- a/qa/tf/gauntlet/samsung/main.tf +++ b/qa/tf/gauntlet/samsung/main.tf @@ -11,10 +11,8 @@ module "samsung-cluster" { fb_ingest_node_count = 1 gitlab_token = var.gitlab_token branch = var.branch -} - -resource "aws_vpc_peering_connection" "gauntlet-to-vpn" { - vpc_id = module.samsung-cluster.vpc_id - peer_vpc_id = "vpc-0cb7cf76f2079aa0e" - auto_accept = true + vpc_id = "vpc-05a26a122f961dc2b" + vpc_cidr_block = "10.0.0.0/16" + vpc_public_subnets = ["subnet-066b4b922b54e51a2","subnet-037b8884269a69025","subnet-08482631514426210",] + vpc_private_subnets = ["subnet-050b1219d78f2db1b","subnet-0d623c769e086e46e","subnet-07155281789c6d33b",] } \ No newline at end of file diff --git a/qa/tf/gauntlet/samsung/outputs.tf b/qa/tf/gauntlet/samsung/outputs.tf index 9caf49db3..0c405bed0 100644 --- a/qa/tf/gauntlet/samsung/outputs.tf +++ b/qa/tf/gauntlet/samsung/outputs.tf @@ -6,9 +6,4 @@ output "ingest_ips" { output "data_node_ips" { description = "List of data node IPs" value = module.samsung-cluster.data_node_ips -} - -output "vpc_id" { - description = "ID of the gauntlet VPC" - value = module.samsung-cluster.vpc_id } \ No newline at end of file diff --git a/qa/tf/gauntlet/samsung/terraform.tfstate.backup b/qa/tf/gauntlet/samsung/terraform.tfstate.backup new file mode 100644 index 000000000..2622f5631 --- /dev/null +++ b/qa/tf/gauntlet/samsung/terraform.tfstate.backup @@ -0,0 +1,938 @@ +{ + "version": 4, + "terraform_version": "1.1.2", + "serial": 20, + "lineage": "febac4ac-400a-d207-d2d1-64c55f14767b", + "outputs": { + "data_node_ips": { + "value": [ + "10.0.1.197", + "10.0.2.133", + "10.0.3.244" + ], + "type": [ + "tuple", + [ + "string", + "string", + "string" + ] + ] + }, + "ingest_ips": { + "value": [ + "3.145.96.245" + ], + "type": [ + "tuple", + [ + "string" + ] + ] + } + }, + "resources": [ + { + "module": "module.samsung-cluster", + "mode": "data", + "type": "aws_ami", + "name": "amazon_linux_2", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "architecture": "arm64", + "arn": "arn:aws:ec2:us-east-2::image/ami-0b09f36be67d32fff", + "block_device_mappings": [ + { + "device_name": "/dev/xvda", + "ebs": { + "delete_on_termination": "true", + "encrypted": "false", + "iops": "0", + "snapshot_id": "snap-0617b00e90bae012b", + "throughput": "0", + "volume_size": "8", + "volume_type": "gp2" + }, + "no_device": "", + "virtual_name": "" + } + ], + "creation_date": "2021-12-01T19:36:11.000Z", + "description": "Amazon Linux 2 LTS Arm64 AMI 2.0.20211201.0 arm64 HVM gp2", + "ena_support": true, + "executable_users": null, + "filter": [ + { + "name": "architecture", + "values": [ + "arm64" + ] + }, + { + "name": "name", + "values": [ + "amzn2-ami-hvm-*" + ] + }, + { + "name": "virtualization-type", + "values": [ + "hvm" + ] + } + ], + "hypervisor": "xen", + "id": "ami-0b09f36be67d32fff", + "image_id": "ami-0b09f36be67d32fff", + "image_location": "amazon/amzn2-ami-hvm-2.0.20211201.0-arm64-gp2", + "image_owner_alias": "amazon", + "image_type": "machine", + "kernel_id": null, + "most_recent": true, + "name": "amzn2-ami-hvm-2.0.20211201.0-arm64-gp2", + "name_regex": null, + "owner_id": "137112412989", + "owners": [ + "amazon" + ], + "platform": null, + "platform_details": "Linux/UNIX", + "product_codes": [], + "public": true, + "ramdisk_id": null, + "root_device_name": "/dev/xvda", + "root_device_type": "ebs", + "root_snapshot_id": "snap-0617b00e90bae012b", + "sriov_net_support": "simple", + "state": "available", + "state_reason": { + "code": "UNSET", + "message": "UNSET" + }, + "tags": {}, + "usage_operation": "RunInstances", + "virtualization_type": "hvm" + }, + "sensitive_attributes": [] + } + ] + }, + { + "module": "module.samsung-cluster", + "mode": "managed", + "type": "aws_iam_instance_profile", + "name": "fb_cluster_node_profile", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:iam::977373308795:instance-profile/samsung-gauntlet-fb_cluster_node_profile", + "create_date": "2022-01-07T23:16:27Z", + "id": "samsung-gauntlet-fb_cluster_node_profile", + "name": "samsung-gauntlet-fb_cluster_node_profile", + "name_prefix": null, + "path": "/", + "role": "samsung-gauntlet-fb_cluster_node", + "tags": {}, + "tags_all": {}, + "unique_id": "AIPA6HD75E55ZM7XC2IBD" + }, + "sensitive_attributes": [], + "private": "bnVsbA==", + "dependencies": [ + "module.samsung-cluster.aws_iam_role.fb_cluster_node_role" + ] + } + ] + }, + { + "module": "module.samsung-cluster", + "mode": "managed", + "type": "aws_iam_role", + "name": "fb_cluster_node_role", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "arn": "arn:aws:iam::977373308795:role/samsung-gauntlet-fb_cluster_node", + "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ec2.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}", + "create_date": "2022-01-07T23:16:05Z", + "description": "", + "force_detach_policies": false, + "id": "samsung-gauntlet-fb_cluster_node", + "inline_policy": [ + { + "name": "ec2_read_all", + "policy": "{\"Statement\":[{\"Action\":[\"ec2:Describe*\"],\"Effect\":\"Allow\",\"Resource\":\"*\"}],\"Version\":\"2012-10-17\"}" + } + ], + "managed_policy_arns": [], + "max_session_duration": 3600, + "name": "samsung-gauntlet-fb_cluster_node", + "name_prefix": "", + "path": "/", + "permissions_boundary": null, + "tags": {}, + "tags_all": {}, + "unique_id": "AROA6HD75E55VM3GADWTD" + }, + "sensitive_attributes": [], + "private": "bnVsbA==" + } + ] + }, + { + "module": "module.samsung-cluster", + "mode": "managed", + "type": "aws_instance", + "name": "fb_cluster_nodes", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "ami": "ami-0b09f36be67d32fff", + "arn": "arn:aws:ec2:us-east-2:977373308795:instance/i-09664bb4472386327", + "associate_public_ip_address": false, + "availability_zone": "us-east-2a", + "capacity_reservation_specification": [ + { + "capacity_reservation_preference": "open", + "capacity_reservation_target": [] + } + ], + "cpu_core_count": 4, + "cpu_threads_per_core": 1, + "credit_specification": [], + "disable_api_termination": false, + "ebs_block_device": [ + { + "delete_on_termination": true, + "device_name": "/dev/sdb", + "encrypted": false, + "iops": 10000, + "kms_key_id": "", + "snapshot_id": "", + "tags": {}, + "throughput": 125, + "volume_id": "vol-04c28c1cb5143ddf7", + "volume_size": 100, + "volume_type": "gp3" + } + ], + "ebs_optimized": false, + "enclave_options": [ + { + "enabled": false + } + ], + "ephemeral_block_device": [], + "get_password_data": false, + "hibernation": false, + "host_id": null, + "iam_instance_profile": "samsung-gauntlet-fb_cluster_node_profile", + "id": "i-09664bb4472386327", + "instance_initiated_shutdown_behavior": "stop", + "instance_state": "running", + "instance_type": "m6g.xlarge", + "ipv6_address_count": 0, + "ipv6_addresses": [], + "key_name": "samsung-gauntlet-gitlab-ci", + "launch_template": [], + "metadata_options": [ + { + "http_endpoint": "enabled", + "http_put_response_hop_limit": 1, + "http_tokens": "optional" + } + ], + "monitoring": true, + "network_interface": [], + "outpost_arn": "", + "password_data": "", + "placement_group": "", + "placement_partition_number": null, + "primary_network_interface_id": "eni-0809b96866ccfa203", + "private_dns": "ip-10-0-1-197.us-east-2.compute.internal", + "private_ip": "10.0.1.197", + "public_dns": "", + "public_ip": "", + "root_block_device": [ + { + "delete_on_termination": true, + "device_name": "/dev/xvda", + "encrypted": false, + "iops": 3000, + "kms_key_id": "", + "tags": {}, + "throughput": 125, + "volume_id": "vol-031f177e3f36fe051", + "volume_size": 20, + "volume_type": "gp3" + } + ], + "secondary_private_ips": [], + "security_groups": [], + "source_dest_check": true, + "subnet_id": "subnet-050b1219d78f2db1b", + "tags": { + "Name": "samsung-gauntlet-featurebase-cluster-0", + "Prefix": "samsung-gauntlet", + "Role": "cluster_node" + }, + "tags_all": { + "Name": "samsung-gauntlet-featurebase-cluster-0", + "Prefix": "samsung-gauntlet", + "Role": "cluster_node" + }, + "tenancy": "default", + "timeouts": null, + "user_data": "ed849ffb2caa5f32ccaf0571e91c3f6d9a54faac", + "user_data_base64": null, + "volume_tags": null, + "vpc_security_group_ids": [ + "sg-04d60067fbf393f98" + ] + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMDB9LCJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", + "dependencies": [ + "module.samsung-cluster.aws_iam_role.fb_cluster_node_role", + "module.samsung-cluster.aws_key_pair.gitlab-featurebase-ci", + "module.samsung-cluster.aws_security_group.featurebase", + "module.samsung-cluster.data.aws_ami.amazon_linux_2", + "module.samsung-cluster.aws_iam_instance_profile.fb_cluster_node_profile" + ] + }, + { + "index_key": 1, + "schema_version": 1, + "attributes": { + "ami": "ami-0b09f36be67d32fff", + "arn": "arn:aws:ec2:us-east-2:977373308795:instance/i-031b4e15ea7645578", + "associate_public_ip_address": false, + "availability_zone": "us-east-2b", + "capacity_reservation_specification": [ + { + "capacity_reservation_preference": "open", + "capacity_reservation_target": [] + } + ], + "cpu_core_count": 4, + "cpu_threads_per_core": 1, + "credit_specification": [], + "disable_api_termination": false, + "ebs_block_device": [ + { + "delete_on_termination": true, + "device_name": "/dev/sdb", + "encrypted": false, + "iops": 10000, + "kms_key_id": "", + "snapshot_id": "", + "tags": {}, + "throughput": 125, + "volume_id": "vol-0fd362b5516d0c017", + "volume_size": 100, + "volume_type": "gp3" + } + ], + "ebs_optimized": false, + "enclave_options": [ + { + "enabled": false + } + ], + "ephemeral_block_device": [], + "get_password_data": false, + "hibernation": false, + "host_id": null, + "iam_instance_profile": "samsung-gauntlet-fb_cluster_node_profile", + "id": "i-031b4e15ea7645578", + "instance_initiated_shutdown_behavior": "stop", + "instance_state": "running", + "instance_type": "m6g.xlarge", + "ipv6_address_count": 0, + "ipv6_addresses": [], + "key_name": "samsung-gauntlet-gitlab-ci", + "launch_template": [], + "metadata_options": [ + { + "http_endpoint": "enabled", + "http_put_response_hop_limit": 1, + "http_tokens": "optional" + } + ], + "monitoring": true, + "network_interface": [], + "outpost_arn": "", + "password_data": "", + "placement_group": "", + "placement_partition_number": null, + "primary_network_interface_id": "eni-0b844cf311584941e", + "private_dns": "ip-10-0-2-133.us-east-2.compute.internal", + "private_ip": "10.0.2.133", + "public_dns": "", + "public_ip": "", + "root_block_device": [ + { + "delete_on_termination": true, + "device_name": "/dev/xvda", + "encrypted": false, + "iops": 3000, + "kms_key_id": "", + "tags": null, + "throughput": 125, + "volume_id": "vol-0c3fe8fb90d0542c0", + "volume_size": 20, + "volume_type": "gp3" + } + ], + "secondary_private_ips": [], + "security_groups": [], + "source_dest_check": true, + "subnet_id": "subnet-0d623c769e086e46e", + "tags": { + "Name": "samsung-gauntlet-featurebase-cluster-1", + "Prefix": "samsung-gauntlet", + "Role": "cluster_node" + }, + "tags_all": { + "Name": "samsung-gauntlet-featurebase-cluster-1", + "Prefix": "samsung-gauntlet", + "Role": "cluster_node" + }, + "tenancy": "default", + "timeouts": null, + "user_data": "ed849ffb2caa5f32ccaf0571e91c3f6d9a54faac", + "user_data_base64": null, + "volume_tags": null, + "vpc_security_group_ids": [ + "sg-04d60067fbf393f98" + ] + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMDB9LCJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", + "dependencies": [ + "module.samsung-cluster.aws_iam_instance_profile.fb_cluster_node_profile", + "module.samsung-cluster.aws_key_pair.gitlab-featurebase-ci", + "module.samsung-cluster.aws_security_group.featurebase", + "module.samsung-cluster.data.aws_ami.amazon_linux_2" + ] + }, + { + "index_key": 2, + "schema_version": 1, + "attributes": { + "ami": "ami-0b09f36be67d32fff", + "arn": "arn:aws:ec2:us-east-2:977373308795:instance/i-0a37c057bee7ba28d", + "associate_public_ip_address": false, + "availability_zone": "us-east-2c", + "capacity_reservation_specification": [ + { + "capacity_reservation_preference": "open", + "capacity_reservation_target": [] + } + ], + "cpu_core_count": 4, + "cpu_threads_per_core": 1, + "credit_specification": [], + "disable_api_termination": false, + "ebs_block_device": [ + { + "delete_on_termination": true, + "device_name": "/dev/sdb", + "encrypted": false, + "iops": 10000, + "kms_key_id": "", + "snapshot_id": "", + "tags": {}, + "throughput": 125, + "volume_id": "vol-0203d9c0080bccc2a", + "volume_size": 100, + "volume_type": "gp3" + } + ], + "ebs_optimized": false, + "enclave_options": [ + { + "enabled": false + } + ], + "ephemeral_block_device": [], + "get_password_data": false, + "hibernation": false, + "host_id": null, + "iam_instance_profile": "samsung-gauntlet-fb_cluster_node_profile", + "id": "i-0a37c057bee7ba28d", + "instance_initiated_shutdown_behavior": "stop", + "instance_state": "running", + "instance_type": "m6g.xlarge", + "ipv6_address_count": 0, + "ipv6_addresses": [], + "key_name": "samsung-gauntlet-gitlab-ci", + "launch_template": [], + "metadata_options": [ + { + "http_endpoint": "enabled", + "http_put_response_hop_limit": 1, + "http_tokens": "optional" + } + ], + "monitoring": true, + "network_interface": [], + "outpost_arn": "", + "password_data": "", + "placement_group": "", + "placement_partition_number": null, + "primary_network_interface_id": "eni-03d10f8c14edc12b2", + "private_dns": "ip-10-0-3-244.us-east-2.compute.internal", + "private_ip": "10.0.3.244", + "public_dns": "", + "public_ip": "", + "root_block_device": [ + { + "delete_on_termination": true, + "device_name": "/dev/xvda", + "encrypted": false, + "iops": 3000, + "kms_key_id": "", + "tags": null, + "throughput": 125, + "volume_id": "vol-06b96553464e68c08", + "volume_size": 20, + "volume_type": "gp3" + } + ], + "secondary_private_ips": [], + "security_groups": [], + "source_dest_check": true, + "subnet_id": "subnet-07155281789c6d33b", + "tags": { + "Name": "samsung-gauntlet-featurebase-cluster-2", + "Prefix": "samsung-gauntlet", + "Role": "cluster_node" + }, + "tags_all": { + "Name": "samsung-gauntlet-featurebase-cluster-2", + "Prefix": "samsung-gauntlet", + "Role": "cluster_node" + }, + "tenancy": "default", + "timeouts": null, + "user_data": "ed849ffb2caa5f32ccaf0571e91c3f6d9a54faac", + "user_data_base64": null, + "volume_tags": null, + "vpc_security_group_ids": [ + "sg-04d60067fbf393f98" + ] + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMDB9LCJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", + "dependencies": [ + "module.samsung-cluster.aws_iam_instance_profile.fb_cluster_node_profile", + "module.samsung-cluster.aws_key_pair.gitlab-featurebase-ci", + "module.samsung-cluster.aws_security_group.featurebase", + "module.samsung-cluster.data.aws_ami.amazon_linux_2" + ] + } + ] + }, + { + "module": "module.samsung-cluster", + "mode": "managed", + "type": "aws_instance", + "name": "fb_ingest", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 1, + "attributes": { + "ami": "ami-0b09f36be67d32fff", + "arn": "arn:aws:ec2:us-east-2:977373308795:instance/i-05fe29bb7763ef362", + "associate_public_ip_address": true, + "availability_zone": "us-east-2a", + "capacity_reservation_specification": [ + { + "capacity_reservation_preference": "open", + "capacity_reservation_target": [] + } + ], + "cpu_core_count": 2, + "cpu_threads_per_core": 1, + "credit_specification": [], + "disable_api_termination": false, + "ebs_block_device": [ + { + "delete_on_termination": true, + "device_name": "/dev/sdb", + "encrypted": false, + "iops": 10000, + "kms_key_id": "", + "snapshot_id": "", + "tags": {}, + "throughput": 125, + "volume_id": "vol-08bc1374e4a0ef2d8", + "volume_size": 100, + "volume_type": "gp3" + } + ], + "ebs_optimized": false, + "enclave_options": [ + { + "enabled": false + } + ], + "ephemeral_block_device": [], + "get_password_data": false, + "hibernation": false, + "host_id": null, + "iam_instance_profile": "samsung-gauntlet-fb_cluster_node_profile", + "id": "i-05fe29bb7763ef362", + "instance_initiated_shutdown_behavior": "stop", + "instance_state": "running", + "instance_type": "m6g.large", + "ipv6_address_count": 0, + "ipv6_addresses": [], + "key_name": "samsung-gauntlet-gitlab-ci", + "launch_template": [], + "metadata_options": [ + { + "http_endpoint": "enabled", + "http_put_response_hop_limit": 1, + "http_tokens": "optional" + } + ], + "monitoring": true, + "network_interface": [], + "outpost_arn": "", + "password_data": "", + "placement_group": "", + "placement_partition_number": null, + "primary_network_interface_id": "eni-0dac7645cbd9504c0", + "private_dns": "ip-10-0-101-110.us-east-2.compute.internal", + "private_ip": "10.0.101.110", + "public_dns": "", + "public_ip": "3.145.96.245", + "root_block_device": [ + { + "delete_on_termination": true, + "device_name": "/dev/xvda", + "encrypted": false, + "iops": 3000, + "kms_key_id": "", + "tags": {}, + "throughput": 125, + "volume_id": "vol-054d4f37ba9a40786", + "volume_size": 20, + "volume_type": "gp3" + } + ], + "secondary_private_ips": [], + "security_groups": [], + "source_dest_check": true, + "subnet_id": "subnet-066b4b922b54e51a2", + "tags": { + "Name": "samsung-gauntlet-featurebase-ingest-0", + "Prefix": "samsung-gauntlet", + "Role": "ingest_node" + }, + "tags_all": { + "Name": "samsung-gauntlet-featurebase-ingest-0", + "Prefix": "samsung-gauntlet", + "Role": "ingest_node" + }, + "tenancy": "default", + "timeouts": null, + "user_data": "a511760e647134f82a8c6862bace75462b4be450", + "user_data_base64": null, + "volume_tags": null, + "vpc_security_group_ids": [ + "sg-04819516ceb6d6a6d" + ] + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMDB9LCJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", + "dependencies": [ + "module.samsung-cluster.aws_iam_instance_profile.fb_cluster_node_profile", + "module.samsung-cluster.aws_iam_role.fb_cluster_node_role", + "module.samsung-cluster.aws_key_pair.gitlab-featurebase-ci", + "module.samsung-cluster.aws_security_group.ingest", + "module.samsung-cluster.data.aws_ami.amazon_linux_2" + ] + } + ] + }, + { + "module": "module.samsung-cluster", + "mode": "managed", + "type": "aws_key_pair", + "name": "gitlab-featurebase-ci", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-east-2:977373308795:key-pair/samsung-gauntlet-gitlab-ci", + "fingerprint": "69:e5:4b:15:8d:1f:22:61:de:08:a9:ee:f3:29:5c:69", + "id": "samsung-gauntlet-gitlab-ci", + "key_name": "samsung-gauntlet-gitlab-ci", + "key_name_prefix": "", + "key_pair_id": "key-0f23e421e2db9bc94", + "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC91hhpVHNonAG7ku2ugpxEskf9KHeyHJPQJT26OHrMUw7R+T5A8TjqSzTau07sXQ/E9SO3ebV8SJ5PqeaQOnQB8VEvVNK0DjQH7ppvNg1Rfs42FZT9ttzTMvOjsSbK3vZTHXdoKQEdC9NxBwSkFIRGQojK1HUOq9xGrw31fA1OjSwlpLcbx7yyg18lcqW6UOptnVR8U9Yy9qQ5jZF1HtkQ6L9J+gv4o1UyNAUK2bopeGiXpBc3PQ/CFaFT2h/aqLBP66qAHsHVyAFD3PIRtplC5EHa8jXDgLacEls0uF7Q3kRPxvzcuo4g4VkOn1rDy9qH3vd2hT3aKVnM73FIDUiL", + "tags": {}, + "tags_all": {} + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" + } + ] + }, + { + "module": "module.samsung-cluster", + "mode": "managed", + "type": "aws_security_group", + "name": "featurebase", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-east-2:977373308795:security-group/sg-04d60067fbf393f98", + "description": "Allow featurebase inbound traffic", + "egress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 0, + "ipv6_cidr_blocks": [ + "::/0" + ], + "prefix_list_ids": [], + "protocol": "-1", + "security_groups": [], + "self": false, + "to_port": 0 + } + ], + "id": "sg-04d60067fbf393f98", + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "SSH", + "from_port": 22, + "ipv6_cidr_blocks": [ + "::/0" + ], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 22 + }, + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "icmp from Anywhere", + "from_port": -1, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "icmp", + "security_groups": [], + "self": false, + "to_port": -1 + }, + { + "cidr_blocks": [ + "10.0.0.0/16" + ], + "description": "etcd from internal 2", + "from_port": 10401, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 10401 + }, + { + "cidr_blocks": [ + "10.0.0.0/16" + ], + "description": "etcd from internal", + "from_port": 10301, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 10301 + }, + { + "cidr_blocks": [ + "10.0.0.0/8", + "172.31.0.0/16" + ], + "description": "GRPC from Internal", + "from_port": 20101, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 20101 + }, + { + "cidr_blocks": [ + "10.0.0.0/8", + "172.31.0.0/16" + ], + "description": "HTTP from Internal", + "from_port": 10101, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 10101 + }, + { + "cidr_blocks": [ + "10.0.0.0/8", + "172.31.0.0/16" + ], + "description": "PostgreSQL from Internal", + "from_port": 55432, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 55432 + } + ], + "name": "samsung-gauntlet-allow_featurebase", + "name_prefix": "", + "owner_id": "977373308795", + "revoke_rules_on_delete": false, + "tags": { + "Name": "allow_featurebase" + }, + "tags_all": { + "Name": "allow_featurebase" + }, + "timeouts": null, + "vpc_id": "vpc-05a26a122f961dc2b" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=" + } + ] + }, + { + "module": "module.samsung-cluster", + "mode": "managed", + "type": "aws_security_group", + "name": "ingest", + "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", + "instances": [ + { + "schema_version": 1, + "attributes": { + "arn": "arn:aws:ec2:us-east-2:977373308795:security-group/sg-04819516ceb6d6a6d", + "description": "Allow ingest inbound traffic", + "egress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 0, + "ipv6_cidr_blocks": [ + "::/0" + ], + "prefix_list_ids": [], + "protocol": "-1", + "security_groups": [], + "self": false, + "to_port": 0 + } + ], + "id": "sg-04819516ceb6d6a6d", + "ingress": [ + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "", + "from_port": 10101, + "ipv6_cidr_blocks": [ + "::/0" + ], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 10101 + }, + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "SSH", + "from_port": 22, + "ipv6_cidr_blocks": [ + "::/0" + ], + "prefix_list_ids": [], + "protocol": "tcp", + "security_groups": [], + "self": false, + "to_port": 22 + }, + { + "cidr_blocks": [ + "0.0.0.0/0" + ], + "description": "icmp from Anywhere", + "from_port": -1, + "ipv6_cidr_blocks": [], + "prefix_list_ids": [], + "protocol": "icmp", + "security_groups": [], + "self": false, + "to_port": -1 + } + ], + "name": "samsung-gauntlet-allow_ingest", + "name_prefix": "", + "owner_id": "977373308795", + "revoke_rules_on_delete": false, + "tags": { + "Name": "allow_ingest" + }, + "tags_all": { + "Name": "allow_ingest" + }, + "timeouts": null, + "vpc_id": "vpc-05a26a122f961dc2b" + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=" + } + ] + } + ] +} From 474362421001cbc05ab4c6d63ffd76c440937b63 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Sat, 8 Jan 2022 15:35:57 -0600 Subject: [PATCH 10/12] refactored scripts for imperative setup and execution --- qa/scripts/setupSamsungGauntlet.sh | 58 +- qa/scripts/setupSmokeTest.sh | 47 +- qa/scripts/teardownSmokeTest.sh | 4 + qa/scripts/testSmokeTest.sh | 27 +- qa/scripts/utilCluster.sh | 252 +++++++ qa/tf/.modules/featurebase-cluster/main.tf | 2 - qa/tf/.modules/featurebase-cluster/outputs.tf | 10 +- .../.modules/featurebase-cluster/variables.tf | 9 - qa/tf/ci/smoketest/main.tf | 2 - qa/tf/ci/smoketest/outputs.tf | 12 +- qa/tf/ci/smoketest/terraform.tfstate.backup | 704 +----------------- qa/tf/gauntlet/samsung/main.tf | 2 - qa/tf/gauntlet/samsung/outputs.tf | 12 +- 13 files changed, 384 insertions(+), 757 deletions(-) create mode 100644 qa/scripts/utilCluster.sh diff --git a/qa/scripts/setupSamsungGauntlet.sh b/qa/scripts/setupSamsungGauntlet.sh index 1c741be78..d14da6729 100755 --- a/qa/scripts/setupSamsungGauntlet.sh +++ b/qa/scripts/setupSamsungGauntlet.sh @@ -1,10 +1,19 @@ #!/bin/bash # To run script: ./setupSamsungGauntlet.sh +export TF_IN_AUTOMATION=1 + # requires TF_VAR_gitlab_token env var to be set +if [ -z ${TF_VAR_gitlab_token+x} ]; then echo "TF_VAR_gitlab_token is unset"; else echo "TF_VAR_gitlab_token is set to '$TF_VAR_gitlab_token'"; fi + +# requires TF_VAR_branch env var to be set +if [ -z ${TF_VAR_branch+x} ]; then echo "TF_VAR_branch is unset"; else echo "TF_VAR_branch is set to '$TF_VAR_branch'"; fi + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +source $SCRIPT_DIR/utilCluster.sh + pushd ./qa/tf/gauntlet/samsung -export TF_IN_AUTOMATION=1 echo "Running terraform init..." terraform init -input=false echo "Running terraform apply..." @@ -12,30 +21,45 @@ terraform apply -input=false -auto-approve terraform output -json > outputs.json popd -# get the bastion host -BASTION=$(cat ./qa/tf/gauntlet/samsung/outputs.json | jq -r '[.ingest_ips][0]["value"][0]') -echo "using bastion ${BASTION}" +# get the first ingest host +INGESTNODE0=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.ingest_ips][0]["value"][0]') +echo "using INGESTNODE0 ${INGESTNODE0}" -NODE=$(cat ./qa/tf/gauntlet/samsung/outputs.json | jq -r '[.data_node_ips][0]["value"][0]') -echo "using node ${NODE}" +# get the first data host +DATANODE0=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.data_node_ips][0]["value"][0]') +echo "using DATANODE0 ${DATANODE0}" -# remember that the nodes will take at least 2 mins to be up and going and finish cloud-init -#while true -#do -# nc -G 2 -w 1 $BASTION 22 -# if [ $? -eq 0 ] -# then -# break -# fi -#done -sleep 150 +#wait until we can connect to one of the hosts +for i in {0..24} +do + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no -o ConnectTimeout=10 ec2-user@${DATANODE0} "pwd" + if [ $? -eq 0 ] + then + echo "Cluster is up after $${i} tries." + break + fi + sleep 10s +done + +ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no -o ConnectTimeout=10 ec2-user@${DATANODE0} "pwd" +if [ $? -ne 0 ] +then + echo "Unable to connect to cluster - giving up" + exit 1 +fi + +setupClusterNodes # verify featurebase running -ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${BASTION} "curl -s http://${NODE}:10101/status" +echo "Verifying featurebase cluster running..." +curl -s http://${DATANODE0}:10101/status if (( $? != 0 )) then echo "Featurebase cluster not running" exit 1 fi +echo "Cluster running." + + diff --git a/qa/scripts/setupSmokeTest.sh b/qa/scripts/setupSmokeTest.sh index 766d9a82b..37eba6879 100755 --- a/qa/scripts/setupSmokeTest.sh +++ b/qa/scripts/setupSmokeTest.sh @@ -1,10 +1,18 @@ #!/bin/bash # To run script: ./setupSmokeTest.sh +export TF_IN_AUTOMATION=1 + # requires TF_VAR_gitlab_token env var to be set +if [ -z ${TF_VAR_gitlab_token+x} ]; then echo "TF_VAR_gitlab_token is unset"; else echo "TF_VAR_gitlab_token is set to '$TF_VAR_gitlab_token'"; fi + +# requires TF_VAR_branch env var to be set +if [ -z ${TF_VAR_branch+x} ]; then echo "TF_VAR_branch is unset"; else echo "TF_VAR_branch is set to '$TF_VAR_branch'"; fi + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +source $SCRIPT_DIR/utilCluster.sh pushd ./qa/tf/ci/smoketest -export TF_IN_AUTOMATION=1 echo "Running terraform init..." terraform init -input=false echo "Running terraform apply..." @@ -12,21 +20,38 @@ terraform apply -input=false -auto-approve terraform output -json > outputs.json popd -# get the bastion host -BASTION=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.ingest_ips][0]["value"][0]') -echo "using bastion ${BASTION}" +# get the first ingest host +INGESTNODE0=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.ingest_ips][0]["value"][0]') +echo "using INGESTNODE0 ${INGESTNODE0}" -NODE=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.data_node_ips][0]["value"][0]') -echo "using node ${NODE}" +# get the first data host +DATANODE0=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.data_node_ips][0]["value"][0]') +echo "using DATANODE0 ${DATANODE0}" -# remember that the nodes will take at least 2 mins to be up and going and finish cloud-init -echo "Waiting for cluster to become available..." -# jaffee - I do wanna do a loop here, but I give up, and am running home to sleep... -POK -sleep 150 +#wait until we can connect to one of the hosts +for i in {0..24} +do + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no -o ConnectTimeout=10 ec2-user@${DATANODE0} "pwd" + if [ $? -eq 0 ] + then + echo "Cluster is up after $${i} tries." + break + fi + sleep 10 +done + +ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no -o ConnectTimeout=10 ec2-user@${DATANODE0} "pwd" +if [ $? -ne 0 ] +then + echo "Unable to connect to cluster - giving up" + exit 1 +fi + +setupClusterNodes # verify featurebase running echo "Verifying featurebase cluster running..." -ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${BASTION} "curl -s http://${NODE}:10101/status" +curl -s http://${DATANODE0}:10101/status if (( $? != 0 )) then echo "Featurebase cluster not running" diff --git a/qa/scripts/teardownSmokeTest.sh b/qa/scripts/teardownSmokeTest.sh index 1e67d2895..6215d419e 100755 --- a/qa/scripts/teardownSmokeTest.sh +++ b/qa/scripts/teardownSmokeTest.sh @@ -2,6 +2,10 @@ # To run script: ./teardownSmokeTest.sh # requires TF_VAR_gitlab_token env var to be set +if [ -z ${TF_VAR_gitlab_token+x} ]; then echo "TF_VAR_gitlab_token is unset"; else echo "TF_VAR_gitlab_token is set to '$TF_VAR_gitlab_token'"; fi + +# requires TF_VAR_branch env var to be set +if [ -z ${TF_VAR_branch+x} ]; then echo "TF_VAR_branch is unset"; else echo "TF_VAR_branch is set to '$TF_VAR_branch'"; fi cd qa/tf/ci/smoketest export TF_IN_AUTOMATION=1 diff --git a/qa/scripts/testSmokeTest.sh b/qa/scripts/testSmokeTest.sh index ed748cf97..19d84e265 100755 --- a/qa/scripts/testSmokeTest.sh +++ b/qa/scripts/testSmokeTest.sh @@ -1,14 +1,25 @@ #!/bin/bash -# get the bastion host -BASTION=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.ingest_ips][0]["value"][0]') -echo "using bastion ${BASTION}" +# requires TF_VAR_gitlab_token env var to be set +if [ -z ${TF_VAR_gitlab_token+x} ]; then echo "TF_VAR_gitlab_token is unset"; else echo "TF_VAR_gitlab_token is set to '$TF_VAR_gitlab_token'"; fi + +# requires TF_VAR_branch env var to be set +if [ -z ${TF_VAR_branch+x} ]; then echo "TF_VAR_branch is unset"; else echo "TF_VAR_branch is set to '$TF_VAR_branch'"; fi + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +source $SCRIPT_DIR/utilCluster.sh + +# get the first ingest host +INGESTNODE0=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.ingest_ips][0]["value"][0]') +echo "using INGESTNODE0 ${INGESTNODE0}" + +# get the first data host +DATANODE0=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.data_node_ips][0]["value"][0]') +echo "using DATANODE0 ${DATANODE0}" -NODE=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.data_node_ips][0]["value"][0]') -echo "using node ${NODE}" echo "Copying tests to remote" -scp -r -i ~/.ssh/gitlab-featurebase-ci.pem ./qa/testcases/smoketest/*.py ec2-user@${BASTION}:/data +scp -r -i ~/.ssh/gitlab-featurebase-ci.pem ./qa/testcases/smoketest/*.py ec2-user@${INGESTNODE0}:/data if (( $? != 0 )) then echo "Copy failed" @@ -17,7 +28,7 @@ fi # run smoke test echo "Running smoke test..." -ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${BASTION} " pushd /data; pytest --junitxml=report.xml; popd" +ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" ec2-user@${INGESTNODE0} "pushd /data; ~/.local/bin/pytest --junitxml=report.xml; popd" if (( $? != 0 )) then echo "Unable to run smoke test" @@ -25,7 +36,7 @@ then fi echo "Copying test report to local" -scp -r -i ~/.ssh/gitlab-featurebase-ci.pem ec2-user@${BASTION}:/data/report.xml report.xml +scp -r -i ~/.ssh/gitlab-featurebase-ci.pem ec2-user@${INGESTNODE0}:/data/report.xml report.xml if (( $? != 0 )) then echo "Copy failed" diff --git a/qa/scripts/utilCluster.sh b/qa/scripts/utilCluster.sh new file mode 100644 index 000000000..d0bc49184 --- /dev/null +++ b/qa/scripts/utilCluster.sh @@ -0,0 +1,252 @@ +#!/bin/bash + +#path to the featurebase.conf file +CONFIG_FILE_PATH="/etc/featurebase.conf" +#path to the featurebase.service file +SERVICE_FILE_PATH="/etc/systemd/system/featurebase.service" + +#cluster prefix that was used +DEPLOYED_CLUSTER_PREFIX="" + +#cluster replica count that was used +DEPLOYED_CLUSTER_REPLICA_COUNT="" + +#List of deployed IPs for data nodes +DEPLOYED_DATA_IPS="" +DEPLOYED_DATA_IPS_LEN=0 + +#List of deployed IPs for ingest nodes +DEPLOYED_INGEST_IPS="" +DEPLOYED_INGEST_IPS_LEN=0 + +#Initial cluster string +INITIAL_CLUSTER="" + +writeFeatureBaseNodeServiceFile() { + echo "Writing featurebase.service file...index: $1, ip:$2" + NODEIDX=$1 + NODEIP=$2 + cat << EOT > featurebase.service +# Not Ansible managed + +[Unit] +Description="Service for FeatureBase" + +[Service] +RestartSec=30 +Restart=on-failure +EnvironmentFile= +User=molecula +ExecStart=/usr/local/bin/featurebase server -c /etc/featurebase.conf + +[Install] +EOT + + #echo "featurebase.service >>" + #cat featurebase.service + #echo "featurebase.service <<" + + scp -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" featurebase.service ec2-user@${NODEIP}: + if (( $? != 0 )) + then + echo "featurebase.service copy failed" + exit 1 + fi + + rm -f featurebase.service + + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo mv featurebase.service ${SERVICE_FILE_PATH}" +} + +writeFeatureBaseNodeConfigFile() { + echo "Writing featurebase.conf file...index: $1, ip:$2" + NODEIDX=$1 + NODEIP=$2 + cat << EOT > featurebase.conf +name = "p${NODEIDX}" +bind = "0.0.0.0:10101" +bind-grpc = "0.0.0.0:20101" + +data-dir = "/data/featurebase" +log-path = "/var/log/molecula/featurebase.log" + +max-file-count=900000 +max-map-count=900000 + +long-query-time = "10s" + +[postgres] + + bind = "localhost:55432" + +[cluster] + + name = "${DEPLOYED_CLUSTER_PREFIX}" + replicas = ${DEPLOYED_CLUSTER_REPLICA_COUNT} + +[etcd] + + listen-client-address = "http://${NODEIP}:10401" + listen-peer-address = "http://${NODEIP}:10301" + initial-cluster = "${INITIAL_CLUSTER}" + +[metric] + + service = "prometheus" +EOT + + #echo "featurebase.conf >>" + #cat featurebase.conf + #echo "featurebase.conf <<" + + scp -i ~/.ssh/gitlab-featurebase-ci.pem -o "StrictHostKeyChecking no" featurebase.conf ec2-user@${NODEIP}: + if (( $? != 0 )) + then + echo "featurebase.conf copy failed" + exit 1 + fi + rm -f featurebase.conf + + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo mv featurebase.conf ${CONFIG_FILE_PATH}" +} + +executeGeneralNodeConfigCommands() { + echo "Executing node config...index: $1, ip:$2" + NODEIDX=$1 + NODEIP=$2 + + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo mkdir /data" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo mkfs.ext4 /dev/nvme1n1" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo mount /dev/nvme1n1 /data" + + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo adduser molecula" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo mkdir /var/log/molecula" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo chown molecula /var/log/molecula" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo mkdir -p /data/featurebase" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo chown molecula /data/featurebase" + + + # TODO handle different archs + echo "Getting featurebase binary..." + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "curl --fail --header 'PRIVATE-TOKEN: ${TF_VAR_gitlab_token}' -o /home/ec2-user/featurebase_linux_arm64 https://gitlab.com/api/v4/projects/molecula%2Ffeaturebase/jobs/artifacts/${TF_VAR_branch}/raw/featurebase_linux_arm64?job=build%20for%20linux%20arm64" + if (( $? != 0 )) + then + echo "Unable to get featurebase binary" + exit 1 + fi + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "chown ec2-user:ec2-user /home/ec2-user/featurebase_linux_arm64" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "chmod ugo+x /home/ec2-user/featurebase_linux_arm64" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo mv /home/ec2-user/featurebase_linux_arm64 /usr/local/bin/featurebase" + + echo "featurebase binary copied." +} + +executeDataStartCommands() { + echo "executeDataStartCommands...index: $1, ip:$2" + NODEIDX=$1 + NODEIP=$2 + + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo systemctl daemon-reload" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo systemctl start featurebase" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo systemctl enable featurebase" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo systemctl status featurebase" +} + +startDataNodes() { + #now go thru loop again to start up each node + cnt=0 + for ip in $DEPLOYED_DATA_IPS + do + executeDataStartCommands $cnt $ip + cnt=$((cnt+1)) + done +} + +setupDataNode() { + echo "setting up node $1 at $2" + + writeFeatureBaseNodeConfigFile $1 $2 + writeFeatureBaseNodeServiceFile $1 $2 + executeGeneralNodeConfigCommands $1 $2 +} + +setupIngestNode() { + echo "setting up ingest node $1 at $2" + NODEIDX=$1 + NODEIP=$2 + + executeGeneralNodeConfigCommands $1 $2 + + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "sudo chown -R ec2-user /data" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "pip3 install -U pytest" + ssh -A -i ~/.ssh/gitlab-featurebase-ci.pem -o StrictHostKeyChecking=no ec2-user@${NODEIP} "pip3 install -U requests" +} + +setupDataNodes() { + cnt=0 + for ip in $DEPLOYED_DATA_IPS + do + setupDataNode $cnt $ip + cnt=$((cnt+1)) + done +} + +setupIngestNodes() { + cnt=0 + for ip in $DEPLOYED_INGEST_IPS + do + setupIngestNode $cnt $ip + cnt=$((cnt+1)) + done +} + +generateInitialClusterString() { + IFS=$'\n' + cnt=0 + for ip in $DEPLOYED_DATA_IPS + do + if (($cnt + 1 != $DEPLOYED_DATA_IPS_LEN)) + then + INITIAL_CLUSTER="${INITIAL_CLUSTER}p${cnt}=http://$ip:10301," + else + INITIAL_CLUSTER="${INITIAL_CLUSTER}p${cnt}=http://$ip:10301" + fi + cnt=$((cnt+1)) + done + + echo "INITIAL_CLUSTER: ${INITIAL_CLUSTER}" +} + +setupClusterNodes() { + DEPLOYED_CLUSTER_PREFIX=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.cluster_prefix][0]["value"]') + echo "Using DEPLOYED_CLUSTER_PREFIX: ${DEPLOYED_CLUSTER_PREFIX}" + + DEPLOYED_CLUSTER_REPLICA_COUNT=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.fb_cluster_replica_count][0]["value"]') + echo "Using DEPLOYED_CLUSTER_REPLICA_COUNT: ${DEPLOYED_CLUSTDEPLOYED_CLUSTER_REPLICA_COUNTER_PREFIX}" + + DEPLOYED_DATA_IPS=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.data_node_ips][0]["value"][]') + echo "DEPLOYED_DATA_IPS: {" + echo "${DEPLOYED_DATA_IPS}" + echo "}" + + DEPLOYED_DATA_IPS_LEN=`echo "$DEPLOYED_DATA_IPS" | wc -l` + + DEPLOYED_INGEST_IPS=$(cat ./qa/tf/ci/smoketest/outputs.json | jq -r '[.ingest_ips][0]["value"][]') + echo "DEPLOYED_INGEST_IPS: {" + echo "${DEPLOYED_INGEST_IPS}" + echo "}" + + DEPLOYED_INGEST_IPS_LEN=`echo "$DEPLOYED_INGEST_IPS" | wc -l` + + + #data nodes + generateInitialClusterString + + setupDataNodes + + startDataNodes + + #ingest nodes + setupIngestNodes + +} \ No newline at end of file diff --git a/qa/tf/.modules/featurebase-cluster/main.tf b/qa/tf/.modules/featurebase-cluster/main.tf index 79f574266..593ae0d29 100644 --- a/qa/tf/.modules/featurebase-cluster/main.tf +++ b/qa/tf/.modules/featurebase-cluster/main.tf @@ -46,7 +46,6 @@ resource "aws_instance" "fb_cluster_nodes" { Role = "cluster_node" } - user_data = base64encode(templatefile("${path.module}/setup_cluster_node.sh.tpl", { gitlab_token = var.gitlab_token, branch = var.branch, cluster_prefix = var.cluster_prefix, node_count = var.fb_data_node_count, fb_cluster_replica_count = var.fb_cluster_replica_count, region = var.region })) } resource "aws_instance" "fb_ingest" { @@ -79,7 +78,6 @@ resource "aws_instance" "fb_ingest" { Role = "ingest_node" } - user_data = base64encode(templatefile("${path.module}/setup_ingest_node.sh.tpl", { gitlab_token = var.gitlab_token, branch = var.branch, cluster_prefix = var.cluster_prefix, node_count = var.fb_ingest_node_count, this_node = count.index, region = var.region })) } resource "aws_key_pair" "gitlab-featurebase-ci" { diff --git a/qa/tf/.modules/featurebase-cluster/outputs.tf b/qa/tf/.modules/featurebase-cluster/outputs.tf index fd8847bc2..e1c21e2eb 100644 --- a/qa/tf/.modules/featurebase-cluster/outputs.tf +++ b/qa/tf/.modules/featurebase-cluster/outputs.tf @@ -6,6 +6,10 @@ output "data_node_ips" { value = aws_instance.fb_cluster_nodes.*.private_ip } -output "vpc_id" { - value = var.vpc_id -} \ No newline at end of file +output "cluster_prefix" { + value = var.cluster_prefix +} + +output "fb_cluster_replica_count" { + value = var.fb_cluster_replica_count +} diff --git a/qa/tf/.modules/featurebase-cluster/variables.tf b/qa/tf/.modules/featurebase-cluster/variables.tf index 01957116f..4d7762d7e 100644 --- a/qa/tf/.modules/featurebase-cluster/variables.tf +++ b/qa/tf/.modules/featurebase-cluster/variables.tf @@ -87,15 +87,6 @@ variable "profile" { type = string } -variable "gitlab_token" { - description = "Gitlab API token" - type = string -} - -variable "branch" { - description = "The branch we are on" - type = string -} variable "vpc_id" { description = "The VPC in which we will build the cluster" diff --git a/qa/tf/ci/smoketest/main.tf b/qa/tf/ci/smoketest/main.tf index a358080fd..3ebd5eb08 100644 --- a/qa/tf/ci/smoketest/main.tf +++ b/qa/tf/ci/smoketest/main.tf @@ -6,8 +6,6 @@ module "ci-cluster" { profile = var.profile fb_data_node_type = "m6g.large" fb_data_node_count = 1 - gitlab_token = var.gitlab_token - branch = var.branch vpc_id = "vpc-05a26a122f961dc2b" vpc_cidr_block = "10.0.0.0/16" vpc_public_subnets = ["subnet-066b4b922b54e51a2","subnet-037b8884269a69025","subnet-08482631514426210",] diff --git a/qa/tf/ci/smoketest/outputs.tf b/qa/tf/ci/smoketest/outputs.tf index adcc96dc9..886c6f783 100644 --- a/qa/tf/ci/smoketest/outputs.tf +++ b/qa/tf/ci/smoketest/outputs.tf @@ -6,4 +6,14 @@ output "ingest_ips" { output "data_node_ips" { description = "List of data node IPs" value = module.ci-cluster.data_node_ips -} \ No newline at end of file +} + +output "cluster_prefix" { + description = "The cluster prefix used" + value = module.ci-cluster.cluster_prefix +} + +output "fb_cluster_replica_count" { + description = "The cluster replica count used" + value = module.ci-cluster.fb_cluster_replica_count +} diff --git a/qa/tf/ci/smoketest/terraform.tfstate.backup b/qa/tf/ci/smoketest/terraform.tfstate.backup index 1827d6cfa..5bb4c8639 100644 --- a/qa/tf/ci/smoketest/terraform.tfstate.backup +++ b/qa/tf/ci/smoketest/terraform.tfstate.backup @@ -1,706 +1,8 @@ { "version": 4, "terraform_version": "1.1.2", - "serial": 64, + "serial": 178, "lineage": "0f5e8a05-0e94-e86f-f384-26086bd40585", - "outputs": { - "data_node_ips": { - "value": [ - "10.0.1.92" - ], - "type": [ - "tuple", - [ - "string" - ] - ] - }, - "ingest_ips": { - "value": [ - "18.119.132.64" - ], - "type": [ - "tuple", - [ - "string" - ] - ] - }, - "vpc_id": { - "value": "vpc-05a26a122f961dc2b", - "type": "string" - } - }, - "resources": [ - { - "module": "module.ci-cluster", - "mode": "data", - "type": "aws_ami", - "name": "amazon_linux_2", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "architecture": "arm64", - "arn": "arn:aws:ec2:us-east-2::image/ami-0b09f36be67d32fff", - "block_device_mappings": [ - { - "device_name": "/dev/xvda", - "ebs": { - "delete_on_termination": "true", - "encrypted": "false", - "iops": "0", - "snapshot_id": "snap-0617b00e90bae012b", - "throughput": "0", - "volume_size": "8", - "volume_type": "gp2" - }, - "no_device": "", - "virtual_name": "" - } - ], - "creation_date": "2021-12-01T19:36:11.000Z", - "description": "Amazon Linux 2 LTS Arm64 AMI 2.0.20211201.0 arm64 HVM gp2", - "ena_support": true, - "executable_users": null, - "filter": [ - { - "name": "architecture", - "values": [ - "arm64" - ] - }, - { - "name": "name", - "values": [ - "amzn2-ami-hvm-*" - ] - }, - { - "name": "virtualization-type", - "values": [ - "hvm" - ] - } - ], - "hypervisor": "xen", - "id": "ami-0b09f36be67d32fff", - "image_id": "ami-0b09f36be67d32fff", - "image_location": "amazon/amzn2-ami-hvm-2.0.20211201.0-arm64-gp2", - "image_owner_alias": "amazon", - "image_type": "machine", - "kernel_id": null, - "most_recent": true, - "name": "amzn2-ami-hvm-2.0.20211201.0-arm64-gp2", - "name_regex": null, - "owner_id": "137112412989", - "owners": [ - "amazon" - ], - "platform": null, - "platform_details": "Linux/UNIX", - "product_codes": [], - "public": true, - "ramdisk_id": null, - "root_device_name": "/dev/xvda", - "root_device_type": "ebs", - "root_snapshot_id": "snap-0617b00e90bae012b", - "sriov_net_support": "simple", - "state": "available", - "state_reason": { - "code": "UNSET", - "message": "UNSET" - }, - "tags": {}, - "usage_operation": "RunInstances", - "virtualization_type": "hvm" - }, - "sensitive_attributes": [] - } - ] - }, - { - "module": "module.ci-cluster", - "mode": "managed", - "type": "aws_iam_instance_profile", - "name": "fb_cluster_node_profile", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "arn": "arn:aws:iam::977373308795:instance-profile/fb_cluster_node_profile", - "create_date": "2022-01-07T22:01:54Z", - "id": "fb_cluster_node_profile", - "name": "fb_cluster_node_profile", - "name_prefix": null, - "path": "/", - "role": "fb_cluster_node", - "tags": null, - "tags_all": {}, - "unique_id": "AIPA6HD75E55U4UWVZABB" - }, - "sensitive_attributes": [], - "private": "bnVsbA==", - "dependencies": [ - "module.ci-cluster.aws_iam_role.fb_cluster_node_role" - ] - } - ] - }, - { - "module": "module.ci-cluster", - "mode": "managed", - "type": "aws_iam_role", - "name": "fb_cluster_node_role", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 0, - "attributes": { - "arn": "arn:aws:iam::977373308795:role/fb_cluster_node", - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ec2.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}", - "create_date": "2022-01-07T22:01:52Z", - "description": "", - "force_detach_policies": false, - "id": "fb_cluster_node", - "inline_policy": [ - { - "name": "ec2_read_all", - "policy": "{\"Statement\":[{\"Action\":[\"ec2:Describe*\"],\"Effect\":\"Allow\",\"Resource\":\"*\"}],\"Version\":\"2012-10-17\"}" - } - ], - "managed_policy_arns": [], - "max_session_duration": 3600, - "name": "fb_cluster_node", - "name_prefix": "", - "path": "/", - "permissions_boundary": null, - "tags": null, - "tags_all": {}, - "unique_id": "AROA6HD75E55VPUUN47EM" - }, - "sensitive_attributes": [], - "private": "bnVsbA==" - } - ] - }, - { - "module": "module.ci-cluster", - "mode": "managed", - "type": "aws_instance", - "name": "fb_cluster_nodes", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "ami": "ami-0b09f36be67d32fff", - "arn": "arn:aws:ec2:us-east-2:977373308795:instance/i-018646ae2723b9266", - "associate_public_ip_address": false, - "availability_zone": "us-east-2a", - "capacity_reservation_specification": [ - { - "capacity_reservation_preference": "open", - "capacity_reservation_target": [] - } - ], - "cpu_core_count": 2, - "cpu_threads_per_core": 1, - "credit_specification": [], - "disable_api_termination": false, - "ebs_block_device": [ - { - "delete_on_termination": true, - "device_name": "/dev/sdb", - "encrypted": false, - "iops": 3000, - "kms_key_id": "", - "snapshot_id": "", - "tags": {}, - "throughput": 125, - "volume_id": "vol-064dca608db210bf4", - "volume_size": 100, - "volume_type": "gp3" - } - ], - "ebs_optimized": false, - "enclave_options": [ - { - "enabled": false - } - ], - "ephemeral_block_device": [], - "get_password_data": false, - "hibernation": false, - "host_id": null, - "iam_instance_profile": "fb_cluster_node_profile", - "id": "i-018646ae2723b9266", - "instance_initiated_shutdown_behavior": "stop", - "instance_state": "running", - "instance_type": "m6g.large", - "ipv6_address_count": 0, - "ipv6_addresses": [], - "key_name": "gitlab-featurebase-ci", - "launch_template": [], - "metadata_options": [ - { - "http_endpoint": "enabled", - "http_put_response_hop_limit": 1, - "http_tokens": "optional" - } - ], - "monitoring": true, - "network_interface": [], - "outpost_arn": "", - "password_data": "", - "placement_group": "", - "placement_partition_number": null, - "primary_network_interface_id": "eni-013fb4dd776a4ca48", - "private_dns": "ip-10-0-1-92.us-east-2.compute.internal", - "private_ip": "10.0.1.92", - "public_dns": "", - "public_ip": "", - "root_block_device": [ - { - "delete_on_termination": true, - "device_name": "/dev/xvda", - "encrypted": false, - "iops": 3000, - "kms_key_id": "", - "tags": null, - "throughput": 125, - "volume_id": "vol-008d2b71268dd84e3", - "volume_size": 20, - "volume_type": "gp3" - } - ], - "secondary_private_ips": [], - "security_groups": [], - "source_dest_check": true, - "subnet_id": "subnet-050b1219d78f2db1b", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV-featurebase-cluster-0", - "Prefix": "smoke-X8A0attf2zz6EhnV", - "Role": "cluster_node" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV-featurebase-cluster-0", - "Prefix": "smoke-X8A0attf2zz6EhnV", - "Role": "cluster_node" - }, - "tenancy": "default", - "timeouts": null, - "user_data": "efedaaed014dc69321f5e633ebc5dc436baf7b1e", - "user_data_base64": null, - "volume_tags": null, - "vpc_security_group_ids": [ - "sg-014eb096b1eee30a5" - ] - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMDB9LCJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", - "dependencies": [ - "module.ci-cluster.aws_iam_instance_profile.fb_cluster_node_profile", - "module.ci-cluster.aws_iam_role.fb_cluster_node_role", - "module.ci-cluster.aws_key_pair.gitlab-featurebase-ci", - "module.ci-cluster.aws_security_group.featurebase", - "module.ci-cluster.data.aws_ami.amazon_linux_2" - ] - } - ] - }, - { - "module": "module.ci-cluster", - "mode": "managed", - "type": "aws_instance", - "name": "fb_ingest", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 1, - "attributes": { - "ami": "ami-0b09f36be67d32fff", - "arn": "arn:aws:ec2:us-east-2:977373308795:instance/i-013fde620a82c4102", - "associate_public_ip_address": true, - "availability_zone": "us-east-2a", - "capacity_reservation_specification": [ - { - "capacity_reservation_preference": "open", - "capacity_reservation_target": [] - } - ], - "cpu_core_count": 8, - "cpu_threads_per_core": 1, - "credit_specification": [], - "disable_api_termination": false, - "ebs_block_device": [ - { - "delete_on_termination": true, - "device_name": "/dev/sdb", - "encrypted": false, - "iops": 3000, - "kms_key_id": "", - "snapshot_id": "", - "tags": {}, - "throughput": 125, - "volume_id": "vol-0bd5eaddda4e19de5", - "volume_size": 100, - "volume_type": "gp3" - } - ], - "ebs_optimized": false, - "enclave_options": [ - { - "enabled": false - } - ], - "ephemeral_block_device": [], - "get_password_data": false, - "hibernation": false, - "host_id": null, - "iam_instance_profile": "fb_cluster_node_profile", - "id": "i-013fde620a82c4102", - "instance_initiated_shutdown_behavior": "stop", - "instance_state": "running", - "instance_type": "c6g.2xlarge", - "ipv6_address_count": 0, - "ipv6_addresses": [], - "key_name": "gitlab-featurebase-ci", - "launch_template": [], - "metadata_options": [ - { - "http_endpoint": "enabled", - "http_put_response_hop_limit": 1, - "http_tokens": "optional" - } - ], - "monitoring": true, - "network_interface": [], - "outpost_arn": "", - "password_data": "", - "placement_group": "", - "placement_partition_number": null, - "primary_network_interface_id": "eni-0bfb2b924677bd7bd", - "private_dns": "ip-10-0-101-31.us-east-2.compute.internal", - "private_ip": "10.0.101.31", - "public_dns": "", - "public_ip": "18.119.132.64", - "root_block_device": [ - { - "delete_on_termination": true, - "device_name": "/dev/xvda", - "encrypted": false, - "iops": 3000, - "kms_key_id": "", - "tags": null, - "throughput": 125, - "volume_id": "vol-0f2c177cb0a77aecc", - "volume_size": 20, - "volume_type": "gp3" - } - ], - "secondary_private_ips": [], - "security_groups": [], - "source_dest_check": true, - "subnet_id": "subnet-066b4b922b54e51a2", - "tags": { - "Name": "smoke-X8A0attf2zz6EhnV-featurebase-ingest-0", - "Prefix": "smoke-X8A0attf2zz6EhnV", - "Role": "ingest_node" - }, - "tags_all": { - "Name": "smoke-X8A0attf2zz6EhnV-featurebase-ingest-0", - "Prefix": "smoke-X8A0attf2zz6EhnV", - "Role": "ingest_node" - }, - "tenancy": "default", - "timeouts": null, - "user_data": "38da76e780fedb19ef551fe9d3c84540d1823453", - "user_data_base64": null, - "volume_tags": null, - "vpc_security_group_ids": [ - "sg-04e315d7b9ace5146" - ] - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6MTIwMDAwMDAwMDAwMCwidXBkYXRlIjo2MDAwMDAwMDAwMDB9LCJzY2hlbWFfdmVyc2lvbiI6IjEifQ==", - "dependencies": [ - "module.ci-cluster.aws_iam_instance_profile.fb_cluster_node_profile", - "module.ci-cluster.aws_iam_role.fb_cluster_node_role", - "module.ci-cluster.aws_key_pair.gitlab-featurebase-ci", - "module.ci-cluster.aws_security_group.ingest", - "module.ci-cluster.data.aws_ami.amazon_linux_2" - ] - } - ] - }, - { - "module": "module.ci-cluster", - "mode": "managed", - "type": "aws_key_pair", - "name": "gitlab-featurebase-ci", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:977373308795:key-pair/gitlab-featurebase-ci", - "fingerprint": "69:e5:4b:15:8d:1f:22:61:de:08:a9:ee:f3:29:5c:69", - "id": "gitlab-featurebase-ci", - "key_name": "gitlab-featurebase-ci", - "key_name_prefix": "", - "key_pair_id": "key-059c3d744adf3c048", - "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC91hhpVHNonAG7ku2ugpxEskf9KHeyHJPQJT26OHrMUw7R+T5A8TjqSzTau07sXQ/E9SO3ebV8SJ5PqeaQOnQB8VEvVNK0DjQH7ppvNg1Rfs42FZT9ttzTMvOjsSbK3vZTHXdoKQEdC9NxBwSkFIRGQojK1HUOq9xGrw31fA1OjSwlpLcbx7yyg18lcqW6UOptnVR8U9Yy9qQ5jZF1HtkQ6L9J+gv4o1UyNAUK2bopeGiXpBc3PQ/CFaFT2h/aqLBP66qAHsHVyAFD3PIRtplC5EHa8jXDgLacEls0uF7Q3kRPxvzcuo4g4VkOn1rDy9qH3vd2hT3aKVnM73FIDUiL", - "tags": null, - "tags_all": {} - }, - "sensitive_attributes": [], - "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==" - } - ] - }, - { - "module": "module.ci-cluster", - "mode": "managed", - "type": "aws_security_group", - "name": "featurebase", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:977373308795:security-group/sg-014eb096b1eee30a5", - "description": "Allow featurebase inbound traffic", - "egress": [ - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "", - "from_port": 0, - "ipv6_cidr_blocks": [ - "::/0" - ], - "prefix_list_ids": [], - "protocol": "-1", - "security_groups": [], - "self": false, - "to_port": 0 - } - ], - "id": "sg-014eb096b1eee30a5", - "ingress": [ - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "SSH", - "from_port": 22, - "ipv6_cidr_blocks": [ - "::/0" - ], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 22 - }, - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "icmp from Anywhere", - "from_port": -1, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "icmp", - "security_groups": [], - "self": false, - "to_port": -1 - }, - { - "cidr_blocks": [ - "10.0.0.0/16" - ], - "description": "etcd from internal 2", - "from_port": 10401, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 10401 - }, - { - "cidr_blocks": [ - "10.0.0.0/16" - ], - "description": "etcd from internal", - "from_port": 10301, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 10301 - }, - { - "cidr_blocks": [ - "10.0.0.0/8", - "172.31.0.0/16" - ], - "description": "GRPC from Internal", - "from_port": 20101, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 20101 - }, - { - "cidr_blocks": [ - "10.0.0.0/8", - "172.31.0.0/16" - ], - "description": "HTTP from Internal", - "from_port": 10101, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 10101 - }, - { - "cidr_blocks": [ - "10.0.0.0/8", - "172.31.0.0/16" - ], - "description": "PostgreSQL from Internal", - "from_port": 55432, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 55432 - } - ], - "name": "allow_featurebase", - "name_prefix": "", - "owner_id": "977373308795", - "revoke_rules_on_delete": false, - "tags": { - "Name": "allow_featurebase" - }, - "tags_all": { - "Name": "allow_featurebase" - }, - "timeouts": null, - "vpc_id": "vpc-05a26a122f961dc2b" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=" - } - ] - }, - { - "module": "module.ci-cluster", - "mode": "managed", - "type": "aws_security_group", - "name": "ingest", - "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]", - "instances": [ - { - "schema_version": 1, - "attributes": { - "arn": "arn:aws:ec2:us-east-2:977373308795:security-group/sg-04e315d7b9ace5146", - "description": "Allow ingest inbound traffic", - "egress": [ - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "", - "from_port": 0, - "ipv6_cidr_blocks": [ - "::/0" - ], - "prefix_list_ids": [], - "protocol": "-1", - "security_groups": [], - "self": false, - "to_port": 0 - } - ], - "id": "sg-04e315d7b9ace5146", - "ingress": [ - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "", - "from_port": 10101, - "ipv6_cidr_blocks": [ - "::/0" - ], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 10101 - }, - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "SSH", - "from_port": 22, - "ipv6_cidr_blocks": [ - "::/0" - ], - "prefix_list_ids": [], - "protocol": "tcp", - "security_groups": [], - "self": false, - "to_port": 22 - }, - { - "cidr_blocks": [ - "0.0.0.0/0" - ], - "description": "icmp from Anywhere", - "from_port": -1, - "ipv6_cidr_blocks": [], - "prefix_list_ids": [], - "protocol": "icmp", - "security_groups": [], - "self": false, - "to_port": -1 - } - ], - "name": "allow_ingest", - "name_prefix": "", - "owner_id": "977373308795", - "revoke_rules_on_delete": false, - "tags": { - "Name": "allow_ingest" - }, - "tags_all": { - "Name": "allow_ingest" - }, - "timeouts": null, - "vpc_id": "vpc-05a26a122f961dc2b" - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6OTAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0=" - } - ] - } - ] + "outputs": {}, + "resources": [] } diff --git a/qa/tf/gauntlet/samsung/main.tf b/qa/tf/gauntlet/samsung/main.tf index 0c9831626..a4bdd2321 100644 --- a/qa/tf/gauntlet/samsung/main.tf +++ b/qa/tf/gauntlet/samsung/main.tf @@ -9,8 +9,6 @@ module "samsung-cluster" { fb_ingest_type = "m6g.large" fb_ingest_disk_iops = 10000 fb_ingest_node_count = 1 - gitlab_token = var.gitlab_token - branch = var.branch vpc_id = "vpc-05a26a122f961dc2b" vpc_cidr_block = "10.0.0.0/16" vpc_public_subnets = ["subnet-066b4b922b54e51a2","subnet-037b8884269a69025","subnet-08482631514426210",] diff --git a/qa/tf/gauntlet/samsung/outputs.tf b/qa/tf/gauntlet/samsung/outputs.tf index 0c405bed0..c00860a34 100644 --- a/qa/tf/gauntlet/samsung/outputs.tf +++ b/qa/tf/gauntlet/samsung/outputs.tf @@ -6,4 +6,14 @@ output "ingest_ips" { output "data_node_ips" { description = "List of data node IPs" value = module.samsung-cluster.data_node_ips -} \ No newline at end of file +} + +output "cluster_prefix" { + description = "The cluster prefix used" + value = module.samsung-cluster.cluster_prefix +} + +output "fb_cluster_replica_count" { + description = "The cluster replica count used" + value = module.samsung-cluster.fb_cluster_replica_count +} From a5c36d5c21e0d9179da2fd3ea4f33d046ddbfbf3 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Sat, 8 Jan 2022 16:00:46 -0600 Subject: [PATCH 11/12] remove un-needed files --- .../setup_cluster_node.sh.tpl | 188 ------------------ .../setup_ingest_node.sh.tpl | 72 ------- 2 files changed, 260 deletions(-) delete mode 100644 qa/tf/.modules/featurebase-cluster/setup_cluster_node.sh.tpl delete mode 100644 qa/tf/.modules/featurebase-cluster/setup_ingest_node.sh.tpl diff --git a/qa/tf/.modules/featurebase-cluster/setup_cluster_node.sh.tpl b/qa/tf/.modules/featurebase-cluster/setup_cluster_node.sh.tpl deleted file mode 100644 index 9a7e71a93..000000000 --- a/qa/tf/.modules/featurebase-cluster/setup_cluster_node.sh.tpl +++ /dev/null @@ -1,188 +0,0 @@ -#!/bin/bash - -#path to the featurebase.conf file -CONFIG_FILE_PATH="/etc/featurebase.conf" -#path to the featurebase.service file -SERVICE_FILE_PATH="/etc/systemd/system/featurebase.service" - -AWS_INSTANCE_ID="" -#IP of this node -PRIVATE_IP="" -PRIVATE_IP_INDEX=-1 -#IPs of the cluster -CLUSTER_IPS="" - -get_aws_instance_id() { - echo "Getting AWS instance ID..." - while true - do - curl -s http://169.254.169.254/latest/meta-data/instance-id > /dev/null - if [ $? -eq 0 ] - then - break - fi - done - AWS_INSTANCE_ID=`curl http://169.254.169.254/latest/meta-data/instance-id` - echo "AWS instance ID is: $${AWS_INSTANCE_ID}" -} - -wait_on_all_cluster_ips() { - echo "Waiting on all cluster IPs..." - # get IP for node - IPS=$(aws ec2 describe-instances --filters "Name=instance-state-name, Values=running" "Name=tag:Role, Values=cluster_node" "Name=tag:Prefix, Values=${cluster_prefix}" --query 'Reservations[*].Instances[*].PrivateIpAddress' --output text --region ${region}) - IP_LENGTH=`echo "$IPS" | wc -l` - - for i in {0..24} - do - echo "Comparing $${IP_LENGTH} with ${node_count}" - if [ $IP_LENGTH == "${node_count}" ]; then - echo "Cluster is up after $${i} tries." - break - fi - sleep 10s - done - - if [ $IP_LENGTH != "${node_count}" ]; then - echo "Timed out waiting for cluster to be available $${IP_LENGTH} actual nodes compared with ${node_count} desire nodes." - exit 1 - fi -} - -get_private_ip() { - echo "Getting private IP address..." - PRIVATE_IP=$(aws ec2 describe-instances --filters "Name=instance-state-name, Values=running" "Name=instance-id,Values=$${AWS_INSTANCE_ID}" --query 'Reservations[*].Instances[*].PrivateIpAddress' --output text --region ${region}) - echo "Private IP is $${PRIVATE_IP}" -} - -get_cluster_ips() { - echo "Getting cluster IPs..." - # get IP for node - IPS=$(aws ec2 describe-instances --filters "Name=instance-state-name, Values=running" "Name=tag:Role, Values=cluster_node" "Name=tag:Prefix, Values=${cluster_prefix}" --query 'Reservations[*].Instances[*].PrivateIpAddress' --output text --region ${region}) - IP_LENGTH=`echo "$IPS" | wc -l` - - IFS=$'\n' - cnt=0 - for ip in $IPS - do - echo $cnt $ip - if (($cnt + 1 != $IP_LENGTH)) - then - CLUSTER_IPS="$${CLUSTER_IPS}p$${cnt}=http://$ip:10301," - else - CLUSTER_IPS="$${CLUSTER_IPS}p$${cnt}=http://$ip:10301" - fi - echo "comparing $ip to $PRIVATE_IP" - if [ "$ip" = "$PRIVATE_IP" ]; then - PRIVATE_IP_INDEX=$cnt - fi - cnt=$((cnt+1)) - done - - echo "CLUSTER_IPS are: $${CLUSTER_IPS}" -} - -write_featurebase_config_file() { - echo "Writing featurebase.conf file..." - cat << EOT > $${CONFIG_FILE_PATH} -name = "p$${PRIVATE_IP_INDEX}" -bind = "0.0.0.0:10101" -bind-grpc = "0.0.0.0:20101" - -data-dir = "/data/featurebase" -log-path = "/var/log/molecula/featurebase.log" - -max-file-count=900000 -max-map-count=900000 - -long-query-time = "10s" - -[postgres] - - bind = "localhost:55432" - -[cluster] - - name = "${cluster_prefix}" - replicas = ${fb_cluster_replica_count} - -[etcd] - - listen-client-address = "http://$${PRIVATE_IP}:10401" - listen-peer-address = "http://$${PRIVATE_IP}:10301" - initial-cluster = "$${CLUSTER_IPS}" - -[metric] - - service = "prometheus" -EOT - - echo "featurebase.conf written to $${CONFIG_FILE_PATH}." -} - -write_featurebase_service_file() { - echo "Writing featurebase.service file..." - cat << EOT > $${SERVICE_FILE_PATH} -# Not Ansible managed - -[Unit] -Description="Service for FeatureBase" - -[Service] -RestartSec=30 -Restart=on-failure -EnvironmentFile= -User=molecula -ExecStart=/usr/local/bin/featurebase server -c /etc/featurebase.conf - -[Install] -EOT - - echo "featurebase.service written to $${SERVICE_FILE_PATH}." - -} - -#get the instance id -get_aws_instance_id - -#copy the script so we can look at it later if needed -sudo cp /var/lib/cloud/instances/$${AWS_INSTANCE_ID}/user-data.txt /home/ec2-user/setup_cluster_node.sh - -#wait for the count of nodes to equal requested nodes -wait_on_all_cluster_ips - -#get private ip -get_private_ip - -#generate cluster ips -get_cluster_ips - -#write the featurebase config file -write_featurebase_config_file - -#write the featurebase service file -write_featurebase_service_file - -#get the featurebase binary and put in in the right spot -echo "Getting featurebase binary..." -curl --fail --header "PRIVATE-TOKEN: ${gitlab_token}" -o "/home/ec2-user/featurebase_linux_arm64" https://gitlab.com/api/v4/projects/molecula%2Ffeaturebase/jobs/artifacts/${branch}/raw/featurebase_linux_arm64?job=build%20for%20linux%20arm64 -chown ec2-user:ec2-user "/home/ec2-user/featurebase_linux_arm64" -chmod ugo+x "/home/ec2-user/featurebase_linux_arm64" - -mv /home/ec2-user/featurebase_linux_arm64 /usr/local/bin/featurebase -echo "featurebase binary copied." - -sudo mkdir /data -sudo mkfs.ext4 /dev/nvme1n1 -sudo mount /dev/nvme1n1 /data - -adduser molecula -sudo mkdir /var/log/molecula -sudo chown molecula /var/log/molecula -sudo mkdir -p /data/featurebase -sudo chown molecula /data/featurebase -sudo systemctl daemon-reload -sudo systemctl start featurebase -sudo systemctl enable featurebase -sudo systemctl status featurebase - -echo "Done!" \ No newline at end of file diff --git a/qa/tf/.modules/featurebase-cluster/setup_ingest_node.sh.tpl b/qa/tf/.modules/featurebase-cluster/setup_ingest_node.sh.tpl deleted file mode 100644 index 8c032f0e5..000000000 --- a/qa/tf/.modules/featurebase-cluster/setup_ingest_node.sh.tpl +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -AWS_INSTANCE_ID="" - -get_aws_instance_id() { - echo "Getting AWS instance ID..." - while true - do - curl -s http://169.254.169.254/latest/meta-data/instance-id > /dev/null - if [ $? -eq 0 ] - then - break - fi - done - AWS_INSTANCE_ID=`curl http://169.254.169.254/latest/meta-data/instance-id` - echo "AWS instance ID is: $${AWS_INSTANCE_ID}" -} - -wait_on_all_ingest_ips() { - echo "Waiting on all cluster IPs..." - # get IP for node - IPS=$(aws ec2 describe-instances --filters "Name=instance-state-name, Values=running" "Name=tag:Role, Values=ingest_node" "Name=tag:Prefix, Values=${cluster_prefix}" --query 'Reservations[*].Instances[*].PrivateIpAddress' --output text --region ${region}) - IP_LENGTH=`echo "$IPS" | wc -l` - - for i in {0..24} - do - echo "Comparing $${IP_LENGTH} with ${node_count}" - if [ $IP_LENGTH == "${node_count}" ]; then - echo "Cluster is up after $${i} tries." - break - fi - sleep 10s - done - - if [ $IP_LENGTH != "${node_count}" ]; then - echo "Timed out waiting for cluster to be available $${IP_LENGTH} actual nodes compared with ${node_count} desire nodes." - exit 1 - fi -} - -#copy the script so we can look at it later if needed -sudo cp /var/lib/cloud/instances/$${AWS_INSTANCE_ID}/user-data.txt ~/setup_ingest_node.sh - -#get the instance id -get_aws_instance_id - -#wait for the count of nodes to equal requested nodes -wait_on_all_ingest_ips - -echo "Getting featurebase binary..." -curl --fail --header "PRIVATE-TOKEN: ${gitlab_token}" -o "/home/ec2-user/featurebase_linux_arm64" https://gitlab.com/api/v4/projects/molecula%2Ffeaturebase/jobs/artifacts/${branch}/raw/featurebase_linux_arm64?job=build%20for%20linux%20arm64 -chown ec2-user:ec2-user "/home/ec2-user/featurebase_linux_arm64" -chmod ugo+x "/home/ec2-user/featurebase_linux_arm64" - -mv /home/ec2-user/featurebase_linux_arm64 /usr/local/bin/featurebase -echo "featurebase binary copied." - - -sudo mkdir /data -sudo mkfs.ext4 /dev/nvme1n1 -sudo mount /dev/nvme1n1 /data - -sudo chown -R ec2-user /data - -echo "Installing pytest" -pip3 install -U pytest -pip3 install -U requests - -echo "Done." - - - From 6dee0d1ec28855a7a0cd4448a681ff980693a3c0 Mon Sep 17 00:00:00 2001 From: pokeeffe-molecula Date: Sat, 8 Jan 2022 16:42:23 -0600 Subject: [PATCH 12/12] changes --- qa/testcases/smoketest/test_smoke.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/testcases/smoketest/test_smoke.py b/qa/testcases/smoketest/test_smoke.py index 954dbfd26..08d266dc5 100644 --- a/qa/testcases/smoketest/test_smoke.py +++ b/qa/testcases/smoketest/test_smoke.py @@ -4,4 +4,4 @@ def inc(x): def test_answer(): - assert inc(3) == 6 \ No newline at end of file + assert inc(3) == 1 \ No newline at end of file