From 8605f3f406468f57bb9b2eac12a4421f65965300 Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 4 Feb 2020 14:16:01 +0000 Subject: CSIT Azure integration + Terraform + Ansible Signed-off-by: Peter Mikus Change-Id: I353511c5ef39d8c8d43fedc61c8dbb30b4821e1b --- .../ansible/roles/calibration/defaults/main.yaml | 21 +++++++++++++++++ .../ansible/roles/calibration/tasks/main.yaml | 26 ++++++++++++++++------ .../ansible/roles/calibration/tasks/x86_64.yaml | 26 +++++++++++++--------- 3 files changed, 55 insertions(+), 18 deletions(-) create mode 100644 resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml (limited to 'resources/tools/testbed-setup/ansible/roles/calibration') diff --git a/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml b/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml new file mode 100644 index 0000000000..43628ff146 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/calibration/defaults/main.yaml @@ -0,0 +1,21 @@ +--- +# file: roles/calibration/defaults/main.yaml + +packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}" + +packages_base: + - [] + +packages_by_distro: + ubuntu: + - "build-essential" + +packages_by_arch: + aarch64: + - [] + x86_64: + - [] + +pma_directory: "/tmp/pma_tools" +jitter_core: 7 +jitter_iterations: 30 diff --git a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml index c3c96ac499..462f72788c 100644 --- a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/main.yaml @@ -1,14 +1,26 @@ --- # file: roles/calibration/tasks/main.yaml -- name: Run Spectre Meltdown checker - raw: 'wget -qO - https://meltdown.ovh | sudo bash -s - --no-color || true' +- name: Calibration - Install Distribution - Release - Machine Prerequisites + package: + name: "{{ packages | flatten(levels=1) }}" + state: latest + update_cache: true + tags: + - install-dependencies + +- name: Calibration - Run Spectre Meltdown Checker + raw: "wget -qO - https://meltdown.ovh | sudo bash -s - --no-color || true" register: spectre_meltdown_output - tags: run-spectre-meltdown-checker + tags: + - run-spectre-meltdown-checker - debug: var=spectre_meltdown_output.stdout_lines - tags: run-spectre-meltdown-checker + tags: + - run-spectre-meltdown-checker -- name: Machine specifics - include_tasks: '{{ ansible_machine }}.yaml' - tags: run-jitter-tool +- name: Calibration - {{ ansible_machine }} Specific + include_tasks: "{{ ansible_machine }}.yaml" + when: ansible_machine == "x86_64" + tags: + - run-jitter-tool diff --git a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/x86_64.yaml b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/x86_64.yaml index a6132841a0..1d9ed5ea08 100644 --- a/resources/tools/testbed-setup/ansible/roles/calibration/tasks/x86_64.yaml +++ b/resources/tools/testbed-setup/ansible/roles/calibration/tasks/x86_64.yaml @@ -1,21 +1,25 @@ --- # file: roles/calibration/tasks/x86_64.yaml -- name: Clone Jitter tool +- name: Calibration - Clone PMA Tool git: - repo: 'https://gerrit.fd.io/r/pma_tools' - dest: '{{ jitter.directory }}' - tags: run-jitter-tool + repo: "https://gerrit.fd.io/r/pma_tools" + dest: "{{ pma_directory }}" + tags: + - run-jitter-tool -- name: Compile Jitter tool - raw: 'cd {{ jitter.directory }}/jitter && make' - tags: run-jitter-tool +- name: Calibration - Compile PMA Tool + raw: "cd {{ pma_directory }}/jitter && make" + tags: + - run-jitter-tool -- name: Run Jitter tool - raw: '{{ jitter.directory }}/jitter/jitter -c {{ jitter.core }} -i {{ jitter.iterations }} -f' +- name: Calibration - Run Jitter Tool + raw: "{{ pma_directory }}/jitter/jitter -c {{ jitter_core }} -i {{ jitter_iterations }} -f" become: yes register: jitter_output - tags: run-jitter-tool + tags: + - run-jitter-tool - debug: var=jitter_output.stdout_lines - tags: run-jitter-tool + tags: + - run-jitter-tool -- cgit 1.2.3-korg