feat(infra): AWS -> Noble 59/41959/2
authorPeter Mikus <[email protected]>
Wed, 4 Dec 2024 08:12:26 +0000 (09:12 +0100)
committerPeter Mikus <[email protected]>
Wed, 4 Dec 2024 08:41:00 +0000 (08:41 +0000)
Signed-off-by: Peter Mikus <[email protected]>
Change-Id: I95f2945597eeacb01e04ae0b40dc2bba667dcf91

47 files changed:
fdio.infra.ansible/inventories/lf_inventory/host_vars/10.30.51.36.yaml
fdio.infra.ansible/roles/aws/handlers/main.yaml
fdio.infra.ansible/roles/aws/tasks/main.yaml
fdio.infra.ansible/roles/aws/tasks/ubuntu_noble.yaml [new file with mode: 0644]
fdio.infra.ansible/roles/calibration/defaults/main.yaml
fdio.infra.terraform/terraform-aws-1n-aws-c5n/variables.tf
fdio.infra.terraform/terraform-aws-1n-c6in/variables.tf
fdio.infra.terraform/terraform-aws-2n-aws-c5n/variables.tf
fdio.infra.terraform/terraform-aws-2n-c6gn/hosts.tftpl [deleted file]
fdio.infra.terraform/terraform-aws-2n-c6gn/main.tf [deleted file]
fdio.infra.terraform/terraform-aws-2n-c6gn/output.tf [deleted file]
fdio.infra.terraform/terraform-aws-2n-c6gn/providers.tf [deleted file]
fdio.infra.terraform/terraform-aws-2n-c6gn/topology-2n-c6gn.tftpl [deleted file]
fdio.infra.terraform/terraform-aws-2n-c6gn/variables.tf [deleted file]
fdio.infra.terraform/terraform-aws-2n-c6gn/versions.tf [deleted file]
fdio.infra.terraform/terraform-aws-2n-c6in/variables.tf
fdio.infra.terraform/terraform-aws-2n-c7gn/variables.tf
fdio.infra.terraform/terraform-aws-3n-aws-c5n/hosts.tftpl [deleted file]
fdio.infra.terraform/terraform-aws-3n-aws-c5n/main.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-aws-c5n/output.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-aws-c5n/providers.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-aws-c5n/topology-3n-aws-c5n.tftpl [deleted file]
fdio.infra.terraform/terraform-aws-3n-aws-c5n/variables.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-aws-c5n/versions.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6gn/hosts.tftpl [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6gn/main.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6gn/output.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6gn/providers.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6gn/topology-3n-c6gn.tftpl [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6gn/variables.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6gn/versions.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6in/hosts.tftpl [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6in/main.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6in/output.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6in/providers.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6in/topology-3n-c6in.tftpl [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6in/variables.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c6in/versions.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c7gn/hosts.tftpl [deleted file]
fdio.infra.terraform/terraform-aws-3n-c7gn/main.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c7gn/output.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c7gn/providers.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c7gn/topology-3n-c7gn.tftpl [deleted file]
fdio.infra.terraform/terraform-aws-3n-c7gn/variables.tf [deleted file]
fdio.infra.terraform/terraform-aws-3n-c7gn/versions.tf [deleted file]
fdio.infra/packer-aws-sut/ubuntu_noble_arm.pkr.hcl
fdio.infra/packer-aws-sut/ubuntu_noble_x86.pkr.hcl [moved from fdio.infra/packer-aws-sut/ubuntu_jammy_x86.pkr.hcl with 65% similarity]

index 800cab9..62f58a7 100644 (file)
@@ -12,6 +12,8 @@ grub:
   nosoftlockup: true
   processor.max_cstate: "1"
   rcu_nocbs: "1-71"
+  cpufreq.off: "1"
+  cpuidle.off: "1"
 sysctl:
   kernel:
     watchdog_cpumask: "0,71"
index bc160a3..b9680b1 100644 (file)
@@ -1,25 +1,25 @@
 ---
-# file: roles/aws/handlers/main.yaml
+# file: handlers/main.yaml
 
-- name: Reload systemd-modules
+- name: "Reload systemd-modules"
   systemd:
     name: "systemd-modules-load"
     state: "restarted"
   tags:
     - reload-systemd-modules
 
-- name: Update GRUB
-  ansible.builtin.command: update-grub
+- name: "Update GRUB"
+  ansible.builtin.command: "update-grub"
   tags:
     - update-grub
 
-- name: Reboot Server
+- name: "Reboot Server"
   ansible.builtin.reboot:
     reboot_timeout: 3600
   tags:
     - reboot-server
 
-- name: Restart SSHd
+- name: "Restart SSHd"
   ansible.builtin.service:
-    name: sshd
+    name: "sshd"
     state: restarted
index b33848e..b06fe93 100644 (file)
@@ -1,19 +1,19 @@
 ---
 # file: tasks/main.yaml
 
-- name: Edit repositories
+- name: "Edit repositories"
   include_tasks: "{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml"
   tags:
     - aws-edit-repo
 
-- name: Prerequisites
+- name: "Prerequisites"
   ansible.builtin.package:
     name: "{{ packages | flatten(levels=1) }}"
     state: "latest"
   tags:
     - aws-inst-prerequisites
 
-- name: Load Kernel Modules By Default
+- name: "Load Kernel Modules By Default"
   ansible.builtin.lineinfile:
     path: "/etc/modules"
     state: "present"
@@ -24,7 +24,7 @@
   tags:
     - aws-load-kernel-modules
 
-- name: Add Kernel Modules Options (igb_uio)
+- name: "Add Kernel Modules Options (igb_uio)"
   ansible.builtin.lineinfile:
     path: "/etc/modprobe.d/igb_uio.conf"
     state: "present"
@@ -35,7 +35,7 @@
   tags:
     - aws-load-kernel-modules
 
-- name: Add Kernel Modules Options (vfio-pci)
+- name: "Add Kernel Modules Options (vfio-pci)"
   ansible.builtin.lineinfile:
     path: "/etc/modprobe.d/vfio-noiommu.conf"
     state: "present"
@@ -46,7 +46,7 @@
   tags:
     - aws-load-kernel-modules
 
-- name: Kernel Parameters
+- name: "Kernel Parameters"
   ansible.builtin.lineinfile:
     path: "/etc/default/grub"
     state: "present"
 
 - meta: flush_handlers
 
-- name: Disable Password Login
+- name: "Disable Password Login"
   ansible.builtin.lineinfile:
     dest: "/etc/ssh/sshd_config"
     regexp: "^PasswordAuthentication yes"
     line: "PasswordAuthentication no"
-  notify:
-    - "Restart SSHd"
   tags:
     - conf-ssh
 
-- name: Recursively Delete Other Configs
+- name: "Recursively Delete Other Configs"
   ansible.builtin.file:
     path: "/etc/ssh/sshd_config.d"
     state: "absent"
 #  tags:
 #    - aws-vfio-patch
 
-- name: Adjust nr_hugepages
+- name: "Adjust nr_hugepages"
   ansible.builtin.sysctl:
     name: "vm.nr_hugepages"
     value: "8192"
   tags:
     - aws-set-hugepages
 
-- name: Shutdown host with delay
+- name: "Shutdown host with delay"
   ansible.builtin.command: "/sbin/shutdown -P +720"
   tags:
     - aws-set-self-terminate
diff --git a/fdio.infra.ansible/roles/aws/tasks/ubuntu_noble.yaml b/fdio.infra.ansible/roles/aws/tasks/ubuntu_noble.yaml
new file mode 100644 (file)
index 0000000..f99da4f
--- /dev/null
@@ -0,0 +1,19 @@
+---
+# file: tasks/ubuntu_noble.yaml
+
+- name: "Enable deb-src APT Repository"
+  ansible.builtin.apt_repository:
+    repo: "deb-src {{ packages_repo[ansible_distribution|lower][ansible_machine] }} noble main"
+    state: "present"
+    update_cache: true
+  tags:
+    - aws-enable-src-repo
+
+- name: "Update Package Cache (APT)"
+  ansible.builtin.apt:
+    update_cache: true
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution == 'Ubuntu'
+  tags:
+    - aws-enable-src-repo
\ No newline at end of file
index dac42b8..8f3f0c8 100644 (file)
@@ -16,6 +16,7 @@ kernel_version_by_distro_by_arch:
     noble:
       x86_64:
         - "6.8.0-45-generic"
+        - "6.8.0-1016-aws"
         - "5.15.0-1000-aws"
         - "5.4.0-1009-aws"
       aarch64:
index 566a073..f65366f 100644 (file)
@@ -38,7 +38,7 @@ variable "placement_group_strategy" {
 variable "tg_ami" {
   description = "AMI to use for the instance."
   type        = string
-  default     = "ami-07430bfa17fd4e597"
+  default     = "ami-00ff6ec6a76b31665"
 }
 
 variable "tg_associate_public_ip_address" {
index db0cfa8..b08495d 100644 (file)
@@ -38,7 +38,7 @@ variable "placement_group_strategy" {
 variable "tg_ami" {
   description = "AMI to use for the instance."
   type        = string
-  default     = "ami-07430bfa17fd4e597"
+  default     = "ami-00ff6ec6a76b31665"
 }
 
 variable "tg_associate_public_ip_address" {
index de11316..0979449 100644 (file)
@@ -38,7 +38,7 @@ variable "placement_group_strategy" {
 variable "tg_ami" {
   description = "AMI to use for the instance."
   type        = string
-  default     = "ami-07430bfa17fd4e597"
+  default     = "ami-00ff6ec6a76b31665"
 }
 
 variable "tg_associate_public_ip_address" {
@@ -74,7 +74,7 @@ variable "tg_source_dest_check" {
 variable "sut1_ami" {
   description = "AMI to use for the instance."
   type        = string
-  default     = "ami-0a890555652963ec2"
+  default     = "ami-0217b4ddda6e9c79c"
 }
 
 variable "sut1_associate_public_ip_address" {
diff --git a/fdio.infra.terraform/terraform-aws-2n-c6gn/hosts.tftpl b/fdio.infra.terraform/terraform-aws-2n-c6gn/hosts.tftpl
deleted file mode 100644 (file)
index cb36dbb..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-all:
-  children:
-    tg:
-      hosts:
-        ${tg_public_ip}
-    sut:
-      hosts:
-        ${dut1_public_ip}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-2n-c6gn/main.tf b/fdio.infra.terraform/terraform-aws-2n-c6gn/main.tf
deleted file mode 100644 (file)
index b3da06b..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-data "vault_aws_access_credentials" "creds" {
-  backend = "${var.vault-name}-path"
-  role    = "${var.vault-name}-role"
-}
-
-locals {
-  ansible_python_executable = "/usr/bin/python3"
-  availability_zone         = "eu-central-1a"
-  name                      = "csit-vpc"
-  environment               = "csit-vpc-environment"
-  key_pair_key_name         = "${var.resource_prefix}-${var.testbed_name}-pk"
-  placement_group_name      = "${var.resource_prefix}-${var.testbed_name}-pg"
-  security_group_name       = "${var.resource_prefix}-${var.testbed_name}-sg"
-  testbed_name              = "testbed1"
-  topology_name             = "2n-c6gn"
-  tg_name                   = "${var.resource_prefix}-${var.testbed_name}-tg"
-  sut1_name                 = "${var.resource_prefix}-${var.testbed_name}-sut1"
-}
-
-# Create VPC
-module "vpc" {
-  source                   = "../terraform-aws-vpc"
-  security_group_name      = local.security_group_name
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  vpc_enable_dns_hostnames = false
-}
-
-# Create Subnet
-module "subnet_b" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "192.168.10.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 2)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-module "subnet_d" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "192.168.20.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 4)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-# Create Private Key
-module "private_key" {
-  source  = "pmikus/private-key/tls"
-  version = "4.0.4"
-
-  private_key_algorithm = var.private_key_algorithm
-}
-
-# Create Key Pair
-module "key_pair" {
-  source  = "pmikus/key-pair/aws"
-  version = "5.7.0"
-
-  key_pair_key_name   = local.key_pair_key_name
-  key_pair_public_key = module.private_key.public_key_openssh
-
-  key_pair_tags = {
-    "Environment" = local.environment
-  }
-}
-
-# Create Placement Group
-resource "aws_placement_group" "placement_group" {
-  name     = local.placement_group_name
-  strategy = var.placement_group_strategy
-}
-
-# Create Instance
-resource "aws_instance" "tg" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.tg_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.tg_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.tg_instance_initiated_shutdown_behavior
-  instance_type                        = var.tg_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.tg_private_ip
-  source_dest_check                    = var.tg_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "1"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "tg_if1" {
-  depends_on = [
-    module.subnet_b,
-    aws_instance.tg
-  ]
-  private_ip        = var.tg_if1_private_ip
-  private_ips       = [var.tg_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.tg_source_dest_check
-  subnet_id         = module.subnet_b.subnet_id
-
-  attachment {
-    instance     = aws_instance.tg.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "tg_if2" {
-  depends_on = [
-    module.subnet_d,
-    aws_instance.tg
-  ]
-  private_ip        = var.tg_if2_private_ip
-  private_ips       = [var.tg_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.tg_source_dest_check
-  subnet_id         = module.subnet_d.subnet_id
-
-  attachment {
-    instance     = aws_instance.tg.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "tg_if1" {
-  id = aws_network_interface.tg_if1.id
-}
-
-data "aws_network_interface" "tg_if2" {
-  id = aws_network_interface.tg_if2.id
-}
-
-resource "aws_route" "route_tg_if1" {
-  depends_on = [
-    aws_instance.tg
-  ]
-  destination_cidr_block = var.destination_cidr_block_tg_if1
-  network_interface_id   = aws_instance.tg.primary_network_interface_id
-  route_table_id         = module.vpc.vpc_main_route_table_id
-}
-
-resource "aws_route" "route_tg_if2" {
-  depends_on = [
-    aws_instance.tg
-  ]
-  destination_cidr_block = var.destination_cidr_block_tg_if2
-  network_interface_id   = aws_instance.tg.primary_network_interface_id
-  route_table_id         = module.vpc.vpc_main_route_table_id
-}
-
-resource "aws_instance" "sut1" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.sut1_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.sut1_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.sut1_instance_initiated_shutdown_behavior
-  instance_type                        = var.sut1_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.sut1_private_ip
-  source_dest_check                    = var.sut1_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "2"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut1_if1" {
-  depends_on = [
-    module.subnet_b,
-    aws_instance.sut1
-  ]
-  private_ip        = var.sut1_if1_private_ip
-  private_ips       = [var.sut1_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut1_source_dest_check
-  subnet_id         = module.subnet_b.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut1.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut1_if2" {
-  depends_on = [
-    module.subnet_d,
-    aws_instance.sut1
-  ]
-  private_ip        = var.sut1_if2_private_ip
-  private_ips       = [var.sut1_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut1_source_dest_check
-  subnet_id         = module.subnet_d.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut1.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "sut1_if1" {
-  id = aws_network_interface.sut1_if1.id
-}
-
-data "aws_network_interface" "sut1_if2" {
-  id = aws_network_interface.sut1_if2.id
-}
-
-resource "null_resource" "deploy_tg" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.tg.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "null_resource" "deploy_sut1" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.sut1.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "local_file" "topology_file" {
-  depends_on = [
-    aws_instance.tg,
-    aws_instance.sut1
-  ]
-
-  content = templatefile(
-    "${path.module}/topology-${local.topology_name}.tftpl",
-    {
-      tg_if1_mac     = data.aws_network_interface.tg_if1.mac_address
-      tg_if2_mac     = data.aws_network_interface.tg_if2.mac_address
-      dut1_if1_mac   = data.aws_network_interface.sut1_if1.mac_address
-      dut1_if2_mac   = data.aws_network_interface.sut1_if2.mac_address
-      tg_public_ip   = aws_instance.tg.public_ip
-      dut1_public_ip = aws_instance.sut1.public_ip
-    }
-  )
-  filename = "${path.module}/../../topologies/available/${local.topology_name}-${local.testbed_name}.yaml"
-}
-
-resource "local_file" "hosts" {
-  depends_on = [
-    aws_instance.tg,
-    aws_instance.sut1
-  ]
-
-  content = templatefile(
-    "${path.module}/hosts.tftpl",
-    {
-      tg_public_ip   = aws_instance.tg.public_ip
-      dut1_public_ip = aws_instance.sut1.public_ip
-    }
-  )
-  filename = "${path.module}/../../fdio.infra.ansible/inventories/cloud_inventory/hosts.yaml"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-2n-c6gn/output.tf b/fdio.infra.terraform/terraform-aws-2n-c6gn/output.tf
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/fdio.infra.terraform/terraform-aws-2n-c6gn/providers.tf b/fdio.infra.terraform/terraform-aws-2n-c6gn/providers.tf
deleted file mode 100644 (file)
index 1a98cb5..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-provider "aws" {
-  region     = var.region
-  access_key = data.vault_aws_access_credentials.creds.access_key
-  secret_key = data.vault_aws_access_credentials.creds.secret_key
-}
-
-provider "vault" {
-  address         = "http://vault.service.consul:8200"
-  skip_tls_verify = true
-  token           = "hvs.bzHw4ZHsz9B0019P8I73yS6l"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-2n-c6gn/topology-2n-c6gn.tftpl b/fdio.infra.terraform/terraform-aws-2n-c6gn/topology-2n-c6gn.tftpl
deleted file mode 100644 (file)
index a0fa5fc..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
----
-metadata:
-  version: 0.1
-  schema:
-    - resources/topology_schemas/2_node_topology.sch.yaml
-    - resources/topology_schemas/topology.sch.yaml
-  tags: [hw, 2-node]
-
-nodes:
-  TG:
-    type: TG
-    subtype: TREX
-    host: "${tg_public_ip}"
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    interfaces:
-      port1:
-        # tg_instance/p1 - 100GE port1 on ENA NIC.
-        mac_address: "${tg_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link1
-        model: Amazon-Nitro-100G
-      port2:
-        # tg_instance/p2 - 100GE port2 on ENA NIC.
-        mac_address: "${tg_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link2
-        model: Amazon-Nitro-100G
-  DUT1:
-    type: DUT
-    host: "${dut1_public_ip}"
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    uio_driver: vfio-pci
-    interfaces:
-      port1:
-        # dut1_instance/p1 - 100GE port1 on ENA NIC.
-        mac_address: "${dut1_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link1
-        model: Amazon-Nitro-100G
-      port2:
-        # dut1_instance/p2 - 100GE port2 on ENA NIC.
-        mac_address: "${dut1_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link2
-        model: Amazon-Nitro-100G
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-2n-c6gn/variables.tf b/fdio.infra.terraform/terraform-aws-2n-c6gn/variables.tf
deleted file mode 100644 (file)
index fec8331..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-variable "vault-name" {
-  default = "dynamic-aws-creds-vault-fdio-csit-jenkins"
-}
-
-variable "region" {
-  description = "AWS Region."
-  type        = string
-  default     = "eu-central-1"
-}
-
-variable "resource_prefix" {
-  description = "Resources name prefix."
-  type        = string
-  default     = "csit-2n-c6gn"
-}
-
-variable "testbed_name" {
-  description = "Testbed name."
-  type        = string
-  default     = "testbed1"
-}
-
-# Variables for Private Key
-variable "private_key_algorithm" {
-  description = "The name of the algorithm to use for the key."
-  type        = string
-  default     = "RSA"
-}
-
-variable "private_key_ecdsa_curve" {
-  description = "When algorithm is ECDSA, the name of the elliptic curve to use."
-  type        = string
-  default     = "P521"
-}
-
-variable "private_key_rsa_bits" {
-  description = "When algorithm is RSA, the size of the generated RSA key in bits."
-  type        = number
-  default     = 4096
-}
-
-# Variables for Placement Group
-variable "placement_group_strategy" {
-  description = "The placement strategy. Can be cluster, partition or spread."
-  type        = string
-  default     = "cluster"
-}
-
-# Variables for Instance
-variable "tg_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-07430bfa17fd4e597"
-}
-
-variable "tg_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "tg_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "tg_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c6in.4xlarge"
-}
-
-variable "tg_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.10"
-}
-
-variable "tg_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-variable "sut1_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-0cebabdc14ee56909"
-}
-
-variable "sut1_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "sut1_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "sut1_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c6gn.4xlarge"
-}
-
-variable "sut1_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.11"
-}
-
-variable "sut1_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-# Variables for Network Interface
-variable "tg_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.10.254"
-}
-
-variable "tg_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.20.254"
-}
-
-variable "destination_cidr_block_tg_if1" {
-  description = "The destination CIDR block."
-  type        = string
-  default     = "10.0.0.0/24"
-}
-
-variable "destination_cidr_block_tg_if2" {
-  description = "The destination CIDR block."
-  type        = string
-  default     = "20.0.0.0/24"
-}
-
-variable "sut1_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.10.11"
-}
-
-variable "sut1_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.20.11"
-}
-
-# Variables for Null Resource
-variable "first_run_commands" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = list(string)
-  default = [
-    "sudo sed -i 's/^PasswordAuthentication/#PasswordAuthentication/' /etc/ssh/sshd_config",
-    "sudo systemctl restart sshd",
-    "sudo useradd --create-home -s /bin/bash provisionuser",
-    "echo 'provisionuser:Csit1234' | sudo chpasswd",
-    "echo 'provisionuser ALL = (ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers",
-    "sudo useradd --create-home -s /bin/bash testuser",
-    "echo 'testuser:Csit1234' | sudo chpasswd",
-    "echo 'testuser ALL = (ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers"
-  ]
-}
-
-# Variables for Null Resource
-variable "ansible_topology_path" {
-  description = "Ansible topology path."
-  type        = string
-  default     = "../../fdio.infra.ansible/cloud_topology.yaml"
-}
diff --git a/fdio.infra.terraform/terraform-aws-2n-c6gn/versions.tf b/fdio.infra.terraform/terraform-aws-2n-c6gn/versions.tf
deleted file mode 100644 (file)
index 5896996..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-terraform {
-  required_providers {
-    aws = {
-      source  = "hashicorp/aws"
-      version = ">= 5.7.0"
-    }
-    null = {
-      source  = "hashicorp/null"
-      version = ">= 3.2.1"
-    }
-    tls = {
-      source  = "hashicorp/tls"
-      version = ">= 4.0.4"
-    }
-    vault = {
-      version = ">= 3.15.2"
-    }
-  }
-  required_version = ">= 1.4.2"
-}
\ No newline at end of file
index 4835b7a..f9c3a15 100644 (file)
@@ -50,7 +50,7 @@ variable "placement_group_strategy" {
 variable "tg_ami" {
   description = "AMI to use for the instance."
   type        = string
-  default     = "ami-0285a978d8bd77dcb"
+  default     = "ami-00ff6ec6a76b31665"
 }
 
 variable "tg_associate_public_ip_address" {
@@ -86,7 +86,7 @@ variable "tg_source_dest_check" {
 variable "sut1_ami" {
   description = "AMI to use for the instance."
   type        = string
-  default     = "ami-0f3ecd7f56fc232bd"
+  default     = "ami-0217b4ddda6e9c79c"
 }
 
 variable "sut1_associate_public_ip_address" {
index 1b9d375..b4c38af 100644 (file)
@@ -38,7 +38,7 @@ variable "placement_group_strategy" {
 variable "tg_ami" {
   description = "AMI to use for the instance."
   type        = string
-  default     = "ami-0243e38bc8ac1f8a3"
+  default     = "ami-00ff6ec6a76b31665"
 }
 
 variable "tg_associate_public_ip_address" {
diff --git a/fdio.infra.terraform/terraform-aws-3n-aws-c5n/hosts.tftpl b/fdio.infra.terraform/terraform-aws-3n-aws-c5n/hosts.tftpl
deleted file mode 100644 (file)
index e88c8ba..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-all:
-  children:
-    tg:
-      hosts:
-        ${tg_public_ip}
-    sut:
-      hosts:
-        ${dut1_public_ip}
-        ${dut2_public_ip}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-aws-c5n/main.tf b/fdio.infra.terraform/terraform-aws-3n-aws-c5n/main.tf
deleted file mode 100644 (file)
index c95c8a6..0000000
+++ /dev/null
@@ -1,457 +0,0 @@
-data "vault_aws_access_credentials" "creds" {
-  backend = "${var.vault-name}-path"
-  role    = "${var.vault-name}-role"
-}
-
-locals {
-  ansible_python_executable = "/usr/bin/python3"
-  availability_zone         = "eu-central-1a"
-  name                      = "csit-vpc"
-  environment               = "csit-vpc-environment"
-  key_pair_key_name         = "${var.resource_prefix}-${var.testbed_name}-pk"
-  placement_group_name      = "${var.resource_prefix}-${var.testbed_name}-pg"
-  security_group_name       = "${var.resource_prefix}-${var.testbed_name}-sg"
-  testbed_name              = "testbed1"
-  topology_name             = "3n-aws-c5n"
-  tg_name                   = "${var.resource_prefix}-${var.testbed_name}-tg"
-  sut1_name                 = "${var.resource_prefix}-${var.testbed_name}-sut1"
-  sut2_name                 = "${var.resource_prefix}-${var.testbed_name}-sut2"
-}
-
-# Create VPC
-module "vpc" {
-  source                   = "../terraform-aws-vpc"
-  security_group_name      = local.security_group_name
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-}
-
-# Create Subnet
-module "subnet_b" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "192.168.10.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 2)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-module "subnet_c" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "200.0.0.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 3)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-module "subnet_d" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "192.168.20.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 4)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-# Create Private Key
-module "private_key" {
-  source  = "pmikus/private-key/tls"
-  version = "4.0.4"
-
-  private_key_algorithm = var.private_key_algorithm
-}
-
-# Create Key Pair
-module "key_pair" {
-  source  = "pmikus/key-pair/aws"
-  version = "5.7.0"
-
-  key_pair_key_name   = local.key_pair_key_name
-  key_pair_public_key = module.private_key.public_key_openssh
-
-  key_pair_tags = {
-    "Environment" = local.environment
-  }
-}
-
-# Create Placement Group
-resource "aws_placement_group" "placement_group" {
-  name     = local.placement_group_name
-  strategy = var.placement_group_strategy
-}
-
-# Create Instance
-resource "aws_instance" "tg" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.tg_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.tg_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.tg_instance_initiated_shutdown_behavior
-  instance_type                        = var.tg_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.tg_private_ip
-  source_dest_check                    = var.tg_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "1"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "tg_if1" {
-  depends_on = [
-    module.subnet_b,
-    aws_instance.tg
-  ]
-  private_ip        = var.tg_if1_private_ip
-  private_ips       = [var.tg_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.tg_source_dest_check
-  subnet_id         = module.subnet_b.subnet_id
-
-  attachment {
-    instance     = aws_instance.tg.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "tg_if2" {
-  depends_on = [
-    module.subnet_d,
-    aws_instance.tg
-  ]
-  private_ips       = [var.tg_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.tg_source_dest_check
-  subnet_id         = module.subnet_d.subnet_id
-
-  attachment {
-    instance     = aws_instance.tg.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "tg_if1" {
-  id = aws_network_interface.tg_if1.id
-}
-
-data "aws_network_interface" "tg_if2" {
-  id = aws_network_interface.tg_if2.id
-}
-
-resource "aws_route" "route_tg_if1" {
-  depends_on = [
-    aws_instance.tg
-  ]
-  destination_cidr_block = var.destination_cidr_block_tg_if1
-  network_interface_id   = aws_instance.tg.primary_network_interface_id
-  route_table_id         = module.vpc.vpc_main_route_table_id
-}
-
-resource "aws_route" "route_tg_if2" {
-  depends_on = [
-    aws_instance.tg
-  ]
-  destination_cidr_block = var.destination_cidr_block_tg_if2
-  network_interface_id   = aws_instance.tg.primary_network_interface_id
-  route_table_id         = module.vpc.vpc_main_route_table_id
-}
-
-resource "aws_instance" "sut1" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.sut1_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.sut1_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.sut1_instance_initiated_shutdown_behavior
-  instance_type                        = var.sut1_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.sut1_private_ip
-  source_dest_check                    = var.sut1_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "2"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut1_if1" {
-  depends_on = [
-    module.subnet_b,
-    aws_instance.sut1
-  ]
-  private_ips       = [var.sut1_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut1_source_dest_check
-  subnet_id         = module.subnet_b.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut1.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut1_if2" {
-  depends_on = [
-    module.subnet_c,
-    aws_instance.sut1
-  ]
-  private_ips       = [var.sut1_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut1_source_dest_check
-  subnet_id         = module.subnet_c.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut1.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "sut1_if1" {
-  id = aws_network_interface.sut1_if1.id
-}
-
-data "aws_network_interface" "sut1_if2" {
-  id = aws_network_interface.sut1_if2.id
-}
-
-resource "aws_instance" "sut2" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.sut2_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.sut2_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.sut2_instance_initiated_shutdown_behavior
-  instance_type                        = var.sut2_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.sut2_private_ip
-  source_dest_check                    = var.sut2_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "2"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.sut2_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut2_if1" {
-  depends_on = [
-    module.subnet_c,
-    aws_instance.sut2
-  ]
-  private_ips       = [var.sut2_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut2_source_dest_check
-  subnet_id         = module.subnet_c.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut2.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.sut2_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut2_if2" {
-  depends_on = [
-    module.subnet_d,
-    aws_instance.sut2
-  ]
-  private_ips       = [var.sut2_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut2_source_dest_check
-  subnet_id         = module.subnet_d.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut2.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.sut2_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "sut2_if1" {
-  id = aws_network_interface.sut2_if1.id
-}
-
-data "aws_network_interface" "sut2_if2" {
-  id = aws_network_interface.sut2_if2.id
-}
-
-resource "null_resource" "deploy_tg" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2,
-    aws_instance.sut2,
-    aws_network_interface.sut2_if1,
-    aws_network_interface.sut2_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.tg.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "null_resource" "deploy_sut1" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2,
-    aws_instance.sut2,
-    aws_network_interface.sut2_if1,
-    aws_network_interface.sut2_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.sut1.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "null_resource" "deploy_sut2" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2,
-    aws_instance.sut2,
-    aws_network_interface.sut2_if1,
-    aws_network_interface.sut2_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.sut2.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "local_file" "topology_file" {
-  depends_on = [
-    aws_instance.tg,
-    aws_instance.sut1,
-    aws_instance.sut2
-  ]
-
-  content = templatefile(
-    "${path.module}/topology-${local.topology_name}.tftpl",
-    {
-      tg_if1_mac     = data.aws_network_interface.tg_if1.mac_address
-      tg_if2_mac     = data.aws_network_interface.tg_if2.mac_address
-      dut1_if1_mac   = data.aws_network_interface.sut1_if1.mac_address
-      dut1_if2_mac   = data.aws_network_interface.sut1_if2.mac_address
-      dut2_if1_mac   = data.aws_network_interface.sut2_if1.mac_address
-      dut2_if2_mac   = data.aws_network_interface.sut2_if2.mac_address
-      tg_public_ip   = aws_instance.tg.public_ip
-      dut1_public_ip = aws_instance.sut1.public_ip
-      dut2_public_ip = aws_instance.sut2.public_ip
-    }
-  )
-  filename = "${path.module}/../../topologies/available/${local.topology_name}-${local.testbed_name}.yaml"
-}
-
-resource "local_file" "hosts" {
-  depends_on = [
-    aws_instance.tg,
-    aws_instance.sut1,
-    aws_instance.sut2
-  ]
-
-  content = templatefile(
-    "${path.module}/hosts.tftpl",
-    {
-      tg_public_ip   = aws_instance.tg.public_ip
-      dut1_public_ip = aws_instance.sut1.public_ip
-      dut2_public_ip = aws_instance.sut2.public_ip
-    }
-  )
-  filename = "${path.module}/../../fdio.infra.ansible/inventories/cloud_inventory/hosts.yaml"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-aws-c5n/output.tf b/fdio.infra.terraform/terraform-aws-3n-aws-c5n/output.tf
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/fdio.infra.terraform/terraform-aws-3n-aws-c5n/providers.tf b/fdio.infra.terraform/terraform-aws-3n-aws-c5n/providers.tf
deleted file mode 100644 (file)
index 485f0eb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-provider "aws" {
-  region     = var.region
-  access_key = data.vault_aws_access_credentials.creds.access_key
-  secret_key = data.vault_aws_access_credentials.creds.secret_key
-}
-
-provider "vault" {
-  address         = "http://10.30.51.24:8200"
-  skip_tls_verify = true
-  token           = "hvs.bzHw4ZHsz9B0019P8I73yS6l"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-aws-c5n/topology-3n-aws-c5n.tftpl b/fdio.infra.terraform/terraform-aws-3n-aws-c5n/topology-3n-aws-c5n.tftpl
deleted file mode 100644 (file)
index 9886b56..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
----
-metadata:
-  version: 0.1
-  schema:
-    - resources/topology_schemas/3_node_topology.sch.yaml
-    - resources/topology_schemas/topology.sch.yaml
-  tags: [hw, 3-node]
-
-nodes:
-  TG:
-    type: TG
-    subtype: TREX
-    host: "${tg_public_ip}"
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    interfaces:
-      port1:
-        # tg_instance/p1 - 50GE port1 on ENA NIC.
-        mac_address: "${tg_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link1
-        model: Amazon-Nitro-50G
-      port2:
-        # tg_instance/p2 - 50GE port2 on ENA NIC.
-        mac_address: "${tg_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link2
-        model: Amazon-Nitro-50G
-  DUT1:
-    type: DUT
-    host: ${dut1_public_ip}
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    uio_driver: vfio-pci
-    interfaces:
-      port1:
-        # dut1_instance/p1 - 50GE port1 on ENA NIC.
-        mac_address: "${dut1_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link1
-        model: Amazon-Nitro-50G
-      port2:
-        # dut1_instance/p2 - 50GE port2 on ENA NIC.
-        mac_address: "${dut1_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link21
-        model: Amazon-Nitro-50G
-  DUT2:
-    type: DUT
-    host: ${dut2_public_ip}
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    uio_driver: vfio-pci
-    interfaces:
-      port1:
-        # dut2_instance/p1 - 50GE port1 on ENA NIC.
-        mac_address: "${dut2_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link21
-        model: Amazon-Nitro-50G
-      port2:
-        # dut2_instance/p2 - 50GE port1 on ENA NIC.
-        mac_address: "${dut2_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link2
-        model: Amazon-Nitro-50G
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-aws-c5n/variables.tf b/fdio.infra.terraform/terraform-aws-3n-aws-c5n/variables.tf
deleted file mode 100644 (file)
index d64dd5b..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-variable "vault-name" {
-  default = "dynamic-aws-creds-vault-fdio-csit-jenkins"
-}
-
-variable "region" {
-  description = "AWS Region."
-  type        = string
-  default     = "eu-central-1"
-}
-
-variable "resource_prefix" {
-  description = "Resources name prefix."
-  type        = string
-  default     = "csit-3n-aws-c5n"
-}
-
-variable "testbed_name" {
-  description = "Testbed name."
-  type        = string
-  default     = "testbed1"
-}
-
-# Variables for Private Key
-variable "private_key_algorithm" {
-  description = "The name of the algorithm to use for the key."
-  type        = string
-  default     = "ED25519"
-}
-
-# Variables for Placement Group
-variable "placement_group_strategy" {
-  description = "The placement strategy. Can be cluster, partition or spread."
-  type        = string
-  default     = "cluster"
-}
-
-# Variables for Instance
-variable "tg_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-07430bfa17fd4e597"
-}
-
-variable "tg_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "tg_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "tg_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c5n.4xlarge"
-}
-
-variable "tg_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.10"
-}
-
-variable "tg_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-variable "sut1_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-0a890555652963ec2"
-}
-
-variable "sut1_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "sut1_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "sut1_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c5n.4xlarge"
-}
-
-variable "sut1_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.11"
-}
-
-variable "sut1_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-variable "sut2_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-07898402cb1fd6561"
-}
-
-variable "sut2_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "sut2_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "sut2_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c5n.4xlarge"
-}
-
-variable "sut2_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.12"
-}
-
-variable "sut2_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-# Variables for Network Interface
-variable "tg_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.10.254"
-}
-
-variable "tg_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.20.254"
-}
-
-variable "destination_cidr_block_tg_if1" {
-  description = "The destination CIDR block."
-  type        = string
-  default     = "10.0.0.0/24"
-}
-
-variable "destination_cidr_block_tg_if2" {
-  description = "The destination CIDR block."
-  type        = string
-  default     = "20.0.0.0/24"
-}
-
-variable "sut1_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.10.11"
-}
-
-variable "sut1_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "200.0.0.101"
-}
-
-variable "sut2_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "200.0.0.102"
-}
-
-variable "sut2_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.20.11"
-}
-
-# Variables for Null Resource
-variable "first_run_commands" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = list(string)
-  default = [
-    "sudo sed -i 's/^PasswordAuthentication/#PasswordAuthentication/' /etc/ssh/sshd_config",
-    "sudo systemctl restart sshd",
-    "sudo useradd --create-home -s /bin/bash provisionuser",
-    "echo 'provisionuser:Csit1234' | sudo chpasswd",
-    "echo 'provisionuser ALL = (ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers",
-    "sudo useradd --create-home -s /bin/bash testuser",
-    "echo 'testuser:Csit1234' | sudo chpasswd",
-    "echo 'testuser ALL = (ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers"
-  ]
-}
-
-# Variables for Null Resource
-variable "ansible_topology_path" {
-  description = "Ansible topology path."
-  type        = string
-  default     = "../../fdio.infra.ansible/cloud_topology.yaml"
-}
diff --git a/fdio.infra.terraform/terraform-aws-3n-aws-c5n/versions.tf b/fdio.infra.terraform/terraform-aws-3n-aws-c5n/versions.tf
deleted file mode 100644 (file)
index 5896996..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-terraform {
-  required_providers {
-    aws = {
-      source  = "hashicorp/aws"
-      version = ">= 5.7.0"
-    }
-    null = {
-      source  = "hashicorp/null"
-      version = ">= 3.2.1"
-    }
-    tls = {
-      source  = "hashicorp/tls"
-      version = ">= 4.0.4"
-    }
-    vault = {
-      version = ">= 3.15.2"
-    }
-  }
-  required_version = ">= 1.4.2"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6gn/hosts.tftpl b/fdio.infra.terraform/terraform-aws-3n-c6gn/hosts.tftpl
deleted file mode 100644 (file)
index e88c8ba..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-all:
-  children:
-    tg:
-      hosts:
-        ${tg_public_ip}
-    sut:
-      hosts:
-        ${dut1_public_ip}
-        ${dut2_public_ip}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6gn/main.tf b/fdio.infra.terraform/terraform-aws-3n-c6gn/main.tf
deleted file mode 100644 (file)
index dc0ad6a..0000000
+++ /dev/null
@@ -1,457 +0,0 @@
-data "vault_aws_access_credentials" "creds" {
-  backend = "${var.vault-name}-path"
-  role    = "${var.vault-name}-role"
-}
-
-locals {
-  ansible_python_executable = "/usr/bin/python3"
-  availability_zone         = "eu-central-1a"
-  name                      = "csit-vpc"
-  environment               = "csit-vpc-environment"
-  key_pair_key_name         = "${var.resource_prefix}-${var.testbed_name}-pk"
-  placement_group_name      = "${var.resource_prefix}-${var.testbed_name}-pg"
-  security_group_name       = "${var.resource_prefix}-${var.testbed_name}-sg"
-  testbed_name              = "testbed1"
-  topology_name             = "3n-c6gn"
-  tg_name                   = "${var.resource_prefix}-${var.testbed_name}-tg"
-  sut1_name                 = "${var.resource_prefix}-${var.testbed_name}-sut1"
-  sut2_name                 = "${var.resource_prefix}-${var.testbed_name}-sut2"
-}
-
-# Create VPC
-module "vpc" {
-  source                   = "../terraform-aws-vpc"
-  security_group_name      = local.security_group_name
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-}
-
-# Create Subnet
-module "subnet_b" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "192.168.10.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 2)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-module "subnet_c" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "200.0.0.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 3)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-module "subnet_d" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "192.168.20.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 4)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-# Create Private Key
-module "private_key" {
-  source  = "pmikus/private-key/tls"
-  version = "4.0.4"
-
-  private_key_algorithm = var.private_key_algorithm
-}
-
-# Create Key Pair
-module "key_pair" {
-  source  = "pmikus/key-pair/aws"
-  version = "5.7.0"
-
-  key_pair_key_name   = local.key_pair_key_name
-  key_pair_public_key = module.private_key.public_key_openssh
-
-  key_pair_tags = {
-    "Environment" = local.environment
-  }
-}
-
-# Create Placement Group
-resource "aws_placement_group" "placement_group" {
-  name     = local.placement_group_name
-  strategy = var.placement_group_strategy
-}
-
-# Create Instance
-resource "aws_instance" "tg" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.tg_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.tg_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.tg_instance_initiated_shutdown_behavior
-  instance_type                        = var.tg_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.tg_private_ip
-  source_dest_check                    = var.tg_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "1"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "tg_if1" {
-  depends_on = [
-    module.subnet_b,
-    aws_instance.tg
-  ]
-  private_ip        = var.tg_if1_private_ip
-  private_ips       = [var.tg_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.tg_source_dest_check
-  subnet_id         = module.subnet_b.subnet_id
-
-  attachment {
-    instance     = aws_instance.tg.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "tg_if2" {
-  depends_on = [
-    module.subnet_d,
-    aws_instance.tg
-  ]
-  private_ips       = [var.tg_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.tg_source_dest_check
-  subnet_id         = module.subnet_d.subnet_id
-
-  attachment {
-    instance     = aws_instance.tg.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "tg_if1" {
-  id = aws_network_interface.tg_if1.id
-}
-
-data "aws_network_interface" "tg_if2" {
-  id = aws_network_interface.tg_if2.id
-}
-
-resource "aws_route" "route_tg_if1" {
-  depends_on = [
-    aws_instance.tg
-  ]
-  destination_cidr_block = var.destination_cidr_block_tg_if1
-  network_interface_id   = aws_instance.tg.primary_network_interface_id
-  route_table_id         = module.vpc.vpc_main_route_table_id
-}
-
-resource "aws_route" "route_tg_if2" {
-  depends_on = [
-    aws_instance.tg
-  ]
-  destination_cidr_block = var.destination_cidr_block_tg_if2
-  network_interface_id   = aws_instance.tg.primary_network_interface_id
-  route_table_id         = module.vpc.vpc_main_route_table_id
-}
-
-resource "aws_instance" "sut1" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.sut1_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.sut1_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.sut1_instance_initiated_shutdown_behavior
-  instance_type                        = var.sut1_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.sut1_private_ip
-  source_dest_check                    = var.sut1_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "2"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut1_if1" {
-  depends_on = [
-    module.subnet_b,
-    aws_instance.sut1
-  ]
-  private_ips       = [var.sut1_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut1_source_dest_check
-  subnet_id         = module.subnet_b.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut1.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut1_if2" {
-  depends_on = [
-    module.subnet_c,
-    aws_instance.sut1
-  ]
-  private_ips       = [var.sut1_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut1_source_dest_check
-  subnet_id         = module.subnet_c.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut1.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "sut1_if1" {
-  id = aws_network_interface.sut1_if1.id
-}
-
-data "aws_network_interface" "sut1_if2" {
-  id = aws_network_interface.sut1_if2.id
-}
-
-resource "aws_instance" "sut2" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.sut2_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.sut2_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.sut2_instance_initiated_shutdown_behavior
-  instance_type                        = var.sut2_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.sut2_private_ip
-  source_dest_check                    = var.sut2_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "2"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.sut2_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut2_if1" {
-  depends_on = [
-    module.subnet_c,
-    aws_instance.sut2
-  ]
-  private_ips       = [var.sut2_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut2_source_dest_check
-  subnet_id         = module.subnet_c.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut2.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.sut2_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut2_if2" {
-  depends_on = [
-    module.subnet_d,
-    aws_instance.sut2
-  ]
-  private_ips       = [var.sut2_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut2_source_dest_check
-  subnet_id         = module.subnet_d.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut2.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.sut2_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "sut2_if1" {
-  id = aws_network_interface.sut2_if1.id
-}
-
-data "aws_network_interface" "sut2_if2" {
-  id = aws_network_interface.sut2_if2.id
-}
-
-resource "null_resource" "deploy_tg" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2,
-    aws_instance.sut2,
-    aws_network_interface.sut2_if1,
-    aws_network_interface.sut2_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.tg.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "null_resource" "deploy_sut1" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2,
-    aws_instance.sut2,
-    aws_network_interface.sut2_if1,
-    aws_network_interface.sut2_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.sut1.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "null_resource" "deploy_sut2" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2,
-    aws_instance.sut2,
-    aws_network_interface.sut2_if1,
-    aws_network_interface.sut2_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.sut2.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "local_file" "topology_file" {
-  depends_on = [
-    aws_instance.tg,
-    aws_instance.sut1,
-    aws_instance.sut2
-  ]
-
-  content = templatefile(
-    "${path.module}/topology-${local.topology_name}.tftpl",
-    {
-      tg_if1_mac     = data.aws_network_interface.tg_if1.mac_address
-      tg_if2_mac     = data.aws_network_interface.tg_if2.mac_address
-      dut1_if1_mac   = data.aws_network_interface.sut1_if1.mac_address
-      dut1_if2_mac   = data.aws_network_interface.sut1_if2.mac_address
-      dut2_if1_mac   = data.aws_network_interface.sut2_if1.mac_address
-      dut2_if2_mac   = data.aws_network_interface.sut2_if2.mac_address
-      tg_public_ip   = aws_instance.tg.public_ip
-      dut1_public_ip = aws_instance.sut1.public_ip
-      dut2_public_ip = aws_instance.sut2.public_ip
-    }
-  )
-  filename = "${path.module}/../../topologies/available/${local.topology_name}-${local.testbed_name}.yaml"
-}
-
-resource "local_file" "hosts" {
-  depends_on = [
-    aws_instance.tg,
-    aws_instance.sut1,
-    aws_instance.sut2
-  ]
-
-  content = templatefile(
-    "${path.module}/hosts.tftpl",
-    {
-      tg_public_ip   = aws_instance.tg.public_ip
-      dut1_public_ip = aws_instance.sut1.public_ip
-      dut2_public_ip = aws_instance.sut2.public_ip
-    }
-  )
-  filename = "${path.module}/../../fdio.infra.ansible/inventories/cloud_inventory/hosts.yaml"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6gn/output.tf b/fdio.infra.terraform/terraform-aws-3n-c6gn/output.tf
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6gn/providers.tf b/fdio.infra.terraform/terraform-aws-3n-c6gn/providers.tf
deleted file mode 100644 (file)
index 485f0eb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-provider "aws" {
-  region     = var.region
-  access_key = data.vault_aws_access_credentials.creds.access_key
-  secret_key = data.vault_aws_access_credentials.creds.secret_key
-}
-
-provider "vault" {
-  address         = "http://10.30.51.24:8200"
-  skip_tls_verify = true
-  token           = "hvs.bzHw4ZHsz9B0019P8I73yS6l"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6gn/topology-3n-c6gn.tftpl b/fdio.infra.terraform/terraform-aws-3n-c6gn/topology-3n-c6gn.tftpl
deleted file mode 100644 (file)
index dc6d869..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
----
-metadata:
-  version: 0.1
-  schema:
-    - resources/topology_schemas/3_node_topology.sch.yaml
-    - resources/topology_schemas/topology.sch.yaml
-  tags: [hw, 3-node]
-
-nodes:
-  TG:
-    type: TG
-    subtype: TREX
-    host: "${tg_public_ip}"
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    interfaces:
-      port1:
-        # tg_instance/p1 - 100GE port1 on ENA NIC.
-        mac_address: "${tg_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link1
-        model: Amazon-Nitro-100G
-      port2:
-        # tg_instance/p2 - 100GE port2 on ENA NIC.
-        mac_address: "${tg_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link2
-        model: Amazon-Nitro-100G
-  DUT1:
-    type: DUT
-    host: "${dut1_public_ip}"
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    uio_driver: vfio-pci
-    interfaces:
-      port1:
-        # dut1_instance/p1 - 100GE port1 on ENA NIC.
-        mac_address: "${dut1_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link1
-        model: Amazon-Nitro-100G
-      port2:
-        # dut1_instance/p2 - 100GE port2 on ENA NIC.
-        mac_address: "${dut1_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link21
-        model: Amazon-Nitro-100G
-  DUT2:
-    type: DUT
-    host: "${dut2_public_ip}"
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    uio_driver: vfio-pci
-    interfaces:
-      port1:
-        # dut2_instance/p1 - 100GE port1 on ENA NIC.
-        mac_address: "${dut2_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link21
-        model: Amazon-Nitro-100G
-      port2:
-        # dut2_instance/p2 - 100GE port1 on ENA NIC.
-        mac_address: "${dut2_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link2
-        model: Amazon-Nitro-100G
-
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6gn/variables.tf b/fdio.infra.terraform/terraform-aws-3n-c6gn/variables.tf
deleted file mode 100644 (file)
index 23ae7cf..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-variable "vault-name" {
-  default = "dynamic-aws-creds-vault-fdio-csit-jenkins"
-}
-
-variable "region" {
-  description = "AWS Region."
-  type        = string
-  default     = "eu-central-1"
-}
-
-variable "resource_prefix" {
-  description = "Resources name prefix."
-  type        = string
-  default     = "csit-3n-c6gn"
-}
-
-variable "testbed_name" {
-  description = "Testbed name."
-  type        = string
-  default     = "testbed1"
-}
-
-# Variables for Private Key
-variable "private_key_algorithm" {
-  description = "The name of the algorithm to use for the key."
-  type        = string
-  default     = "ED25519"
-}
-
-# Variables for Placement Group
-variable "placement_group_strategy" {
-  description = "The placement strategy. Can be cluster, partition or spread."
-  type        = string
-  default     = "cluster"
-}
-
-# Variables for Instance
-variable "tg_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-07430bfa17fd4e597"
-}
-
-variable "tg_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "tg_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "tg_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c6in.4xlarge"
-}
-
-variable "tg_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.10"
-}
-
-variable "tg_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-variable "sut1_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-0cebabdc14ee56909"
-}
-
-variable "sut1_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "sut1_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "sut1_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c6gn.4xlarge"
-}
-
-variable "sut1_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.11"
-}
-
-variable "sut1_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-variable "sut2_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-0cebabdc14ee56909"
-}
-
-variable "sut2_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "sut2_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "sut2_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c6gn.4xlarge"
-}
-
-variable "sut2_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.12"
-}
-
-variable "sut2_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-# Variables for Network Interface
-variable "tg_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.10.254"
-}
-
-variable "tg_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.20.254"
-}
-
-variable "destination_cidr_block_tg_if1" {
-  description = "The destination CIDR block."
-  type        = string
-  default     = "10.0.0.0/24"
-}
-
-variable "destination_cidr_block_tg_if2" {
-  description = "The destination CIDR block."
-  type        = string
-  default     = "20.0.0.0/24"
-}
-
-variable "sut1_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.10.11"
-}
-
-variable "sut1_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "200.0.0.101"
-}
-
-variable "sut2_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "200.0.0.102"
-}
-
-variable "sut2_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.20.11"
-}
-
-# Variables for Null Resource
-variable "first_run_commands" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = list(string)
-  default = [
-    "sudo sed -i 's/^PasswordAuthentication/#PasswordAuthentication/' /etc/ssh/sshd_config",
-    "sudo systemctl restart sshd",
-    "sudo useradd --create-home -s /bin/bash provisionuser",
-    "echo 'provisionuser:Csit1234' | sudo chpasswd",
-    "echo 'provisionuser ALL = (ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers",
-    "sudo useradd --create-home -s /bin/bash testuser",
-    "echo 'testuser:Csit1234' | sudo chpasswd",
-    "echo 'testuser ALL = (ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers"
-  ]
-}
-
-# Variables for Null Resource
-variable "ansible_topology_path" {
-  description = "Ansible topology path."
-  type        = string
-  default     = "../../fdio.infra.ansible/cloud_topology.yaml"
-}
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6gn/versions.tf b/fdio.infra.terraform/terraform-aws-3n-c6gn/versions.tf
deleted file mode 100644 (file)
index 5896996..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-terraform {
-  required_providers {
-    aws = {
-      source  = "hashicorp/aws"
-      version = ">= 5.7.0"
-    }
-    null = {
-      source  = "hashicorp/null"
-      version = ">= 3.2.1"
-    }
-    tls = {
-      source  = "hashicorp/tls"
-      version = ">= 4.0.4"
-    }
-    vault = {
-      version = ">= 3.15.2"
-    }
-  }
-  required_version = ">= 1.4.2"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6in/hosts.tftpl b/fdio.infra.terraform/terraform-aws-3n-c6in/hosts.tftpl
deleted file mode 100644 (file)
index e88c8ba..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-all:
-  children:
-    tg:
-      hosts:
-        ${tg_public_ip}
-    sut:
-      hosts:
-        ${dut1_public_ip}
-        ${dut2_public_ip}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6in/main.tf b/fdio.infra.terraform/terraform-aws-3n-c6in/main.tf
deleted file mode 100644 (file)
index f1bb1b0..0000000
+++ /dev/null
@@ -1,457 +0,0 @@
-data "vault_aws_access_credentials" "creds" {
-  backend = "${var.vault-name}-path"
-  role    = "${var.vault-name}-role"
-}
-
-locals {
-  ansible_python_executable = "/usr/bin/python3"
-  availability_zone         = "eu-central-1b"
-  name                      = "csit-vpc"
-  environment               = "csit-vpc-environment"
-  key_pair_key_name         = "${var.resource_prefix}-${var.testbed_name}-pk"
-  placement_group_name      = "${var.resource_prefix}-${var.testbed_name}-pg"
-  security_group_name       = "${var.resource_prefix}-${var.testbed_name}-sg"
-  testbed_name              = "testbed1"
-  topology_name             = "3n-c6in"
-  tg_name                   = "${var.resource_prefix}-${var.testbed_name}-tg"
-  sut1_name                 = "${var.resource_prefix}-${var.testbed_name}-sut1"
-  sut2_name                 = "${var.resource_prefix}-${var.testbed_name}-sut2"
-}
-
-# Create VPC
-module "vpc" {
-  source                   = "../terraform-aws-vpc"
-  security_group_name      = local.security_group_name
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-}
-
-# Create Subnet
-module "subnet_b" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "192.168.10.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 2)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-module "subnet_c" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "200.0.0.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 3)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-module "subnet_d" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "192.168.20.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 4)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-# Create Private Key
-module "private_key" {
-  source  = "pmikus/private-key/tls"
-  version = "4.0.4"
-
-  private_key_algorithm = var.private_key_algorithm
-}
-
-# Create Key Pair
-module "key_pair" {
-  source  = "pmikus/key-pair/aws"
-  version = "5.7.0"
-
-  key_pair_key_name   = local.key_pair_key_name
-  key_pair_public_key = module.private_key.public_key_openssh
-
-  key_pair_tags = {
-    "Environment" = local.environment
-  }
-}
-
-# Create Placement Group
-resource "aws_placement_group" "placement_group" {
-  name     = local.placement_group_name
-  strategy = var.placement_group_strategy
-}
-
-# Create Instance
-resource "aws_instance" "tg" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.tg_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.tg_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.tg_instance_initiated_shutdown_behavior
-  instance_type                        = var.tg_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.tg_private_ip
-  source_dest_check                    = var.tg_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "1"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "tg_if1" {
-  depends_on = [
-    module.subnet_b,
-    aws_instance.tg
-  ]
-  private_ip        = var.tg_if1_private_ip
-  private_ips       = [var.tg_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.tg_source_dest_check
-  subnet_id         = module.subnet_b.subnet_id
-
-  attachment {
-    instance     = aws_instance.tg.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "tg_if2" {
-  depends_on = [
-    module.subnet_d,
-    aws_instance.tg
-  ]
-  private_ips       = [var.tg_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.tg_source_dest_check
-  subnet_id         = module.subnet_d.subnet_id
-
-  attachment {
-    instance     = aws_instance.tg.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "tg_if1" {
-  id = aws_network_interface.tg_if1.id
-}
-
-data "aws_network_interface" "tg_if2" {
-  id = aws_network_interface.tg_if2.id
-}
-
-resource "aws_route" "route_tg_if1" {
-  depends_on = [
-    aws_instance.tg
-  ]
-  destination_cidr_block = var.destination_cidr_block_tg_if1
-  network_interface_id   = aws_instance.tg.primary_network_interface_id
-  route_table_id         = module.vpc.vpc_main_route_table_id
-}
-
-resource "aws_route" "route_tg_if2" {
-  depends_on = [
-    aws_instance.tg
-  ]
-  destination_cidr_block = var.destination_cidr_block_tg_if2
-  network_interface_id   = aws_instance.tg.primary_network_interface_id
-  route_table_id         = module.vpc.vpc_main_route_table_id
-}
-
-resource "aws_instance" "sut1" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.sut1_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.sut1_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.sut1_instance_initiated_shutdown_behavior
-  instance_type                        = var.sut1_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.sut1_private_ip
-  source_dest_check                    = var.sut1_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "2"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut1_if1" {
-  depends_on = [
-    module.subnet_b,
-    aws_instance.sut1
-  ]
-  private_ips       = [var.sut1_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut1_source_dest_check
-  subnet_id         = module.subnet_b.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut1.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut1_if2" {
-  depends_on = [
-    module.subnet_c,
-    aws_instance.sut1
-  ]
-  private_ips       = [var.sut1_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut1_source_dest_check
-  subnet_id         = module.subnet_c.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut1.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "sut1_if1" {
-  id = aws_network_interface.sut1_if1.id
-}
-
-data "aws_network_interface" "sut1_if2" {
-  id = aws_network_interface.sut1_if2.id
-}
-
-resource "aws_instance" "sut2" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.sut2_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.sut2_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.sut2_instance_initiated_shutdown_behavior
-  instance_type                        = var.sut2_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.sut2_private_ip
-  source_dest_check                    = var.sut2_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "2"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.sut2_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut2_if1" {
-  depends_on = [
-    module.subnet_c,
-    aws_instance.sut2
-  ]
-  private_ips       = [var.sut2_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut2_source_dest_check
-  subnet_id         = module.subnet_c.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut2.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.sut2_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut2_if2" {
-  depends_on = [
-    module.subnet_d,
-    aws_instance.sut2
-  ]
-  private_ips       = [var.sut2_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut2_source_dest_check
-  subnet_id         = module.subnet_d.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut2.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.sut2_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "sut2_if1" {
-  id = aws_network_interface.sut2_if1.id
-}
-
-data "aws_network_interface" "sut2_if2" {
-  id = aws_network_interface.sut2_if2.id
-}
-
-resource "null_resource" "deploy_tg" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2,
-    aws_instance.sut2,
-    aws_network_interface.sut2_if1,
-    aws_network_interface.sut2_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.tg.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "null_resource" "deploy_sut1" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2,
-    aws_instance.sut2,
-    aws_network_interface.sut2_if1,
-    aws_network_interface.sut2_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.sut1.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "null_resource" "deploy_sut2" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2,
-    aws_instance.sut2,
-    aws_network_interface.sut2_if1,
-    aws_network_interface.sut2_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.sut2.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "local_file" "topology_file" {
-  depends_on = [
-    aws_instance.tg,
-    aws_instance.sut1,
-    aws_instance.sut2
-  ]
-
-  content = templatefile(
-    "${path.module}/topology-${local.topology_name}.tftpl",
-    {
-      tg_if1_mac     = data.aws_network_interface.tg_if1.mac_address
-      tg_if2_mac     = data.aws_network_interface.tg_if2.mac_address
-      dut1_if1_mac   = data.aws_network_interface.sut1_if1.mac_address
-      dut1_if2_mac   = data.aws_network_interface.sut1_if2.mac_address
-      dut2_if1_mac   = data.aws_network_interface.sut2_if1.mac_address
-      dut2_if2_mac   = data.aws_network_interface.sut2_if2.mac_address
-      tg_public_ip   = aws_instance.tg.public_ip
-      dut1_public_ip = aws_instance.sut1.public_ip
-      dut2_public_ip = aws_instance.sut2.public_ip
-    }
-  )
-  filename = "${path.module}/../../topologies/available/${local.topology_name}-${local.testbed_name}.yaml"
-}
-
-resource "local_file" "hosts" {
-  depends_on = [
-    aws_instance.tg,
-    aws_instance.sut1,
-    aws_instance.sut2
-  ]
-
-  content = templatefile(
-    "${path.module}/hosts.tftpl",
-    {
-      tg_public_ip   = aws_instance.tg.public_ip
-      dut1_public_ip = aws_instance.sut1.public_ip
-      dut2_public_ip = aws_instance.sut2.public_ip
-    }
-  )
-  filename = "${path.module}/../../fdio.infra.ansible/inventories/cloud_inventory/hosts.yaml"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6in/output.tf b/fdio.infra.terraform/terraform-aws-3n-c6in/output.tf
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6in/providers.tf b/fdio.infra.terraform/terraform-aws-3n-c6in/providers.tf
deleted file mode 100644 (file)
index 485f0eb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-provider "aws" {
-  region     = var.region
-  access_key = data.vault_aws_access_credentials.creds.access_key
-  secret_key = data.vault_aws_access_credentials.creds.secret_key
-}
-
-provider "vault" {
-  address         = "http://10.30.51.24:8200"
-  skip_tls_verify = true
-  token           = "hvs.bzHw4ZHsz9B0019P8I73yS6l"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6in/topology-3n-c6in.tftpl b/fdio.infra.terraform/terraform-aws-3n-c6in/topology-3n-c6in.tftpl
deleted file mode 100644 (file)
index 2ec39d0..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
----
-metadata:
-  version: 0.1
-  schema:
-    - resources/topology_schemas/3_node_topology.sch.yaml
-    - resources/topology_schemas/topology.sch.yaml
-  tags: [hw, 3-node]
-
-nodes:
-  TG:
-    type: TG
-    subtype: TREX
-    host: "${tg_public_ip}"
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    interfaces:
-      port1:
-        # tg_instance/p1 - 200GE port1 on ENA NIC.
-        mac_address: "${tg_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link1
-        model: Amazon-Nitro-200G
-      port2:
-        # tg_instance/p2 - 200GE port2 on ENA NIC.
-        mac_address: "${tg_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link2
-        model: Amazon-Nitro-200G
-  DUT1:
-    type: DUT
-    host: "${dut1_public_ip}"
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    uio_driver: vfio-pci
-    interfaces:
-      port1:
-        # dut1_instance/p1 - 200GE port1 on ENA NIC.
-        mac_address: "${dut1_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link1
-        model: Amazon-Nitro-200G
-      port2:
-        # dut1_instance/p2 - 200GE port2 on ENA NIC.
-        mac_address: "${dut1_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link21
-        model: Amazon-Nitro-200G
-  DUT2:
-    type: DUT
-    host: "${dut2_public_ip}"
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    uio_driver: vfio-pci
-    interfaces:
-      port1:
-        # dut2_instance/p1 - 200GE port1 on ENA NIC.
-        mac_address: "${dut2_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link21
-        model: Amazon-Nitro-200G
-      port2:
-        # dut2_instance/p2 - 200GE port1 on ENA NIC.
-        mac_address: "${dut2_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link2
-        model: Amazon-Nitro-200G
-
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6in/variables.tf b/fdio.infra.terraform/terraform-aws-3n-c6in/variables.tf
deleted file mode 100644 (file)
index 084a9da..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-variable "vault-name" {
-  default = "dynamic-aws-creds-vault-fdio-csit-jenkins"
-}
-
-variable "region" {
-  description = "AWS Region."
-  type        = string
-  default     = "eu-central-1"
-}
-
-variable "resource_prefix" {
-  description = "Resources name prefix."
-  type        = string
-  default     = "csit-3n-c6in"
-}
-
-variable "testbed_name" {
-  description = "Testbed name."
-  type        = string
-  default     = "testbed1"
-}
-
-# Variables for Private Key
-variable "private_key_algorithm" {
-  description = "The name of the algorithm to use for the key."
-  type        = string
-  default     = "ED25519"
-}
-
-# Variables for Placement Group
-variable "placement_group_strategy" {
-  description = "The placement strategy. Can be cluster, partition or spread."
-  type        = string
-  default     = "cluster"
-}
-
-# Variables for Instance
-variable "tg_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-0285a978d8bd77dcb"
-}
-
-variable "tg_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "tg_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "tg_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c6in.4xlarge"
-}
-
-variable "tg_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.10"
-}
-
-variable "tg_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-variable "sut1_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-0f3ecd7f56fc232bd"
-}
-
-variable "sut1_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "sut1_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "sut1_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c6in.4xlarge"
-}
-
-variable "sut1_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.11"
-}
-
-variable "sut1_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-variable "sut2_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-07898402cb1fd6561"
-}
-
-variable "sut2_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "sut2_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "sut2_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c6in.4xlarge"
-}
-
-variable "sut2_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.12"
-}
-
-variable "sut2_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-# Variables for Network Interface
-variable "tg_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.10.254"
-}
-
-variable "tg_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.20.254"
-}
-
-variable "destination_cidr_block_tg_if1" {
-  description = "The destination CIDR block."
-  type        = string
-  default     = "10.0.0.0/24"
-}
-
-variable "destination_cidr_block_tg_if2" {
-  description = "The destination CIDR block."
-  type        = string
-  default     = "20.0.0.0/24"
-}
-
-variable "sut1_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.10.11"
-}
-
-variable "sut1_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "200.0.0.101"
-}
-
-variable "sut2_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "200.0.0.102"
-}
-
-variable "sut2_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.20.11"
-}
-
-# Variables for Null Resource
-variable "first_run_commands" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = list(string)
-  default = [
-    "sudo sed -i 's/^PasswordAuthentication/#PasswordAuthentication/' /etc/ssh/sshd_config",
-    "sudo systemctl restart sshd",
-    "sudo useradd --create-home -s /bin/bash provisionuser",
-    "echo 'provisionuser:Csit1234' | sudo chpasswd",
-    "echo 'provisionuser ALL = (ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers",
-    "sudo useradd --create-home -s /bin/bash testuser",
-    "echo 'testuser:Csit1234' | sudo chpasswd",
-    "echo 'testuser ALL = (ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers"
-  ]
-}
-
-# Variables for Null Resource
-variable "ansible_topology_path" {
-  description = "Ansible topology path."
-  type        = string
-  default     = "../../fdio.infra.ansible/cloud_topology.yaml"
-}
diff --git a/fdio.infra.terraform/terraform-aws-3n-c6in/versions.tf b/fdio.infra.terraform/terraform-aws-3n-c6in/versions.tf
deleted file mode 100644 (file)
index 5896996..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-terraform {
-  required_providers {
-    aws = {
-      source  = "hashicorp/aws"
-      version = ">= 5.7.0"
-    }
-    null = {
-      source  = "hashicorp/null"
-      version = ">= 3.2.1"
-    }
-    tls = {
-      source  = "hashicorp/tls"
-      version = ">= 4.0.4"
-    }
-    vault = {
-      version = ">= 3.15.2"
-    }
-  }
-  required_version = ">= 1.4.2"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c7gn/hosts.tftpl b/fdio.infra.terraform/terraform-aws-3n-c7gn/hosts.tftpl
deleted file mode 100644 (file)
index e88c8ba..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-all:
-  children:
-    tg:
-      hosts:
-        ${tg_public_ip}
-    sut:
-      hosts:
-        ${dut1_public_ip}
-        ${dut2_public_ip}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c7gn/main.tf b/fdio.infra.terraform/terraform-aws-3n-c7gn/main.tf
deleted file mode 100644 (file)
index 68d2dd9..0000000
+++ /dev/null
@@ -1,457 +0,0 @@
-data "vault_aws_access_credentials" "creds" {
-  backend = "${var.vault-name}-path"
-  role    = "${var.vault-name}-role"
-}
-
-locals {
-  ansible_python_executable = "/usr/bin/python3"
-  availability_zone         = "${var.region}a"
-  name                      = "csit-vpc"
-  environment               = "csit-vpc-environment"
-  key_pair_key_name         = "${var.resource_prefix}-${var.testbed_name}-pk"
-  placement_group_name      = "${var.resource_prefix}-${var.testbed_name}-pg"
-  security_group_name       = "${var.resource_prefix}-${var.testbed_name}-sg"
-  testbed_name              = "testbed1"
-  topology_name             = "3n-c7gn"
-  tg_name                   = "${var.resource_prefix}-${var.testbed_name}-tg"
-  sut1_name                 = "${var.resource_prefix}-${var.testbed_name}-sut1"
-  sut2_name                 = "${var.resource_prefix}-${var.testbed_name}-sut2"
-}
-
-# Create VPC
-module "vpc" {
-  source                   = "../terraform-aws-vpc"
-  security_group_name      = local.security_group_name
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-}
-
-# Create Subnet
-module "subnet_b" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "192.168.10.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 2)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-module "subnet_c" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "200.0.0.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 3)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-module "subnet_d" {
-  source                   = "../terraform-aws-subnet"
-  subnet_cidr_block        = "192.168.20.0/24"
-  subnet_ipv6_cidr_block   = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 4)
-  subnet_availability_zone = local.availability_zone
-  tags_name                = local.name
-  tags_environment         = local.environment
-  subnet_vpc_id            = module.vpc.vpc_id
-}
-
-# Create Private Key
-module "private_key" {
-  source  = "pmikus/private-key/tls"
-  version = "4.0.4"
-
-  private_key_algorithm = var.private_key_algorithm
-}
-
-# Create Key Pair
-module "key_pair" {
-  source  = "pmikus/key-pair/aws"
-  version = "5.7.0"
-
-  key_pair_key_name   = local.key_pair_key_name
-  key_pair_public_key = module.private_key.public_key_openssh
-
-  key_pair_tags = {
-    "Environment" = local.environment
-  }
-}
-
-# Create Placement Group
-resource "aws_placement_group" "placement_group" {
-  name     = local.placement_group_name
-  strategy = var.placement_group_strategy
-}
-
-# Create Instance
-resource "aws_instance" "tg" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.tg_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.tg_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.tg_instance_initiated_shutdown_behavior
-  instance_type                        = var.tg_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.tg_private_ip
-  source_dest_check                    = var.tg_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "1"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "tg_if1" {
-  depends_on = [
-    module.subnet_b,
-    aws_instance.tg
-  ]
-  private_ip        = var.tg_if1_private_ip
-  private_ips       = [var.tg_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.tg_source_dest_check
-  subnet_id         = module.subnet_b.subnet_id
-
-  attachment {
-    instance     = aws_instance.tg.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "tg_if2" {
-  depends_on = [
-    module.subnet_d,
-    aws_instance.tg
-  ]
-  private_ips       = [var.tg_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.tg_source_dest_check
-  subnet_id         = module.subnet_d.subnet_id
-
-  attachment {
-    instance     = aws_instance.tg.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.tg_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "tg_if1" {
-  id = aws_network_interface.tg_if1.id
-}
-
-data "aws_network_interface" "tg_if2" {
-  id = aws_network_interface.tg_if2.id
-}
-
-resource "aws_route" "route_tg_if1" {
-  depends_on = [
-    aws_instance.tg
-  ]
-  destination_cidr_block = var.destination_cidr_block_tg_if1
-  network_interface_id   = aws_instance.tg.primary_network_interface_id
-  route_table_id         = module.vpc.vpc_main_route_table_id
-}
-
-resource "aws_route" "route_tg_if2" {
-  depends_on = [
-    aws_instance.tg
-  ]
-  destination_cidr_block = var.destination_cidr_block_tg_if2
-  network_interface_id   = aws_instance.tg.primary_network_interface_id
-  route_table_id         = module.vpc.vpc_main_route_table_id
-}
-
-resource "aws_instance" "sut1" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.sut1_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.sut1_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.sut1_instance_initiated_shutdown_behavior
-  instance_type                        = var.sut1_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.sut1_private_ip
-  source_dest_check                    = var.sut1_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "2"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut1_if1" {
-  depends_on = [
-    module.subnet_b,
-    aws_instance.sut1
-  ]
-  private_ips       = [var.sut1_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut1_source_dest_check
-  subnet_id         = module.subnet_b.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut1.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut1_if2" {
-  depends_on = [
-    module.subnet_c,
-    aws_instance.sut1
-  ]
-  private_ips       = [var.sut1_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut1_source_dest_check
-  subnet_id         = module.subnet_c.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut1.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.sut1_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "sut1_if1" {
-  id = aws_network_interface.sut1_if1.id
-}
-
-data "aws_network_interface" "sut1_if2" {
-  id = aws_network_interface.sut1_if2.id
-}
-
-resource "aws_instance" "sut2" {
-  depends_on = [
-    module.vpc,
-    aws_placement_group.placement_group
-  ]
-  ami                                  = var.sut2_ami
-  availability_zone                    = local.availability_zone
-  associate_public_ip_address          = var.sut2_associate_public_ip_address
-  instance_initiated_shutdown_behavior = var.sut2_instance_initiated_shutdown_behavior
-  instance_type                        = var.sut2_instance_type
-  key_name                             = module.key_pair.key_pair_key_name
-  placement_group                      = aws_placement_group.placement_group.id
-  private_ip                           = var.sut2_private_ip
-  source_dest_check                    = var.sut2_source_dest_check
-  subnet_id                            = module.vpc.vpc_subnet_id
-  vpc_security_group_ids               = [module.vpc.vpc_security_group_id]
-  # host_id                            = "2"
-
-  root_block_device {
-    delete_on_termination = true
-    volume_size           = 50
-  }
-
-  tags = {
-    "Name"        = local.sut2_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut2_if1" {
-  depends_on = [
-    module.subnet_c,
-    aws_instance.sut2
-  ]
-  private_ips       = [var.sut2_if1_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut2_source_dest_check
-  subnet_id         = module.subnet_c.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut2.id
-    device_index = 1
-  }
-
-  tags = {
-    "Name"        = local.sut2_name
-    "Environment" = local.environment
-  }
-}
-
-resource "aws_network_interface" "sut2_if2" {
-  depends_on = [
-    module.subnet_d,
-    aws_instance.sut2
-  ]
-  private_ips       = [var.sut2_if2_private_ip]
-  security_groups   = [module.vpc.vpc_security_group_id]
-  source_dest_check = var.sut2_source_dest_check
-  subnet_id         = module.subnet_d.subnet_id
-
-  attachment {
-    instance     = aws_instance.sut2.id
-    device_index = 2
-  }
-
-  tags = {
-    "Name"        = local.sut2_name
-    "Environment" = local.environment
-  }
-}
-
-data "aws_network_interface" "sut2_if1" {
-  id = aws_network_interface.sut2_if1.id
-}
-
-data "aws_network_interface" "sut2_if2" {
-  id = aws_network_interface.sut2_if2.id
-}
-
-resource "null_resource" "deploy_tg" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2,
-    aws_instance.sut2,
-    aws_network_interface.sut2_if1,
-    aws_network_interface.sut2_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.tg.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "null_resource" "deploy_sut1" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2,
-    aws_instance.sut2,
-    aws_network_interface.sut2_if1,
-    aws_network_interface.sut2_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.sut1.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "null_resource" "deploy_sut2" {
-  depends_on = [
-    aws_instance.tg,
-    aws_network_interface.tg_if1,
-    aws_network_interface.tg_if2,
-    aws_instance.sut1,
-    aws_network_interface.sut1_if1,
-    aws_network_interface.sut1_if2,
-    aws_instance.sut2,
-    aws_network_interface.sut2_if1,
-    aws_network_interface.sut2_if2
-  ]
-
-  connection {
-    user        = "ubuntu"
-    host        = aws_instance.sut2.public_ip
-    private_key = module.private_key.private_key_pem
-  }
-
-  provisioner "remote-exec" {
-    inline = var.first_run_commands
-  }
-}
-
-resource "local_file" "topology_file" {
-  depends_on = [
-    aws_instance.tg,
-    aws_instance.sut1,
-    aws_instance.sut2
-  ]
-
-  content = templatefile(
-    "${path.module}/topology-${local.topology_name}.tftpl",
-    {
-      tg_if1_mac     = data.aws_network_interface.tg_if1.mac_address
-      tg_if2_mac     = data.aws_network_interface.tg_if2.mac_address
-      dut1_if1_mac   = data.aws_network_interface.sut1_if1.mac_address
-      dut1_if2_mac   = data.aws_network_interface.sut1_if2.mac_address
-      dut2_if1_mac   = data.aws_network_interface.sut2_if1.mac_address
-      dut2_if2_mac   = data.aws_network_interface.sut2_if2.mac_address
-      tg_public_ip   = aws_instance.tg.public_ip
-      dut1_public_ip = aws_instance.sut1.public_ip
-      dut2_public_ip = aws_instance.sut2.public_ip
-    }
-  )
-  filename = "${path.module}/../../topologies/available/${local.topology_name}-${local.testbed_name}.yaml"
-}
-
-resource "local_file" "hosts" {
-  depends_on = [
-    aws_instance.tg,
-    aws_instance.sut1,
-    aws_instance.sut2
-  ]
-
-  content = templatefile(
-    "${path.module}/hosts.tftpl",
-    {
-      tg_public_ip   = aws_instance.tg.public_ip
-      dut1_public_ip = aws_instance.sut1.public_ip
-      dut2_public_ip = aws_instance.sut2.public_ip
-    }
-  )
-  filename = "${path.module}/../../fdio.infra.ansible/inventories/cloud_inventory/hosts.yaml"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c7gn/output.tf b/fdio.infra.terraform/terraform-aws-3n-c7gn/output.tf
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/fdio.infra.terraform/terraform-aws-3n-c7gn/providers.tf b/fdio.infra.terraform/terraform-aws-3n-c7gn/providers.tf
deleted file mode 100644 (file)
index 485f0eb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-provider "aws" {
-  region     = var.region
-  access_key = data.vault_aws_access_credentials.creds.access_key
-  secret_key = data.vault_aws_access_credentials.creds.secret_key
-}
-
-provider "vault" {
-  address         = "http://10.30.51.24:8200"
-  skip_tls_verify = true
-  token           = "hvs.bzHw4ZHsz9B0019P8I73yS6l"
-}
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c7gn/topology-3n-c7gn.tftpl b/fdio.infra.terraform/terraform-aws-3n-c7gn/topology-3n-c7gn.tftpl
deleted file mode 100644 (file)
index 65106da..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
----
-metadata:
-  version: 0.1
-  schema:
-    - resources/topology_schemas/3_node_topology.sch.yaml
-    - resources/topology_schemas/topology.sch.yaml
-  tags: [hw, 3-node]
-
-nodes:
-  TG:
-    type: TG
-    subtype: TREX
-    host: "${tg_public_ip}"
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    interfaces:
-      port1:
-        # tg_instance/p1 - 100GE port1 on ENA NIC.
-        mac_address: "${tg_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link1
-        model: Amazon-Nitro-100G
-      port2:
-        # tg_instance/p2 - 100GE port2 on ENA NIC.
-        mac_address: "${tg_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link2
-        model: Amazon-Nitro-100G
-  DUT1:
-    type: DUT
-    host: "${dut1_public_ip}"
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    uio_driver: vfio-pci
-    interfaces:
-      port1:
-        # dut1_instance/p1 - 100GE port1 on ENA NIC.
-        mac_address: "${dut1_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link1
-        model: Amazon-Nitro-100G
-      port2:
-        # dut1_instance/p2 - 100GE port2 on ENA NIC.
-        mac_address: "${dut1_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link21
-        model: Amazon-Nitro-100G
-  DUT2:
-    type: DUT
-    host: "${dut2_public_ip}"
-    arch: x86_64
-    port: 22
-    username: testuser
-    password: Csit1234
-    uio_driver: vfio-pci
-    interfaces:
-      port1:
-        # dut2_instance/p1 - 100GE port1 on ENA NIC.
-        mac_address: "${dut2_if1_mac}"
-        pci_address: "0000:00:06.0"
-        link: link21
-        model: Amazon-Nitro-100G
-      port2:
-        # dut2_instance/p2 - 100GE port1 on ENA NIC.
-        mac_address: "${dut2_if2_mac}"
-        pci_address: "0000:00:07.0"
-        link: link2
-        model: Amazon-Nitro-100G
\ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-3n-c7gn/variables.tf b/fdio.infra.terraform/terraform-aws-3n-c7gn/variables.tf
deleted file mode 100644 (file)
index 3ad51af..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-variable "vault-name" {
-  default = "dynamic-aws-creds-vault-fdio-csit-jenkins"
-}
-
-variable "region" {
-  description = "AWS Region."
-  type        = string
-  default     = "eu-west-1"
-}
-
-variable "resource_prefix" {
-  description = "Resources name prefix."
-  type        = string
-  default     = "csit-3n-c7gn"
-}
-
-variable "testbed_name" {
-  description = "Testbed name."
-  type        = string
-  default     = "testbed1"
-}
-
-# Variables for Private Key
-variable "private_key_algorithm" {
-  description = "The name of the algorithm to use for the key."
-  type        = string
-  default     = "ED25519"
-}
-
-# Variables for Placement Group
-variable "placement_group_strategy" {
-  description = "The placement strategy. Can be cluster, partition or spread."
-  type        = string
-  default     = "cluster"
-}
-
-# Variables for Instance
-variable "tg_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-0b5aa26a6e4192705"
-}
-
-variable "tg_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "tg_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "tg_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c6in.4xlarge"
-}
-
-variable "tg_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.10"
-}
-
-variable "tg_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-variable "sut1_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-08930f71bd0be1085"
-}
-
-variable "sut1_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "sut1_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "sut1_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c7gn.4xlarge"
-}
-
-variable "sut1_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.11"
-}
-
-variable "sut1_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-variable "sut2_ami" {
-  description = "AMI to use for the instance."
-  type        = string
-  default     = "ami-08930f71bd0be1085"
-}
-
-variable "sut2_associate_public_ip_address" {
-  description = "Whether to associate a public IP address with an instance in a VPC."
-  type        = bool
-  default     = true
-}
-
-variable "sut2_instance_initiated_shutdown_behavior" {
-  description = "Shutdown behavior for the instance."
-  type        = string
-  default     = "terminate"
-}
-
-variable "sut2_instance_type" {
-  description = "The instance type to use for the instance."
-  type        = string
-  default     = "c7gn.4xlarge"
-}
-
-variable "sut2_private_ip" {
-  description = "Private IP address to associate with the instance in a VPC."
-  type        = string
-  default     = "192.168.0.12"
-}
-
-variable "sut2_source_dest_check" {
-  description = "Controls if traffic is routed to the instance when the destination address does not match the instance."
-  type        = bool
-  default     = false
-}
-
-# Variables for Network Interface
-variable "tg_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.10.254"
-}
-
-variable "tg_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.20.254"
-}
-
-variable "destination_cidr_block_tg_if1" {
-  description = "The destination CIDR block."
-  type        = string
-  default     = "10.0.0.0/24"
-}
-
-variable "destination_cidr_block_tg_if2" {
-  description = "The destination CIDR block."
-  type        = string
-  default     = "20.0.0.0/24"
-}
-
-variable "sut1_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.10.11"
-}
-
-variable "sut1_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "200.0.0.101"
-}
-
-variable "sut2_if1_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "200.0.0.102"
-}
-
-variable "sut2_if2_private_ip" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = string
-  default     = "192.168.20.11"
-}
-
-# Variables for Null Resource
-variable "first_run_commands" {
-  description = "List of private IPs to assign to the ENI without regard to order."
-  type        = list(string)
-  default = [
-    "sudo sed -i 's/^PasswordAuthentication/#PasswordAuthentication/' /etc/ssh/sshd_config",
-    "sudo systemctl restart sshd",
-    "sudo useradd --create-home -s /bin/bash provisionuser",
-    "echo 'provisionuser:Csit1234' | sudo chpasswd",
-    "echo 'provisionuser ALL = (ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers",
-    "sudo useradd --create-home -s /bin/bash testuser",
-    "echo 'testuser:Csit1234' | sudo chpasswd",
-    "echo 'testuser ALL = (ALL) NOPASSWD: ALL' | sudo tee -a /etc/sudoers"
-  ]
-}
-
-# Variables for Null Resource
-variable "ansible_topology_path" {
-  description = "Ansible topology path."
-  type        = string
-  default     = "../../fdio.infra.ansible/cloud_topology.yaml"
-}
diff --git a/fdio.infra.terraform/terraform-aws-3n-c7gn/versions.tf b/fdio.infra.terraform/terraform-aws-3n-c7gn/versions.tf
deleted file mode 100644 (file)
index 5896996..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-terraform {
-  required_providers {
-    aws = {
-      source  = "hashicorp/aws"
-      version = ">= 5.7.0"
-    }
-    null = {
-      source  = "hashicorp/null"
-      version = ">= 3.2.1"
-    }
-    tls = {
-      source  = "hashicorp/tls"
-      version = ">= 4.0.4"
-    }
-    vault = {
-      version = ">= 3.15.2"
-    }
-  }
-  required_version = ">= 1.4.2"
-}
\ No newline at end of file
index 58507ff..1d3c78e 100644 (file)
@@ -60,7 +60,7 @@ source "amazon-ebs" "csit_ubuntu_noble_arm_sut" {
   force_deregister = true
   region           = "eu-west-1"
   skip_create_ami  = false
-  source_ami       = "ami-0a1b36900d715a3ad"
+  source_ami       = "ami-099a546c02844706e"
   ssh_username     = "ubuntu"
 }
 
@@ -47,28 +47,28 @@ variable "ansible_provision_pwd" {
   default     = "Csit1234"
 }
 
-source "amazon-ebs" "csit_ubuntu_noble_x86_sut" {
-  ami_name        = "csit_ubuntu_noble_x86_sut"
-  ami_description = "CSIT SUT image based on Ubuntu noble"
-  ena_support     = true
-  instance_type   = "c6in.4xlarge"
-  launch_block_device_mappings {
-    device_name = "/dev/sda1"
-    volume_size = 40
-    volume_type = "gp2"
-  }
-  force_deregister = true
-  region           = "eu-central-1"
-  skip_create_ami  = false
-  source_ami       = "ami-026c3177c9bd54288"
-  ssh_username     = "ubuntu"
-}
+#source "amazon-ebs" "csit_ubuntu_noble_x86_sut" {
+#  ami_name        = "csit_ubuntu_noble_x86_sut"
+#  ami_description = "CSIT SUT image based on Ubuntu noble"
+#  ena_support     = true
+#  instance_type   = "c5n.4xlarge"
+#  launch_block_device_mappings {
+#    device_name = "/dev/sda1"
+#    volume_size = 40
+#    volume_type = "gp2"
+#  }
+#  force_deregister = true
+#  region           = "eu-central-1"
+#  skip_create_ami  = false
+#  source_ami       = "ami-0084a47cc718c111a"
+#  ssh_username     = "ubuntu"
+#}
 
 source "amazon-ebs" "csit_ubuntu_noble_x86_tg" {
   ami_name        = "csit_ubuntu_noble_x86_tg"
   ami_description = "CSIT TG image based on Ubuntu noble"
   ena_support     = true
-  instance_type   = "c6in.4xlarge"
+  instance_type   = "c5n.4xlarge"
   launch_block_device_mappings {
     device_name = "/dev/sda1"
     volume_size = 40
@@ -77,32 +77,32 @@ source "amazon-ebs" "csit_ubuntu_noble_x86_tg" {
   force_deregister = true
   region           = "eu-central-1"
   skip_create_ami  = false
-  source_ami       = "ami-026c3177c9bd54288"
+  source_ami       = "ami-0084a47cc718c111a"
   ssh_username     = "ubuntu"
 }
 
-build {
-  name = "csit_ubuntu_noble_x86_sut-packer"
-  sources = [
-    "source.amazon-ebs.csit_ubuntu_noble_x86_sut"
-  ]
-  provisioner "shell" {
-    inline = var.first_run_commands
-  }
-  provisioner "ansible" {
-    playbook_file = var.ansible_file_path
-    user          = "ubuntu"
-    use_proxy     = false
-    groups        = ["sut_aws"]
-    extra_arguments = [
-      "--extra-vars", "ansible_ssh_pass=${var.ansible_provision_pwd}",
-      "--extra-vars", "aws=true"
-    ]
-  }
-  provisioner "shell" {
-    inline = var.last_run_commands
-  }
-}
+#build {
+#  name = "csit_ubuntu_noble_x86_sut-packer"
+#  sources = [
+#    "source.amazon-ebs.csit_ubuntu_noble_x86_sut"
+#  ]
+#  provisioner "shell" {
+#    inline = var.first_run_commands
+#  }
+#  provisioner "ansible" {
+#    playbook_file = var.ansible_file_path
+#    user          = "ubuntu"
+#    use_proxy     = false
+#    groups        = ["sut_aws"]
+#    extra_arguments = [
+#      "--extra-vars", "ansible_ssh_pass=${var.ansible_provision_pwd}",
+#      "--extra-vars", "aws=true"
+#    ]
+#  }
+#  provisioner "shell" {
+#    inline = var.last_run_commands
+#  }
+#}
 
 build {
   name = "csit_ubuntu_noble_x86_tg-packer"