diff options
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles')
3 files changed, 38 insertions, 0 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml b/resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml index f3f5d85aa1..24f433f9b9 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml @@ -3,3 +3,7 @@ - name: Install distribution - release - machine prerequisites include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml' + +- name: Install WRK + include_tasks: 'wrk.yaml' + tags: install-wrk diff --git a/resources/tools/testbed-setup/ansible/roles/tg/tasks/ubuntu_bionic.yaml b/resources/tools/testbed-setup/ansible/roles/tg/tasks/ubuntu_bionic.yaml index 27b8b7248e..95a47b0917 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg/tasks/ubuntu_bionic.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg/tasks/ubuntu_bionic.yaml @@ -5,6 +5,7 @@ apt: name: - 'unzip' + - 'libssl-dev' state: 'present' install_recommends: False tags: install-csit-dependencies diff --git a/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml b/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml new file mode 100644 index 0000000000..1da45fb4b4 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml @@ -0,0 +1,33 @@ +--- +# file: roles/tg/tasks/wrk.yaml + +- name: Download WRK release archive + get_url: + url: '{{ wrk.url }}/{{ wrk.version }}.tar.gz' + dest: '{{ wrk.target_dir }}/{{ wrk.version }}.tar.gz' + mode: 0644 + register: 'linux__wrk_downloaded' + tags: install-wrk + +- name: Extract WRK release archive + become: yes + unarchive: + src: '{{ wrk.target_dir }}/{{ wrk.version }}.tar.gz' + dest: '{{ wrk.target_dir }}/wrk-{{ wrk.version }}' + remote_src: yes + when: 'linux__wrk_downloaded' + register: 'linux__wrk_extracted' + tags: install-wrk + +- name: Compile WRK release + become: yes + shell: 'cd {{ wrk.target_dir }}/wrk-{{ wrk.version }}; make' + when: 'linux__wrk_extracted' + register: 'linux__wrk_compiled' + tags: install-wrk + +- name: Move WRK binary + become: yes + command: 'mv {{ wrk.target_dir }}/wrk-{{ wrk.version }}/wrk /usr/local/bin/' + when: 'linux__wrk_compiled' + tags: install-wrk |