Infra: Ansible sync 97/31697/2
authorpmikus <pmikus@cisco.com>
Mon, 22 Mar 2021 08:46:04 +0000 (08:46 +0000)
committerPeter Mikus <pmikus@cisco.com>
Mon, 22 Mar 2021 09:03:17 +0000 (09:03 +0000)
Signed-off-by: pmikus <pmikus@cisco.com>
Change-Id: I4b1516a957447b8356949626e385b9317ed1933c

108 files changed:
resources/tools/testbed-setup/ansible/dev.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.13.yaml [deleted file]
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.14.yaml [deleted file]
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.28.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.29.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.30.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.32.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.33.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.34.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.35.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.39.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.40.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.49.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.50.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.51.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.65.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.66.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.67.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.68.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.69.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.70.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.71.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.32.8.14.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.32.8.15.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.32.8.16.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.32.8.17.yaml
resources/tools/testbed-setup/ansible/inventories/lf_inventory/hosts
resources/tools/testbed-setup/ansible/nomad.yaml
resources/tools/testbed-setup/ansible/roles/ab/defaults/main.yaml
resources/tools/testbed-setup/ansible/roles/ab/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/aws/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/aws/tasks/ubuntu_bionic.yaml
resources/tools/testbed-setup/ansible/roles/cadvisor/defaults/main.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/cadvisor/tasks/main.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml
resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/cleanup/tasks/clean_images.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/cleanup/tasks/kill_containers.yaml
resources/tools/testbed-setup/ansible/roles/cleanup/tasks/kill_process.yaml
resources/tools/testbed-setup/ansible/roles/cleanup/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/cleanup/tasks/nomad.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/cleanup/tasks/remove_package.yaml
resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml
resources/tools/testbed-setup/ansible/roles/cleanup/tasks/tg.yaml
resources/tools/testbed-setup/ansible/roles/cleanup/tasks/vpp_device.yaml
resources/tools/testbed-setup/ansible/roles/common/defaults/main.yaml
resources/tools/testbed-setup/ansible/roles/common/handlers/main.yaml
resources/tools/testbed-setup/ansible/roles/common/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/consul/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/csit_shim_image/files/Dockerfile [deleted file]
resources/tools/testbed-setup/ansible/roles/csit_shim_image/files/files/badkeypub [deleted file]
resources/tools/testbed-setup/ansible/roles/csit_shim_image/files/files/sshconfig [deleted file]
resources/tools/testbed-setup/ansible/roles/csit_shim_image/files/files/wrapdocker [deleted file]
resources/tools/testbed-setup/ansible/roles/csit_shim_image/tasks/main.yaml [deleted file]
resources/tools/testbed-setup/ansible/roles/csit_sut_image/files/Dockerfile
resources/tools/testbed-setup/ansible/roles/csit_sut_image/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/docker/defaults/main.yaml
resources/tools/testbed-setup/ansible/roles/docker/handlers/main.yaml
resources/tools/testbed-setup/ansible/roles/docker/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_bionic.yaml
resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_focal.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/docker/templates/daemon.json.j2 [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/dpdk/defaults/main.yaml
resources/tools/testbed-setup/ansible/roles/dpdk/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/iperf/defaults/main.yaml
resources/tools/testbed-setup/ansible/roles/iperf/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/defaults/main.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/handlers/main.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/tasks/main.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/templates/jenkins-job-health-exporter.j2 [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/templates/jenkins-job-health-exporter.service.j2 [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/kernel/defaults/main.yaml
resources/tools/testbed-setup/ansible/roles/kernel/handlers/main.yaml
resources/tools/testbed-setup/ansible/roles/kernel/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_bionic.yaml
resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_focal.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/kernel_vm/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/kubernetes/tasks/ubuntu_bionic.yaml
resources/tools/testbed-setup/ansible/roles/mellanox/defaults/main.yaml
resources/tools/testbed-setup/ansible/roles/mellanox/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/nomad/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/performance_tuning/defaults/main.yaml
resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/turbo_boost.yaml
resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/ubuntu_bionic.yaml [deleted file]
resources/tools/testbed-setup/ansible/roles/prometheus_exporter/defaults/main.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/prometheus_exporter/files/blackbox.yml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/prometheus_exporter/handlers/main.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/prometheus_exporter/tasks/main.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/prometheus_exporter/tasks/ubuntu_bionic.yaml [new file with mode: 0644]
resources/tools/testbed-setup/ansible/roles/tg/files/csit-initialize-docker-tg.sh
resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/topology/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/trex/defaults/main.yaml
resources/tools/testbed-setup/ansible/roles/trex/tasks/deploy_block.yaml
resources/tools/testbed-setup/ansible/roles/trex/tasks/main.yaml
resources/tools/testbed-setup/ansible/roles/vpp/defaults/main.yaml
resources/tools/testbed-setup/ansible/roles/vpp/tasks/main.yaml
resources/tools/testbed-setup/ansible/site.yaml
resources/tools/testbed-setup/ansible/site_aws.yaml [deleted file]
resources/tools/testbed-setup/ansible/site_azure.yaml [deleted file]
resources/tools/testbed-setup/ansible/sut.yaml
resources/tools/testbed-setup/ansible/sut_aws.yaml [deleted file]
resources/tools/testbed-setup/ansible/sut_azure.yaml [deleted file]
resources/tools/testbed-setup/ansible/tg.yaml
resources/tools/testbed-setup/ansible/tg_aws.yaml [deleted file]
resources/tools/testbed-setup/ansible/tg_azure.yaml [deleted file]
resources/tools/testbed-setup/ansible/vpp_device.yaml

index 48ec6b2..6f6d2a7 100644 (file)
@@ -5,6 +5,12 @@
   remote_user: testuser
   become: yes
   become_user: root
+  gather_facts: false
+  pre_tasks:
+    - name: Gathering Facts
+      gather_facts:
+      tags:
+        - always
   roles:
     - role: user_add
       tags: user_add
diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.13.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.13.yaml
deleted file mode 100644 (file)
index 443f725..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
----
-# file: host_vars/10.30.51.13.yaml
-
-hostname: "s44-nomad"
-
-# User management.
-users:
-  - username: localadmin
-    groups: [adm, sudo]
-    password: "$6$FIsbVDQR$5D0wgufOd2FtnmOiRNsGlgg6Loh.0x3dWSj72DSQnqisSyE9DROfgSgA6s0yxDwz4Jd5SRTXiTKuRYuSQ5POI1"
-    ssh_key:
-      - "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAgObJFDIMmPwQhhkjAynvlbwpM5yeSewyaE7vTLaFf4uFz4vmsE2hFf6B2xXHUGLVwoVfk91UeK7LOGrdDpoDDHzvPZXj5NmZI+WiWax5y2pQZNkcSZws0ENCeEc4hPwc4veJ1JmhokF4Bsmu14HyFMaFUhM8897jtJwsh+9fLA/no0iPGaQqEtRUQhkV+P4jCEPoY0qdRZAzVw/rY4EGAMhsJe3EJmyj63OfrrkG3+hvSLFo5pDxHQr3pZd/c6ukI7xMef48PosAvGCm3oxzb/Gu9PZIGuHLczY+tCnzCkY7MO7E+IWgjXrUAfYwSWz8XmFmA9LLe26DT5jkcK8hGQ== pmikus@cisco.com"
-  - username: testuser
-    groups: [adm, sudo]
-    password: "$6$zpBUdQ4q$P2zKclumvCndWujgP/qQ8eMk3YZk7ESAom04Fqp26hJH2jWkMXEX..jqxzMdDLJKiDaDHIaSkQMVjHzd3cRLs1"
-    ssh_key:
-      - "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAgObJFDIMmPwQhhkjAynvlbwpM5yeSewyaE7vTLaFf4uFz4vmsE2hFf6B2xXHUGLVwoVfk91UeK7LOGrdDpoDDHzvPZXj5NmZI+WiWax5y2pQZNkcSZws0ENCeEc4hPwc4veJ1JmhokF4Bsmu14HyFMaFUhM8897jtJwsh+9fLA/no0iPGaQqEtRUQhkV+P4jCEPoY0qdRZAzVw/rY4EGAMhsJe3EJmyj63OfrrkG3+hvSLFo5pDxHQr3pZd/c6ukI7xMef48PosAvGCm3oxzb/Gu9PZIGuHLczY+tCnzCkY7MO7E+IWgjXrUAfYwSWz8XmFmA9LLe26DT5jkcK8hGQ== pmikus@cisco.com"
-
-# Nomad settings.
-nomad_certificates:
-  - src: "{{ vault_nomad_v2_ca_file }}"
-    dest: "{{ nomad_ca_file }}"
-  - src: "{{ vault_nomad_v2_cert_file }}"
-    dest: "{{ nomad_cert_file }}"
-  - src: "{{ vault_nomad_v2_key_file }}"
-    dest: "{{ nomad_key_file }}"
-nomad_datacenter: "yul1"
-nomad_encrypt: "Y4T+5JGx1C3l2NFBBvkTWQ=="
-nomad_name: "{{ hostname }}-{{ ansible_architecture }}"
-nomad_node_role: "server"
-nomad_retry_servers: [ "10.30.51.32", "10.30.51.33", "10.30.51.14" ]
-nomad_servers: [ "10.30.51.13:4647" ]
diff --git a/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.14.yaml b/resources/tools/testbed-setup/ansible/inventories/lf_inventory/host_vars/10.30.51.14.yaml
deleted file mode 100644 (file)
index 4da927e..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
----
-# file: host_vars/10.30.51.14.yaml
-
-hostname: "s45-nomad"
-
-# User management.
-users:
-  - username: localadmin
-    groups: [adm, sudo]
-    password: "$6$FIsbVDQR$5D0wgufOd2FtnmOiRNsGlgg6Loh.0x3dWSj72DSQnqisSyE9DROfgSgA6s0yxDwz4Jd5SRTXiTKuRYuSQ5POI1"
-    ssh_key:
-      - "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAgObJFDIMmPwQhhkjAynvlbwpM5yeSewyaE7vTLaFf4uFz4vmsE2hFf6B2xXHUGLVwoVfk91UeK7LOGrdDpoDDHzvPZXj5NmZI+WiWax5y2pQZNkcSZws0ENCeEc4hPwc4veJ1JmhokF4Bsmu14HyFMaFUhM8897jtJwsh+9fLA/no0iPGaQqEtRUQhkV+P4jCEPoY0qdRZAzVw/rY4EGAMhsJe3EJmyj63OfrrkG3+hvSLFo5pDxHQr3pZd/c6ukI7xMef48PosAvGCm3oxzb/Gu9PZIGuHLczY+tCnzCkY7MO7E+IWgjXrUAfYwSWz8XmFmA9LLe26DT5jkcK8hGQ== pmikus@cisco.com"
-  - username: testuser
-    groups: [adm, sudo]
-    password: "$6$zpBUdQ4q$P2zKclumvCndWujgP/qQ8eMk3YZk7ESAom04Fqp26hJH2jWkMXEX..jqxzMdDLJKiDaDHIaSkQMVjHzd3cRLs1"
-    ssh_key:
-      - "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAgObJFDIMmPwQhhkjAynvlbwpM5yeSewyaE7vTLaFf4uFz4vmsE2hFf6B2xXHUGLVwoVfk91UeK7LOGrdDpoDDHzvPZXj5NmZI+WiWax5y2pQZNkcSZws0ENCeEc4hPwc4veJ1JmhokF4Bsmu14HyFMaFUhM8897jtJwsh+9fLA/no0iPGaQqEtRUQhkV+P4jCEPoY0qdRZAzVw/rY4EGAMhsJe3EJmyj63OfrrkG3+hvSLFo5pDxHQr3pZd/c6ukI7xMef48PosAvGCm3oxzb/Gu9PZIGuHLczY+tCnzCkY7MO7E+IWgjXrUAfYwSWz8XmFmA9LLe26DT5jkcK8hGQ== pmikus@cisco.com"
-
-# Nomad settings.
-nomad_certificates:
-  - src: "{{ vault_nomad_v2_ca_file }}"
-    dest: "{{ nomad_ca_file }}"
-  - src: "{{ vault_nomad_v2_cert_file }}"
-    dest: "{{ nomad_cert_file }}"
-  - src: "{{ vault_nomad_v2_key_file }}"
-    dest: "{{ nomad_key_file }}"
-nomad_datacenter: "yul1"
-nomad_encrypt: "Y4T+5JGx1C3l2NFBBvkTWQ=="
-nomad_name: "{{ hostname }}-{{ ansible_architecture }}"
-nomad_node_role: "server"
-nomad_retry_servers: [ "10.30.51.32", "10.30.51.33", "10.30.51.13" ]
-nomad_servers: [ "10.30.51.13:4647" ]
index 46a08bc..bf1da2a 100644 (file)
@@ -54,4 +54,11 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 7d71f6a..5b3a172 100644 (file)
@@ -53,4 +53,11 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index e563a17..13306a7 100644 (file)
@@ -55,4 +55,11 @@ consul_node_name: "{{ hostname }}"
 consul_node_role: "both"
 consul_retry_servers:
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 4f6c65a..a52008f 100644 (file)
@@ -54,4 +54,11 @@ consul_node_name: "{{ hostname }}"
 consul_node_role: "both"
 consul_retry_servers:
   - "10.30.51.30"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 18fd62b..7ab2f82 100644 (file)
@@ -54,4 +54,11 @@ consul_node_name: "{{ hostname }}"
 consul_node_role: "both"
 consul_retry_servers:
   - "10.30.51.30"
-  - "10.30.51.32"
\ No newline at end of file
+  - "10.30.51.32"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 3f4cf57..a45cda8 100644 (file)
@@ -55,4 +55,11 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 2ee23fa..f609a83 100644 (file)
@@ -55,4 +55,11 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 7e27795..da66a5e 100644 (file)
@@ -60,4 +60,11 @@ consul_retry_servers:
   - "10.30.51.33"
   - "10.32.8.14"
   - "10.32.8.15"
-  - "10.32.8.16"
\ No newline at end of file
+  - "10.32.8.16"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 7b98b3e..58839c8 100644 (file)
@@ -60,4 +60,11 @@ consul_retry_servers:
   - "10.30.51.33"
   - "10.32.8.14"
   - "10.32.8.15"
-  - "10.32.8.16"
\ No newline at end of file
+  - "10.32.8.16"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 62ef6da..9e6d17f 100644 (file)
@@ -1,7 +1,7 @@
 ---
 # file: host_vars/10.30.51.49.yaml
 
-hostname: "s19-t33t34-tg1"
+hostname: "s19-t33t211-tg1"
 grub:
   audit: "0"
   hpet: "disable"
@@ -22,8 +22,9 @@ sysctl:
   kernel:
     watchdog_cpumask: "0,28,56,84"
   vm:
-    nr_hugepages: 8192
+    nr_hugepages: 16384
     max_map_count: 20000
 
 inventory_ipmi_hostname: '10.30.50.46'
 cpu_microarchitecture: "skylake"
+docker_tg: true
index cd7a739..f3b8886 100644 (file)
@@ -57,4 +57,13 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  default-shm-size: "1073741824"
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ ansible_hostname }}" ]
+  host: [ "172.17.0.1:/var/run/docker.sock" ]
\ No newline at end of file
index 447f6a9..019cd5a 100644 (file)
@@ -57,4 +57,13 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  default-shm-size: "1073741824"
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ ansible_hostname }}" ]
+  host: [ "172.17.0.1:/var/run/docker.sock" ]
\ No newline at end of file
index 6e9d533..76b330a 100644 (file)
@@ -57,4 +57,11 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 0e133d4..5223e4b 100644 (file)
@@ -57,4 +57,11 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index bedbbab..da9ed6d 100644 (file)
@@ -57,4 +57,11 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index ce40261..0295af4 100644 (file)
@@ -57,4 +57,11 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 22107c4..ad33f02 100644 (file)
@@ -61,4 +61,12 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ ansible_hostname }}" ]
+  storage-driver: "overlay2"
\ No newline at end of file
index f8b7c92..1712346 100644 (file)
@@ -61,4 +61,12 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ ansible_hostname }}" ]
+  storage-driver: "overlay2"
\ No newline at end of file
index dd2a2f5..c609cc7 100644 (file)
@@ -29,7 +29,7 @@ nomad_datacenter: "yul1"
 nomad_encrypt: "Y4T+5JGx1C3l2NFBBvkTWQ=="
 nomad_name: "{{ hostname }}-{{ ansible_architecture }}"
 nomad_node_role: "client"
-nomad_node_class: "s5ci"
+nomad_node_class: "builder"
 nomad_options:
   driver.raw_exec.enable: 1
   docker.cleanup.image: true
@@ -38,13 +38,13 @@ nomad_options:
   driver.whitelist: "docker,raw_exec,exec"
   fingerprint.network.disallow_link_local: true
 nomad_retry_servers: [ "10.30.51.30", "10.30.51.32", "10.30.51.33" ]
-nomad_servers: [ "10.30.51.32:4647", "10.30.51.33:4647" ]
+nomad_servers: [ "10.30.51.32:4647", "10.30.51.33:4647", "10.30.51.30:4647" ]
 nomad_volumes:
   - name: "prod-volume-data1-1"
     path: "/data"
     read_only: false
 
-# Consul settigs.
+# Consul settings.
 consul_nomad_integration: true
 consul_certificates:
   - src: "{{ vault_consul_v1_ca_file }}"
@@ -60,4 +60,11 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 7e103cf..c9825c7 100644 (file)
@@ -38,9 +38,9 @@ nomad_options:
   driver.whitelist: "docker,raw_exec,exec"
   fingerprint.network.disallow_link_local: true
 nomad_retry_servers: [ "10.30.51.30", "10.30.51.32", "10.30.51.33" ]
-nomad_servers: [ "10.30.51.32:4647", "10.30.51.33:4647" ]
+nomad_servers: [ "10.30.51.32:4647", "10.30.51.33:4647", "10.30.51.30:4647" ]
 nomad_volumes:
-  - name: "prod-volume-data2-1"
+  - name: "prod-volume-data1-1"
     path: "/data"
     read_only: false
 
@@ -60,4 +60,11 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index e1b47ca..1d95255 100644 (file)
@@ -39,6 +39,10 @@ nomad_options:
   fingerprint.network.disallow_link_local: true
 nomad_retry_servers: [ "10.30.51.30", "10.30.51.32", "10.30.51.33" ]
 nomad_servers: [ "10.30.51.32:4647", "10.30.51.33:4647", "10.30.51.30:4647" ]
+nomad_volumes:
+  - name: "prod-volume-data1-1"
+    path: "/data"
+    read_only: false
 
 # Consul settigs.
 consul_nomad_integration: true
@@ -56,4 +60,11 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 6a4e238..2feac85 100644 (file)
@@ -39,6 +39,10 @@ nomad_options:
   fingerprint.network.disallow_link_local: true
 nomad_retry_servers: [ "10.30.51.30", "10.30.51.32", "10.30.51.33" ]
 nomad_servers: [ "10.30.51.32:4647", "10.30.51.33:4647", "10.30.51.30:4647" ]
+nomad_volumes:
+  - name: "prod-volume-data1-1"
+    path: "/data"
+    read_only: false
 
 # Consul settigs.
 consul_nomad_integration: true
@@ -56,4 +60,11 @@ consul_node_role: "client"
 consul_retry_servers:
   - "10.30.51.30"
   - "10.30.51.32"
-  - "10.30.51.33"
\ No newline at end of file
+  - "10.30.51.33"
+
+# Docker daemon settings.
+docker_daemon:
+  # https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
+  dns: [ "172.17.0.1" ]
+  dns-opts: []
+  dns-search: [ "{{ansible_hostname}}" ]
\ No newline at end of file
index 741da67..cc0e0b3 100644 (file)
@@ -44,6 +44,7 @@ all:
         10.32.8.24: #s60-t210-sut1 - epyc
         10.30.51.69: #s27-t34-sut1 - thunderx2 9975
     vpp_device:
+      # Note: vpp_device hosts are also nomad client hosts
       hosts:
         10.30.51.50: #s1-t11-sut1 - skylake
         10.30.51.51: #s2-t12-sut1 - skylake
index 6532156..ae9de1e 100644 (file)
@@ -5,6 +5,12 @@
   remote_user: testuser
   become: yes
   become_user: root
+  gather_facts: false
+  pre_tasks:
+    - name: Gathering Facts
+      gather_facts:
+      tags:
+        - always
   roles:
     - role: user_add
       tags: user_add
     - role: nomad
       tags: nomad
     - role: consul
-      tags: consul
\ No newline at end of file
+      tags: consul
+    - role: prometheus_exporter
+      tags: prometheus_exporter
+    - role: jenkins_job_health_exporter
+      tags: jenkins_job_health_exporter
+    - role: cadvisor
+      tags: cadvisor
+    - role: cleanup
+      tags: cleanup
\ No newline at end of file
index 0609b06..45b80be 100644 (file)
@@ -1,14 +1,17 @@
 ---
 # file: roles/wrk/defaults/main.yaml
 
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
 
 packages_base:
   - []
 
 packages_by_distro:
   ubuntu:
-    - "apache2-utils"
+    bionic:
+      - "apache2-utils"
+    focal:
+      - "apache2-utils"
 
 packages_by_arch:
   aarch64:
index 9153198..37e702e 100644 (file)
@@ -1,9 +1,18 @@
 ---
 # file: roles/ab/tasks/main.yaml
 
-- name: Install Apache ab tools
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - ab-inst-prerequisites
+
+- name: Inst - Apache ab tools
   package:
     name: "{{ packages | flatten(levels=1) }}"
     state: present
-    update_cache: true
-  tags: install-ab
+  tags:
+    - ab-inst
\ No newline at end of file
index 7b7a7fb..deca067 100644 (file)
@@ -1,26 +1,40 @@
 ---
 # file: roles/aws/tasks/main.yaml
 
-- name: AWS - Edit repositories
-  include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml'
-  tags: edit-repo
+- name: Edit repositories
+  include_tasks: "{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml"
+  tags:
+    - edit-repo
+
+- name: Get vfio-pci With WC Patcher
+  get_url:
+    url: "https://github.com/amzn/amzn-drivers/raw/master/userspace/dpdk/enav2-vfio-patch/get-vfio-with-wc.sh"
+    dest: "/opt/get-vfio-with-wc.sh"
+    mode: "744"
+  tags:
+    - vfio-aws-patch
+
+- name: Create vfio-pci Patch Directory
+  file:
+    path: "/opt/patches/"
+    state: "directory"
+  tags:
+    - vfio-aws-patch
 
-- name: AWS - Get vfio-pci Patcher Script
+- name: Get vfio-pci WC Patch
   get_url:
-    url: "https://github.com/amzn/amzn-drivers/raw/master/userspace/dpdk/enav2-vfio-patch/vfio-wc-patch.sh"
-    dest: "/opt/vfio-wc-patch.sh"
+    url: "https://github.com/amzn/amzn-drivers/raw/master/userspace/dpdk/enav2-vfio-patch/patches/linux-4.10-vfio-wc.patch"
+    dest: "/opt/patches/linux-4.10-vfio-wc.patch"
     mode: "744"
-  register: "vfio_patch_downloaded"
   tags:
     - vfio-aws-patch
 
-- name: AWS - Patch vfio-pci
-  shell: "/bin/bash /opt/vfio-wc-patch.sh"
-  when: "vfio_patch_downloaded"
+- name: Compile vfio-pci With WC Patch
+  shell: "/bin/bash /opt/get-vfio-with-wc.sh"
   tags:
     - vfio-aws-patch
 
-- name: AWS - Load Kernel Modules By Default
+- name: Load Kernel Modules By Default
   lineinfile:
     path: "/etc/modules"
     state: "present"
   with_items:
     - "vfio-pci"
     - "igb_uio"
-  register: "modules_added"
   tags:
     - load-kernel-modules
 
-- name: AWS - Add Kernel Modules Options
+- name: Add Kernel Modules Options (igb_uio)
   lineinfile:
     path: "/etc/modprobe.d/igb_uio.conf"
     state: "present"
     create: "yes"
   with_items:
     - "options igb_uio wc_activate=1"
-  when: "modules_added"
-  register: "modules_added"
   tags:
     - load-kernel-modules
 
-- name: AWS - Reload systemd-modules
+- name: Add Kernel Modules Options (vfio-pci)
+  lineinfile:
+    path: "/etc/modprobe.d/vfio-noiommu.conf"
+    state: "present"
+    line: "{{ item }}"
+    create: "yes"
+  with_items:
+    - "options vfio enable_unsafe_noiommu_mode=1"
+  tags:
+    - load-kernel-modules
+
+- name: Reload systemd-modules
   systemd:
     name: "systemd-modules-load"
     state: "restarted"
-  when: "modules_added"
   tags:
     - reload-systemd-modules
 
-- name: AWS - Performance Tuning - Adjust nr_hugepages
+- name: Performance Tuning - Adjust nr_hugepages
   sysctl:
     name: "vm.nr_hugepages"
     value: "8192"
index 75e4a3a..ba6e107 100644 (file)
@@ -1,10 +1,10 @@
 ---
-# file: roles/aws/tasks/ubuntu_bionic.yaml
+# file: roles/aws/tasks/ubuntu_bionic.yaml.yaml
 
-- name: AWS - Enable deb-src APT Repositories
-  replace:
-    path: "/etc/apt/sources.list"
-    regexp: "^# deb-src "
-    replace: "deb-src "
+- name: Enable deb-src APT Repository
+  apt_repository:
+    repo: "deb-src http://archive.ubuntu.com/ubuntu bionic main"
+    state: "present"
+    update_cache: yes
   tags:
-    - enable-src-repo
+    - enable-src-repo
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/cadvisor/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/cadvisor/defaults/main.yaml
new file mode 100644 (file)
index 0000000..3b25e55
--- /dev/null
@@ -0,0 +1,24 @@
+---
+# file: roles/cadvisor/defaults/main.yaml
+
+packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+
+packages_base:
+  - []
+
+packages_by_distro:
+  ubuntu:
+    - "python3-docker"
+    - "python3-dockerpty"
+
+packages_by_arch:
+  aarch64:
+    - []
+  x86_64:
+    - []
+
+image: "{{ image_by_arch[ansible_machine] }}"
+
+image_by_arch:
+  aarch64: "zcube/cadvisor:v0.37.0"
+  x86_64: "gcr.io/cadvisor/cadvisor:v0.38.7"
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/cadvisor/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/cadvisor/tasks/main.yaml
new file mode 100644 (file)
index 0000000..a2a1336
--- /dev/null
@@ -0,0 +1,39 @@
+---
+# file: roles/cadvisor/tasks/main.yaml
+
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - cadvisor-inst-prerequisites
+
+- name: Inst - Prerequisites
+  package:
+    name: "{{ packages | flatten(levels=1) }}"
+    state: latest
+  tags:
+    - cadvisor-inst-prerequisites
+
+- name: Inst - Start a container
+  docker_container:
+    name: "cAdvisor"
+    image: "{{ image }}"
+    state: "started"
+    restart_policy: "unless-stopped"
+    detach: yes
+    devices:
+     - "/dev/kmsg"
+    ports:
+     - "8080:8080"
+    privileged: yes
+    volumes:
+      - "/:/rootfs:ro"
+      - "/var/run:/var/run:ro"
+      - "/sys:/sys:ro"
+      - "/var/lib/docker/:/var/lib/docker:ro"
+      - "/dev/disk/:/dev/disk:ro"
+  tags:
+    - cadvisor-run-container
index c639f11..5eb9453 100644 (file)
@@ -2,15 +2,19 @@
 # file: roles/calibration/defaults/main.yaml
 
 # Packages to install.
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
 
 packages_base:
   - []
 
 packages_by_distro:
   ubuntu:
-    - "build-essential"
-    - "dmidecode"
+    bionic:
+      - "build-essential"
+      - "dmidecode"
+    focal:
+      - "build-essential"
+      - "dmidecode"
 
 packages_by_arch:
   aarch64:
@@ -19,16 +23,24 @@ packages_by_arch:
     - []
 
 # Kernel version to check.
-kernel_version: "{{ kernel_version_by_distro_by_arch[ansible_distribution | lower][ansible_machine] }}"
+kernel_version: "{{ kernel_version_by_distro_by_arch[ansible_distribution | lower][ansible_distribution_release][ansible_machine] }}"
 
 kernel_version_by_distro_by_arch:
   ubuntu:
-    x86_64:
-      - "4.15.0-72-generic"
-      - "5.3.0-1020-azure"
-      - "5.3.0-1017-aws"
-    aarch64:
-      - "4.15.0-54-generic"
+    bionic:
+      x86_64:
+        - "4.15.0-72-generic"
+        - "5.3.0-1020-azure"
+        - "4.15.0-1057-aws"
+      aarch64:
+        - "4.15.0-54-generic"
+    focal:
+      x86_64:
+        - "5.4.0-65-generic"
+        - "5.3.0-1020-azure"
+        - "5.3.0-1017-aws"
+      aarch64:
+        - "5.4.0-65-generic"
 
 pma_directory: "/tmp/pma_tools"
 jitter_core: 7
index a6e8898..5d0c3b1 100644 (file)
@@ -1,13 +1,21 @@
 ---
 # file: roles/calibration/tasks/main.yaml
 
-- name: Install Distribution - Release - Machine Prerequisites
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - calibration-inst-prerequisites
+
+- name: Inst - Prerequisites
   package:
     name: "{{ packages | flatten(levels=1) }}"
     state: latest
-    update_cache: true
   tags:
-    - install-dependencies
+    - calibration-inst-prerequisites
 
 - name: Check CPU Power States
   shell: "lscpu"
diff --git a/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/clean_images.yaml b/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/clean_images.yaml
new file mode 100644 (file)
index 0000000..e030acb
--- /dev/null
@@ -0,0 +1,36 @@
+---
+# file: roles/cleanup/tasks/clean_images.yaml
+
+- name: Clean Docker Images
+  block:
+  - name: Clean Images - Prefetch Docker Images
+    cron:
+      name: "Prefetch docker image {{ item }}"
+      minute: "10"
+      hour: "7"
+      job: "/usr/bin/docker pull {{ item }}"
+    loop:
+      "{{ images_to_prefetch_by_arch[ansible_machine] }}"
+    tags:
+      - prefetch-docker-images
+
+  - name: Clean Images - Remove Dangling Docker Images
+    cron:
+      name: "Remove dangling docker images"
+      minute: "10"
+      hour: "5"
+      weekday: "7"
+      job: "/usr/bin/docker rmi $(/usr/bin/docker images --filter 'dangling=true' -q)"
+    tags:
+      - remove-docker-images-dangling
+
+  # TODO: Disabled until all images will be in registry
+  #- name: Clean Images - Prune Docker Images
+  #  cron:
+  #    name: "Prune docker images"
+  #    minute: "10"
+  #    hour: "6"
+  #    weekday: 7
+  #    job: "/usr/bin/docker image prune --all --force"
+  #  tags:
+  #    - prune-docker-images
\ No newline at end of file
index ad4fb37..25fd48e 100644 (file)
@@ -3,16 +3,18 @@
 
 - name: Kill Docker Containers
   block:
-  - name: Kill container - Get Running Docker Containers
+  - name: Kill Container - Get Running Docker Containers
     shell: "docker ps -aq"
     register: running_containers
     changed_when: no
-    tags: kill-containers
+    tags:
+      - kill-containers
 
-  - name: Kill container - Remove All Docker Containers
+  - name: Kill Container - Remove All Docker Containers
     shell: "docker rm --force {{ item }}"
     with_items: "{{ running_containers.stdout_lines }}"
-    tags: kill-containers
+    tags:
+      - kill-containers
 
   rescue:
   - name: Restart Docker Daemon
 
 - name: Kill LXC Containers
   block:
-  - name: Kill container - Get Running LXC Containers
+  - name: Kill Container - Get Running LXC Containers
     shell: "lxc-ls"
     register: running_containers
     changed_when: no
-    tags: kill-containers
+    tags:
+      - kill-containers
 
-  - name: Kill container - Remove All LXC Containers
+  - name: Kill Container - Remove All LXC Containers
     shell: "lxc-destroy --force -n {{ item }}"
     with_items: "{{ running_containers.stdout_lines }}"
-    tags: kill-containers
+    tags:
+      - kill-containers
 
   rescue:
   - fail:
index 30a9f45..c7cee37 100644 (file)
@@ -1,32 +1,36 @@
 ---
 # file: roles/cleanup/tasks/kill_process.yaml
 
-- name: Kill process - {{ process }}
+- name: Kill Process - {{ process }}
   block:
-  - name: Kill process - Get pid of {{ process }}
+  - name: Get PID Of {{ process }}
     shell: "ps -ef | grep -v grep | grep -w {{ process }} | awk '{print $2}'"
-    when: >
-      process is defined and process != ""
+    when:
+      process is defined and process != ""
     register: running_processes
-    tags: kill-process
+    tags:
+      - kill-process
 
-  - name: Kill process - Safe kill {{ process }}
+  - name: Safe Kill {{ process }}
     shell: "kill {{ item }}"
     with_items: "{{ running_processes.stdout_lines }}"
-    tags: kill-process
+    tags:
+      - kill-process
 
   - wait_for:
       path: "/proc/{{ item }}/status"
-      state: absent
+      state: "absent"
     with_items: "{{ running_processes.stdout_lines }}"
     ignore_errors: yes
     register: killed_processes
-    tags: kill-process
+    tags:
+      - kill-process
 
-  - name: Kill process - Force kill {{ process }}
+  - name: Kill Process - Force Kill {{ process }}
     shell: "kill -9 {{ item }}"
     with_items: "{{ killed_processes.results | select('failed') | map(attribute='item') | list }}"
-    tags: kill-process
+    tags:
+      - kill-process
 
   rescue:
   - fail:
index 64a55c4..eeda013 100644 (file)
 #     - vpp_device
 #         - Run tasks on vpp_device servers only.
 #         - Reset SRIOV
+#         - Docker image cleanup
+#     - nomad
+#         - Docker image cleanup
 
 - name: tg specific
   include_tasks: tg.yaml
   when: "'tg' in group_names"
-  tags: cleanup
+  tags:
+    - cleanup
 
 - name: sut specific
   include_tasks: sut.yaml
   when: "'sut' in group_names"
-  tags: cleanup
+  tags:
+    - cleanup
 
 - name: vpp_device specific
   include_tasks: vpp_device.yaml
   when: "'vpp_device' in group_names"
-  tags: cleanup
+  tags:
+    - cleanup
+
+- name: nomad specific
+  include_tasks: nomad.yaml
+  when: "'nomad' in group_names"
+  tags:
+    - cleanup
diff --git a/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/nomad.yaml b/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/nomad.yaml
new file mode 100644 (file)
index 0000000..3c5bf64
--- /dev/null
@@ -0,0 +1,22 @@
+---
+# file: roles/cleanup/tasks/nomad.yaml
+
+- name: Host Cleanup
+  block:
+  - name: Clean Images
+    import_tasks: clean_images.yaml
+    vars:
+      images_to_prefetch_by_arch:
+        aarch64:
+          - "fdiotools/builder-ubuntu2004:prod-aarch64"
+          - "fdiotools/builder-ubuntu1804:prod-aarch64"
+          - "fdiotools/builder-centos8:prod-aarch64"
+        x86_64:
+          - "fdiotools/builder-ubuntu2004:prod-x86_64"
+          - "fdiotools/builder-ubuntu1804:prod-x86_64"
+          - "fdiotools/builder-debian10:prod-x86_64"
+          - "fdiotools/builder-debian9:prod-x86_64"
+          - "fdiotools/builder-centos8:prod-x86_64"
+          - "fdiotools/builder-centos7:prod-x86_64"
+    tags:
+      - clean-images
\ No newline at end of file
index 0c8816f..302b43c 100644 (file)
@@ -1,19 +1,21 @@
 ---
 # file: roles/cleanup/tasks/remove_package.yaml
 
-- name: Remove package - Fix corrupted apt
-  shell: 'dpkg --configure -a'
-  when: >
-    ansible_distribution == 'Ubuntu'
-  tags: remove-package
+- name: Remove Package - Fix Corrupted APT
+  shell: "dpkg --configure -a"
+  when:
+    - ansible_distribution == 'Ubuntu'
+  tags:
+    - remove-package
 
-- name: Remove package - {{ package }}
+- name: Remove Package - {{ package }}
   apt:
-    name: '{{ package }}'
+    name: "{{ package }}"
     force: yes
     purge: yes
-    state: absent
+    state: "absent"
   failed_when: no
-  when: >
-    ansible_distribution == 'Ubuntu'
-  tags: remove-package
+  when:
+    - ansible_distribution == 'Ubuntu'
+  tags:
+    - remove-package
index 53a65dd..d80a35b 100644 (file)
@@ -1,72 +1,83 @@
 ---
 # file: roles/cleanup/tasks/sut.yaml
 
-- name: Host cleanup
+- name: Host Cleanup
   block:
-    - name: Kill processes - qemu
+    - name: Kill Processes - Qemu
       import_tasks: kill_process.yaml
       vars:
         process: "qemu"
-      tags: kill-process
+      tags:
+        - kill-process
 
-    - name: Kill processes - l3fwd
+    - name: Kill Processes - L3fwd
       import_tasks: kill_process.yaml
       vars:
         process: "l3fwd"
-      tags: kill-process
+      tags:
+        - kill-process
 
-    - name: Kill processes - testpmd
+    - name: Kill Processes - Testpmd
       import_tasks: kill_process.yaml
       vars:
         process: "testpmd"
-      tags: kill-process
+      tags:
+        - kill-process
 
-    - name: Kill processes - iperf3
+    - name: Kill Processes - iPerf3
       import_tasks: kill_process.yaml
       vars:
         process: "iperf3"
-      tags: kill-process
+      tags:
+        - kill-process
 
-    - name: Kill processes - vpp_echo
+    - name: Kill Processes - vpp_echo
       import_tasks: kill_process.yaml
       vars:
         process: "vpp_echo"
-      tags: kill-process
+      tags:
+        - kill-process
 
-    - name: Find file or dir - Core zip file
+    - name: Find File Or Dir - Core Zip File
       find:
         paths: "/tmp/"
         patterns: "*tar.lzo.lrz.xz*"
       register: files_to_delete
-      tags: remove-file-dir
+      tags:
+        - remove-file-dir
 
-    - name: Remove file or dir - Core zip file
+    - name: Remove File Or Dir - Core Zip File
       file:
         path: "{{ item.path }}"
         state: absent
       with_items: "{{ files_to_delete.files }}"
-      tags: remove-file-dir
+      tags:
+        - remove-file-dir
 
-    - name: Find file or dir - Core dump file
+    - name: Find File Or Dir - Core Dump File
       find:
         paths: "/tmp/"
         patterns: "*core*"
       register: files_to_delete
-      tags: remove-file-dir
+      tags:
+        - remove-file-dir
 
-    - name: Remove file or dir - Core dump file
+    - name: Remove File Or Dir - Core Dump File
       file:
         path: "{{ item.path }}"
         state: absent
       with_items: "{{ files_to_delete.files }}"
-      tags: remove-file-dir
+      tags:
+        - remove-file-dir
 
-    - name: Kill containers - Remove all containers
+    - name: Kill Containers - Remove All Containers
       import_tasks: kill_containers.yaml
-      tags: kill-containers
+      tags:
+        - kill-containers
 
-    - name: Remove packages - Remove VPP
+    - name: Remove Packages - Remove VPP
       import_tasks: remove_package.yaml
       vars:
         package: "*vpp*"
-      tags: remove-package
+      tags:
+        - remove-package
index 9ac83bc..fa2d2d2 100644 (file)
@@ -1,9 +1,13 @@
 ---
 # file: roles/cleanup/tasks/tg.yaml
 
-- name: Kill processes - TRex
-  import_tasks: kill_process.yaml
-  vars:
-      process: "_t-rex"
-  when: docker_tg is undefined
-  tags: kill-process
+- name: Host Cleanup
+  block:
+    - name: Kill Processes - TRex
+      import_tasks: kill_process.yaml
+      vars:
+        process: "_t-rex"
+      when:
+        - docker_tg is undefined
+      tags:
+        - kill-process
index f5e6ea5..41c4b29 100644 (file)
@@ -1,15 +1,32 @@
 ---
 # file: roles/cleanup/tasks/vpp_device.yaml
 
-- name: Reset vpp_device binary
-  copy:
-   src: 'files/reset_vppdevice.sh'
-   dest: '/usr/local/bin'
-   owner: 'root'
-   group: 'root'
-   mode: '744'
-  tags: reset-sriov
+- name: Host Cleanup
+  block:
+  - name: Reset vpp_device Binary
+    copy:
+     src: "files/reset_vppdevice.sh"
+     dest: "/usr/local/bin"
+     owner: "root"
+     group: "root"
+     mode: "744"
+    tags:
+      - reset-sriov
 
-- name: Reset vpp_device
-  raw: 'reset_vppdevice.sh --force'
-  tags: reset-sriov
+  - name: Clean Images
+    import_tasks: clean_images.yaml
+    vars:
+      images_to_prefetch_by_arch:
+        aarch64:
+          - "fdiotools/builder-ubuntu2004:prod-aarch64"
+          - "fdiotools/builder-ubuntu1804:prod-aarch64"
+          - "fdiotools/builder-centos8:prod-aarch64"
+        x86_64:
+          - "fdiotools/builder-ubuntu2004:prod-x86_64"
+          - "fdiotools/builder-ubuntu1804:prod-x86_64"
+          - "fdiotools/builder-debian10:prod-x86_64"
+          - "fdiotools/builder-debian9:prod-x86_64"
+          - "fdiotools/builder-centos8:prod-x86_64"
+          - "fdiotools/builder-centos7:prod-x86_64"
+    tags:
+      - clean-images
\ No newline at end of file
index 5517b20..43e40eb 100644 (file)
@@ -1,7 +1,7 @@
 ---
 # file: roles/common/defaults/main.yaml
 
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
 
 packages_base:
   - "autoconf"
@@ -17,23 +17,37 @@ packages_base:
 
 packages_by_distro:
   ubuntu:
-    - "build-essential"
-    - "libpcap-dev"
-    - "net-tools"
-    - "python-all"
-    - "python-apt"
-    - "python-cffi"
-    - "python-cffi-backend"
-    - "python-dev"
-    - "python-pip"
-    - "python-setuptools"
-    - "python3-all"
-    - "python3-apt"
-    - "python3-cffi"
-    - "python3-cffi-backend"
-    - "python3-dev"
-    - "python3-pip"
-    - "python3-setuptools"
+    bionic:
+      - "build-essential"
+      - "libpcap-dev"
+      - "net-tools"
+      - "python-all"
+      - "python-apt"
+      - "python-cffi"
+      - "python-cffi-backend"
+      - "python-dev"
+      - "python-pip"
+      - "python-setuptools"
+      - "python3-all"
+      - "python3-apt"
+      - "python3-cffi"
+      - "python3-cffi-backend"
+      - "python3-dev"
+      - "python3-pip"
+      - "python3-pyelftools"
+      - "python3-setuptools"
+    focal:
+      - "build-essential"
+      - "libpcap-dev"
+      - "net-tools"
+      - "python3-all"
+      - "python3-apt"
+      - "python3-cffi"
+      - "python3-cffi-backend"
+      - "python3-dev"
+      - "python3-pip"
+      - "python3-pyelftools"
+      - "python3-setuptools"
 
 packages_by_arch:
   aarch64:
@@ -55,5 +69,4 @@ packages_by_arch:
 #  ftp_proxy: http://proxy.com:80
 #  FTP_PROXY: http://proxy.com:80
 #  no_proxy: localhost,127.0.0.1,{{ ansible_default_ipv4.address }}
-#  NO_PROXY: localhost,127.0.0.1,{{ ansible_default_ipv4.address }}
-
+#  NO_PROXY: localhost,127.0.0.1,{{ ansible_default_ipv4.address }}
\ No newline at end of file
index e7327d3..bb317e8 100644 (file)
@@ -1,7 +1,7 @@
 ---
 # file: roles/common/handlers/main.yaml
 
-- name: Reboot server
+- name: Reboot Server
   reboot:
     reboot_timeout: 3600
   tags:
index e60b32a..91fcd18 100644 (file)
@@ -1,7 +1,7 @@
 ---
 # file: roles/common/tasks/main.yaml
 
-- name: Add permanent proxy settings
+- name: Conf - Add permanent proxy settings
   lineinfile:
     path: "/etc/environment"
     state: "present"
@@ -9,17 +9,25 @@
   with_dict: "{{ proxy_env }}"
   when: proxy_env is defined
   tags:
-    - set-proxy
+    - common-conf-proxy
 
-- name: Install Distribution - Release - Machine Prerequisites
+- name: Inst - Update package cache (apt)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - common-inst-prerequisites
+
+- name: Inst - Prerequisites
   package:
     name: "{{ packages | flatten(levels=1) }}"
     state: latest
-    update_cache: true
   tags:
-    - install-dependencies
+    - common-inst-prerequisites
 
-- name: Install CSIT PIP requirements
+- name: Inst - CSIT PIP requirements
   pip:
     name:
       - "ecdsa==0.13.3"
@@ -31,7 +39,7 @@
       - "robotframework==3.1.2"
       - "scapy==2.4.3"
       - "scp==0.13.2"
-      - "ansible==2.7.8"
+      - "ansible==2.10.7"
       - "dill==0.2.8.2"
       - "numpy==1.17.3"
       - "hdrhistogram==0.6.1"
       - "sphinxcontrib-serializinghtml==1.1.3"
       - "urllib3==1.25.6"
   tags:
-    - install-pip
+    - common-inst-pip
 
-- name: Install CSIT PIP requirements - Pandas and SciPy workaround
+- name: Inst - CSIT PIP requirements - Pandas and SciPy workaround
   pip:
     name:
       - "pandas==0.25.3"
-      - "scipy==1.1.0"
+      - "scipy==1.5.4"
   tags:
-    - install-pip
+    - common-inst-pip
 
-- name: Install Meson (repository version is too old)
+- name: Inst - Meson (DPDK)
   pip:
     name:
       - "meson==0.47.1"
   tags:
-    - install-meson
+    - common-inst-meson
 
-- name: Set sudoers admin
+- name: Conf - sudoers admin
   lineinfile:
     path: "/etc/sudoers"
     state: "present"
     line: "%admin ALL=(ALL) ALL"
     validate: "/usr/sbin/visudo -cf %s"
   tags:
-    - set-sudoers
+    - common-conf-sudoers
 
-- name: Set sudoers sudo
+- name: Conf - sudoers nopasswd
   lineinfile:
     path: "/etc/sudoers"
     state: "present"
     line: "%sudo ALL=(ALL:ALL) NOPASSWD: ALL"
     validate: "/usr/sbin/visudo -cf %s"
   tags:
-    - set-sudoers
+    - common-conf-sudoers
 
 - meta: flush_handlers
index f87590e..99ac52d 100644 (file)
@@ -1,11 +1,19 @@
 ---
 # file: roles/consul/tasks/main.yaml
 
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - consul-inst-prerequisites
+
 - name: Inst - Prerequisites
   package:
     name: "{{ packages | flatten(levels=1) }}"
     state: latest
-    update_cache: true
   tags:
     - consul-inst-prerequisites
 
diff --git a/resources/tools/testbed-setup/ansible/roles/csit_shim_image/files/Dockerfile b/resources/tools/testbed-setup/ansible/roles/csit_shim_image/files/Dockerfile
deleted file mode 100644 (file)
index 2b2e1ea..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-FROM ubuntu:18.04
-LABEL Description="CSIT vpp-device ubuntu 18.04 shim image"
-LABEL Version="master"
-
-# Setup the environment
-ENV DEBIAN_FRONTEND=noninteractive
-ENV NOTVISIBLE "in users profile"
-RUN echo "export VISIBLE=now" >> /etc/profile
-
-ADD files/wrapdocker /usr/local/bin/wrapdocker
-RUN chmod +x /usr/local/bin/wrapdocker
-
-# Install packages and Docker
-RUN apt-get -q update \
- && apt-get install -y -qq \
-        bash \
-        curl \
-        iproute2 \
-        locales \
-        ssh \
-        sudo \
-        tzdata \
-        uuid-runtime \
- && curl -fsSL https://get.docker.com | sh \
- && rm -rf /var/lib/apt/lists/*
-
-# Configure locales
-RUN locale-gen en_US
-
-RUN mkdir /var/run/sshd
-RUN echo 'root:Csit1234' | chpasswd
-RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
-
-# SSH login fix. Otherwise user is kicked off after login
-RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
-
-# Need volume for sidecar docker launches
-VOLUME /var/lib/docker
-
-# SSH to listen on port 6022 in shim
-RUN echo 'Port 6022' >>/etc/ssh/sshd_config
-RUN echo 'Port 6023' >>/etc/ssh/sshd_config
-ADD files/badkeypub /root/.ssh/authorized_keys
-ADD files/sshconfig /root/.ssh/config
-
-# Start sshd by default
-EXPOSE 22
-CMD ["/usr/sbin/sshd", "-D"]
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/csit_shim_image/files/files/badkeypub b/resources/tools/testbed-setup/ansible/roles/csit_shim_image/files/files/badkeypub
deleted file mode 100644 (file)
index 4530b66..0000000
+++ /dev/null
@@ -1 +0,0 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyUNd/iRk5Ajw4ZBB0gXyjzecEzQHh/MctgvHGJjasqJDkwYyZBrunUorOZ3n82W8VGdd5+eNINCWOM/ERjuaHjnutfade+ocPgZRdk+kEgTvetDVNWIgBd0PMVcnp57jJfx7CZVqTNgGeVQ8OJ2RbJGeOb/EKApQI74IPkAfc0PSieSw5gC0eqEOHb39Awgp0ycrzsUHF/OEicfCmo+6vvrMGenDe7frKUoTKYMWs7l3DOyFC8NaOxhGD3J1Ne5u3A/r4w6mN1HVI0rFwIcoms+t0B4lb2ODWKZiZikQdn8/eqwsmbSEZZsWN3FkshgjPS83+dNqVwB6pPY5Yqte7 ejk@bhima.local
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/csit_shim_image/files/files/sshconfig b/resources/tools/testbed-setup/ansible/roles/csit_shim_image/files/files/sshconfig
deleted file mode 100644 (file)
index e7bd907..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Host 172.17.0.*
-       StrictHostKeyChecking no
-       UserKnownHostsFile=/dev/null
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/csit_shim_image/files/files/wrapdocker b/resources/tools/testbed-setup/ansible/roles/csit_shim_image/files/files/wrapdocker
deleted file mode 100644 (file)
index d13f8b7..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/bin/bash
-
-# Ensure that all nodes in /dev/mapper correspond to mapped devices currently loaded by the device-mapper kernel driver
-dmsetup mknodes
-
-# First, make sure that cgroups are mounted correctly.
-CGROUP=/sys/fs/cgroup
-: {LOG:=stdio}
-
-[ -d $CGROUP ] ||
-    mkdir $CGROUP
-
-mountpoint -q $CGROUP ||
-    mount -n -t tmpfs -o uid=0,gid=0,mode=0755 cgroup $CGROUP || {
-        echo "Could not make a tmpfs mount. Did you use --privileged?"
-        exit 1
-    }
-
-if [ -d /sys/kernel/security ] && ! mountpoint -q /sys/kernel/security
-then
-    mount -t securityfs none /sys/kernel/security || {
-        echo "Could not mount /sys/kernel/security."
-        echo "AppArmor detection and --privileged mode might break."
-    }
-fi
-
-# Mount the cgroup hierarchies exactly as they are in the parent system.
-for SUBSYS in $(cut -d: -f2 /proc/1/cgroup)
-do
-        [ -d $CGROUP/$SUBSYS ] || mkdir $CGROUP/$SUBSYS
-        mountpoint -q $CGROUP/$SUBSYS ||
-                mount -n -t cgroup -o $SUBSYS cgroup $CGROUP/$SUBSYS
-
-        # The two following sections address a bug which manifests itself
-        # by a cryptic "lxc-start: no ns_cgroup option specified" when
-        # trying to start containers withina container.
-        # The bug seems to appear when the cgroup hierarchies are not
-        # mounted on the exact same directories in the host, and in the
-        # container.
-
-        # Named, control-less cgroups are mounted with "-o name=foo"
-        # (and appear as such under /proc/<pid>/cgroup) but are usually
-        # mounted on a directory named "foo" (without the "name=" prefix).
-        # Systemd and OpenRC (and possibly others) both create such a
-        # cgroup. To avoid the aforementioned bug, we symlink "foo" to
-        # "name=foo". This shouldn't have any adverse effect.
-        echo $SUBSYS | grep -q ^name= && {
-                NAME=$(echo $SUBSYS | sed s/^name=//)
-                ln -s $SUBSYS $CGROUP/$NAME
-        }
-
-        # Likewise, on at least one system, it has been reported that
-        # systemd would mount the CPU and CPU accounting controllers
-        # (respectively "cpu" and "cpuacct") with "-o cpuacct,cpu"
-        # but on a directory called "cpu,cpuacct" (note the inversion
-        # in the order of the groups). This tries to work around it.
-        [ $SUBSYS = cpuacct,cpu ] && ln -s $SUBSYS $CGROUP/cpu,cpuacct
-done
-
-# Note: as I write those lines, the LXC userland tools cannot setup
-# a "sub-container" properly if the "devices" cgroup is not in its
-# own hierarchy. Let's detect this and issue a warning.
-grep -q :devices: /proc/1/cgroup ||
-    echo "WARNING: the 'devices' cgroup should be in its own hierarchy."
-grep -qw devices /proc/1/cgroup ||
-    echo "WARNING: it looks like the 'devices' cgroup is not mounted."
-
-# Now, close extraneous file descriptors.
-pushd /proc/self/fd >/dev/null
-for FD in *
-do
-    case "$FD" in
-    # Keep stdin/stdout/stderr
-    [012])
-        ;;
-    # Nuke everything else
-    *)
-        eval exec "$FD>&-"
-        ;;
-    esac
-done
-popd >/dev/null
-
-
-# If a pidfile is still around (for example after a container restart),
-# delete it so that docker can start.
-rm -rf /var/run/docker.pid
-
-# If we were given a PORT environment variable, start as a simple daemon;
-# otherwise, spawn a shell as well
-if [ "$PORT" ]
-then
-    exec dockerd -H 0.0.0.0:$PORT -H unix:///var/run/docker.sock \
-        $DOCKER_DAEMON_ARGS
-else
-    if [ "$LOG" == "file" ]
-    then
-        dockerd $DOCKER_DAEMON_ARGS &>/var/log/docker.log &
-    else
-        dockerd $DOCKER_DAEMON_ARGS &
-    fi
-    (( timeout = 60 + SECONDS ))
-    until docker info >/dev/null 2>&1
-    do
-        if (( SECONDS >= timeout )); then
-            echo 'Timed out trying to connect to internal docker host.' >&2
-            break
-        fi
-        sleep 1
-    done
-    [[ $1 ]] && exec "$@"
-    exec bash --login
-fi
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/csit_shim_image/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/csit_shim_image/tasks/main.yaml
deleted file mode 100644 (file)
index bdba4f6..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
----
-# file: roles/csit_shim_image/tasks/main.yaml
-
-- name: Create a directory if it does not exist
-  file:
-    path: "{{ item }}"
-    state: "directory"
-    mode: 0755
-  with_items:
-    - "/opt/csit-shim/"
-    - "/opt/csit-shim/files"
-  tags: csit-shim-image
-
-- name: Copy Build Items
-  copy:
-    src: "{{ item }}"
-    dest: "/opt/csit-shim/{{ item }}"
-    owner: "root"
-    group: "root"
-    mode: 0655
-  with_items:
-    - "Dockerfile"
-    - "files/badkeypub"
-    - "files/sshconfig"
-    - "files/wrapdocker"
-  tags: csit-shim-image
-
-- name: Build CSIT shim Docker Image
-  shell: "docker build -t csit_shim-ubuntu1804:local ."
-  args:
-    chdir: "/opt/csit-shim"
-  tags: csit-shim-image
\ No newline at end of file
index 6dddad6..73ff5c5 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
+# Copyright (c) 2021 Cisco and/or its affiliates.
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at:
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM ubuntu:18.04
-LABEL Description="CSIT vpp-device ubuntu 18.04 SUT image"
+FROM ubuntu:20.04
+LABEL Description="CSIT vpp-device ubuntu 20.04 SUT image"
 LABEL Version="master"
 
 # Setup the environment
 ENV DEBIAN_FRONTEND=noninteractive
-ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
-ENV NOTVISIBLE "in users profile"
-ENV VPP_PYTHON_PREFIX=/var/cache/vpp/python
+
+# Configure locales
+RUN apt-get update -qq \
+ && apt-get install -y \
+        apt-utils \
+        locales \
+ && sed -i 's/# \(en_US\.UTF-8 .*\)/\1/' /etc/locale.gen \
+ && locale-gen en_US.UTF-8 \
+ && dpkg-reconfigure --frontend=noninteractive locales \
+ && update-locale LANG=en_US.UTF-8 \
+ && TZ=Etc/UTC && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
+ && rm -r /var/lib/apt/lists/*
+ENV LANG="en_US.UTF-8" LANGUAGE="en_US" LC_ALL="en_US.UTF-8"
 
 # Install packages and Docker
 RUN apt-get -q update \
  && apt-get install -y -qq \
-        # general tools
         apt-transport-https \
         bridge-utils \
+        ca-certificates \
         cloud-init \
-        curl \
-        gdb \
-        locales \
-        net-tools \
-        openssh-server \
-        pciutils \
-        rsyslog \
-        software-properties-common \
-        ssh \
-        sudo \
-        supervisor \
-        tar \
-        vim \
-        wget \
-        # csit requirements
         cmake \
+        curl \
         dkms \
+        gdb \
         gfortran \
+        libapr1 \
         libblas-dev \
         libffi-dev \
         liblapack-dev \
+        libmbedcrypto3 \
+        libmbedtls12 \
+        libmbedx509-0 \
+        libnuma1 \
+        libnuma-dev \
         libpcap-dev \
+        libpixman-1-dev \
         libssl-dev \
-        python-all \
-        python-apt \
-        python-cffi \
-        python-cffi-backend \
-        python-dev \
-        python-enum34 \
-        python-pip \
-        python-setuptools \
-        python-virtualenv \
+        locales \
+        net-tools \
+        openssh-server \
+        pciutils \
         python3-all \
         python3-apt \
         python3-cffi \
@@ -69,30 +68,23 @@ RUN apt-get -q update \
         python3-setuptools \
         python3-virtualenv \
         qemu-system \
+        rsyslog \
         socat \
+        software-properties-common \
         strongswan \
-        unzip \
+        ssh \
+        sshpass \
+        sudo \
+        supervisor \
+        tar \
         tcpdump \
+        unzip \
+        vim \
+        wget \
         zlib1g-dev \
-        # vpp requirements
-        ca-certificates \
-        libapr1 \
-        libmbedcrypto1 \
-        libmbedtls10 \
-        libmbedx509-0 \
-        libnuma1 \
-        sshpass \
- && curl -L https://packagecloud.io/fdio/master/gpgkey | sudo apt-key add - \
- && curl -s https://packagecloud.io/install/repositories/fdio/master/script.deb.sh | sudo bash \
- # temp hack due to build.sh
- && apt-get install -y -qq vpp-ext-deps \
  && curl -fsSL https://get.docker.com | sh \
  && rm -rf /var/lib/apt/lists/*
 
-# Configure locales
-RUN locale-gen en_US.UTF-8 \
- && dpkg-reconfigure locales
-
 # Fix permissions
 RUN chown root:syslog /var/log \
  && chmod 755 /etc/default
@@ -113,7 +105,7 @@ RUN pip3 install \
         robotframework==3.1.2 \
         scapy==2.4.3 \
         scp==0.13.2 \
-        ansible==2.7.8 \
+        ansible==2.10.7 \
         dill==0.2.8.2 \
         numpy==1.17.3 \
         hdrhistogram==0.6.1 \
@@ -123,6 +115,7 @@ RUN pip3 install \
         sphinx-rtd-theme==0.4.0 \
         sphinxcontrib-programoutput==0.15 \
         sphinxcontrib-robotdoc==0.11.0 \
+        ply==3.11 \
         alabaster==0.7.12 \
         Babel==2.7.0 \
         bcrypt==3.1.7 \
@@ -158,7 +151,7 @@ RUN pip3 install \
 # ARM workaround
 RUN pip3 install \
         pandas==0.25.3 \
-        scipy==1.1.0
+        scipy==1.5.4
 
 # SSH settings
 RUN echo 'root:Csit1234' | chpasswd \
index 7b41be8..2affe4b 100644 (file)
@@ -6,7 +6,8 @@
     path: "/opt/csit-sut/"
     state: "directory"
     mode: 0755
-  tags: csit-sut-image
+  tags:
+    - csit-sut-image
 
 - name: Copy Build Items
   copy:
   with_items:
     - Dockerfile
     - supervisord.conf
-  tags: csit-sut-image
+  tags:
+    - csit-sut-image
 
 - name: Build CSIT SUT Docker Image
-  shell: "docker build -t csit_sut-ubuntu1804:local ."
+  shell: "docker build -t csit_sut-ubuntu2004:local ."
   args:
     chdir: "/opt/csit-sut"
-  tags: csit-sut-image
\ No newline at end of file
+  tags:
+    - csit-sut-image
\ No newline at end of file
index 9b182de..8343558 100644 (file)
@@ -21,8 +21,8 @@ docker_apt_gpg_key_state: present
 
 # Used only for RedHat/CentOS/Fedora.
 docker_yum_repo_url: https://download.docker.com/linux/{{ (ansible_distribution == "Fedora") | ternary("fedora","centos") }}/docker-{{ docker_edition }}.repo
-docker_yum_repo_enable_edge: '0'
-docker_yum_repo_enable_test: '0'
+docker_yum_repo_enable_edge: "0"
+docker_yum_repo_enable_test: "0"
 docker_yum_gpg_key: https://download.docker.com/linux/centos/gpg
 
 # A list of users who will be added to the docker group.
index 4dfcd0b..d89adb9 100644 (file)
@@ -5,3 +5,5 @@
   service:
     name: "docker"
     state: "{{ docker_restart_handler_state }}"
+  tags:
+    - docker-restart-service
\ No newline at end of file
index 8158af5..5a96b7a 100644 (file)
   tags:
     - docker-conf-service
 
+- name: Conf - Docker Daemon
+  template:
+    src: "templates/daemon.json.j2"
+    dest: "/etc/docker/daemon.json"
+    owner: "root"
+    group: "root"
+    mode: "0644"
+  when: >
+    docker_daemon is defined
+  tags:
+    - docker-conf-daemon
+
 - name: Conf - Docker HTTP Proxy
   template:
     src: "templates/docker.service.proxy.http"
index 2e82c55..8bda4fe 100644 (file)
     state: "present"
     cache_valid_time: 3600
     install_recommends: False
-  tags: docker-inst-dependencies
+  tags:
+    - docker-inst-dependencies
 
 - name: Conf - Add APT Key
   apt_key:
     url: "{{ docker_apt_gpg_key }}"
     state: "{{ docker_apt_gpg_key_state }}"
-  tags: docker-conf-apt
+  tags:
+    - docker-conf-apt
 
 - name: Conf - Install APT Repository
   apt_repository:
     repo: "{{ docker_apt_repository }}"
     state: "{{ docker_apt_repository_state }}"
-    update_cache: True
-  tags: docker-conf-apt
+    update_cache: yes
+  tags:
+    - docker-conf-apt
diff --git a/resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_focal.yaml b/resources/tools/testbed-setup/ansible/roles/docker/tasks/ubuntu_focal.yaml
new file mode 100644 (file)
index 0000000..84bd1c5
--- /dev/null
@@ -0,0 +1,30 @@
+---
+# file: roles/docker/tasks/ubuntu_focal.yaml
+
+- name: Inst - Dependencies
+  apt:
+    name:
+      - "apt-transport-https"
+      - "ca-certificates"
+      - "gpg-agent"
+      - "software-properties-common"
+    state: "present"
+    cache_valid_time: 3600
+    install_recommends: False
+  tags:
+    - docker-inst-dependencies
+
+- name: Conf - Add APT Key
+  apt_key:
+    url: "{{ docker_apt_gpg_key }}"
+    state: "{{ docker_apt_gpg_key_state }}"
+  tags:
+    - docker-conf-apt
+
+- name: Conf - Install APT Repository
+  apt_repository:
+    repo: "{{ docker_apt_repository }}"
+    state: "{{ docker_apt_repository_state }}"
+    update_cache: yes
+  tags:
+    - docker-conf-apt
diff --git a/resources/tools/testbed-setup/ansible/roles/docker/templates/daemon.json.j2 b/resources/tools/testbed-setup/ansible/roles/docker/templates/daemon.json.j2
new file mode 100644 (file)
index 0000000..becc2b1
--- /dev/null
@@ -0,0 +1 @@
+{{ docker_daemon | to_nice_json }}
\ No newline at end of file
index e43c284..2a8c691 100644 (file)
@@ -1,15 +1,19 @@
 ---
 # file: roles/dpdk/defaults/main.yaml
 
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
 
 packages_base:
   - []
 
 packages_by_distro:
   ubuntu:
-    - "build-essential"
-    - "libnuma-dev"
+    bionic:
+      - "build-essential"
+      - "libnuma-dev"
+    focal:
+      - "build-essential"
+      - "libnuma-dev"
 
 packages_by_arch:
   aarch64:
@@ -19,13 +23,9 @@ packages_by_arch:
 
 dpdk_target_dir: "/opt"
 dpdk_version:
-  - "19.02"
   - "20.02"
 dpdk_url: "https://fast.dpdk.org/rel"
 dpdk_build_targets:
-  "19.02":
-    aarch64: "arm64-armv8a-linuxapp-gcc"
-    x86_64: "x86_64-native-linuxapp-gcc"
   "20.02":
     aarch64: "arm64-armv8a-linux-gcc"
     x86_64: "x86_64-native-linux-gcc"
index 1b4e398..46f942b 100644 (file)
@@ -1,15 +1,23 @@
 ---
 # file: roles/dpdk/tasks/main.yaml
 
-- name: DPDK - Install Distribution - Release - Machine Prerequisites
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - dpdk-inst-prerequisites
+
+- name: Inst - Prerequisites
   package:
     name: "{{ packages | flatten(levels=1) }}"
     state: latest
-    update_cache: true
   tags:
-    - install-dependencies
+    - dpdk-inst-prerequisites
 
-- name: DPDK - Download Release Archive
+- name: Download Release Archive
   get_url:
     url: "{{ dpdk_url }}/dpdk-{{ item }}.tar.xz"
     dest: "{{ dpdk_target_dir }}/dpdk-{{ item }}.tar.xz"
@@ -17,9 +25,9 @@
   loop: "{{ dpdk_version }}"
   register: "dpdk_downloaded"
   tags:
-    - install-dpdk
+    - dpdk-inst
 
-- name: DPDK - Extract Release Archive
+- name: Extract Release Archive
   unarchive:
     remote_src: true
     src: "{{ dpdk_target_dir }}/dpdk-{{ item }}.tar.xz"
@@ -29,9 +37,9 @@
   when: "dpdk_downloaded"
   register: "dpdk_extracted"
   tags:
-    - install-dpdk
+    - dpdk-inst
 
-- name: DPDK - Build igb_uio by default
+- name: Build igb_uio by default
   lineinfile:
     dest: "{{ dpdk_target_dir }}/dpdk-{{ item }}/config/common_base"
     regexp: "^CONFIG_RTE_EAL_IGB_UIO"
   when: "dpdk_extracted"
   register: "dpdk_configured"
   tags:
-    - install-dpdk
+    - dpdk-inst
 
-- name: DPDK - Compile Release I
+- name: Compile Release I
   become: yes
   command: "make install T={{ dpdk_build_targets[item][ansible_machine] }} DESTDIR={{ dpdk_target_dir }}/dpdk-{{ item }} chdir={{ dpdk_target_dir }}/dpdk-{{ item }}"
   loop: "{{ dpdk_version }}"
   when: "dpdk_configured"
   register: "dpdk_compiled"
   tags:
-    - install-dpdk
+    - dpdk-inst
 
-- name: DPDK - Link igb_uio Module
+- name: Link igb_uio Module
   shell: "ln -fs {{ dpdk_target_dir }}/dpdk-{{ item }}/{{ dpdk_build_targets[item][ansible_machine] }}/kmod/igb_uio.ko /lib/modules/`uname -r`/igb_uio.ko && depmod -a"
   ignore_errors: "yes"
   loop: "{{ dpdk_version }}"
   when: "dpdk_compiled"
   tags:
-    - install-dpdk
+    - dpdk-inst
\ No newline at end of file
index 5021066..07af60b 100644 (file)
@@ -1,15 +1,19 @@
 ---
 # file: roles/iperf/defaults/main.yaml
 
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
 
 packages_base:
   - []
 
 packages_by_distro:
   ubuntu:
-    - "build-essential"
-    - "lib32z1"
+    bionic:
+      - "build-essential"
+      - "lib32z1"
+    focal:
+      - "build-essential"
+      - "lib32z1"
 
 packages_by_arch:
   aarch64:
index 8233ba7..f8948ca 100644 (file)
@@ -1,15 +1,23 @@
 ---
 # file: roles/iperf/tasks/main.yaml
 
-- name: iPerf - Install Distribution - Release - Machine Prerequisites
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - iperf-inst-prerequisites
+
+- name: Inst - Prerequisites
   package:
     name: "{{ packages | flatten(levels=1) }}"
     state: latest
-    update_cache: true
   tags:
-    - install-dependencies
+    - iperf-inst-prerequisites
 
-- name: iPerf - Get Release Archive
+- name: Get Release Archive
   get_url:
     url: "https://downloads.es.net/pub/iperf/iperf-{{ item }}.tar.gz"
     dest: "{{ iperf_target_dir }}/iperf-{{ item }}.tar.gz"
@@ -17,9 +25,9 @@
     mode: 0644
   loop: "{{ iperf_version }}"
   tags:
-    - install-iperf
+    - iperf-inst
 
-- name: iPerf - Extract Release Archive
+- name: Extract Release Archive
   unarchive:
     remote_src: true
     src: "{{ iperf_target_dir }}/iperf-{{ item }}.tar.gz"
     creates: "{{ iperf_target_dir }}/iperf-{{ item }}/src"
   loop: "{{ iperf_version }}"
   tags:
-    - install-iperf
+    - iperf-inst
 
-- name: iPerf - Compile Release I
+- name: Compile Release I
   command: "./configure"
   args:
       chdir: "{{ iperf_target_dir }}/iperf-{{ item }}/"
   loop: "{{ iperf_version }}"
   tags:
-    - install-iperf
+    - iperf-inst
 
-- name: iPerf - Compile Release II
+- name: Compile Release II
   command: "make"
   args:
       chdir: "{{ iperf_target_dir }}/iperf-{{ item }}/"
   loop: "{{ iperf_version }}"
   tags:
-    - install-iperf
+    - iperf-inst
 
-- name: iPerf - Compile Release III
+- name: Compile Release III
   command: "make install"
   args:
       chdir: "{{ iperf_target_dir }}/iperf-{{ item }}/"
   loop: "{{ iperf_version }}"
   tags:
-    - install-iperf
+    - iperf-inst
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/defaults/main.yaml
new file mode 100644 (file)
index 0000000..9813d41
--- /dev/null
@@ -0,0 +1,35 @@
+---
+# file: roles/jenkins_job_health_exporter/defaults/main.yaml
+
+# Conf - Jenkins Job Health Exporter.
+jenkins_host: "jenkins.fd.io"
+poll_interval_sec: 1800
+req_timeout_sec: 30
+bind_to: "0.0.0.0:9186"
+last_builds: 10
+jobs:
+  - "vpp-csit-verify-api-crc-master"
+  - "vpp-beta-verify-master-ubuntu2004-aarch64"
+  - "vpp-verify-master-centos8-aarch64"
+  - "vpp-verify-master-ubuntu1804-aarch64"
+  - "vpp-gcc-verify-master-ubuntu2004-x86_64"
+  - "vpp-verify-master-centos8-x86_64"
+  - "vpp-verify-master-debian10-x86_64"
+  - "vpp-verify-master-ubuntu2004-x86_64"
+  - "vpp-verify-master-ubuntu1804-x86_64"
+  - "vpp-debug-verify-master-ubuntu2004-x86_64"
+  - "vpp-checkstyle-verify-master-ubuntu2004-x86_64"
+  - "vpp-sphinx-docs-verify-master-ubuntu1804-x86_64"
+  - "vpp-docs-verify-master-ubuntu1804-x86_64"
+  - "vpp-make-test-docs-verify-master-ubuntu1804-x86_64"
+  - "vpp-csit-verify-device-master-1n-skx"
+  - "vpp-csit-verify-device-master-1n-tx2"
+
+# Conf - Service.
+jenkins_job_health_exporter_restart_handler_state: "restarted"
+
+# Inst - System paths.
+jenkins_job_health_exporter_target_dir: "/usr/bin"
+jenkins_job_health_exporter_conf_dir: "/etc"
+jenkins_job_health_exporter_url: "https://github.com/ayourtch/jenkins-job-health-exporter/releases/download"
+jenkins_job_health_exporter_version: "v0.0.3"
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/handlers/main.yaml b/resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/handlers/main.yaml
new file mode 100644 (file)
index 0000000..29fee98
--- /dev/null
@@ -0,0 +1,9 @@
+---
+# file roles/jenkins_job_health_exporter/handlers/main.yaml
+
+- name: Restart Jenkins Job Health Exporter
+  systemd:
+    daemon_reload: true
+    enabled: true
+    name: "jenkins-job-health-exporter"
+    state: "{{ jenkins_job_health_exporter_restart_handler_state }}"
diff --git a/resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/tasks/main.yaml
new file mode 100644 (file)
index 0000000..5dbe476
--- /dev/null
@@ -0,0 +1,38 @@
+---
+# file: roles/jenkins_job_health_exporter/tasks/main.yaml
+
+- name: Conf - Jenkins Job Health Exporter Config
+  template:
+    src: "templates/jenkins-job-health-exporter.j2"
+    dest: "/etc/jenkins-job-health-exporter.json"
+    owner: "root"
+    group: "root"
+    mode: "0644"
+  when:
+    - ansible_hostname == "s42-nomad"
+  tags:
+    - conf-jenkins-job-json
+
+- name: Inst - Jenkins Job Health Exporter Binary
+  get_url:
+    url: "{{ jenkins_job_health_exporter_url }}/{{ jenkins_job_health_exporter_version }}/jenkins-job-health-exporter"
+    dest: "{{ jenkins_job_health_exporter_target_dir }}/jenkins-job-health-exporter"
+    mode: "0755"
+  when:
+    - ansible_hostname == "s42-nomad"
+  tags:
+    - inst-jenkins-job-binary
+
+- name: Inst - Jenkins Job Health Exporter Service
+  template:
+    src: "templates/jenkins-job-health-exporter.service.j2"
+    dest: "/lib/systemd/system/jenkins-job-health-exporter.service"
+    owner: "root"
+    group: "root"
+    mode: "0644"
+  when:
+    - ansible_hostname == "s42-nomad"
+  notify:
+    - "Restart Jenkins Job Health Exporter"
+  tags:
+    - inst-jenkins-job-service
diff --git a/resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/templates/jenkins-job-health-exporter.j2 b/resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/templates/jenkins-job-health-exporter.j2
new file mode 100644 (file)
index 0000000..5942b78
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "jenkins_host": "{{ jenkins_host }}",
+  "poll_interval_sec": {{ poll_interval_sec }},
+  "req_timeout_sec": {{ req_timeout_sec }},
+  "bind_to": "{{ bind_to }}",
+  "last_builds": {{ last_builds }},
+  "jobs": [
+{% for item in jobs %}
+    "{{ item }}"
+{%- if not loop.last %},
+{% endif %}
+{% endfor %}
+
+  ],
+  "verbose": 3
+}
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/templates/jenkins-job-health-exporter.service.j2 b/resources/tools/testbed-setup/ansible/roles/jenkins_job_health_exporter/templates/jenkins-job-health-exporter.service.j2
new file mode 100644 (file)
index 0000000..38073d0
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=Jenkins Job Health Exporter
+Documentation=https://github.com/ayourtch/jenkins-job-health-exporter
+
+[Service]
+Restart=always
+ExecStart={{ jenkins_job_health_exporter_target_dir }}/jenkins-job-health-exporter {{ jenkins_job_health_exporter_conf_dir }}/jenkins-job-health-exporter.json
+ExecReload=/bin/kill -HUP $MAINPID
+TimeoutStopSec=20s
+SendSIGKILL=no
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
index d84a163..b9b4253 100644 (file)
@@ -2,27 +2,42 @@
 # file: roles/kernel/defaults/main.yaml
 
 # Kernel version to install (Default to any version).
-kernel_version: "{{ kernel_version_by_distro[ansible_distribution | lower] | join(' ') }}"
+kernel_version: "{{ kernel_version_by_distro[ansible_distribution|lower][ansible_distribution_release] | join(' ') }}"
 
 kernel_version_by_distro:
   ubuntu:
-    - "4.15.0-72"
+    bionic:
+      - "4.15.0-72"
+    focal:
+      - "5.4.0-65"
 
-kernel_packages: "{{ kernel_packages_by_distro[ansible_distribution | lower] | flatten(levels=1) }}"
+kernel_packages: "{{ kernel_packages_by_distro[ansible_distribution|lower][ansible_distribution_release] | flatten(levels=1) }}"
 
 kernel_packages_by_distro:
   ubuntu:
-    - "linux-image"
-    - "linux-headers"
-    - "linux-modules"
-    - "linux-modules-extra"
-    - "linux-tools"
+    bionic:
+      - "linux-image"
+      - "linux-headers"
+      - "linux-modules"
+      - "linux-modules-extra"
+      - "linux-tools"
+    focal:
+      - "linux-image"
+      - "linux-headers"
+      - "linux-modules"
+      - "linux-modules-extra"
+      - "linux-tools"
 
 # Packages to remove in relation to kernel upgrade.
-absent_packages: "{{ absent_packages_by_distro[ansible_distribution | lower] | flatten(levels=1) }}"
+absent_packages: "{{ absent_packages_by_distro[ansible_distribution|lower][ansible_distribution_release] | flatten(levels=1) }}"
 
 absent_packages_by_distro:
   ubuntu:
-    - "amd64-microcode"
-    - "intel-microcode"
-    - "iucode-tool"
+    bionic:
+      - "amd64-microcode"
+      - "intel-microcode"
+      - "iucode-tool"
+    focal:
+      - "amd64-microcode"
+      - "intel-microcode"
+      - "iucode-tool"
\ No newline at end of file
index 3d30a09..963fd71 100644 (file)
@@ -4,3 +4,5 @@
 - name: Reboot Server
   reboot:
     reboot_timeout: 3600
+  tags:
+    - reboot-server
\ No newline at end of file
index 4c63c70..431e344 100644 (file)
@@ -1,8 +1,9 @@
 ---
 # file: roles/kernel/tasks/main.yaml
 
-- name: Kernel - Install distribution - release
-  include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml'
-  tags: install-kernel
+- name: Inst - Prerequisites
+  include_tasks: "{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml"
+  tags:
+    - kernel-inst-prerequisites
 
 - meta: flush_handlers
index 3cb7935..349c853 100644 (file)
@@ -1,33 +1,37 @@
 ---
 # file: roles/kernel/tasks/ubuntu_bionic.yaml
 
-- name: Kernel - Get Available Kernel Versions
+- name: Get Available Kernel Versions
   command: "apt-cache showpkg linux-headers-*"
   changed_when: false
   register: apt_kernel_list
-  tags: install-kernel
+  tags:
+    - kernel-inst
 
-- name: Kernel - Get installed packages with APT
+- name: Get installed packages with APT
   command: "dpkg -l"
   changed_when: false
   register: apt_packages_list
-  tags: install-kernel
+  tags:
+    - kernel-inst
 
-- name: Kernel - Set target APT kernel version
+- name: Set target APT kernel version
   set_fact:
     _kernel: "{{ apt_kernel_list | deb_kernel(
                  kernel_version, ansible_kernel) }}"
-  tags: install-kernel
+  tags:
+    - kernel-inst
 
-- name: Kernel - Ensure Packages Versions
+- name: Ensure Packages Versions
   apt:
     name: "{{ apt_kernel_list | deb_kernel_pkg(
               kernel_version, ansible_kernel, ansible_distribution,
               ansible_architecture, item) }}"
   loop: "{{ kernel_packages }}"
-  tags: install-kernel
+  tags:
+    - kernel-inst
 
-- name: Kernel - Ensure Any Other Kernel Packages Are Removed
+- name: Ensure Any Other Kernel Packages Are Removed
   apt:
     name: "{{ apt_packages_list | deb_installed_kernel(
               apt_kernel_list, kernel_version, ansible_kernel) }}"
     purge: true
   notify:
     - "Reboot Server"
-  tags: install-kernel
+  tags:
+    - kernel-inst
 
-- name: Kernel - Ensure Any Microcode Is Absent
+- name: Ensure Any Microcode Is Absent
   apt:
     name: "{{ absent_packages }}"
     state: absent
     purge: true
-  tags: install-kernel
-
+  tags:
+    - kernel-inst
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_focal.yaml b/resources/tools/testbed-setup/ansible/roles/kernel/tasks/ubuntu_focal.yaml
new file mode 100644 (file)
index 0000000..9cbc4d4
--- /dev/null
@@ -0,0 +1,51 @@
+---
+# file: roles/kernel/tasks/ubuntu_focal.yaml
+
+- name: Get Available Kernel Versions
+  command: "apt-cache showpkg linux-headers-*"
+  changed_when: false
+  register: apt_kernel_list
+  tags:
+    - kernel-inst
+
+- name: Get installed packages with APT
+  command: "dpkg -l"
+  changed_when: false
+  register: apt_packages_list
+  tags:
+    - kernel-inst
+
+- name: Set target APT kernel version
+  set_fact:
+    _kernel: "{{ apt_kernel_list | deb_kernel(
+                 kernel_version, ansible_kernel) }}"
+  tags:
+    - kernel-inst
+
+- name: Ensure Packages Versions
+  apt:
+    name: "{{ apt_kernel_list | deb_kernel_pkg(
+              kernel_version, ansible_kernel, ansible_distribution,
+              ansible_architecture, item) }}"
+  loop: "{{ kernel_packages }}"
+  tags:
+    - kernel-inst
+
+- name: Ensure Any Other Kernel Packages Are Removed
+  apt:
+    name: "{{ apt_packages_list | deb_installed_kernel(
+              apt_kernel_list, kernel_version, ansible_kernel) }}"
+    state: absent
+    purge: true
+  notify:
+    - "Reboot Server"
+  tags:
+    - kernel-inst
+
+- name: Ensure Any Microcode Is Absent
+  apt:
+    name: "{{ absent_packages }}"
+    state: absent
+    purge: true
+  tags:
+    - kernel-inst
\ No newline at end of file
index ba9426a..4d1b306 100644 (file)
@@ -1,7 +1,7 @@
 ---
 # file: roles/kernel_vm/tasks/main.yaml
 
-- name: Kernel VM - Backup remote initramfs modules
+- name: Inst - Backup remote initramfs modules
   copy:
     src: "/etc/initramfs-tools/modules"
     dest: "/tmp/initramfs_modules.bkp"
@@ -9,9 +9,9 @@
   ignore_errors: yes
   register: __initramfs_modules_backuped
   tags:
-    - install-kernel-image
+    - kernel-inst-image
 
-- name: Kernel VM - Backup remote initramfs resume config
+- name: Inst - Backup remote initramfs resume config
   copy:
     src: "/etc/initramfs-tools/conf.d/resume"
     dest: "/tmp/initramfs-resume.bkp"
   ignore_errors: yes
   register: __initramfs_resume_backuped
   tags:
-    - install-kernel-image
+    - kernel-inst-image
 
-- name: Kernel VM - Update remote initramfs modules
+- name: Inst - Update remote initramfs modules
   copy:
     src: "../files/initramfs_modules"
     dest: "/etc/initramfs-tools/modules"
   tags:
-    - install-kernel-image
+    - kernel-inst-image
 
-- name: Kernel VM - Update remote initramfs resume config
+- name: Inst - Update remote initramfs resume config
   copy:
     src: "../files/initramfs_resume"
     dest: "/etc/initramfs-tools/conf.d/resume"
   tags:
-    - install-kernel-image
+    - kernel-inst-image
 
-- name: Kernel VM - Create target kernel dir
+- name: Inst - Create target kernel dir
   file:
     path: "/opt/boot"
     state: "directory"
   tags:
-    - install-kernel-image
+    - kernel-inst-image
 
-- name: Kernel VM - Build initrd image
+- name: Inst - Build initrd image
   shell: "update-initramfs -k {{ ansible_kernel }} -c -b /opt/boot"
   tags:
-    - install-kernel-image
+    - kernel-inst-image
 
-- name: Kernel VM - Copy corresponding kernel img
+- name: Inst - Copy corresponding kernel img
   copy:
     src: "/boot/vmlinuz-{{ ansible_kernel }}"
     dest: "/opt/boot/vmlinuz-{{ ansible_kernel }}"
     remote_src: yes
   tags:
-    - install-kernel-image
+    - kernel-inst-image
 
-- name: Kernel VM - Restore remote initramfs modules
+- name: Inst - Restore remote initramfs modules
   copy:
     src: "/tmp/initramfs_modules.bkp"
     dest: "/etc/initramfs-tools/modules"
   ignore_errors: yes
   when: __initramfs_modules_backuped
   tags:
-    - install-kernel-image
+    - kernel-inst-image
 
-- name: Kernel VM - Remove remote backup initramfs modules
+- name: Inst - Remove remote backup initramfs modules
   file:
     path: "/tmp/initramfs_modules.bkp"
     state: "absent"
   when: __initramfs_modules_backuped
   tags:
-    - install-kernel-image
+    - kernel-inst-image
 
-- name: Kernel VM - Restore remote initramfs resume config
+- name: Inst - Restore remote initramfs resume config
   copy:
     src: "/tmp/initramfs-resume.bkp"
     dest: "/etc/initramfs-tools/conf.d/resume"
   ignore_errors: yes
   when: __initramfs_resume_backuped
   tags:
-    - install-kernel-image
+    - kernel-inst-image
 
-- name: Kernel VM - Remove remote backup initramfs resume config
+- name: Inst - Remove remote backup initramfs resume config
   file:
     path: "/tmp/initramfs-resume.bkp"
     state: "absent"
   when: __initramfs_resume_backuped
   tags:
-    - install-kernel-image
+    - kernel-inst-image
index ddb885f..454e80e 100644 (file)
@@ -22,7 +22,7 @@
   apt_repository:
     repo: '{{ kubernetes_apt_repository }}'
     state: '{{ kubernetes_apt_repository_state }}'
-    update_cache: True
+    update_cache: yes
   tags: install-kubernetes
 
 - name: Kubernetes - Install
index a77bc67..0961ec7 100644 (file)
@@ -18,4 +18,4 @@ packages_by_arch:
   x86_64:
     - []
 
-mellanox_version: "4.6-1.0.1.1"
+mellanox_version: "5.2-1.0.4.0"
\ No newline at end of file
index 2fb6e2e..6702829 100644 (file)
@@ -1,32 +1,40 @@
 ---
 # file: roles/mellanox/tasks/main.yaml
 
-- name: Mellanox Install - Install Distribution - Release - Machine Prerequisites
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - mellanox-inst-prerequisites
+
+- name: Inst - Prerequisites
   package:
     name: "{{ packages | flatten(levels=1) }}"
     state: latest
-    update_cache: true
   tags:
-    - install-dependencies
+    - mellanox-inst-prerequisites
 
-- name: Mellanox Install - Check Presence of Mellanox Hardware
+- name: Inst - Check Presence of Mellanox Hardware
   shell: "lspci | grep Mellanox | awk '{print $1}'"
   register: mellanox_pcis
   failed_when: no
   changed_when: no
   tags:
-    - install-mellanox
+    - mellanox-inst
 
-- name: Mellanox Install - Get OFED
+- name: Inst - Get OFED
   get_url:
     url: "http://content.mellanox.com/ofed/MLNX_OFED-{{ mellanox_version }}/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
     dest: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
     mode: 0644
   when: mellanox_pcis.stdout_lines | length > 0
   tags:
-    - install-mellanox
+    - mellanox-inst
 
-- name: Mellanox Install - Extract OFED
+- name: Inst - Extract OFED
   unarchive:
     remote_src: true
     src: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}.tgz"
   register: mellanox_firmware_extracted
   when: mellanox_pcis.stdout_lines | length > 0
   tags:
-    - install-mellanox
+    - mellanox-inst
 
-- name: Mellanox Install - Install OFED
+- name: Inst - OFED
   command: "./mlnxofedinstall --with-mft --dpdk --force --upstream-libs"
   args:
     chdir: "/opt/MLNX_OFED_LINUX-{{ mellanox_version }}-{{ ansible_distribution|lower }}{{ ansible_distribution_version }}-{{ ansible_machine }}"
   when: mellanox_pcis.stdout_lines | length > 0 and mellanox_firmware_extracted
   tags:
-    - install-mellanox
+    - mellanox-inst
 
-- name: Mellanox Install - Switch Infiniband to Ethernet
+- name: Switch Infiniband to Ethernet
   command: "mlxconfig --yes --dev {{ item }} set LINK_TYPE_P1=2 LINK_TYPE_P2=2"
   with_items: "{{ mellanox_pcis.stdout_lines }}"
   tags:
-    - install-mellanox
+    - mellanox-conf
 
-- name: Mellanox Install - FIX qemu-system removal
+- name: FIX qemu-system removal
   package:
     name: "qemu-system"
     state: latest
-    update_cache: true
   tags:
-    - install-mellanox
+    - mellanox-inst
index e1341b3..54e8051 100644 (file)
@@ -1,11 +1,19 @@
 ---
 # file: roles/nomad/tasks/main.yaml
 
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - nomad-inst-prerequisites
+
 - name: Inst - Prerequisites
   package:
     name: "{{ packages | flatten(levels=1) }}"
     state: latest
-    update_cache: true
   tags:
     - nomad-inst-prerequisites
 
index 612bc5a..2dad931 100644 (file)
@@ -1,14 +1,17 @@
 ---
 # file: roles/performance_tuning/defaults/main.yaml
 
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
 
 packages_base:
   - "cpufrequtils"
 
 packages_by_distro:
   ubuntu:
-    - []
+    bionic:
+      - []
+    focal:
+      - []
 
 packages_by_arch:
   aarch64:
index c437b40..e9cdd0d 100644 (file)
@@ -1,41 +1,31 @@
 ---
 # file: roles/performance_tuning/tasks/main.yaml
 
-- name: Performance Tuning - Install Distribution - Release - Machine Prerequisites
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - perf-inst-prerequisites
+
+- name: Inst - Machine Prerequisites
   package:
     name: "{{ packages | flatten(levels=1) }}"
     state: latest
-    update_cache: true
-  tags:
-    - install-dependencies
-
-- name: Performance Tuning - Distribution - release - machine optimizations
-  include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml'
-  tags:
-    - machine-optimizations
-
-- name: Performance Tuning - Configure {{ ansible_machine }} Kernel Parameters
-  lineinfile:
-    path: "/etc/default/grub"
-    state: "present"
-    regexp: "^GRUB_CMDLINE_LINUX="
-    line: "GRUB_CMDLINE_LINUX=\"{% for key, value in grub.items() %}{% if value %}{{key}}={{value}} {% else %}{{key}} {% endif %}{% endfor %}\""
-  notify:
-    - "Update GRUB"
   tags:
-    - set-grub
-
-- meta: flush_handlers
+    - perf-inst-prerequisites
 
-- name: Performance Tuning - Turbo Boost
+- name: Conf - Turbo Boost
   import_tasks: turbo_boost.yaml
   when: >
     cpu_microarchitecture == "skylake" or
     cpu_microarchitecture == "cascadelake"
   tags:
-    - turbo-boost
+    - perf-conf-turbo-boost
 
-- name: Performance Tuning - Adjust nr_hugepages
+- name: Conf - Adjust nr_hugepages
   # change the minimum size of the hugepage pool.
   # 2G VPP, 4GB per VNF/CNF, 2G reserve
   sysctl:
@@ -45,9 +35,9 @@
     sysctl_file: "/etc/sysctl.d/90-csit.conf"
     reload: "yes"
   tags:
-    - set-sysctl
+    - perf-conf-sysctl
 
-- name: Performance Tuning - Adjust max_map_count
+- name: Conf - Adjust max_map_count
   # this file contains the maximum number of memory map areas a process
   # may have. memory map areas are used as a side-effect of calling
   # malloc, directly by mmap and mprotect, and also when loading shared
@@ -64,9 +54,9 @@
     sysctl_file: "/etc/sysctl.d/90-csit.conf"
     reload: "yes"
   tags:
-    - set-sysctl
+    - perf-conf-sysctl
 
-- name: Performance Tuning - Adjust hugetlb_shm_group
+- name: Conf - Adjust hugetlb_shm_group
   # hugetlb_shm_group contains group id that is allowed to create sysv
   # shared memory segment using hugetlb page.
   sysctl:
@@ -76,9 +66,9 @@
     sysctl_file: "/etc/sysctl.d/90-csit.conf"
     reload: "yes"
   tags:
-    - set-sysctl
+    - perf-conf-sysctl
 
-- name: Performance Tuning - Adjust swappiness
+- name: Conf - Adjust swappiness
   # this control is used to define how aggressive the kernel will swap
   # memory pages.  higher values will increase agressiveness, lower values
   # decrease the amount of swap.  a value of 0 instructs the kernel not to
@@ -91,9 +81,9 @@
     sysctl_file: "/etc/sysctl.d/90-csit.conf"
     reload: "yes"
   tags:
-    - set-sysctl
+    - perf-conf-sysctl
 
-- name: Performance Tuning - Adjust shmmax
+- name: Conf - Adjust shmmax
   # shared memory max must be greator or equal to the total size of hugepages.
   # for 2mb pages, totalhugepagesize = vm.nr_hugepages * 2 * 1024 * 1024
   # if the existing kernel.shmmax setting (cat /sys/proc/kernel/shmmax)
     sysctl_file: "/etc/sysctl.d/90-csit.conf"
     reload: "yes"
   tags:
-    - set-sysctl
+    - perf-conf-sysctl
 
-- name: Performance Tuning - Adjust watchdog_cpumask
+- name: Conf - Adjust watchdog_cpumask
   # this value can be used to control on which cpus the watchdog may run.
   # the default cpumask is all possible cores, but if no_hz_full is
   # enabled in the kernel config, and cores are specified with the
     sysctl_file: "/etc/sysctl.d/90-csit.conf"
     reload: "yes"
   tags:
-    - set-sysctl
+    - perf-conf-sysctl
 
-- name: Performance Tuning - Adjust randomize_va_space
+- name: Conf - Adjust randomize_va_space
   # this option can be used to select the type of process address
   # space randomization that is used in the system, for architectures
   # that support this feature.
     sysctl_file: "/etc/sysctl.d/90-csit.conf"
     reload: "yes"
   tags:
-    - set-sysctl
+    - perf-conf-sysctl
 
-- name: Performance Tuning - Copy Cpufrequtils File
+- name: Conf - Cpufrequtils
   copy:
     src: "files/cpufrequtils"
     dest: "/etc/default/cpufrequtils"
     owner: "root"
     group: "root"
-    mode: "0644"
+    mode: 0644
   tags:
-    - copy-cpufrequtils
+    - perf-conf-cpufrequtils
 
-- name: Performance Tuning - Copy Irqbalance File
+- name: Conf - Irqbalance
   template:
     src: "files/irqbalance"
     dest: "/etc/default/irqbalance"
     owner: "root"
     group: "root"
-    mode: "0644"
-  notify:
-    - "Update GRUB"
+    mode: 0644
   tags:
-    - copy-irqbalance
+    - perf-conf-irqbalance
 
-- name: Performance Tuning - Set Ondemand Service To Disable
+- name: Conf - Set Ondemand Service To Disable
   service:
     name: "ondemand"
     enabled: "no"
   tags:
-    - set-ondemand
+    - perf-conf-ondemand
+
+- name: Conf - Kernel Parameters
+  lineinfile:
+    path: "/etc/default/grub"
+    state: "present"
+    regexp: "^GRUB_CMDLINE_LINUX="
+    line: "GRUB_CMDLINE_LINUX=\"{% for key, value in grub.items() %}{% if value is sameas true %}{{key}} {% else %}{{key}}={{value}} {% endif %}{% endfor %}\""
+  notify:
+    - "Update GRUB"
+  tags:
+    - perf-conf-grub
 
-- name: Performance Tuning - Load Kernel Modules By Default
+- meta: flush_handlers
+
+- name: Conf - Load Kernel Modules By Default
   lineinfile:
     path: "/etc/modules"
     state: "present"
     line: "{{ item }}"
   with_items:
     - "vfio-pci"
+  notify:
+    - "Reboot Server"
   tags:
-    - load-kernel-modules
+    - perf-conf-load-kernel-modules
 
-- meta: flush_handlers
+- meta: flush_handlers
\ No newline at end of file
index 310803c..7f69365 100644 (file)
@@ -1,36 +1,44 @@
 ---
 # file: roles/performance_tuning/tasks/turbo_boost.yaml
 
-- name: Turbo Boost - Install msr-tools
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - turbo-inst-prerequisites
+
+- name: Inst - msr-tools
   package:
     name:
       - "msr-tools"
     state: latest
-    update_cache: true
   tags:
-    - turbo-boost
+    - turbo-inst-prerequisites
 
-- name: Turbo Boost - Load msr By Default
+- name: Conf - Load msr By Default
   lineinfile:
     path: "/etc/modules"
     state: "present"
     line: "msr"
   tags:
-    - turbo-boost
+    - turbo-conf-msr
 
-- name: Turbo Boost - Custom Startup Service Hook
+- name: Conf - Custom Startup Service Hook
   copy:
     src: "files/disable-turbo-boost.service"
     dest: "/etc/systemd/system/disable-turbo-boost.service"
     owner: "root"
     group: "root"
-    mode: "0644"
+    mode: 0644
   tags:
-    - turbo-boost
+    - turbo-conf-msr
 
-- name: Turbo Boost - Custom Startup Service Hook Enable
+- name: Conf - Custom Startup Service Hook Enable
   service:
     name: "disable-turbo-boost"
     enabled: yes
   tags:
-    - turbo-boost
+    - turbo-conf-msr
diff --git a/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/ubuntu_bionic.yaml b/resources/tools/testbed-setup/ansible/roles/performance_tuning/tasks/ubuntu_bionic.yaml
deleted file mode 100644 (file)
index 273ad53..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
----
-# file: roles/performance_tuning/tasks/ubuntu_bionic.yaml
-
-- name: Ubuntu Bionic - Mount /tmp as tmpfs I
-  copy:
-    src: "/usr/share/systemd/tmp.mount"
-    dest: "/etc/systemd/system/tmp.mount"
-    remote_src: yes
-  tags:
-    - machine-optimizations
-
-- name: Ubuntu Bionic - Mount /tmp as tmpfs II
-  systemd:
-    name: "tmp.mount"
-    daemon_reload: yes
-    enabled: yes
-  tags:
-    - machine-optimizations
diff --git a/resources/tools/testbed-setup/ansible/roles/prometheus_exporter/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/prometheus_exporter/defaults/main.yaml
new file mode 100644 (file)
index 0000000..eb2b94c
--- /dev/null
@@ -0,0 +1,17 @@
+---
+# file: roles/prometheus_exporter/defaults/main.yaml
+
+# Inst - Exporters.
+ne_packages: "{{ ne_packages_by_distro[ansible_distribution | lower][ansible_machine] }}"
+
+ne_packages_by_distro:
+  ubuntu:
+    aarch64: "http://ports.ubuntu.com/pool/universe/p/prometheus-node-exporter/prometheus-node-exporter_1.0.1+ds-1_arm64.deb"
+    x86_64: "http://archive.ubuntu.com/ubuntu/pool/universe/p/prometheus-node-exporter/prometheus-node-exporter_1.0.1+ds-1_amd64.deb"
+
+be_packages: "{{ be_packages_by_distro[ansible_distribution | lower][ansible_machine] }}"
+
+be_packages_by_distro:
+  ubuntu:
+    aarch64: "http://ports.ubuntu.com/pool/universe/p/prometheus-blackbox-exporter/prometheus-blackbox-exporter_0.17.0+ds-1_arm64.deb"
+    x86_64: "http://archive.ubuntu.com/ubuntu/pool/universe/p/prometheus-blackbox-exporter/prometheus-blackbox-exporter_0.17.0+ds-1_amd64.deb"
diff --git a/resources/tools/testbed-setup/ansible/roles/prometheus_exporter/files/blackbox.yml b/resources/tools/testbed-setup/ansible/roles/prometheus_exporter/files/blackbox.yml
new file mode 100644 (file)
index 0000000..f61c26e
--- /dev/null
@@ -0,0 +1,25 @@
+modules:
+  http_2xx:
+    prober: http
+    timeout: 5s
+    http:
+      valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
+      no_follow_redirects: false
+      fail_if_ssl: false
+      fail_if_not_ssl: true
+      tls_config:
+        insecure_skip_verify: false
+      preferred_ip_protocol: "ip4"
+  icmp_v4:
+    prober: icmp
+    timeout: 5s
+    icmp:
+      preferred_ip_protocol: "ip4"
+  dns_udp:
+    prober: dns
+    timeout: 5s
+    dns:
+      query_name: "jenkins.fd.io"
+      query_type: "A"
+      valid_rcodes:
+      - NOERROR
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/prometheus_exporter/handlers/main.yaml b/resources/tools/testbed-setup/ansible/roles/prometheus_exporter/handlers/main.yaml
new file mode 100644 (file)
index 0000000..9c374ea
--- /dev/null
@@ -0,0 +1,16 @@
+---
+# file roles/prometheus_exporter/handlers/main.yaml
+
+- name: Restart Prometheus Node Exporter
+  systemd:
+    daemon_reload: true
+    enabled: true
+    name: "prometheus-node-exporter"
+    state: "restarted"
+
+- name: Restart Prometheus Blackbox Exporter
+  systemd:
+    daemon_reload: true
+    enabled: true
+    name: "prometheus-blackbox-exporter"
+    state: "restarted"
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/prometheus_exporter/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/prometheus_exporter/tasks/main.yaml
new file mode 100644 (file)
index 0000000..b38215c
--- /dev/null
@@ -0,0 +1,15 @@
+---
+# file: roles/prometheus_exporter/tasks/main.yaml
+
+- include_tasks: "{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml"
+  tags:
+    - prometheus-inst
+
+- name: Conf - Prometheus Blackbox Exporter
+  copy:
+   src: 'files/blackbox.yml'
+   dest: '/etc/prometheus/blackbox.yml'
+  notify:
+    - "Restart Prometheus Blackbox Exporter"
+  tags:
+    - prometheus-conf-blackbox-exporter
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/roles/prometheus_exporter/tasks/ubuntu_bionic.yaml b/resources/tools/testbed-setup/ansible/roles/prometheus_exporter/tasks/ubuntu_bionic.yaml
new file mode 100644 (file)
index 0000000..566753e
--- /dev/null
@@ -0,0 +1,33 @@
+---
+# file: roles/prometheus_exporter/tasks/ubuntu_bionic.yaml
+
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  tags:
+    - prometheus-inst-prerequisites
+
+- name: Inst - Prerequisites
+  package:
+    name: "init-system-helpers"
+    default_release: "bionic-backports"
+    state: latest
+  tags:
+    - prometheus-inst-prerequisites
+
+- name: Inst - Prometheus Node Exporter
+  apt:
+    deb: "{{ ne_packages }}"
+  notify:
+    - "Restart Prometheus Node Exporter"
+  tags:
+    - prometheus-inst-node-exporter
+
+- name: Inst - Prometheus Blackbox Exporter
+  apt:
+    deb: "{{ be_packages }}"
+  notify:
+    - "Restart Prometheus Blackbox Exporter"
+  tags:
+    - prometheus-inst-blackbox-exporter
\ No newline at end of file
index 7b90d20..1192fee 100755 (executable)
@@ -24,7 +24,7 @@ case "${1:-start}" in
             docker network create --driver bridge csit-nw-tg${cnt} || true
             # If the IMAGE is not already loaded then docker run will pull the
             # IMAGE, and all image dependencies, before it starts the container.
-            dcr_image="snergster/csit-sut:latest"
+            dcr_image="csit_sut-ubuntu2004:local"
             # Run the container in the background and print the new container
             # ID.
             dcr_stc_params="--detach=true "
@@ -33,7 +33,7 @@ case "${1:-start}" in
             # containers.
             dcr_stc_params+="--privileged "
             # Publish all exposed ports to random ports on the host interfaces.
-            dcr_stc_params+="--publish 600${cnt}:22 "
+            dcr_stc_params+="--publish 600${cnt}:2222 "
             # Automatically remove the container when it exits.
             dcr_stc_params+="--rm "
             # Size of /dev/shm.
index d7a9ed8..4e79dab 100644 (file)
@@ -1,28 +1,30 @@
 ---
 # file: roles/tg/tasks/main.yaml
 
-- name: TG - Copy csit-initialize-docker-tg.sh
+- name: Conf - csit-initialize-docker-tg.sh
   copy:
    src: "files/csit-initialize-docker-tg.sh"
    dest: "/usr/local/bin/csit-initialize-docker-tg.sh"
    owner: "root"
    group: "root"
-   mode: "744"
-  when: docker_tg is defined
+   mode: 0744
+  when:
+    - docker_tg is defined
   tags:
-    - docker-tg
+    - tg-conf-docker
 
-- name: TG - Start csit-initialize-docker-tg.service
+- name: Conf - Start csit-initialize-docker-tg.service
   copy:
    src: "files/csit-initialize-docker-tg.service"
    dest: "/etc/systemd/system/"
    owner: "root"
    group: "root"
-   mode: "644"
+   mode: 0644
   notify:
     - "Start csit-initialize-docker-tg.service"
-  when: docker_tg is defined
+  when:
+    - docker_tg is defined
   tags:
-    - docker-tg
+    - tg-conf-docker
 
 - meta: flush_handlers
index 9efdc71..cf3eb53 100644 (file)
@@ -3,7 +3,7 @@
 
 - name: Create topology file
   template:
-    src: 'templates/topology_{{ cloud_topology }}.j2'
-    dest: '../../../../topologies/available/{{ cloud_topology }}_testbed.yaml'
+    src: "templates/topology_{{ cloud_topology }}.j2"
+    dest: "../../../../topologies/available/{{ cloud_topology }}_{{ testbed_name }}.yaml"
   tags:
     - create-topology-file
index c3caf52..19bb15e 100644 (file)
@@ -1,23 +1,35 @@
 ---
 # file: roles/trex/defaults/main.yaml
 
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
 
 packages_base:
   - []
 
 packages_by_distro:
   ubuntu:
-    - "build-essential"
-    - "libmnl-dev"
-    - "libnuma-dev"
-    - "libpcap-dev"
-    - "librdmacm-dev"
-    - "librdmacm1"
-    - "libssl-dev"
-    - "pciutils"
-    - "python3-pip"
-    - "zlib1g-dev"
+    bionic:
+      - "build-essential"
+      - "libmnl-dev"
+      - "libnuma-dev"
+      - "libpcap-dev"
+      - "librdmacm-dev"
+      - "librdmacm1"
+      - "libssl-dev"
+      - "pciutils"
+      - "python3-pip"
+      - "zlib1g-dev"
+    focal:
+      - "build-essential"
+      - "libmnl-dev"
+      - "libnuma-dev"
+      - "libpcap-dev"
+      - "librdmacm-dev"
+      - "librdmacm1"
+      - "libssl-dev"
+      - "pciutils"
+      - "python3-pip"
+      - "zlib1g-dev"
 
 packages_by_arch:
   aarch64:
@@ -28,12 +40,5 @@ packages_by_arch:
 trex_target_dir: "/opt"
 trex_url: "https://github.com/cisco-system-traffic-generator/trex-core/archive/"
 trex_version:
-  # rls1908
-  - "2.54"
-  # rls2001
-  # rls2005
-  - "2.73"
-  # rls2009
-  - "2.82"
-  # rls2101
-  - "2.86"
+  # master // ubuntu 20.04
+  - "2.88"
\ No newline at end of file
index 1513a0a..5a7890b 100644 (file)
@@ -1,7 +1,7 @@
 ---
 # file: roles/trex/tasks/deploy_block.yaml
 
-- name: "Get Release {{ item }}"
+- name: Get Release {{ item }}
   get_url:
     url: "{{ trex_url }}/v{{ item }}.tar.gz"
     dest: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
@@ -9,12 +9,12 @@
     mode: 0644
   register: trex_downloaded
 
-- name: "Create Directory {{ item }}"
+- name: Create Directory {{ item }}
   file:
     path: "{{ trex_target_dir }}/trex-core-{{ item }}"
     state: "directory"
 
-- name: "Extract Release {{ item }}"
+- name: Extract Release {{ item }}
   unarchive:
     remote_src: true
     src: "{{ trex_target_dir }}/trex-core-{{ item }}.tar.gz"
   when:
     - azure is defined and item == "2.73"
 
-- name: "Compile Release {{ item }} Part I"
+- name: Compile Release {{ item }} Part I
   command: "./b configure"
   args:
       chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
   when: trex_extracted.changed
 
-- name: "Compile Release {{ item }} Part II"
+- name: Compile Release {{ item }} Part II
   command: "./b build"
   args:
       chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/linux_dpdk/"
   when: trex_extracted.changed
 
-- name: "Compile Release {{ item }} Part III"
+- name: Compile Release {{ item }} Part III
   command: "make -j 16"
   args:
       chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
   when: trex_extracted.changed
 
-- name: "Compile Release {{ item }} Part IV"
+- name: Compile Release {{ item }} Part IV
   command: "make install"
   args:
       chdir: "{{ trex_target_dir }}/trex-core-{{ item }}/scripts/ko/src"
index 019a27f..d43baf9 100644 (file)
@@ -1,16 +1,24 @@
 ---
 # file: roles/trex/tasks/main.yaml
 
-- name: Install Distribution - Release - Machine Prerequisites
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - trex-inst-prerequisites
+
+- name: Inst - Prerequisites
   package:
     name: "{{ packages | flatten(levels=1) }}"
     state: latest
-    update_cache: true
   tags:
-    - install-dependencies
+    - trex-inst-prerequisites
 
-- name: Deploy Multiple T-Rex Versions
+- name: Inst - Multiple T-Rex Versions
   include_tasks: deploy_block.yaml
   loop: "{{ trex_version }}"
   tags:
-    - install-trex
\ No newline at end of file
+    - trex-inst
\ No newline at end of file
index 323d00c..7fac499 100644 (file)
@@ -1,7 +1,7 @@
 ---
 # file: roles/vpp/defaults/main.yaml
 
-packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
+packages: "{{ packages_base + packages_by_distro[ansible_distribution|lower][ansible_distribution_release] + packages_by_arch[ansible_machine] }}"
 
 packages_base:
   - "gdb"
@@ -12,13 +12,22 @@ packages_base:
 
 packages_by_distro:
   ubuntu:
-    - "build-essential"
-    - "libglib2.0-dev"
-    - "libmbedcrypto1"
-    - "libmbedtls10"
-    - "libmbedx509-0"
-    - "libnuma-dev"
-    - "libpixman-1-dev"
+    bionic:
+      - "build-essential"
+      - "libglib2.0-dev"
+      - "libmbedcrypto1"
+      - "libmbedtls10"
+      - "libmbedx509-0"
+      - "libnuma-dev"
+      - "libpixman-1-dev"
+    focal:
+      - "build-essential"
+      - "libglib2.0-dev"
+      - "libmbedcrypto3"
+      - "libmbedtls12"
+      - "libmbedx509-0"
+      - "libnuma-dev"
+      - "libpixman-1-dev"
 
 packages_by_arch:
   aarch64:
index 174373c..ef03011 100644 (file)
@@ -1,27 +1,27 @@
 ---
-# file: roles/sut/tasks/main.yaml
+# file: roles/vpp/tasks/main.yaml
 
-- name: SUT - Install Distribution - Release - Machine Prerequisites
+- name: Inst - Update Package Cache (APT)
+  apt:
+    update_cache: yes
+    cache_valid_time: 3600
+  when:
+    - ansible_distribution|lower == 'ubuntu'
+  tags:
+    - vpp-inst-prerequisites
+
+- name: Inst - Prerequisites
   package:
     name: "{{ packages | flatten(levels=1) }}"
     state: latest
-    update_cache: true
-  tags:
-    - install-dependencies
-
-- name: SUT - Install VPP 19.08 PIP requirements
-  pip:
-    name:
-      - "aenum==2.1.2"
-    executable: pip2
   tags:
-    - install-pip
+    - vpp-inst-prerequisites
 
-- name: SUT - Copy 80-vpp.conf
+- name: Conf - sysctl
   file:
     src: "/dev/null"
     dest: "/etc/sysctl.d/80-vpp.conf"
     state: "link"
   become: yes
   tags:
-    - create-80-vpp
+    - vpp-conf-sysctl
index 5ac76ca..4436c21 100644 (file)
@@ -2,16 +2,25 @@
 # file: site.yaml
 
 - import_playbook: tg.yaml
-  tags: tg
+  tags:
+    - tg
+    - tg_aws
+    - tg_azure
 
 - import_playbook: sut.yaml
-  tags: sut
+  tags:
+    - sut
+    - sut_aws
+    - sut_azure
 
 - import_playbook: vpp_device.yaml
-  tags: vpp-device
+  tags:
+    - vpp-device
 
 - import_playbook: nomad.yaml
-  tags: nomad
+  tags:
+    - nomad
 
 - import_playbook: dev.yaml
-  tags: dev
+  tags:
+    - dev
diff --git a/resources/tools/testbed-setup/ansible/site_aws.yaml b/resources/tools/testbed-setup/ansible/site_aws.yaml
deleted file mode 100644 (file)
index 4e23a97..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
----
-# file: site_aws.yaml
-
-- import_playbook: tg_aws.yaml
-  tags: tg
-
-- import_playbook: sut_aws.yaml
-  tags: sut
diff --git a/resources/tools/testbed-setup/ansible/site_azure.yaml b/resources/tools/testbed-setup/ansible/site_azure.yaml
deleted file mode 100644 (file)
index c60e8b8..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
----
-# file: site_azure.yaml
-
-- import_playbook: tg_azure.yaml
-  tags: tg
-
-- import_playbook: sut_azure.yaml
-  tags: sut
index 302fa1b..abc25a2 100644 (file)
@@ -5,6 +5,12 @@
   remote_user: testuser
   become: yes
   become_user: root
+  gather_facts: false
+  pre_tasks:
+    - name: Gathering Facts
+      gather_facts:
+      tags:
+        - always
   roles:
     - role: baremetal
       tags: baremetal
       tags: kernel
     - role: mellanox
       tags: mellanox
+    - role: docker
+      tags: docker
     - role: vpp
       tags: vpp
     - role: dpdk
       tags: dpdk
-    - role: docker
-      tags: docker
-    - role: kubernetes
-      tags: kubernetes
     - role: kernel_vm
       tags: kernel_vm
     - role: csit_sut_image
       tags: cleanup
     - role: calibration
       tags: calibration
+
+- hosts: sut_aws
+  remote_user: testuser
+  become: yes
+  become_user: root
+  gather_facts: false
+  pre_tasks:
+    - name: Gathering Facts
+      gather_facts:
+      tags:
+        - always
+  roles:
+    - role: user_add
+      tags: user_add
+    - role: common
+      tags: common
+    - role: vpp
+      tags: vpp
+    - role: dpdk
+      tags: dpdk
+    - role: iperf
+      tags: iperf
+    - role: docker
+      tags: docker
+    - role: aws
+      tags: aws
+    - role: cleanup
+      tags: cleanup
+    # TODO: 'Check Kernel Parameters' failing in
+    # resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml
+    # - role: calibration
+    #   tags: calibration
+
+- hosts: sut_azure
+  become: yes
+  become_user: root
+  gather_facts: false
+  pre_tasks:
+    - name: Gathering Facts
+      gather_facts:
+      tags:
+        - always
+  roles:
+    - role: user_add
+      tags: user_add
+    - role: common
+      tags: common
+    - role: docker
+      tags: docker
+    - role: vpp
+      tags: vpp
+    - role: iperf
+      tags: iperf
+    - role: dpdk
+      tags: dpdk
+    - role: azure
+      tags: azure
+    - role: cleanup
+      tags: cleanup
+    # TODO: 'Check Kernel Parameters' failing in
+    # resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml
+    # - role: calibration
+    #   tags: calibration
diff --git a/resources/tools/testbed-setup/ansible/sut_aws.yaml b/resources/tools/testbed-setup/ansible/sut_aws.yaml
deleted file mode 100644 (file)
index a7642ab..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
----
-# file: sut_aws.yaml
-
-- hosts: sut
-  become: yes
-  become_user: root
-  roles:
-    - role: user_add
-      tags: user_add
-    - role: common
-      tags: common
-    - role: vpp
-      tags: vpp
-    - role: dpdk
-      tags: dpdk
-    - role: aws
-      tags: aws
-    - role: iperf
-      tags: iperf
-    - role: docker
-      tags: docker
-    - role: cleanup
-      tags: cleanup
-#    - role: calibration
-#      tags: calibration
diff --git a/resources/tools/testbed-setup/ansible/sut_azure.yaml b/resources/tools/testbed-setup/ansible/sut_azure.yaml
deleted file mode 100644 (file)
index 835ab63..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
----
-# file: sut_azure.yaml
-
-- hosts: sut
-  become: yes
-  become_user: root
-  roles:
-    - role: user_add
-      tags: user_add
-    - role: common
-      tags: common
-    - role: vpp
-      tags: vpp
-    - role: azure
-      tags: azure
-    - role: iperf
-      tags: iperf
-    - role: docker
-      tags: docker
-    - role: dpdk
-      tags: dpdk
-    - role: cleanup
-      tags: cleanup
-#    - role: calibration
-#      tags: calibration
index fc18038..69728a6 100644 (file)
@@ -5,6 +5,12 @@
   remote_user: testuser
   become: yes
   become_user: root
+  gather_facts: false
+  pre_tasks:
+    - name: Gathering Facts
+      gather_facts:
+      tags:
+        - always
   roles:
     - role: baremetal
       tags: baremetal
       tags: kernel
     - role: mellanox
       tags: mellanox
-    - role: tg
-      tags: tg
+    - role: docker
+      tags: docker
     - role: iperf
       tags: iperf
     - role: trex
       tags: trex
     - role: ab
       tags: ab
-    - role: docker
-      tags: docker
+    - role: tg
+      tags: tg
+    - role: csit_sut_image
+      tags: csit_sut_image
     - role: performance_tuning
       tags: performance_tuning
     - role: cleanup
       tags: cleanup
     - role: calibration
       tags: calibration
+
+- hosts: tg_aws
+  remote_user: testuser
+  become: yes
+  become_user: root
+  gather_facts: false
+  pre_tasks:
+    - name: Gathering Facts
+      gather_facts:
+      tags:
+        - always
+  roles:
+    - role: user_add
+      tags: user_add
+    - role: common
+      tags: common
+    - role: dpdk
+      tags: dpdk
+    - role: docker
+      tags: docker
+    - role: tg
+      tags: tg
+    - role: iperf
+      tags: iperf
+    - role: trex
+      tags: trex
+    - role: ab
+      tags: ab
+    - role: aws
+      tags: aws
+    - role: cleanup
+      tags: cleanup
+    # TODO: 'Check Kernel Parameters' failing in
+    # resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml
+    # - role: calibration
+    #   tags: calibration
+
+- hosts: tg_azure
+  become: yes
+  become_user: root
+  gather_facts: false
+  pre_tasks:
+    - name: Gathering Facts
+      gather_facts:
+      tags:
+        - always
+  roles:
+    - role: user_add
+      tags: user_add
+    - role: common
+      tags: common
+    - role: docker
+      tags: docker
+    - role: tg
+      tags: tg
+    - role: iperf
+      tags: iperf
+    - role: trex
+      tags: trex
+    - role: ab
+      tags: ab
+    - role: azure
+      tags: azure
+    - role: cleanup
+      tags: cleanup
+    # TODO: 'Check Kernel Parameters' failing in
+    # resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml
+    # - role: calibration
+    #   tags: calibration
\ No newline at end of file
diff --git a/resources/tools/testbed-setup/ansible/tg_aws.yaml b/resources/tools/testbed-setup/ansible/tg_aws.yaml
deleted file mode 100644 (file)
index db0b574..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
----
-# file: tg_aws.yaml
-
-- hosts: tg
-  become: yes
-  become_user: root
-  roles:
-    - role: user_add
-      tags: user_add
-    - role: common
-      tags: common
-    - role: dpdk
-      tags: dpdk
-    - role: aws
-      tags: aws
-    - role: tg
-      tags: tg
-    - role: iperf
-      tags: iperf
-    - role: trex
-      tags: trex
-    - role: ab
-      tags: ab
-    - role: docker
-      tags: docker
-    - role: cleanup
-      tags: cleanup
-#    - role: calibration
-#      tags: calibration
diff --git a/resources/tools/testbed-setup/ansible/tg_azure.yaml b/resources/tools/testbed-setup/ansible/tg_azure.yaml
deleted file mode 100644 (file)
index e6940a7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
----
-# file: tg_azure.yaml
-
-- hosts: tg
-  become: yes
-  become_user: root
-  roles:
-    - role: user_add
-      tags: user_add
-    - role: common
-      tags: common
-    - role: azure
-      tags: azure
-    - role: tg
-      tags: tg
-    - role: iperf
-      tags: iperf
-    - role: trex
-      tags: trex
-    - role: ab
-      tags: ab
-    - role: docker
-      tags: docker
-    - role: cleanup
-      tags: cleanup
-#    - role: calibration
-#      tags: calibration
index ac42b8c..2ffea31 100644 (file)
@@ -5,6 +5,12 @@
   remote_user: testuser
   become: yes
   become_user: root
+  gather_facts: false
+  pre_tasks:
+    - name: Gathering Facts
+      gather_facts:
+      tags:
+        - always
   roles:
     - role: user_add
       tags: user_add
       tags: nomad
     - role: consul
       tags: consul
+    - role: prometheus_exporter
+      tags: prometheus_exporter
+    - role: jenkins_job_health_exporter
+      tags: jenkins_job_health_exporter
+    - role: cadvisor
+      tags: cadvisor
     - role: vpp_device
       tags: vpp_device
     - role: kernel_vm
       tags: kernel_vm
     - role: csit_sut_image
       tags: csit_sut_image
-    - role: csit_shim_image
-      tags: csit_shim_image
     - role: cleanup
       tags: cleanup