aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles/tg/tasks
diff options
context:
space:
mode:
authorvagrant <pmikus@cisco.com>2020-02-04 14:16:01 +0000
committerPeter Mikus <pmikus@cisco.com>2020-02-07 20:08:43 +0000
commit8605f3f406468f57bb9b2eac12a4421f65965300 (patch)
tree5eef32ff0298ab1c3ac593adced4a502d7c8ea17 /resources/tools/testbed-setup/ansible/roles/tg/tasks
parentd7e14a0a93e7e06047daeaf6a5575f227aeb925a (diff)
CSIT Azure integration
+ Terraform + Ansible Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I353511c5ef39d8c8d43fedc61c8dbb30b4821e1b
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/tg/tasks')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml44
-rw-r--r--resources/tools/testbed-setup/ansible/roles/tg/tasks/trex.yaml37
-rw-r--r--resources/tools/testbed-setup/ansible/roles/tg/tasks/ubuntu_bionic.yaml14
-rw-r--r--resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml40
4 files changed, 17 insertions, 118 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 a7ab90d34a..d7a9ed882d 100644
--- a/resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml
+++ b/resources/tools/testbed-setup/ansible/roles/tg/tasks/main.yaml
@@ -1,38 +1,28 @@
---
# file: roles/tg/tasks/main.yaml
-- name: Install distribution - release - machine prerequisites
- include_tasks: '{{ ansible_distribution|lower }}_{{ ansible_distribution_release }}.yaml'
- tags: install-csit-dependencies
-
-- name: Install WRK
- include_tasks: 'wrk.yaml'
- tags: install-wrk
-
-- name: Install TRex
- include_tasks: 'trex.yaml'
- tags: install-trex
-
-- name: Copy csit-initialize-docker-tg.sh
+- name: TG - Copy 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'
+ 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
- tags: docker-tg
+ tags:
+ - docker-tg
-- name: Start csit-initialize-docker-tg.service
+- name: TG - Start csit-initialize-docker-tg.service
copy:
- src: 'files/csit-initialize-docker-tg.service'
- dest: '/etc/systemd/system/'
- owner: 'root'
- group: 'root'
- mode: '644'
+ src: "files/csit-initialize-docker-tg.service"
+ dest: "/etc/systemd/system/"
+ owner: "root"
+ group: "root"
+ mode: "644"
notify:
- - 'Start csit-initialize-docker-tg.service'
+ - "Start csit-initialize-docker-tg.service"
when: docker_tg is defined
- tags: docker-tg
+ tags:
+ - docker-tg
- meta: flush_handlers
diff --git a/resources/tools/testbed-setup/ansible/roles/tg/tasks/trex.yaml b/resources/tools/testbed-setup/ansible/roles/tg/tasks/trex.yaml
deleted file mode 100644
index dc86ec3e5b..0000000000
--- a/resources/tools/testbed-setup/ansible/roles/tg/tasks/trex.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
----
-# file: roles/tg/tasks/trex.yaml
-
-- name: T-Rex Install - Get Release Archive
- get_url:
- url: 'https://github.com/cisco-system-traffic-generator/trex-core/archive/v{{ trex.version }}.tar.gz'
- dest: '{{ trex.target_dir }}/trex-core-{{ trex.version }}.tar.gz'
- mode: 0644
- register: trex_downloaded
- tags: install-trex
-
-- name: T-Rex Install - Ensure Directory Exists
- file:
- path: '{{ trex.target_dir }}/trex-core-{{ trex.version }}'
- state: 'directory'
- register: trex_dir_created
- tags: install-trex
-
-- name: T-Rex Install - Extract Release Archive
- unarchive:
- remote_src: true
- src: '{{ trex.target_dir }}/trex-core-{{ trex.version }}.tar.gz'
- dest: '{{ trex.target_dir }}/'
- creates: '{{ trex.target_dir }}/trex-core-{{ trex.version }}/linux_dpdk/'
- when: trex_dir_created
- register: trex_extracted
- tags: install-trex
-
-- name: T-Rex Install - Compile Release I
- raw: 'cd {{ trex.target_dir }}/trex-core-{{ trex.version }}/linux_dpdk/; ./b configure; ./b build'
- when: trex_extracted
- tags: install-trex
-
-- name: T-Rex Install - Compile Release II
- raw: 'cd {{ trex.target_dir }}/trex-core-{{ trex.version }}/scripts/ko/src; make; make install'
- when: trex_extracted
- tags: install-trex
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
deleted file mode 100644
index d119f9c462..0000000000
--- a/resources/tools/testbed-setup/ansible/roles/tg/tasks/ubuntu_bionic.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-# file: roles/tg/tasks/ubuntu_bionic.yaml
-
-- name: Install CSIT dependencies
- apt:
- name:
- - 'libmnl-dev'
- - 'libnuma-dev'
- - 'libpcap-dev'
- - 'libssl-dev'
- state: 'present'
- cache_valid_time: 3600
- 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
deleted file mode 100644
index aee3761476..0000000000
--- a/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-# file: roles/tg/tasks/wrk.yaml
-
-- name: WRK Install - Get Release Archive
- get_url:
- url: 'https://github.com/wg/wrk/archive/{{ wrk.version }}.tar.gz'
- dest: '{{ wrk.target_dir }}/{{ wrk.version }}.tar.gz'
- mode: 0644
- register: wrk_downloaded
- tags: install-wrk
-
-- name: WRK Install - Ensure Directory Exists
- file:
- path: '{{ wrk.target_dir }}/wrk-{{ wrk.version }}'
- state: 'directory'
- register: wrk_dir_created
- tags: install-wrk
-
-- name: WRK Install - Extract Release Archive
- unarchive:
- remote_src: true
- src: '{{ wrk.target_dir }}/{{ wrk.version }}.tar.gz'
- dest: '{{ wrk.target_dir }}/'
- creates: '{{ wrk.target_dir }}/wrk-{{ wrk.version }}/src'
- when: wrk_dir_created
- register: wrk_extracted
- tags: install-wrk
-
-- name: WRK Install - Compile Release
- command: 'make'
- args:
- chdir: '{{ wrk.target_dir }}/wrk-{{ wrk.version }}'
- when: wrk_extracted
- register: wrk_compiled
- tags: install-wrk
-
-- name: WRK Install - Move Binary
- command: 'mv {{ wrk.target_dir }}/wrk-{{ wrk.version }}/wrk /usr/local/bin/'
- when: wrk_compiled
- tags: install-wrk