aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/2n_aws_c5n/main.tf
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-03-07 08:57:13 +0000
committerPeter Mikus <pmikus@cisco.com>2021-03-11 07:07:03 +0000
commitc318223fcd266c0ee2982e803c44e193c2023054 (patch)
tree4559bf49a5ab183d0c3a75a883edf40e7802222f /fdio.infra.terraform/2n_aws_c5n/main.tf
parent221e2f4da7cb27954525d973d930cb8db4601c8f (diff)
Infra: Switch csit-shim to fdiotools
+ use /u/fdiotools + use ubuntu 20.04 Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I091e63a0d9e50de203b1527c7500b3864a616af6
Diffstat (limited to 'fdio.infra.terraform/2n_aws_c5n/main.tf')
-rw-r--r--fdio.infra.terraform/2n_aws_c5n/main.tf53
1 files changed, 53 insertions, 0 deletions
diff --git a/fdio.infra.terraform/2n_aws_c5n/main.tf b/fdio.infra.terraform/2n_aws_c5n/main.tf
new file mode 100644
index 0000000000..a73288d9e8
--- /dev/null
+++ b/fdio.infra.terraform/2n_aws_c5n/main.tf
@@ -0,0 +1,53 @@
+module "deploy" {
+ source = "./deploy"
+
+ # TODO: Use ENV variable for testbed_name for dynamic deployment
+ testbed_name = "testbed1"
+ topology_name = "2n_aws_c5n"
+ environment_name = "CSIT-AWS"
+ resources_name_prefix = "CSIT_2n_aws_c5n"
+
+ # AWS general
+ region = "eu-central-1"
+ avail_zone = "eu-central-1a"
+ instance_type = "c5n.4xlarge"
+ ami_image = "ami-0b418580298265d5c"
+ # eu-central-1/bionic-18.04-amd64-hvm-ssd-20200112
+ # kernel 4.15.0-1057-aws (~4.15.0-74)
+
+ # AWS Network
+ vpc_cidr_mgmt = "192.168.0.0/24"
+ vpc_cidr_b = "192.168.10.0/24"
+ vpc_cidr_c = "200.0.0.0/24"
+ vpc_cidr_d = "192.168.20.0/24"
+
+ tg_mgmt_ip = "192.168.0.10"
+ dut1_mgmt_ip = "192.168.0.11"
+
+ tg_if1_ip = "192.168.10.254"
+ tg_if2_ip = "192.168.20.254"
+ dut1_if1_ip = "192.168.10.11"
+ dut1_if2_ip = "192.168.20.11"
+
+ trex_dummy_cidr_port_0 = "10.0.0.0/24"
+ trex_dummy_cidr_port_1 = "20.0.0.0/24"
+
+ # Ansible
+ ansible_python_executable = "/usr/bin/python3"
+ ansible_file_path = "../../resources/tools/testbed-setup/ansible/site.yaml"
+ ansible_topology_path = "../../resources/tools/testbed-setup/ansible/cloud_topology.yaml"
+ ansible_provision_pwd = "Csit1234"
+
+ # First run
+ # TODO: Remove the testuser creation when added to user_add ansible role
+ first_run_commands = [
+ "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"
+ ]
+}