summaryrefslogtreecommitdiffstats
path: root/ansible/roles
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-08-25 20:00:13 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-08-25 20:00:13 +0000
commitafd31c1c34ef66f23e17bbdb2316e7f4bc1bf7ec (patch)
treed7d1da145d0c0b39fec04b1a06a173a8573c3920 /ansible/roles
parent15f6586bf0d2ed6b3f03dc3574a4dff5d9a3c64e (diff)
parent1d91850970f89ff6b383c26a1cf9fbc5e9ac78eb (diff)
Merge "ansible: update dpdk, trex and samplevnf install"
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/download_dpdk/tasks/main.yml15
-rw-r--r--ansible/roles/download_prox/defaults/main.yml12
-rw-r--r--ansible/roles/download_prox/tasks/main.yml36
-rw-r--r--ansible/roles/download_samplevnfs/defaults/main.yml8
-rw-r--r--ansible/roles/download_samplevnfs/tasks/main.yml17
-rw-r--r--ansible/roles/download_trex/defaults/main.yml6
-rw-r--r--ansible/roles/download_trex/tasks/main.yml12
-rw-r--r--ansible/roles/enable_hugepages_on_boot/defaults/main.yml3
-rwxr-xr-xansible/roles/enable_hugepages_on_boot/tasks/main.yml4
-rwxr-xr-xansible/roles/install_dependencies/tasks/Debian.yml1
-rw-r--r--ansible/roles/install_dependencies/tasks/RedHat.yml1
-rw-r--r--ansible/roles/install_dpdk/defaults/main.yml2
-rwxr-xr-xansible/roles/install_dpdk/tasks/Debian.yml3
-rw-r--r--ansible/roles/install_dpdk/tasks/RedHat.yml2
-rw-r--r--ansible/roles/install_dpdk/tasks/main.yml21
-rw-r--r--ansible/roles/install_dpdk/vars/main.yml2
-rwxr-xr-xansible/roles/install_prox/tasks/Debian.yml24
-rw-r--r--ansible/roles/install_prox/tasks/RedHat.yml22
-rw-r--r--ansible/roles/install_samplevnf/tasks/main.yml55
-rw-r--r--ansible/roles/install_samplevnf/vars/main.yml (renamed from ansible/roles/install_prox/tasks/main.yml)43
-rw-r--r--ansible/roles/install_trex/defaults/main.yml3
-rw-r--r--ansible/roles/install_trex/tasks/main.yml17
-rw-r--r--ansible/roles/install_vnf_vACL/tasks/main.yml41
-rw-r--r--ansible/roles/install_vnf_vACL/vars/main.yml2
-rw-r--r--ansible/roles/install_vnf_vCGNAPT/tasks/main.yml41
-rw-r--r--ansible/roles/install_vnf_vCGNAPT/vars/main.yml2
-rw-r--r--ansible/roles/install_vnf_vFW/tasks/main.yml50
-rw-r--r--ansible/roles/install_vnf_vFW/vars/main.yml2
-rw-r--r--ansible/roles/install_vnf_vPE/tasks/main.yml37
-rw-r--r--ansible/roles/install_vnf_vPE/vars/main.yml2
-rw-r--r--ansible/roles/reset_resolv_conf/tasks/main.yml2
31 files changed, 165 insertions, 323 deletions
diff --git a/ansible/roles/download_dpdk/tasks/main.yml b/ansible/roles/download_dpdk/tasks/main.yml
index 322f3cd0c..bcb5dde1a 100644
--- a/ansible/roles/download_dpdk/tasks/main.yml
+++ b/ansible/roles/download_dpdk/tasks/main.yml
@@ -16,6 +16,10 @@
var: dpdk_version
verbosity: 2
+- file:
+ path: "{{ dpdk_dest }}"
+ state: directory
+
- name: fetch dpdk
get_url:
url: "{{ dpdk_url }}"
@@ -24,12 +28,17 @@
checksum: "{{ dpdk_sha256s[dpdk_version] }}"
- unarchive:
- src: "{{ clone_dest }}/{{ dpdk_file }}"
- dest: "{{ clone_dest }}/"
+ src: "{{ dpdk_dest }}/{{ dpdk_file }}"
+ dest: "{{ dpdk_dest }}/"
copy: no
+- name: cleanup tar file to save space
+ file:
+ path: "{{ dpdk_dest }}/{{ dpdk_file }}"
+ state: absent
+
- set_fact:
- dpdk_path: "{{ clone_dest }}/{{ dpdk_unarchive }}"
+ dpdk_path: "{{ dpdk_dest }}/{{ dpdk_unarchive }}"
- set_fact:
RTE_SDK: "{{ dpdk_path }}"
diff --git a/ansible/roles/download_prox/defaults/main.yml b/ansible/roles/download_prox/defaults/main.yml
deleted file mode 100644
index 797db3125..000000000
--- a/ansible/roles/download_prox/defaults/main.yml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-prox_version: v037
-prox_suffix:
- v035: "zip"
- v037: "tar.gz"
-prox_url: "https://01.org/sites/default/files/downloads/intelr-data-plane-performance-demonstrators/dppd-prox-{{ prox_version }}.{{ prox_suffix[prox_version] }}"
-prox_file: "{{ prox_url|basename }}"
-prox_unarchive: "{{ prox_file|regex_replace('[.]zip$', '')|regex_replace('-prox-', '-PROX-') }}"
-prox_dest: "{{ clone_dest }}/"
-prox_sha256s:
- v035: "sha256:f5d3f7c3855ca198d2babbc7045ed4373f0ddc13dc243fedbe23ed395ce65cc9"
- v037: "sha256:a12d021fbc0f5ae55ab55a2bbf8f3b260705ce3e61866288f023ccabca010bca"
diff --git a/ansible/roles/download_prox/tasks/main.yml b/ansible/roles/download_prox/tasks/main.yml
deleted file mode 100644
index 0614c74fa..000000000
--- a/ansible/roles/download_prox/tasks/main.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (c) 2017 Intel Corporation
-#
-# 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.
----
-- debug:
- var: prox_version
- verbosity: 2
-
-- name: fetch prox
- get_url:
- url: "{{ prox_url }}"
- dest: "{{ prox_dest }}"
- validate_certs: False
- checksum: "{{ prox_sha256s[prox_version] }}"
-
-- unarchive:
- src: "{{ clone_dest }}/{{ prox_file }}"
- dest: "{{ clone_dest }}/"
- copy: no
-
-- debug:
- var: prox_unarchive
- verbosity: 2
-
-- set_fact:
- prox_path: "{{ clone_dest }}/{{ prox_unarchive }}" \ No newline at end of file
diff --git a/ansible/roles/download_samplevnfs/defaults/main.yml b/ansible/roles/download_samplevnfs/defaults/main.yml
index 44449af6f..5f565a415 100644
--- a/ansible/roles/download_samplevnfs/defaults/main.yml
+++ b/ansible/roles/download_samplevnfs/defaults/main.yml
@@ -1,6 +1,4 @@
---
-samplevnf_version: ""
-samplevnf_file: "{{ samplevnf_url|basename }}"
-samplevnf_unarchive: "{{ samplevnf_file|regex_replace('[.]tar[.]gz$', '') }}"
-samplevnf_dest: "{{ clone_dest }}/"
-samplevnf_sha256: "sha256:36457cadfd23053c9ce1cf2e6f048cad6a5d04a7371d7a122e133dcbf007989e"
+samplevnf_url: "https://git.opnfv.org/samplevnf"
+samplevnf_dest: "{{ clone_dest }}/samplevnf"
+samplevnf_version: "master"
diff --git a/ansible/roles/download_samplevnfs/tasks/main.yml b/ansible/roles/download_samplevnfs/tasks/main.yml
index 005d57dda..e9d4142c9 100644
--- a/ansible/roles/download_samplevnfs/tasks/main.yml
+++ b/ansible/roles/download_samplevnfs/tasks/main.yml
@@ -17,16 +17,13 @@
# verbosity: 2
- name: fetch samplevnf
- get_url:
- url: "{{ samplevnf_url }}"
+ git:
+ repo: "{{ samplevnf_url }}"
dest: "{{ samplevnf_dest }}"
- validate_certs: False
- checksum: "{{ samplevnf_sha256 }}"
-
-- unarchive:
- src: "{{ clone_dest }}/{{ samplevnf_file }}"
- dest: "{{ clone_dest }}/"
- copy: no
+ version: "{{ samplevnf_version }}"
+ accept_hostkey: yes
+ recursive: no
+ force: yes
- set_fact:
- samplevnf_path: "{{ clone_dest }}/{{ samplevnf_unarchive }}"
+ samplevnf_path: "{{ samplevnf_dest }}"
diff --git a/ansible/roles/download_trex/defaults/main.yml b/ansible/roles/download_trex/defaults/main.yml
index dd2dd27eb..6e8fa7020 100644
--- a/ansible/roles/download_trex/defaults/main.yml
+++ b/ansible/roles/download_trex/defaults/main.yml
@@ -12,9 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
-trex_version: v2.20
+trex_version: v2.28
trex_url: "https://trex-tgn.cisco.com/trex/release/{{ trex_version }}.tar.gz"
trex_file: "{{ trex_url|basename }}"
trex_unarchive: "{{ trex_file|regex_replace('[.]tar.gz$', '') }}"
trex_dest: "{{ clone_dest }}/"
-trex_sha256: "sha256:eb5a069f758a36133a185c7e27af10834ca03d11441165403529fbd7844658fb"
+trex_sha256s:
+ "v2.20": "sha256:eb5a069f758a36133a185c7e27af10834ca03d11441165403529fbd7844658fb"
+ "v2.28": "sha256:c3f08aabbd69dddb09843984d41acbe9ba1af6a6ef3380a7830f7c9e33134207"
diff --git a/ansible/roles/download_trex/tasks/main.yml b/ansible/roles/download_trex/tasks/main.yml
index 75a3169f0..baa964fd8 100644
--- a/ansible/roles/download_trex/tasks/main.yml
+++ b/ansible/roles/download_trex/tasks/main.yml
@@ -16,10 +16,16 @@
get_url:
url: "{{ trex_url }}"
dest: "{{ trex_dest }}"
- checksum: "{{ trex_sha256 }}"
+ validate_certs: False
+ checksum: "{{ trex_sha256s[trex_version] }}"
- name: unarchive Trex
unarchive:
- src: "{{ clone_dest }}/{{ trex_file }}"
- dest: "{{ clone_dest }}/"
+ src: "{{ trex_dest }}/{{ trex_file }}"
+ dest: "{{ trex_dest }}/"
copy: no
+
+- name: cleanup tar file to save space
+ file:
+ path: "{{ trex_dest }}/{{ trex_file }}"
+ state: absent
diff --git a/ansible/roles/enable_hugepages_on_boot/defaults/main.yml b/ansible/roles/enable_hugepages_on_boot/defaults/main.yml
new file mode 100644
index 000000000..015e01bab
--- /dev/null
+++ b/ansible/roles/enable_hugepages_on_boot/defaults/main.yml
@@ -0,0 +1,3 @@
+---
+num_hugepages: auto
+huge_pagesize_mb: 1024 \ No newline at end of file
diff --git a/ansible/roles/enable_hugepages_on_boot/tasks/main.yml b/ansible/roles/enable_hugepages_on_boot/tasks/main.yml
index f258bb684..be4a328a2 100755
--- a/ansible/roles/enable_hugepages_on_boot/tasks/main.yml
+++ b/ansible/roles/enable_hugepages_on_boot/tasks/main.yml
@@ -38,15 +38,11 @@
line: '{{ hugepage_param }}'
state: present
-- name: Update grub
- command: "{{ update_grub[ansible_os_family] }}"
-
- name: create hugetables mount
file:
path: "{{ hugetable_mount }}"
state: directory
-
- name: mount hugetlbfs
mount:
name: "{{ hugetable_mount }}"
diff --git a/ansible/roles/install_dependencies/tasks/Debian.yml b/ansible/roles/install_dependencies/tasks/Debian.yml
index ac8332287..0047a5e3b 100755
--- a/ansible/roles/install_dependencies/tasks/Debian.yml
+++ b/ansible/roles/install_dependencies/tasks/Debian.yml
@@ -29,6 +29,7 @@
- qemu-kvm
- qemu-user-static
- qemu-utils
+ - kpartx
- libvirt0
- python-libvirt
- bridge-utils
diff --git a/ansible/roles/install_dependencies/tasks/RedHat.yml b/ansible/roles/install_dependencies/tasks/RedHat.yml
index 4bb7c318e..b725933d0 100644
--- a/ansible/roles/install_dependencies/tasks/RedHat.yml
+++ b/ansible/roles/install_dependencies/tasks/RedHat.yml
@@ -46,6 +46,7 @@
- python-setuptools
- libffi-devel
- python-devel
+ - kpartx
# don't install kernel-devel here it will trigger unwanted kernel upgrade
# Mandatory Packages:
# Don't use yum groups, they don't work, expand them manually
diff --git a/ansible/roles/install_dpdk/defaults/main.yml b/ansible/roles/install_dpdk/defaults/main.yml
new file mode 100644
index 000000000..fe2172401
--- /dev/null
+++ b/ansible/roles/install_dpdk/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+INSTALL_BIN_PATH: "/opt/nsb_bin" \ No newline at end of file
diff --git a/ansible/roles/install_dpdk/tasks/Debian.yml b/ansible/roles/install_dpdk/tasks/Debian.yml
index 486d40e11..c77e4f96a 100755
--- a/ansible/roles/install_dpdk/tasks/Debian.yml
+++ b/ansible/roles/install_dpdk/tasks/Debian.yml
@@ -17,3 +17,6 @@
with_items:
- libpcap-dev
+- name: Install kernel headers
+ action: "{{ ansible_pkg_mgr }} name=linux-headers-{{ dpdk_kernel }} state=present"
+
diff --git a/ansible/roles/install_dpdk/tasks/RedHat.yml b/ansible/roles/install_dpdk/tasks/RedHat.yml
index af35c9b3e..2fb249eae 100644
--- a/ansible/roles/install_dpdk/tasks/RedHat.yml
+++ b/ansible/roles/install_dpdk/tasks/RedHat.yml
@@ -17,3 +17,5 @@
with_items:
- libpcap-devel
+- name: Install kernel headers
+ action: "{{ ansible_pkg_mgr }} name=kernel-headers-{{ dpdk_kernel }} state=present"
diff --git a/ansible/roles/install_dpdk/tasks/main.yml b/ansible/roles/install_dpdk/tasks/main.yml
index fca0e33af..cab093ad5 100644
--- a/ansible/roles/install_dpdk/tasks/main.yml
+++ b/ansible/roles/install_dpdk/tasks/main.yml
@@ -20,8 +20,22 @@
# with_fileglob:
# - "{{ local_nsb_path }}/patches/dpdk_custom_patch/0*.patch"
+- name: find kernel for image, (including chroot)
+ find_kernel:
+ kernel: "{{ ansible_kernel }}"
+ register: found_kernel
+
+# Do this before installing kernel headers
+- name: Set dpdk_kernel to be the kernel we found
+ set_fact:
+ dpdk_kernel: "{{ found_kernel.kernel }}"
+
- include: "{{ ansible_os_family }}.yml"
+- name: set RTE_KERNELDIR to point to found kernel
+ set_fact:
+ RTE_KERNELDIR: "/lib/modules/{{ dpdk_kernel }}/build"
+
- my_make:
chdir: "{{ dpdk_path }}"
target: config
@@ -29,6 +43,8 @@
T: "{{ dpdk_make_arch }}"
O: "{{ dpdk_make_arch }}"
extra_args: "-j {{ ansible_processor_vcpus }}"
+ environment:
+ RTE_KERNELDIR: "{{ RTE_KERNELDIR }}"
- name: enable RTE_PORT_STATS_COLLECT
lineinfile:
@@ -57,6 +73,8 @@
- my_make:
chdir: "{{ dpdk_path }}/{{ dpdk_make_arch}}"
extra_args: "-j {{ ansible_processor_vcpus }}"
+ environment:
+ RTE_KERNELDIR: "{{ RTE_KERNELDIR }}"
- file:
path: "{{ dpdk_module_dir}}"
@@ -67,7 +85,8 @@
dest: "{{ dpdk_module_dir }}/igb_uio.ko"
remote_src: yes
-- command: depmod -a
+- name: run depmod for dpdk_kernel
+ command: depmod "{{ dpdk_kernel }}"
- file:
path: "{{ INSTALL_BIN_PATH }}"
diff --git a/ansible/roles/install_dpdk/vars/main.yml b/ansible/roles/install_dpdk/vars/main.yml
index 730215c90..1cc4f1583 100644
--- a/ansible/roles/install_dpdk/vars/main.yml
+++ b/ansible/roles/install_dpdk/vars/main.yml
@@ -1,6 +1,6 @@
---
dpdk_make_arch: x86_64-native-linuxapp-gcc
-dpdk_module_dir: "/lib/modules/{{ ansible_kernel }}/extra"
+dpdk_module_dir: "/lib/modules/{{ dpdk_kernel }}/extra"
hugetable_mount: /mnt/huge
dpdk_devbind:
"16.07": "{{ dpdk_path }}/tools/dpdk-devbind.py"
diff --git a/ansible/roles/install_prox/tasks/Debian.yml b/ansible/roles/install_prox/tasks/Debian.yml
deleted file mode 100755
index 00a31fc41..000000000
--- a/ansible/roles/install_prox/tasks/Debian.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-# Copyright (c) 2017 Intel Corporation.
-#
-# 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.
----
-- name: Install PROX build dependencies
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items:
- - pkg-config
- - liblua5.2-dev
- - libncurses5
- - libncurses5-dev
- - libncursesw5
- - libncursesw5-dev
- - libedit-dev
diff --git a/ansible/roles/install_prox/tasks/RedHat.yml b/ansible/roles/install_prox/tasks/RedHat.yml
deleted file mode 100644
index 69fa83b31..000000000
--- a/ansible/roles/install_prox/tasks/RedHat.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright (c) 2017 Intel Corporation.
-#
-# 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.
----
-- name: Install PROX build dependencies
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items:
- - pkgconfig
- - lua-devel
- - ncurses-devel
- - libedit-devel
-
diff --git a/ansible/roles/install_samplevnf/tasks/main.yml b/ansible/roles/install_samplevnf/tasks/main.yml
new file mode 100644
index 000000000..d332c88bc
--- /dev/null
+++ b/ansible/roles/install_samplevnf/tasks/main.yml
@@ -0,0 +1,55 @@
+# Copyright (c) 2017 Intel Corporation
+#
+# 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.
+---
+- set_fact:
+ vnf_build_dir: "{{ samplevnf_path }}/VNFs/{{ vnf_build_dirs[vnf_name] }}"
+
+- set_fact:
+ vnf_app_name: "{{ vnf_app_names[vnf_name] }}"
+
+- name: Install extra build dependencies
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
+ with_items: "{{ vnf_build_dependencies.get(vnf_name, {}).get(ansible_os_family, []) }}"
+
+
+- name: set build env vars
+ set_fact:
+ build_env_vars:
+ RTE_SDK: "{{ RTE_SDK }}"
+ RTE_TARGET: "{{ RTE_TARGET }}"
+ VNF_CORE: "{{ samplevnf_path }}"
+
+- name: set soft CRC for PROX when building in VM
+ set_fact:
+ build_env_vars: "{{ build_env_vars|combine({'crc': 'soft'}) }}"
+ when: vnf_name == "PROX" and image_type is defined and image_type == "vm"
+
+- name: "make {{ vnf_name }} clean"
+ my_make: chdir="{{ vnf_build_dir }}" target=clean extra_args="-j {{ ansible_processor_vcpus }}"
+ environment: "{{ build_env_vars }}"
+
+- name: "make {{ vnf_name }}"
+ my_make: chdir="{{ vnf_build_dir }}" extra_args="-j {{ ansible_processor_vcpus }}"
+ environment: "{{ build_env_vars }}"
+
+#- command: cp "{{ vnf_build_dir }}/{{ vnf_name }}/build/ip_pipeline" "{{ INSTALL_BIN_PATH }}/vACL_vnf"
+
+- name: "Install {{ vnf_name }} VNF"
+ copy:
+ src: "{{ vnf_build_dir }}/build/{{ vnf_app_name }}"
+ dest: "{{ INSTALL_BIN_PATH }}/{{ vnf_app_name }}"
+ remote_src: True
+ # make executable
+ mode: 0755
+
diff --git a/ansible/roles/install_prox/tasks/main.yml b/ansible/roles/install_samplevnf/vars/main.yml
index 93025fcb4..6f2c44a84 100644
--- a/ansible/roles/install_prox/tasks/main.yml
+++ b/ansible/roles/install_samplevnf/vars/main.yml
@@ -12,19 +12,30 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
-- include: "{{ ansible_os_family }}.yml"
-
-- name: workaround, make trailing.sh executable
- file:
- path: "{{ prox_path }}/helper-scripts/trailing.sh"
- state: touch
- mode: 0755
- when: prox_version == "v035"
-
-- make:
- chdir: "{{ prox_path }}"
- environment:
- RTE_SDK: "{{ RTE_SDK }}"
- RTE_TARGET: "{{ RTE_TARGET }}"
-
-
+vnf_build_dependencies:
+ PROX:
+ Debian:
+ - pkg-config
+ - liblua5.2-dev
+ - libncurses5
+ - libncurses5-dev
+ - libncursesw5
+ - libncursesw5-dev
+ - libedit-dev
+ RedHat:
+ - pkgconfig
+ - lua-devel
+ - ncurses-devel
+ - libedit-devel
+vnf_build_dirs:
+ ACL: vACL
+ FW: vFW
+ CGNATP: vCGNAPT
+ UDP_Replay: UDP_Replay
+ PROX: DPPD-PROX
+vnf_app_names:
+ ACL: vACL
+ FW: vFW
+ CGNATP: vCGNAPT
+ UDP_Replay: UDP_Replay
+ PROX: prox
diff --git a/ansible/roles/install_trex/defaults/main.yml b/ansible/roles/install_trex/defaults/main.yml
index 1b2876301..a5555e355 100644
--- a/ansible/roles/install_trex/defaults/main.yml
+++ b/ansible/roles/install_trex/defaults/main.yml
@@ -13,5 +13,6 @@
# limitations under the License.
---
#TREX_DOWNLOAD: "https://trex-tgn.cisco.com/trex/release/v2.05.tar.gz"
-TREX_VERSION: v2.20
+TREX_VERSION: v2.28
TREX_DOWNLOAD: "{{ nsb_mirror_url|ternary(nsb_mirror_url, 'https://trex-tgn.cisco.com/trex/release' }}/{{ TREX_VERSION }}.tar.gz"
+INSTALL_BIN_PATH: "/opt/nsb_bin"
diff --git a/ansible/roles/install_trex/tasks/main.yml b/ansible/roles/install_trex/tasks/main.yml
index 4818a8087..7ba1fc833 100644
--- a/ansible/roles/install_trex/tasks/main.yml
+++ b/ansible/roles/install_trex/tasks/main.yml
@@ -12,17 +12,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
-- set_fact:
- trex_file: "{{ trex_url|basename|regex_replace('[.]tar.gz', '') }}"
-
- file: path="{{ INSTALL_BIN_PATH }}/trex" state=absent
- file: path="{{ INSTALL_BIN_PATH }}/trex" state=directory
+- command: mv "{{ trex_dest }}/{{ trex_unarchive }}" "{{ INSTALL_BIN_PATH }}/trex/scripts"
+
+# Don't overwrite igb_uio.ko compiled from DPDK
-- command: mv "{{ clone_dest }}/{{ trex_unarchive }}" "{{ INSTALL_BIN_PATH }}/trex/scripts"
+- name: fix stl __init__.py for python module
+ file:
+ path: "{{ INSTALL_BIN_PATH }}/trex/scripts/automation/trex_control_plane/stl/__init__.py"
+ state: touch
-- file: path="{{ INSTALL_BIN_PATH }}/trex/scripts/automation/trex_control_plane/stl/__init__.py" state=touch
+- name: "symlink client to {{ INSTALL_BIN_PATH }}/trex_client"
+ file:
+ src: "{{ INSTALL_BIN_PATH }}/trex/scripts/automation/trex_control_plane"
+ dest: "{{ INSTALL_BIN_PATH }}/trex_client"
+ state: link
# Don't use trex/scripts/dpdk_nic_bind.py use DPDK usertools/dpdk-devbind.py
#- command: cp "{{ INSTALL_BIN_PATH }}/trex/scripts/dpdk_nic_bind.py" "{{ INSTALL_BIN_PATH }}"
diff --git a/ansible/roles/install_vnf_vACL/tasks/main.yml b/ansible/roles/install_vnf_vACL/tasks/main.yml
deleted file mode 100644
index ff2e769f0..000000000
--- a/ansible/roles/install_vnf_vACL/tasks/main.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (c) 2017 Intel Corporation
-#
-# 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.
----
-- name: vACL_vnf make clean
- my_make: chdir="{{ acl_build_dir }}" target=clean extra_args="-j {{ ansible_processor_vcpus }}"
- environment:
- RTE_SDK: "{{ RTE_SDK }}"
- RTE_TARGET: "{{ RTE_TARGET }}"
- VNF_CORE: "{{ samplevnf_path }}"
-
-- name: make vACL VNF
- my_make: chdir="{{ acl_build_dir }}" extra_args="-j {{ ansible_processor_vcpus }}"
- environment:
- RTE_SDK: "{{ RTE_SDK }}"
- RTE_TARGET: "{{ RTE_TARGET }}"
- VNF_CORE: "{{ samplevnf_path }}"
-
-#- command: cp "{{ acl_build_dir }}/vACL/build/ip_pipeline" "{{ INSTALL_BIN_PATH }}/vACL_vnf"
-- name: Install vACL VNF
- copy:
- src: "{{ acl_build_dir }}/build/vACL"
- dest: "{{ INSTALL_BIN_PATH }}/vACL"
- remote_src: True
- # make executable
- mode: 0755
-
-#- command: cp "{{ acl_build_dir }}/vACL/config/full_tm_profile_10G.cfg" "{{ INSTALL_BIN_PATH }}/"
-#- copy:
-# src: "{{ acl_build_dir }}/vACL/config/full_tm_profile_10G.cfg"
-# dest: "{{ INSTALL_BIN_PATH }}/"
diff --git a/ansible/roles/install_vnf_vACL/vars/main.yml b/ansible/roles/install_vnf_vACL/vars/main.yml
deleted file mode 100644
index ee61bf11c..000000000
--- a/ansible/roles/install_vnf_vACL/vars/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-acl_build_dir: "{{ samplevnf_path }}/VNFs/vACL" \ No newline at end of file
diff --git a/ansible/roles/install_vnf_vCGNAPT/tasks/main.yml b/ansible/roles/install_vnf_vCGNAPT/tasks/main.yml
deleted file mode 100644
index 9f8458f6f..000000000
--- a/ansible/roles/install_vnf_vCGNAPT/tasks/main.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (c) 2017 Intel Corporation
-#
-# 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.
----
-- name: vCGNAPT_vnf make clean
- my_make: chdir="{{ acl_build_dir }}" target=clean extra_args="-j {{ ansible_processor_vcpus }}"
- environment:
- RTE_SDK: "{{ RTE_SDK }}"
- RTE_TARGET: "{{ RTE_TARGET }}"
- VNF_CORE: "{{ samplevnf_path }}"
-
-- name: make vCGNAPT VNF
- my_make: chdir="{{ acl_build_dir }}" extra_args="-j {{ ansible_processor_vcpus }}"
- environment:
- RTE_SDK: "{{ RTE_SDK }}"
- RTE_TARGET: "{{ RTE_TARGET }}"
- VNF_CORE: "{{ samplevnf_path }}"
-
-#- command: cp "{{ acl_build_dir }}/vCGNAPT/build/ip_pipeline" "{{ INSTALL_BIN_PATH }}/vCGNAPT_vnf"
-- name: Install vCGNAPT VNF
- copy:
- src: "{{ acl_build_dir }}/build/vCGNAPT"
- dest: "{{ INSTALL_BIN_PATH }}/vCGNAPT"
- remote_src: True
- # make executable
- mode: 0755
-
-#- command: cp "{{ acl_build_dir }}/vCGNAPT/config/full_tm_profile_10G.cfg" "{{ INSTALL_BIN_PATH }}/"
-#- copy:
-# src: "{{ acl_build_dir }}/vCGNAPT/config/full_tm_profile_10G.cfg"
-# dest: "{{ INSTALL_BIN_PATH }}/"
diff --git a/ansible/roles/install_vnf_vCGNAPT/vars/main.yml b/ansible/roles/install_vnf_vCGNAPT/vars/main.yml
deleted file mode 100644
index cca1a89a3..000000000
--- a/ansible/roles/install_vnf_vCGNAPT/vars/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-acl_build_dir: "{{ samplevnf_path }}/VNFs/vCGNAPT" \ No newline at end of file
diff --git a/ansible/roles/install_vnf_vFW/tasks/main.yml b/ansible/roles/install_vnf_vFW/tasks/main.yml
deleted file mode 100644
index cb3df3ed4..000000000
--- a/ansible/roles/install_vnf_vFW/tasks/main.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (c) 2017 Intel Corporation
-#
-# 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.
----
-- name: vFW_vnf make clean
- my_make: chdir="{{ vfw_build_dir }}" target=clean extra_args="-j {{ ansible_processor_vcpus }}"
- environment:
- RTE_SDK: "{{ RTE_SDK }}"
- RTE_TARGET: "{{ RTE_TARGET }}"
- VNF_CORE: "{{ samplevnf_path }}"
-
-#- name: make vFW VNF
-# my_make: chdir="{{ vfw_build_dir }}" extra_args="-j {{ ansible_processor_vcpus }}"
-# environment:
-# RTE_SDK: "{{ RTE_SDK }}"
-# RTE_TARGET: "{{ RTE_TARGET }}"
-# VNF_CORE: "{{ samplevnf_path }}"
-
-- name: make vFW VNF
- command: make chdir="{{ vfw_build_dir }}" extra_args="-j {{ ansible_processor_vcpus }}" all
- args:
- chdir: "{{ vfw_build_dir }}"
- environment:
- RTE_SDK: "{{ RTE_SDK }}"
- RTE_TARGET: "{{ RTE_TARGET }}"
- VNF_CORE: "{{ samplevnf_path }}"
-
-#- command: cp "{{ vfw_build_dir }}/vFW/build/ip_pipeline" "{{ INSTALL_BIN_PATH }}/vFW_vnf"
-- name: Install vFW VNF
- copy:
- src: "{{ vfw_build_dir }}/build/vFW"
- dest: "{{ INSTALL_BIN_PATH }}/vFW"
- remote_src: True
- # make executable
- mode: 0755
-
-#- command: cp "{{ vfw_build_dir }}/vFW/config/full_tm_profile_10G.cfg" "{{ INSTALL_BIN_PATH }}/"
-#- copy:
-# src: "{{ vfw_build_dir }}/vFW/config/full_tm_profile_10G.cfg"
-# dest: "{{ INSTALL_BIN_PATH }}/"
diff --git a/ansible/roles/install_vnf_vFW/vars/main.yml b/ansible/roles/install_vnf_vFW/vars/main.yml
deleted file mode 100644
index 8a8a39865..000000000
--- a/ansible/roles/install_vnf_vFW/vars/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-vfw_build_dir: "{{ samplevnf_path }}/VNFs/vFW" \ No newline at end of file
diff --git a/ansible/roles/install_vnf_vPE/tasks/main.yml b/ansible/roles/install_vnf_vPE/tasks/main.yml
deleted file mode 100644
index 91d449a41..000000000
--- a/ansible/roles/install_vnf_vPE/tasks/main.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright (c) 2017 Intel Corporation
-#
-# 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.
----
-- name: vPE_vnf make clean
- my_make: chdir="{{ vpe_build_dir }}" target=clean extra_args="-j {{ ansible_processor_vcpus }}"
- environment:
- RTE_SDK: "{{ RTE_SDK }}"
- RTE_TARGET: "{{ RTE_TARGET }}"
-
-- name: make vPE VNF
- my_make: chdir="{{ vpe_build_dir }}" extra_args="-j {{ ansible_processor_vcpus }}"
- environment:
- RTE_SDK: "{{ RTE_SDK }}"
- RTE_TARGET: "{{ RTE_TARGET }}"
-
-#- command: cp "{{ vpe_build_dir }}/vPE/build/ip_pipeline" "{{ INSTALL_BIN_PATH }}/vPE_vnf"
-- name: Install vPE_vnf
- copy:
- src: "{{ vpe_build_dir }}/build/ip_pipeline"
- dest: "{{ INSTALL_BIN_PATH }}/vPE_vnf"
- remote_src: True
-
-#- command: cp "{{ vpe_build_dir }}/vPE/config/full_tm_profile_10G.cfg" "{{ INSTALL_BIN_PATH }}/"
-#- copy:
-# src: "{{ vpe_build_dir }}/vPE/config/full_tm_profile_10G.cfg"
-# dest: "{{ INSTALL_BIN_PATH }}/"
diff --git a/ansible/roles/install_vnf_vPE/vars/main.yml b/ansible/roles/install_vnf_vPE/vars/main.yml
deleted file mode 100644
index fe0a9727f..000000000
--- a/ansible/roles/install_vnf_vPE/vars/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-vpe_build_dir: "{{ dpdk_path }}/examples/ip_pipeline" \ No newline at end of file
diff --git a/ansible/roles/reset_resolv_conf/tasks/main.yml b/ansible/roles/reset_resolv_conf/tasks/main.yml
index 50094f24f..4e6de695d 100644
--- a/ansible/roles/reset_resolv_conf/tasks/main.yml
+++ b/ansible/roles/reset_resolv_conf/tasks/main.yml
@@ -21,7 +21,7 @@
file:
path: "{{ resolv_conf_stat.stat.lnk_source|dirname }}"
state: directory
- mode: 755
+ mode: 0755
- name: Override resolv.conf link source with specific nameserver
template: