From 970a0beaa8470c8e5c1c93566a562bdbdbb09b4c Mon Sep 17 00:00:00 2001 From: kevinjwa6112 <154457097+kevinjwa6112@users.noreply.github.com> Date: Wed, 6 Mar 2024 12:19:10 -0800 Subject: [PATCH] Cross region tests 1c, 2c (#88) Adding UDP/TCP tests for the cross region VM-VM and VM-LB-VM --------- Co-authored-by: Sumanth Reddy Chinna Pullaiah (from Dev Box) Co-authored-by: Sumanth Reddy CH <38838077+sumanthreddy29@users.noreply.github.com> --- modules/terraform/azure/variables.tf | 2 +- .../bash-scripts/client-userdata.sh | 7 + .../bash-scripts/server-userdata.sh | 14 ++ .../terraform-inputs/aws-us-east-2.tfvars | 59 +++++++++ .../terraform-inputs/aws-us-west-1.tfvars | 120 +++++++++++++++++ .../terraform-inputs/azure-eastus2.tfvars | 80 ++++++++++++ .../terraform-inputs/azure-westus2.tfvars | 120 +++++++++++++++++ .../terraform-test-inputs/aws-us-east-2.json | 6 + .../terraform-test-inputs/aws-us-west-1.json | 6 + .../terraform-test-inputs/azure-eastus2.json | 7 + .../terraform-test-inputs/azure-westus2.json | 7 + .../bash-scripts/client-userdata.sh | 7 + .../bash-scripts/server-userdata.sh | 10 ++ .../terraform-inputs/aws-us-east-2.tfvars | 47 +++++++ .../terraform-inputs/aws-us-west-1.tfvars | 119 +++++++++++++++++ .../terraform-inputs/azure-eastus2.tfvars | 79 +++++++++++ .../terraform-inputs/azure-westus2.tfvars | 123 ++++++++++++++++++ .../terraform-test-inputs/aws-us-east-2.json | 6 + .../terraform-test-inputs/aws-us-west-1.json | 6 + .../terraform-test-inputs/azure-eastus2.json | 7 + .../terraform-test-inputs/azure-westus2.json | 7 + 21 files changed, 838 insertions(+), 1 deletion(-) create mode 100644 scenarios/perf-eval/lb-cross-region-iperf/bash-scripts/client-userdata.sh create mode 100644 scenarios/perf-eval/lb-cross-region-iperf/bash-scripts/server-userdata.sh create mode 100644 scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/aws-us-east-2.tfvars create mode 100644 scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/aws-us-west-1.tfvars create mode 100644 scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/azure-eastus2.tfvars create mode 100644 scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/azure-westus2.tfvars create mode 100644 scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/aws-us-east-2.json create mode 100644 scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/aws-us-west-1.json create mode 100644 scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/azure-eastus2.json create mode 100644 scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/azure-westus2.json create mode 100644 scenarios/perf-eval/vm-cross-region-iperf/bash-scripts/client-userdata.sh create mode 100644 scenarios/perf-eval/vm-cross-region-iperf/bash-scripts/server-userdata.sh create mode 100644 scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/aws-us-east-2.tfvars create mode 100644 scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/aws-us-west-1.tfvars create mode 100644 scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/azure-eastus2.tfvars create mode 100644 scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/azure-westus2.tfvars create mode 100644 scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/aws-us-east-2.json create mode 100644 scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/aws-us-west-1.json create mode 100644 scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/azure-eastus2.json create mode 100644 scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/azure-westus2.json diff --git a/modules/terraform/azure/variables.tf b/modules/terraform/azure/variables.tf index 3ff863afc..5b4dd35de 100644 --- a/modules/terraform/azure/variables.tf +++ b/modules/terraform/azure/variables.tf @@ -270,4 +270,4 @@ variable "private_link_conf" { pe_subnet_name = string }) default = null -} \ No newline at end of file +} diff --git a/scenarios/perf-eval/lb-cross-region-iperf/bash-scripts/client-userdata.sh b/scenarios/perf-eval/lb-cross-region-iperf/bash-scripts/client-userdata.sh new file mode 100644 index 000000000..129a2cb5a --- /dev/null +++ b/scenarios/perf-eval/lb-cross-region-iperf/bash-scripts/client-userdata.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +sudo perl -pi -e 's/^#?Port 22$/Port 2222/' /etc/ssh/sshd_config +sudo service ssh restart + +sudo apt-get update +sudo apt-get install iperf -y \ No newline at end of file diff --git a/scenarios/perf-eval/lb-cross-region-iperf/bash-scripts/server-userdata.sh b/scenarios/perf-eval/lb-cross-region-iperf/bash-scripts/server-userdata.sh new file mode 100644 index 000000000..c3ee06d00 --- /dev/null +++ b/scenarios/perf-eval/lb-cross-region-iperf/bash-scripts/server-userdata.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +sudo perl -pi -e 's/^#?Port 22$/Port 2222/' /etc/ssh/sshd_config +sudo service ssh restart + +sudo apt-get update +sudo apt-get install iperf -y + +for i in {0..1} +do + nohup iperf --server --port "2000$i" &> /dev/null & +done + +nohup iperf --server --udp --port 20002 &> /dev/null & \ No newline at end of file diff --git a/scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/aws-us-east-2.tfvars b/scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/aws-us-east-2.tfvars new file mode 100644 index 000000000..93325a815 --- /dev/null +++ b/scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/aws-us-east-2.tfvars @@ -0,0 +1,59 @@ +scenario_type = "perf-eval" +scenario_name = "lb-cross-region-iperf" +deletion_delay = "2h" +network_config_list = [ + { + role = "network" + vpc_name = "us-east-2-vpc" + vpc_cidr_block = "10.2.0.0/16" + subnet = [ + { + name = "us-east-2-client-subnet" + cidr_block = "10.2.1.0/24" + zone_suffix = "a" + } + ] + security_group_name = "us-east-2-sg" + route_table_cidr_block = "0.0.0.0/0" + sg_rules = { + ingress = [ + { + from_port = 2222 + to_port = 2222 + protocol = "tcp" + cidr_block = "0.0.0.0/0" + }, + { + from_port = 20001 + to_port = 20001 + protocol = "tcp" + cidr_block = "0.0.0.0/0" + }, + { + from_port = 20002 + to_port = 20002 + protocol = "udp" + cidr_block = "0.0.0.0/0" + } + ] + egress = [ + { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_block = "0.0.0.0/0" + } + ] + } + }, +] +loadbalancer_config_list = [] +vm_config_list = [{ + vm_name = "client-vm" + role = "client" + subnet_name = "us-east-2-client-subnet" + security_group_name = "us-east-2-sg" + associate_public_ip_address = true + zone_suffix = "a" + } +] \ No newline at end of file diff --git a/scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/aws-us-west-1.tfvars b/scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/aws-us-west-1.tfvars new file mode 100644 index 000000000..bf98e9b98 --- /dev/null +++ b/scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/aws-us-west-1.tfvars @@ -0,0 +1,120 @@ +scenario_type = "perf-eval" +scenario_name = "lb-cross-region-iperf" +deletion_delay = "2h" +network_config_list = [ + { + role = "network" + vpc_name = "us-west-1-vpc" + vpc_cidr_block = "10.2.0.0/16" + subnet = [ + { + name = "us-west-1-server-subnet" + cidr_block = "10.2.2.0/24" + zone_suffix = "c" + } + ] + security_group_name = "us-west-1-sg" + route_table_cidr_block = "0.0.0.0/0" + sg_rules = { + ingress = [ + { + from_port = 2222 + to_port = 2222 + protocol = "tcp" + cidr_block = "0.0.0.0/0" + }, + { + from_port = 20000 + to_port = 20000 + protocol = "tcp" + cidr_block = "0.0.0.0/0" + }, + { + from_port = 20001 + to_port = 20001 + protocol = "tcp" + cidr_block = "0.0.0.0/0" + }, + { + from_port = 20002 + to_port = 20002 + protocol = "udp" + cidr_block = "0.0.0.0/0" + } + ] + egress = [ + { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_block = "0.0.0.0/0" + } + ] + } + }, +] +loadbalancer_config_list = [{ + role = "ingress" + vpc_name = "us-west-1-vpc" + subnet_name = "us-west-1-server-subnet" + load_balancer_type = "network" + lb_target_group = [{ + role = "nlb-tg" + tg_suffix = "tcp" + port = 20001 + protocol = "TCP" + rule_count = 1 + vpc_name = "us-west-1-vpc" + health_check = { + port = "20000" + protocol = "TCP" + interval = 10 + timeout = 10 + healthy_threshold = 2 + unhealthy_threshold = 2 + } + lb_listener = { + port = 20001 + protocol = "TCP" + } + lb_target_group_attachment = { + vm_name = "server-vm" + port = 20001 + } + }, + { + role = "nlb-tg" + tg_suffix = "udp" + port = 20002 + protocol = "UDP" + rule_count = 1 + vpc_name = "us-west-1-vpc" + health_check = { + port = "20000" + protocol = "TCP" + interval = 10 + timeout = 10 + healthy_threshold = 2 + unhealthy_threshold = 2 + } + lb_listener = { + port = 20002 + protocol = "UDP" + } + lb_target_group_attachment = { + vm_name = "server-vm" + port = 20002 + } + } + ] +}] +vm_config_list = [ + { + vm_name = "server-vm" + role = "server" + subnet_name = "us-west-1-server-subnet" + security_group_name = "us-west-1-sg" + associate_public_ip_address = true + zone_suffix = "c" + } +] \ No newline at end of file diff --git a/scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/azure-eastus2.tfvars b/scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/azure-eastus2.tfvars new file mode 100644 index 000000000..2ae350a7b --- /dev/null +++ b/scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/azure-eastus2.tfvars @@ -0,0 +1,80 @@ +scenario_type = "perf-eval" +scenario_name = "vm-cross-region-iperf" +deletion_delay = "2h" +public_ip_config_list = [ + { + name = "egress-pip" + } +] +network_config_list = [ + { + role = "network" + vnet_name = "eastus2-vnet" + vnet_address_space = "10.2.0.0/16" + subnet = [{ + name = "eastus2-subnet" + address_prefix = "10.2.1.0/24" + }] + network_security_group_name = "eastus2-nsg" + nic_public_ip_associations = [ + { + nic_name = "client-nic" + subnet_name = "eastus2-subnet" + ip_configuration_name = "client-ipconfig" + public_ip_name = "egress-pip" + } + ] + nsr_rules = [{ + name = "nsr-ssh" + priority = 100 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "2222" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "nsr-tcp" + priority = 101 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "20001-20001" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "nsr-udp" + priority = 102 + direction = "Inbound" + access = "Allow" + protocol = "Udp" + source_port_range = "*" + destination_port_range = "20002-20002" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] + } +] +loadbalancer_config_list = [] +vm_config_list = [{ + role = "client" + vm_name = "client-vm" + nic_name = "client-nic" + admin_username = "ubuntu" + zone = "1" + source_image_reference = { + publisher = "Canonical" + offer = "0001-com-ubuntu-server-focal" + sku = "20_04-lts" + version = "latest" + } + create_vm_extension = true + } +] +vmss_config_list = [] +nic_backend_pool_association_list = [] \ No newline at end of file diff --git a/scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/azure-westus2.tfvars b/scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/azure-westus2.tfvars new file mode 100644 index 000000000..3eaa58b5f --- /dev/null +++ b/scenarios/perf-eval/lb-cross-region-iperf/terraform-inputs/azure-westus2.tfvars @@ -0,0 +1,120 @@ +scenario_type = "perf-eval" +scenario_name = "lb-cross-region-iperf" +deletion_delay = "2h" +public_ip_config_list = [ + { + name = "server-pip" + }, + { + name = "lb-pip" + } +] +network_config_list = [ + { + role = "network" + vnet_name = "westus2-vnet" + vnet_address_space = "10.2.0.0/16" + subnet = [{ + name = "westus2-subnet" + address_prefix = "10.2.1.0/24" + }] + network_security_group_name = "westus2-nsg" + nic_public_ip_associations = [ + { + nic_name = "server-nic" + subnet_name = "westus2-subnet" + ip_configuration_name = "server-ipconfig" + public_ip_name = "server-pip" + } + ] + nsr_rules = [{ + name = "nsr-ssh" + priority = 100 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "2222" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "nsr-tcp" + priority = 101 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "20001-20001" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "nsr-udp" + priority = 102 + direction = "Inbound" + access = "Allow" + protocol = "Udp" + source_port_range = "*" + destination_port_range = "20002-20002" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] + } +] +loadbalancer_config_list = [{ + role = "ingress" + loadbalance_name = "ingress-lb" + public_ip_name = "lb-pip" + loadbalance_pool_name = "ingress-lb-pool" + probe_protocol = "Tcp" + probe_port = 20000 + probe_request_path = null, + lb_rules = [{ + type = "Inbound" + rule_count = 1 + role = "ingress-lb-tcp-rule" + protocol = "Tcp" + frontend_port = 20001 + backend_port = 20001 + fronend_ip_config_prefix = "ingress" + enable_tcp_reset = false + idle_timeout_in_minutes = 4 + }, + { + type = "Inbound" + rule_count = 1 + role = "ingress-lb-udp-rule" + protocol = "Udp" + frontend_port = 20002 + backend_port = 20002 + enable_tcp_reset = false + idle_timeout_in_minutes = 4 + }] +}] +vm_config_list = [ + { + role = "server" + vm_name = "server-vm" + nic_name = "server-nic" + admin_username = "ubuntu" + zone = "2" + source_image_reference = { + publisher = "Canonical" + offer = "0001-com-ubuntu-server-focal" + sku = "20_04-lts" + version = "latest" + } + create_vm_extension = true + } +] +vmss_config_list = [] +nic_backend_pool_association_list = [ + { + nic_name = "server-nic" + backend_pool_name = "ingress-lb-pool" + vm_name = "server-vm" + ip_configuration_name = "server-ipconfig" + } +] \ No newline at end of file diff --git a/scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/aws-us-east-2.json b/scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/aws-us-east-2.json new file mode 100644 index 000000000..aa10f5a95 --- /dev/null +++ b/scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/aws-us-east-2.json @@ -0,0 +1,6 @@ +{ + "owner" : "terraform_unit_tests", + "run_id" : "123456789", + "region" : "us-east-2", + "machine_type" : "m5.4xlarge" + } \ No newline at end of file diff --git a/scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/aws-us-west-1.json b/scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/aws-us-west-1.json new file mode 100644 index 000000000..58a8b5022 --- /dev/null +++ b/scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/aws-us-west-1.json @@ -0,0 +1,6 @@ +{ + "owner" : "terraform_unit_tests", + "run_id" : "123456789", + "region" : "us-west-1", + "machine_type" : "m5.4xlarge" + } \ No newline at end of file diff --git a/scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/azure-eastus2.json b/scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/azure-eastus2.json new file mode 100644 index 000000000..47576330c --- /dev/null +++ b/scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/azure-eastus2.json @@ -0,0 +1,7 @@ +{ + "owner" : "terraform_unit_tests", + "run_id" : "123456789", + "region" : "eastus2", + "machine_type" : "Standard_D16_v5", + "accelerated_networking" : true + } \ No newline at end of file diff --git a/scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/azure-westus2.json b/scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/azure-westus2.json new file mode 100644 index 000000000..de98b4503 --- /dev/null +++ b/scenarios/perf-eval/lb-cross-region-iperf/terraform-test-inputs/azure-westus2.json @@ -0,0 +1,7 @@ +{ + "owner" : "terraform_unit_tests", + "run_id" : "123456789", + "region" : "westus2", + "machine_type" : "Standard_D16_v5", + "accelerated_networking" : true + } \ No newline at end of file diff --git a/scenarios/perf-eval/vm-cross-region-iperf/bash-scripts/client-userdata.sh b/scenarios/perf-eval/vm-cross-region-iperf/bash-scripts/client-userdata.sh new file mode 100644 index 000000000..129a2cb5a --- /dev/null +++ b/scenarios/perf-eval/vm-cross-region-iperf/bash-scripts/client-userdata.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +sudo perl -pi -e 's/^#?Port 22$/Port 2222/' /etc/ssh/sshd_config +sudo service ssh restart + +sudo apt-get update +sudo apt-get install iperf -y \ No newline at end of file diff --git a/scenarios/perf-eval/vm-cross-region-iperf/bash-scripts/server-userdata.sh b/scenarios/perf-eval/vm-cross-region-iperf/bash-scripts/server-userdata.sh new file mode 100644 index 000000000..fec48ac2f --- /dev/null +++ b/scenarios/perf-eval/vm-cross-region-iperf/bash-scripts/server-userdata.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +sudo perl -pi -e 's/^#?Port 22$/Port 2222/' /etc/ssh/sshd_config +sudo service ssh restart + +sudo apt-get update +sudo apt-get install iperf -y + +nohup iperf --server --port 20001 &> /dev/null & +nohup iperf --server --udp --port 20002 &> /dev/null & \ No newline at end of file diff --git a/scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/aws-us-east-2.tfvars b/scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/aws-us-east-2.tfvars new file mode 100644 index 000000000..293bd641f --- /dev/null +++ b/scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/aws-us-east-2.tfvars @@ -0,0 +1,47 @@ +scenario_type = "perf-eval" +scenario_name = "vm-cross-region-iperf" +deletion_delay = "2h" +network_config_list = [ + { + role = "client" + vpc_name = "client-vpc" + vpc_cidr_block = "10.0.0.0/16" + subnet = [{ + name = "client-subnet" + cidr_block = "10.0.0.0/24" + zone_suffix = "a" + }] + security_group_name = "client-sg" + route_table_cidr_block = "0.0.0.0/0" + sg_rules = { + ingress = [ + { + from_port = 2222 + to_port = 2222 + protocol = "tcp" + cidr_block = "0.0.0.0/0" + } + ] + egress = [ + { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_block = "0.0.0.0/0" + } + ] + } + } +] +loadbalancer_config_list = [] + +vm_config_list = [{ + vm_name = "client-vm" + role = "client" + network_role = "client" + subnet_name = "client-subnet" + security_group_name = "client-sg" + associate_public_ip_address = true + zone_suffix = "a" + } +] \ No newline at end of file diff --git a/scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/aws-us-west-1.tfvars b/scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/aws-us-west-1.tfvars new file mode 100644 index 000000000..ed2e676e7 --- /dev/null +++ b/scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/aws-us-west-1.tfvars @@ -0,0 +1,119 @@ +scenario_type = "perf-eval" +scenario_name = "vm-cross-region-iperf" +deletion_delay = "2h" +network_config_list = [ + { + role = "server" + vpc_name = "server-vpc" + vpc_cidr_block = "10.1.0.0/16" + subnet = [{ + name = "server-subnet" + cidr_block = "10.1.1.0/24" + zone_suffix = "a" + }] + security_group_name = "server-sg" + route_table_cidr_block = "0.0.0.0/0" + sg_rules = { + ingress = [ + { + from_port = 2222 + to_port = 2222 + protocol = "tcp" + cidr_block = "0.0.0.0/0" + }, + { + from_port = 20000 + to_port = 20000 + protocol = "tcp" + cidr_block = "0.0.0.0/0" + }, + { + from_port = 20001 + to_port = 20001 + protocol = "tcp" + cidr_block = "0.0.0.0/0" + }, + { + from_port = 20002 + to_port = 20002 + protocol = "udp" + cidr_block = "0.0.0.0/0" + } + ] + egress = [ + { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_block = "0.0.0.0/0" + } + ] + } + } +] +loadbalancer_config_list = [{ + role = "ingress" + vpc_name = "server-vpc" + subnet_name = "server-subnet" + load_balancer_type = "network" + lb_target_group = [{ + role = "nlb-tg" + tg_suffix = "tcp" + port = 20001 + protocol = "TCP" + rule_count = 1 + vpc_name = "server-vpc" + health_check = { + port = "20000" + protocol = "TCP" + interval = 10 + timeout = 10 + healthy_threshold = 2 + unhealthy_threshold = 2 + } + lb_listener = { + port = 20001 + protocol = "TCP" + } + lb_target_group_attachment = { + vm_name = "server-vm" + port = 20001 + } + }, + { + role = "nlb-tg" + tg_suffix = "udp" + port = 20002 + protocol = "UDP" + rule_count = 1 + vpc_name = "server-vpc" + health_check = { + port = "20000" + protocol = "TCP" + interval = 10 + timeout = 10 + healthy_threshold = 2 + unhealthy_threshold = 2 + } + lb_listener = { + port = 20002 + protocol = "UDP" + } + lb_target_group_attachment = { + vm_name = "server-vm" + port = 20002 + } + } + ] +}] + +vm_config_list = [ + { + vm_name = "server-vm" + role = "server" + subnet_name = "server-subnet" + security_group_name = "server-sg" + associate_public_ip_address = true + zone_suffix = "a" + } +] \ No newline at end of file diff --git a/scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/azure-eastus2.tfvars b/scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/azure-eastus2.tfvars new file mode 100644 index 000000000..7ce61d129 --- /dev/null +++ b/scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/azure-eastus2.tfvars @@ -0,0 +1,79 @@ +scenario_type = "perf-eval" +scenario_name = "lb-cross-region-iperf" +deletion_delay = "2h" +public_ip_config_list = [ + { + name = "client-pip" + } +] +network_config_list = [ + { + role = "client" + vnet_name = "client-vnet" + vnet_address_space = "10.0.0.0/16" + subnet = [{ + name = "client-subnet" + address_prefix = "10.0.0.0/24" + }] + network_security_group_name = "client-nsg" + nic_public_ip_associations = [ + { + nic_name = "client-nic" + subnet_name = "client-subnet" + ip_configuration_name = "client-ipconfig" + public_ip_name = "client-pip" + }] + nsr_rules = [{ + name = "client-nsr-ssh" + priority = 100 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "2222" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "client-nsr-tcp" + priority = 101 + direction = "Outbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "20001-20002" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "client-nsr-udp" + priority = 102 + direction = "Outbound" + access = "Allow" + protocol = "Udp" + source_port_range = "*" + destination_port_range = "20002-20002" + source_address_prefix = "*" + destination_address_prefix = "*" + }] + } +] +loadbalancer_config_list = [] + +vm_config_list = [{ + role = "client" + vm_name = "client-vm" + nic_name = "client-nic" + admin_username = "ubuntu" + zone = "1" + source_image_reference = { + publisher = "Canonical" + offer = "0001-com-ubuntu-server-focal" + sku = "20_04-lts" + version = "latest" + } + create_vm_extension = true + } +] +vmss_config_list = [] +nic_backend_pool_association_list = [] \ No newline at end of file diff --git a/scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/azure-westus2.tfvars b/scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/azure-westus2.tfvars new file mode 100644 index 000000000..602a3bfa2 --- /dev/null +++ b/scenarios/perf-eval/vm-cross-region-iperf/terraform-inputs/azure-westus2.tfvars @@ -0,0 +1,123 @@ +scenario_type = "perf-eval" +scenario_name = "vm-cross-region-iperf" +deletion_delay = "2h" +public_ip_config_list = [ + { + name = "server-pip" + }, + { + name = "lb-pip" + } +] +network_config_list = [ + { + role = "server" + vnet_name = "server-vnet" + vnet_address_space = "10.1.0.0/16" + subnet = [{ + name = "server-subnet" + address_prefix = "10.1.1.0/24" + }] + network_security_group_name = "server-nsg" + nic_public_ip_associations = [ + { + nic_name = "server-nic" + subnet_name = "server-subnet" + ip_configuration_name = "server-ipconfig" + public_ip_name = "server-pip" + } + ] + nsr_rules = [ + { + name = "server-nsr-tcp" + priority = 100 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "20001-20001" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "server-nsr-udp" + priority = 101 + direction = "Inbound" + access = "Allow" + protocol = "Udp" + source_port_range = "*" + destination_port_range = "20002-20002" + source_address_prefix = "*" + destination_address_prefix = "*" + }, + { + name = "server-nsr-ssh" + priority = 102 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "2222" + source_address_prefix = "*" + destination_address_prefix = "*" + } + ] + } +] +loadbalancer_config_list = [{ + role = "ingress" + loadbalance_name = "ingress-lb" + public_ip_name = "lb-pip" + loadbalance_pool_name = "ingress-lb-pool" + probe_protocol = "Tcp" + probe_port = 20000 + probe_request_path = null, + lb_rules = [{ + type = "Inbound" + rule_count = 1 + role = "ingress-lb-tcp-rule" + protocol = "Tcp" + frontend_port = 20001 + backend_port = 20001 + fronend_ip_config_prefix = "ingress" + enable_tcp_reset = false + idle_timeout_in_minutes = 4 + }, + { + type = "Inbound" + rule_count = 1 + role = "ingress-lb-udp-rule" + protocol = "Udp" + frontend_port = 20002 + backend_port = 20002 + enable_tcp_reset = false + idle_timeout_in_minutes = 4 + }] +}] + +vm_config_list = [ + { + role = "server" + vm_name = "server-vm" + nic_name = "server-nic" + admin_username = "ubuntu" + zone = "1" + source_image_reference = { + publisher = "Canonical" + offer = "0001-com-ubuntu-server-focal" + sku = "20_04-lts" + version = "latest" + } + create_vm_extension = true + } +] +vmss_config_list = [] +nic_backend_pool_association_list = [ + { + nic_name = "server-nic" + backend_pool_name = "ingress-lb-pool" + vm_name = "server-vm" + ip_configuration_name = "server-ipconfig" + } +] + \ No newline at end of file diff --git a/scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/aws-us-east-2.json b/scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/aws-us-east-2.json new file mode 100644 index 000000000..aa10f5a95 --- /dev/null +++ b/scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/aws-us-east-2.json @@ -0,0 +1,6 @@ +{ + "owner" : "terraform_unit_tests", + "run_id" : "123456789", + "region" : "us-east-2", + "machine_type" : "m5.4xlarge" + } \ No newline at end of file diff --git a/scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/aws-us-west-1.json b/scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/aws-us-west-1.json new file mode 100644 index 000000000..58a8b5022 --- /dev/null +++ b/scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/aws-us-west-1.json @@ -0,0 +1,6 @@ +{ + "owner" : "terraform_unit_tests", + "run_id" : "123456789", + "region" : "us-west-1", + "machine_type" : "m5.4xlarge" + } \ No newline at end of file diff --git a/scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/azure-eastus2.json b/scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/azure-eastus2.json new file mode 100644 index 000000000..47576330c --- /dev/null +++ b/scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/azure-eastus2.json @@ -0,0 +1,7 @@ +{ + "owner" : "terraform_unit_tests", + "run_id" : "123456789", + "region" : "eastus2", + "machine_type" : "Standard_D16_v5", + "accelerated_networking" : true + } \ No newline at end of file diff --git a/scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/azure-westus2.json b/scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/azure-westus2.json new file mode 100644 index 000000000..de98b4503 --- /dev/null +++ b/scenarios/perf-eval/vm-cross-region-iperf/terraform-test-inputs/azure-westus2.json @@ -0,0 +1,7 @@ +{ + "owner" : "terraform_unit_tests", + "run_id" : "123456789", + "region" : "westus2", + "machine_type" : "Standard_D16_v5", + "accelerated_networking" : true + } \ No newline at end of file