diff options
Diffstat (limited to 'ansible')
38 files changed, 809 insertions, 333 deletions
diff --git a/ansible/build_yardstick_image.yml b/ansible/build_yardstick_image.yml index 35d9da45e..45ef94e98 100644 --- a/ansible/build_yardstick_image.yml +++ b/ansible/build_yardstick_image.yml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -- hosts: localhost +- hosts: jumphost vars: boot_modes: @@ -29,10 +29,10 @@ sha256sums_url: "{{ lookup('env', 'SHA256SUMS_URL')|default('https://' ~ host ~ '/' ~ sha256sums_path, true) }}" workspace: "{{ lookup('env', 'workspace')|default('/tmp/workspace/yardstick', true) }}" - imgfile: "{{ workspace }}/yardstick-image.img" raw_imgfile_basename: "yardstick-{{ release }}-server.raw" environment: - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin + - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin + - "{{ proxy_env }}" tasks: - group_by: @@ -41,6 +41,9 @@ - package: name=parted state=present - set_fact: + imgfile: "{{ workspace }}/yardstick-image.img" + + - set_fact: mountdir: "{{ lookup('env', 'mountdir')|default('/mnt/yardstick', true) }}" - set_fact: @@ -184,14 +187,6 @@ mode: 0755 when: "target_os == 'Ubuntu'" - - name: set img_modify_playbook - set_fact: - img_modify_playbook: ubuntu_server_cloudimg_modify.yml - - - debug: - var: img_modify_playbook - verbosity: 2 - - name: add chroot as host add_host: name: "{{ mountdir }}" @@ -205,6 +200,11 @@ - name: include {{ img_modify_playbook }} include: "{{ img_modify_playbook }}" +- hosts: localhost + tasks: + - name: convert image to image file + command: "qemu-img convert -c -o compat=0.10 -O qcow2 {{ raw_imgfile }} {{ imgfile }}" + - name: run post build tasks include: post_build_yardstick_image.yml @@ -212,4 +212,4 @@ tasks: - debug: - msg: "yardstick image = {{ raw_imgfile }}" + msg: "yardstick image = {{ imgfile }}" diff --git a/ansible/gen_scale_out_test.yml b/ansible/gen_scale_out_test.yml new file mode 100644 index 000000000..a76ea0ac2 --- /dev/null +++ b/ansible/gen_scale_out_test.yml @@ -0,0 +1,26 @@ +# 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. +--- +- hosts: localhost + connection: local + vars: + vnf_range: + - 2 + - 4 + - 10 + + + tasks: + - include: scale_out_test_templates.yml + with_items: "{{ vnf_range }}" + diff --git a/ansible/multi_port_baremetal_ixia_correlated_test.yaml b/ansible/multi_port_baremetal_ixia_correlated_test.yaml new file mode 100644 index 000000000..ba92b5cd3 --- /dev/null +++ b/ansible/multi_port_baremetal_ixia_correlated_test.yaml @@ -0,0 +1,133 @@ +# 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. +--- +- hosts: localhost + connection: local + vars: + scale_out: + - 1 + - 2 + flow: + traffic_type: 4 + pkt_size: + uplink: {64B: 100} + downlink: {64B: 100} + count: 10 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + vnf_config: + lb_config: 'SW' + lb_count: 1 + worker_config: '1C/1T' + worker_threads: 1 + + # Environment variables + gen: + user: "" + password: "" + key_filename: ~ + tg_config: + ixchassis: "1.1.1.127" #ixia chassis ip + tcl_port: "8009" # tcl server port + lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0" + root_dir: "/opt/ixia/ixos-api/8.01.0.2/" + py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/" + py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi" + dut_result_dir: "/mnt/results" + version: "8.01.106.3" + pcis: + uplink: + - "2:5" #Card:port + - "2:3" #Card:port + downlink: + - "2:6" #Card:port + - "2:5" #Card:port + ip: + mgmt: + - '1.2.1.6/24' + uplink: + - '152.16.100.20/24' + - '172.16.100.20/24' + downlink: + - '152.16.40.20/24' + - '172.16.40.20/24' + mac: + uplink: + - '00:98:10:64:14:00' + - '00:ac:10:64:14:0' + downlink: + - '00:98:10:28:14:00' + - '00:ac:10:28:14:00' + + # Environment variables + gen_1: + user: "" + password: "" + key_filename: ~ + pcis: + uplink: + - "0000:05:00.0" + - "0000:05:00.2" + downlink: + - "0000:05:00.1" + - "0000:05:00.3" + ip: + mgmt: + - '1.2.1.6/24' + uplink: + - '152.16.100.20/24' + - '172.16.100.20/24' + downlink: + - '152.16.40.20/24' + - '172.16.40.20/24' + mac: + uplink: + - '00:00:00:9e:00:f8' + - '00:00:00:9e:00:fa' + downlink: + - '00:00:00:9e:00:f9' + - '00:00:00:9e:00:fb' + + vnf: + ip: "192.168.100.101/24" + user: root + password: "" + key_filename: /root/.ssh/id_rsa + pcis: + uplink: + - "0000:05:00.0" + - "0000:05:00.2" + downlink: + - "0000:05:00.1" + - "0000:05:00.3" + ip: + mgmt: + - '1.2.1.6/24' + uplink: + - '152.16.100.10/24' + - '172.16.100.10/24' + downlink: + - '152.16.40.10/24' + - '172.16.40.10/24' + mac: + uplink: + - '00:00:00:9e:00:f8' + - '00:00:00:9e:00:fa' + downlink: + - '00:00:00:9e:00:f9' + - '00:00:00:9e:00:fb' + + tasks: + - include: multi_port_baremetal_ixia_correlated_test_templates.yml + with_items: "{{ scale_out }}" + diff --git a/ansible/multi_port_baremetal_ixia_correlated_test_templates.yml b/ansible/multi_port_baremetal_ixia_correlated_test_templates.yml new file mode 100644 index 000000000..6f73d8c01 --- /dev/null +++ b/ansible/multi_port_baremetal_ixia_correlated_test_templates.yml @@ -0,0 +1,56 @@ +# 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: + num_vnfs: "{{ item }}" + +- debug: + var: num_vnfs + verbosity: 2 + +- template: + src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-ixia-correlated-scale-out.yaml + dest: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-ixia-{{ num_vnfs }}.yaml + +- template: + src: ../etc/yardstick/nodes/standalone/ixia_template.yaml + dest: /etc/yardstick/nodes/ixia_{{ num_vnfs }}.yaml + +- template: + src: ../etc/yardstick/nodes/standalone/pod_bm_vnf.yaml + dest: /etc/yardstick/nodes/pod_bm_vnf_{{num_vnfs}}.yaml + +- template: + src: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_udp_ixia_correlated_multi_port_template.yaml + dest: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_udp_ixia_correlated_multi_port_{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-ixia-correlated-multi-port.yaml + dest: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-ixia-correlated-multi-port-{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/acl/tc_baremetal_acl_udp_ixia_correlated_multi_port_template.yaml + dest: ../samples/vnf_samples/nsut/acl/tc_baremetal_acl_udp_ixia_correlated_multi_port_{{num_vnfs}}.yaml + +- template: + src: ../samples/vnf_samples/nsut/acl/acl-tg-topology-ixia-correlated-multi-port.yaml + dest: ../samples/vnf_samples/nsut/acl/acl-tg-topology-ixia-correlated-multi-port-{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_cgnapt_udp_ixia_correlated_multi_port_template.yaml + dest: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_cgnapt_udp_ixia_correlated_multi_port_{{num_vnfs}}.yaml + +- template: + src: ../samples/vnf_samples/nsut/cgnapt/cgnapt-tg-topology-ixia-correlated-multi-port.yaml + dest: ../samples/vnf_samples/nsut/cgnapt/cgnapt-tg-topology-ixia-correlated-multi-port-{{ num_vnfs }}.yaml diff --git a/ansible/multi_port_baremetal_ixia_test.yaml b/ansible/multi_port_baremetal_ixia_test.yaml new file mode 100644 index 000000000..52bc40b43 --- /dev/null +++ b/ansible/multi_port_baremetal_ixia_test.yaml @@ -0,0 +1,104 @@ +# 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. +--- +- hosts: localhost + connection: local + vars: + scale_out: + - 1 + - 2 + flow: + traffic_type: 4 + pkt_size: + uplink: {64B: 100} + downlink: {64B: 100} + count: 10 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + vnf_config: + lb_config: 'SW' + lb_count: 1 + worker_config: '1C/1T' + worker_threads: 1 + + # Environment variables + gen: + user: "" + password: "" + key_filename: ~ + tg_config: + ixchassis: "1.1.1.127" #ixia chassis ip + tcl_port: "8009" # tcl server port + lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0" + root_dir: "/opt/ixia/ixos-api/8.01.0.2/" + py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/" + py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi" + dut_result_dir: "/mnt/results" + version: "8.01.106.3" + pcis: + uplink: + - "2:5" #Card:port + - "2:3" #Card:port + downlink: + - "2:6" #Card:port + - "2:5" #Card:port + ip: + mgmt: + - '1.2.1.6/24' + uplink: + - '152.16.100.20/24' + - '172.16.100.20/24' + downlink: + - '152.16.40.20/24' + - '172.16.40.20/24' + mac: + uplink: + - '00:98:10:64:14:00' + - '00:ac:10:64:14:0' + downlink: + - '00:98:10:28:14:00' + - '00:ac:10:28:14:00' + + vnf: + ip: "192.168.100.101/24" + user: root + password: "" + key_filename: /root/.ssh/id_rsa + pcis: + uplink: + - "0000:05:00.0" + - "0000:05:00.2" + downlink: + - "0000:05:00.1" + - "0000:05:00.3" + ip: + mgmt: + - '1.2.1.6/24' + uplink: + - '152.16.100.10/24' + - '172.16.100.10/24' + downlink: + - '152.16.40.10/24' + - '172.16.40.10/24' + mac: + uplink: + - '00:00:00:9e:00:f8' + - '00:00:00:9e:00:fa' + downlink: + - '00:00:00:9e:00:f9' + - '00:00:00:9e:00:fb' + + tasks: + - include: multi_port_baremetal_ixia_test_templates.yml + with_items: "{{ scale_out }}" + diff --git a/ansible/multi_port_baremetal_ixia_test_templates.yml b/ansible/multi_port_baremetal_ixia_test_templates.yml new file mode 100644 index 000000000..f2e04a2d1 --- /dev/null +++ b/ansible/multi_port_baremetal_ixia_test_templates.yml @@ -0,0 +1,60 @@ +# 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: + num_vnfs: "{{ item }}" + +- debug: + var: num_vnfs + verbosity: 2 + +- template: + src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-scale-out.yaml + dest: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-{{ num_vnfs }}.yaml + +- template: + src: ../etc/yardstick/nodes/standalone/ixia_template.yaml + dest: /etc/yardstick/nodes/ixia_{{ num_vnfs }}.yaml + +- template: + src: ../etc/yardstick/nodes/standalone/pod_bm_vnf.yaml + dest: /etc/yardstick/nodes/pod_bm_vnf_{{num_vnfs}}.yaml + +- template: + src: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_rfc2544_template.yaml + dest: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_rfc2544_{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-ixia-multi-port.yaml + dest: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-ixia-multi-port-{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/acl/tc_baremetal_acl_rfc2544_ixia_template.yaml + dest: ../samples/vnf_samples/nsut/acl/tc_baremetal_acl_rfc2544_ixia_{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/acl/acl-tg-topology-ixia-multi-port.yaml + dest: ../samples/vnf_samples/nsut/acl/acl-tg-topology-multi-port-ixia-{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-cgnapt-scale-out.yaml + dest: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-cgnapt-{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_cgnapt_rfc2544_ixia_template.yaml + dest: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_cgnapt_rfc2544_ixia_{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/cgnapt/cgnapt-tg-topology-ixia-multi-port.yaml + dest: ../samples/vnf_samples/nsut/cgnapt/cgnapt-tg-topology-multi-port-ixia-{{ num_vnfs }}.yaml diff --git a/ansible/multi_port_baremetal_test.yaml b/ansible/multi_port_baremetal_test.yaml new file mode 100644 index 000000000..fb12b1c64 --- /dev/null +++ b/ansible/multi_port_baremetal_test.yaml @@ -0,0 +1,95 @@ +# 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. +--- +- hosts: localhost + connection: local + vars: + scale_out: + - 1 + - 2 + flow: + traffic_type: 4 + pkt_size: + uplink: {64B: 100} + downlink: {64B: 100} + count: 10 + rfc2544: + allowed_drop_rate: 0.0001 - 0.0001 + vnf_config: + lb_config: 'SW' + lb_count: 1 + worker_config: '1C/1T' + worker_threads: 1 + + # Environment variables + gen: + user: root + password: "" + key_filename: /root/.ssh/id_rsa + pcis: + uplink: + - "0000:05:00.0" + - "0000:05:00.2" + downlink: + - "0000:05:00.1" + - "0000:05:00.3" + ip: + mgmt: + - '1.2.1.6/24' + uplink: + - '152.16.100.20/24' + - '172.16.100.20/24' + downlink: + - '152.16.40.20/24' + - '172.16.40.20/24' + mac: + uplink: + - '00:00:00:9e:00:f8' + - '00:00:00:9e:00:fa' + downlink: + - '00:00:00:9e:00:f9' + - '00:00:00:9e:00:fb' + + vnf: + ip: "192.168.100.101/24" + user: root + password: "" + key_filename: /root/.ssh/id_rsa + pcis: + uplink: + - "0000:05:00.0" + - "0000:05:00.2" + downlink: + - "0000:05:00.1" + - "0000:05:00.3" + ip: + mgmt: + - '1.2.1.6/24' + uplink: + - '152.16.100.10/24' + - '172.16.100.10/24' + downlink: + - '152.16.40.10/24' + - '172.16.40.10/24' + mac: + uplink: + - '00:00:00:9e:00:f8' + - '00:00:00:9e:00:fa' + downlink: + - '00:00:00:9e:00:f9' + - '00:00:00:9e:00:fb' + + tasks: + - include: multi_port_baremetal_test_templates.yml + with_items: "{{ scale_out }}" + diff --git a/ansible/multi_port_baremetal_test_templates.yml b/ansible/multi_port_baremetal_test_templates.yml new file mode 100644 index 000000000..4b905f8c7 --- /dev/null +++ b/ansible/multi_port_baremetal_test_templates.yml @@ -0,0 +1,60 @@ +# 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: + num_vnfs: "{{ item }}" + +- debug: + var: num_vnfs + verbosity: 2 + +- template: + src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-scale-out.yaml + dest: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-{{ num_vnfs }}.yaml + +- template: + src: ../etc/yardstick/nodes/standalone/baremetal_trex.yaml + dest: /etc/yardstick/nodes/baremetal_trex_{{num_vnfs}}.yaml + +- template: + src: ../etc/yardstick/nodes/standalone/pod_bm_vnf.yaml + dest: /etc/yardstick/nodes/pod_bm_vnf_{{num_vnfs}}.yaml + +- template: + src: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_rfc2544_template.yaml + dest: ../samples/vnf_samples/nsut/vfw/tc_baremetal_vfw_rfc2544_{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-multi-port.yaml + dest: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-multi-port-{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/acl/tc_baremetal_vfw_rfc2544_template.yaml + dest: ../samples/vnf_samples/nsut/acl/tc_baremetal_vfw_rfc2544_{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/acl/acl-tg-topology-multi-port.yaml + dest: ../samples/vnf_samples/nsut/acl/acl-tg-topology-multi-port-{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-cgnapt-scale-out.yaml + dest: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-cgnapt-{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_vfw_rfc2544_template.yaml + dest: ../samples/vnf_samples/nsut/cgnapt/tc_baremetal_vfw_rfc2544_{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/cgnapt/cgnapt-tg-topology-multi-port.yaml + dest: ../samples/vnf_samples/nsut/cgnapt/cgnapt-tg-topology-multi-port-{{ num_vnfs }}.yaml diff --git a/ansible/nsb_setup.yml b/ansible/nsb_setup.yml index 90fba0b1e..bfe5d2349 100644 --- a/ansible/nsb_setup.yml +++ b/ansible/nsb_setup.yml @@ -12,37 +12,26 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -- include: ubuntu_server_baremetal_deploy_samplevnfs.yml - vars: - YARD_IMG_ARCH: amd64 - -- hosts: localhost - roles: - - install_dependencies - - docker - -- include: build_yardstick_image.yml - vars: - YARD_IMG_ARCH: amd64 - release: xenial - when: openrc_file is defined +#- name: Prepare baremetal machine +# include: ubuntu_server_baremetal_deploy_samplevnfs.yml +# vars: +# YARD_IMG_ARCH: amd64 +# +#- name: Install jumphost dependencies and configure docker +# hosts: jumphost +# environment: +# "{{ proxy_env }}" +# roles: +# - install_dependencies +# - docker -- include: clean_images.yml +- name: "handle all openstack stuff when: openrc_file is defined" + include: prepare_openstack.yml when: openrc_file is defined -- hosts: localhost - post_tasks: - - os_image: - name: yardstick-samplevnfs - is_public: yes - disk_format: qcow2 - container_format: bare - filename: "{{ raw_imgfile }}" - properties: - hw_vif_multiqueue_enabled: true - environment: "{{ openrc }}" - when: openrc_file is defined - +- name: start yardstick container on jumphost + hosts: jumphost + tasks: - name: Start yardstick container docker_container: name: yardstick diff --git a/ansible/ovs_scale_out_test_ixia_correlated_templates.yml b/ansible/ovs_scale_out_test_ixia_correlated_templates.yml index ca5fe00ef..c26505342 100644 --- a/ansible/ovs_scale_out_test_ixia_correlated_templates.yml +++ b/ansible/ovs_scale_out_test_ixia_correlated_templates.yml @@ -21,7 +21,7 @@ - template: - src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-ixia-scale-out.yaml + src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-ixia-correlated-scale-out.yaml dest: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-ixia-{{ num_vnfs }}.yaml - template: @@ -49,10 +49,6 @@ dest: ../samples/vnf_samples/nsut/acl/acl-tg-topology-ixia-correlated-scale-out-{{ num_vnfs }}.yaml - template: - src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-cgnapt-ixia-scale-out.yaml - dest: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-cgnapt-{{ num_vnfs }}.yaml - -- template: src: ../samples/vnf_samples/nsut/cgnapt/tc_ovs_cgnapt_udp_ixia_correlated_scale_out_template.yaml dest: ../samples/vnf_samples/nsut/cgnapt/tc_ovs_cgnapt_udp_ixia_correlated_scale_out_{{num_vnfs}}.yaml diff --git a/ansible/ovs_scale_out_test_templates.yml b/ansible/ovs_scale_out_test_templates.yml index aadec6d62..cffa73342 100644 --- a/ansible/ovs_scale_out_test_templates.yml +++ b/ansible/ovs_scale_out_test_templates.yml @@ -25,7 +25,7 @@ - template: src: ../etc/yardstick/nodes/standalone/baremetal_trex.yaml - dest: /etc/yardstick/nodes/baremetal_trex_{{num_vnfs}}.yaml + dest: /etc/yardstick/nodes/baremetal_trex_{{ num_vnfs }}.yaml - template: src: ../etc/yardstick/nodes/standalone/pod_sriov.yaml diff --git a/ansible/prepare_openstack.yml b/ansible/prepare_openstack.yml new file mode 100644 index 000000000..8456c9e59 --- /dev/null +++ b/ansible/prepare_openstack.yml @@ -0,0 +1,44 @@ +# 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: convert openrc_file to openrc env dict + hosts: jumphost + vars_files: + - yardstick_config.yml + roles: + - convert_openrc + +### +# Build yardstick image for openstack quest +# check included file for other vars/env +### +- include: build_yardstick_image.yml + vars: + YARD_IMG_ARCH: amd64 + release: xenial + +### +# Delete old yardstick image and flavors +# Upload new image +### +- name: cleanup old openstack images, upload new + hosts: jumphost + vars_files: + - yardstick_config.yml + environment: + "{{ openrc }}" + roles: + - clean_images + - clean_flavors + - create_samplevnfs_image diff --git a/ansible/roles/add_custom_repos/tasks/ubuntu.yml b/ansible/roles/add_custom_repos/tasks/ubuntu.yml index c0ba89c0b..4658fe514 100644 --- a/ansible/roles/add_custom_repos/tasks/ubuntu.yml +++ b/ansible/roles/add_custom_repos/tasks/ubuntu.yml @@ -12,6 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. --- +- name: Check multiverse repository + shell: "apt-cache policy | grep {{ release }}/multiverse" + args: + executable: /bin/bash + register: multiverse_repos + ignore_errors: yes + - name: add custom repos template: src: sources.list.j2 diff --git a/ansible/roles/add_custom_repos/templates/sources.list.j2 b/ansible/roles/add_custom_repos/templates/sources.list.j2 index af741cb10..61fbe43aa 100644 --- a/ansible/roles/add_custom_repos/templates/sources.list.j2 +++ b/ansible/roles/add_custom_repos/templates/sources.list.j2 @@ -1,5 +1,8 @@ {% if YARD_IMG_ARCH == "arm64" %} deb [arch={{ YARD_IMG_ARCH }}] http://ports.ubuntu.com/ {{ release }}-backports main restricted universe multiverse {% else %} -deb http://archive.ubuntu.com/ubuntu/ {{ release }}-backports main restricted universe multiverse +deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ {{ release }}-backports main restricted universe multiverse + {% if multiverse_repos.rc != 0 %} +deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ {{ release }} multiverse + {% endif %} {% endif %} diff --git a/ansible/roles/archive_spec_cpu2006_result/tasks/main.yaml b/ansible/roles/archive_spec_cpu2006_result/tasks/main.yaml index 7f72e1394..0282244ae 100644 --- a/ansible/roles/archive_spec_cpu2006_result/tasks/main.yaml +++ b/ansible/roles/archive_spec_cpu2006_result/tasks/main.yaml @@ -10,6 +10,5 @@ - name: archive_spec_cpu2006_result archive: - path: /usr/cpu2006/result - dest: /usr/cpu2006/spec_cpu2006_result.zip - become: true + path: ~/cpu2006/result + dest: ~/cpu2006/spec_cpu2006_result.zip diff --git a/ansible/roles/create_image/tasks/main.yml b/ansible/roles/create_image/tasks/main.yml new file mode 100644 index 000000000..f63489d2d --- /dev/null +++ b/ansible/roles/create_image/tasks/main.yml @@ -0,0 +1,23 @@ +# 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: pre-clean openstack enviroment + hosts: yardstick + vars_files: + - yardstick_config.yml + + roles: + - convert_openrc + - clean_images + - clean_flavors diff --git a/ansible/roles/create_samplevnfs_image/tasks/main.yml b/ansible/roles/create_samplevnfs_image/tasks/main.yml new file mode 100644 index 000000000..c83cccab5 --- /dev/null +++ b/ansible/roles/create_samplevnfs_image/tasks/main.yml @@ -0,0 +1,24 @@ +# 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: create yardstick-samplevnfs image + when: openrc_file is defined + os_image: + name: yardstick-samplevnfs + is_public: yes + disk_format: qcow2 + container_format: bare + filename: "{{ raw_imgfile }}" + properties: + hw_vif_multiqueue_enabled: true diff --git a/ansible/roles/download_pmu_tools/files/event_download_local.py b/ansible/roles/download_pmu_tools/files/event_download_local.py deleted file mode 100755 index 8eda2cd0d..000000000 --- a/ansible/roles/download_pmu_tools/files/event_download_local.py +++ /dev/null @@ -1,213 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2014, Intel Corporation -# Author: Andi Kleen -# -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU General Public License, -# version 2, as published by the Free Software Foundation. -# -# This program is distributed in the hope it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# Automatic event list downloader -# -# event_download.py download for current cpu -# event_download.py -a download all -# event_download.py cpustr... Download for specific CPU -from __future__ import absolute_import -from __future__ import print_function -import sys - -import re -import os -import string -from fnmatch import fnmatch -from shutil import copyfile - -try: - from urllib2 import URLError -except ImportError: - # python 3 - from urllib.error import URLError - - -urlpath = 'https://download.01.org/perfmon' -localpath = 'pmu_local_mirror/download.01.org/perfmon' -mapfile = 'mapfile.csv' -modelpath = localpath + "/" + mapfile -NSB_JSON = os.environ.get("PMU_EVENTS_PATH", "/tmp/pmu_event.json") - - -def get_cpustr(): - with open('/proc/cpuinfo', 'r') as f: - cpu = [None, None, None] - for j in f: - n = j.split() - if n[0] == 'vendor_id': - cpu[0] = n[2] - elif n[0] == 'model' and n[1] == ':': - cpu[2] = int(n[2]) - elif n[0] == 'cpu' and n[1] == 'family': - cpu[1] = int(n[3]) - if all(cpu): - break - return "%s-%d-%X" % (cpu[0], cpu[1], cpu[2]) - - -def sanitize(s, a): - o = "" - for j in s: - if j in a: - o += j - return o - - -def getdir(): - try: - d = os.getenv("XDG_CACHE_HOME") - xd = d - if not d: - home = os.getenv("HOME") - d = "%s/.cache" % home - d += "/pmu-events" - if not os.path.isdir(d): - # try to handle the sudo case - if not xd: - user = os.getenv("SUDO_USER") - if user: - nd = os.path.expanduser("~" + user) + "/.cache/pmu-events" - if os.path.isdir(nd): - return nd - os.makedirs(d) - return d - except OSError: - raise Exception('Cannot access ' + d) - - -NUM_TRIES = 3 - - -def getfile(url, dir, fn): - tries = 0 - print("Downloading", url, "to", fn) - while True: - try: - f = open(url) - data = f.read() - except IOError: - tries += 1 - if tries >= NUM_TRIES: - raise - print("retrying download") - continue - break - with open(os.path.join(dir, fn), "w") as o: - o.write(data) - f.close() - - -allowed_chars = string.ascii_letters + '_-.' + string.digits - - -def download(match, key=None, link=True): - found = 0 - dir = getdir() - try: - getfile(modelpath, dir, "mapfile.csv") - models = open(os.path.join(dir, "mapfile.csv")) - for j in models: - n = j.rstrip().split(",") - if len(n) < 4: - if len(n) > 0: - print("Cannot parse", n) - continue - cpu, version, name, type = n - if not fnmatch(cpu, match) or (key is not None and type not in key) or type.startswith("EventType"): - continue - cpu = sanitize(cpu, allowed_chars) - url = localpath + name - fn = "%s-%s.json" % (cpu, sanitize(type, allowed_chars)) - try: - os.remove(os.path.join(dir, fn)) - except OSError: - pass - getfile(url, dir, fn) - if link: - lname = re.sub(r'.*/', '', name) - lname = sanitize(lname, allowed_chars) - try: - os.remove(os.path.join(dir, lname)) - except OSError: - pass - try: - os.symlink(fn, os.path.join(dir, lname)) - except OSError as e: - print("Cannot link %s to %s:" % (name, lname), e, file=sys.stderr) - found += 1 - models.close() - getfile(localpath + "/readme.txt", dir, "readme.txt") - except URLError as e: - print("Cannot access event server:", e, file=sys.stderr) - print("If you need a proxy to access the internet please set it with:", file=sys.stderr) - print("\texport https_proxy=http://proxyname...", file=sys.stderr) - print("If you are not connected to the internet please run this on a connected system:", file=sys.stderr) - print("\tevent_download.py '%s'" % match, file=sys.stderr) - print("and then copy ~/.cache/pmu-events to the system under test", file=sys.stderr) - print("To get events for all possible CPUs use:", file=sys.stderr) - print("\tevent_download.py -a", file=sys.stderr) - except OSError as e: - print("Cannot write events file:", e, file=sys.stderr) - return found - - -def download_current(link=False): - """Download JSON event list for current cpu. - Returns >0 when a event list is found""" - return download(get_cpustr(), link=link) - - -def eventlist_name(name=None, key="core"): - if not name: - name = get_cpustr() - cache = getdir() - return "%s/%s-%s.json" % (cache, name, key) - - -if __name__ == '__main__': - # only import argparse when actually called from command line - # this makes ocperf work on older python versions without it. - import argparse - p = argparse.ArgumentParser(usage='download Intel event files') - p.add_argument('--all', '-a', help='Download all available event files', action='store_true') - p.add_argument('--verbose', '-v', help='Be verbose', action='store_true') - p.add_argument('--mine', help='Print name of current CPU', action='store_true') - p.add_argument('--link', help='Create links with the original event file name', - action='store_true', default=True) - p.add_argument('cpus', help='CPU identifiers to download', nargs='*') - args = p.parse_args() - - cpustr = get_cpustr() - if args.verbose or args.mine: - print("My CPU", cpustr) - if args.mine: - sys.exit(0) - d = getdir() - if args.all: - found = download('*', link=args.link) - elif len(args.cpus) == 0: - found = download_current(link=args.link) - else: - found = 0 - for j in args.cpus: - found += download(j, link=args.link) - - if found == 0: - print("Nothing found", file=sys.stderr) - - el = eventlist_name() - if os.path.exists(el): - print("my event list", el) - copyfile(el, NSB_JSON) - print("File copied to ", NSB_JSON) diff --git a/ansible/roles/download_pmu_tools/tasks/main.yml b/ansible/roles/download_pmu_tools/tasks/main.yml index 3ef412217..37375b668 100644 --- a/ansible/roles/download_pmu_tools/tasks/main.yml +++ b/ansible/roles/download_pmu_tools/tasks/main.yml @@ -31,11 +31,6 @@ - name: Create perfmon local mirror command: "wget -mkEpnp {{ perfmon_url }} -P {{ INSTALL_BIN_PATH }}/pmu_local_mirror" ignore_errors: yes + failed_when: false #some of the links while creating mirror are not found, results in failure + no_log: True -- name: Copy local event download file - copy: - src: event_download_local.py - dest: "{{ INSTALL_BIN_PATH }}/event_download_local.py" - owner: root - group: root - mode: 0755 diff --git a/ansible/roles/enable_hugepages_on_boot/tasks/main.yml b/ansible/roles/enable_hugepages_on_boot/tasks/main.yml index 29432d2e4..75526eb19 100755 --- a/ansible/roles/enable_hugepages_on_boot/tasks/main.yml +++ b/ansible/roles/enable_hugepages_on_boot/tasks/main.yml @@ -31,34 +31,37 @@ msg: "Hugepages already set by someone else" when: is_mine_huge.stdout == "" and is_huge.stdout != "" -- name: use 16 for auto num_hugepages and 1G size - set_fact: - num_hugepages: 8 - when: num_hugepages|default("auto") == "auto" +- name: configure hugepages as idempotent block + block: + - name: use 8 for auto num_hugepages and 1G size + set_fact: + num_hugepages: 8 + when: num_hugepages|default("auto") == "auto" -- name: set hugepages in grub - lineinfile: - dest: /etc/default/grub - regexp: '{{ hugepage_param_regex }}' - line: '{{ hugepage_param }}' - state: present + - name: set hugepages in grub + lineinfile: + dest: /etc/default/grub + regexp: '{{ hugepage_param_regex }}' + line: '{{ hugepage_param }}' + state: present -- name: create hugetables mount - file: - path: "{{ hugetable_mount }}" - state: directory + - name: create hugetables mount + file: + path: "{{ hugetable_mount }}" + state: directory -- name: mount hugetlbfs - mount: - name: "{{ hugetable_mount }}" - src: nodev - fstype: hugetlbfs - state: present + - name: mount hugetlbfs + mount: + name: "{{ hugetable_mount }}" + src: nodev + fstype: hugetlbfs + state: present -- service: - name: procps - enabled: yes + - service: + name: procps + enabled: yes -- include: manual_modify_grub.yml - # only tested on Ubuntu, kernel line is probably different on other distros - when: ansible_distribution == "Ubuntu" + - include: manual_modify_grub.yml + # only tested on Ubuntu, kernel line is probably different on other distros + when: ansible_distribution == "Ubuntu" + when: is_mine_huge.stdout == "" diff --git a/ansible/roles/enable_hugepages_on_boot/tasks/manual_modify_grub.yml b/ansible/roles/enable_hugepages_on_boot/tasks/manual_modify_grub.yml index cac10e80e..6fa0c1d25 100644 --- a/ansible/roles/enable_hugepages_on_boot/tasks/manual_modify_grub.yml +++ b/ansible/roles/enable_hugepages_on_boot/tasks/manual_modify_grub.yml @@ -20,16 +20,17 @@ recurse: yes register: grub_files +- name: check if hugepages are already enabled + command: "grep -o 'default_hugepagesz=' {{ item.path }}" + register: hugepage_enabled + ignore_errors: True + with_items: "{{ grub_files.files }}" -- name: added hugepages to grub manually because we can't run update-grub in chroot +- name: add hugepages to grub manually because we can't run update-grub in chroot replace: dest: "{{ item.path }}" - # console= should end the line - regexp: '(linux\s+/boot/vmlinuz.*console=\S+$)' - # default_hugepagesz=1G hugepagesz=1G hugepages=8 + regexp: '(linux\s+/boot/vmlinuz.*$)' replace: '\1 default_hugepagesz={{ huge_pagesize_short[huge_pagesize_mb] }} hugepagesz={{ huge_pagesize_short[huge_pagesize_mb] }} hugepages={{ num_hugepages }}' with_items: "{{ grub_files.files }}" - - - - + # we suppose consistent /boot/grub/grub.cfg files + when: hugepage_enabled['results'][0].stdout == "" diff --git a/ansible/roles/enable_hugepages_on_boot/vars/main.yml b/ansible/roles/enable_hugepages_on_boot/vars/main.yml index acdf02509..6fec347b2 100644 --- a/ansible/roles/enable_hugepages_on_boot/vars/main.yml +++ b/ansible/roles/enable_hugepages_on_boot/vars/main.yml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -hugepage_param_regex: '^GRUB_CMDLINE_LINUX="\$GRUB_CMDLINE_LINUX.*# added by hugepages role' +hugepage_param_regex: '^GRUB_CMDLINE_LINUX="\$GRUB_CMDLINE_LINUX.*" # added by hugepages role' hugepage_param: 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX default_hugepagesz={{ huge_pagesize_short[huge_pagesize_mb] }} hugepagesz={{ huge_pagesize_short[huge_pagesize_mb] }} hugepages={{ num_hugepages }}" # added by hugepages role' update_grub: diff --git a/ansible/roles/fetch_spec_cpu2006_result/tasks/main.yaml b/ansible/roles/fetch_spec_cpu2006_result/tasks/main.yaml index 370ec7a0c..ccc89000c 100644 --- a/ansible/roles/fetch_spec_cpu2006_result/tasks/main.yaml +++ b/ansible/roles/fetch_spec_cpu2006_result/tasks/main.yaml @@ -10,7 +10,6 @@ - name: fetch_spec_cpu2006_result fetch: - src: /usr/cpu2006/spec_cpu2006_result.zip + src: ~/cpu2006/spec_cpu2006_result.zip dest: /tmp/ flat: yes - become: true diff --git a/ansible/roles/install_image_dependencies/defaults/main.yml b/ansible/roles/install_image_dependencies/defaults/main.yml index 1540806cc..f0b53215a 100644 --- a/ansible/roles/install_image_dependencies/defaults/main.yml +++ b/ansible/roles/install_image_dependencies/defaults/main.yml @@ -20,8 +20,14 @@ install_dependencies: - stress - sysstat - unzip + - netperf + - bonnie++ + - lmbench # for Trex - libpython2.7-dev + # for IxLoad + - libxft-dev + - libxss-dev RedHat: - bc - fio diff --git a/ansible/roles/install_samplevnf/tasks/main.yml b/ansible/roles/install_samplevnf/tasks/main.yml index d2deb5894..b5d33f668 100644 --- a/ansible/roles/install_samplevnf/tasks/main.yml +++ b/ansible/roles/install_samplevnf/tasks/main.yml @@ -29,9 +29,9 @@ RTE_TARGET: "{{ RTE_TARGET }}" VNF_CORE: "{{ samplevnf_path }}" -- name: set soft CRC for PROX when building in VM +- name: set soft CRC and GEN_DECAP_IPV6_TO_IPV4_CKSUM for PROX when building in VM set_fact: - build_env_vars: "{{ build_env_vars|combine({'crc': 'soft'}) }}" + build_env_vars: "{{ build_env_vars|combine({'crc': 'soft'})|combine({'GEN_DECAP_IPV6_TO_IPV4_CKSUM':'y'}) }}" when: vnf_name == "PROX" and image_type is defined and image_type == "vm" - name: "make {{ vnf_name }} clean" diff --git a/ansible/roles/install_spec_cpu2006/tasks/main.yaml b/ansible/roles/install_spec_cpu2006/tasks/main.yaml index baa9f6ca0..ea698f5a2 100644 --- a/ansible/roles/install_spec_cpu2006/tasks/main.yaml +++ b/ansible/roles/install_spec_cpu2006/tasks/main.yaml @@ -12,13 +12,11 @@ copy: src: /home/opnfv/repos/yardstick/yardstick/resources/cpu2006-1.2.iso dest: ~/cpu2006-1.2.iso - become: true - name: install SPEC CPU2006 shell: - mount -t iso9660 -o ro,exec ~/cpu2006-1.2.iso /mnt; + sudo mount -t iso9660 -o ro,exec ~/cpu2006-1.2.iso /mnt; cd /mnt; - ./install.sh -fd /usr/cpu2006; + ./install.sh -fd ~/cpu2006; args: executable: /bin/bash - become: true diff --git a/ansible/roles/unarchive_spec_cpu2006_result/tasks/main.yaml b/ansible/roles/unarchive_spec_cpu2006_result/tasks/main.yaml index 86dcc1aeb..07d15d1a9 100644 --- a/ansible/roles/unarchive_spec_cpu2006_result/tasks/main.yaml +++ b/ansible/roles/unarchive_spec_cpu2006_result/tasks/main.yaml @@ -13,4 +13,3 @@ src: /tmp/spec_cpu2006_result.zip dest: /tmp/ remote_src: True - become: true diff --git a/ansible/roles/uninstall_spec_cpu2006/tasks/main.yaml b/ansible/roles/uninstall_spec_cpu2006/tasks/main.yaml index 72d8c93ee..b2a50896e 100644 --- a/ansible/roles/uninstall_spec_cpu2006/tasks/main.yaml +++ b/ansible/roles/uninstall_spec_cpu2006/tasks/main.yaml @@ -10,9 +10,8 @@ - name: remove SPEC CPU 2006 file: - path: /usr/cpu2006 + path: ~/cpu2006 state: absent - become: true - name: umount SPEC CPU 2006 ISO shell: @@ -25,4 +24,3 @@ file: path: ~/cpu2006-1.2.iso state: absent - become: true diff --git a/ansible/scale_out_test_templates.yml b/ansible/scale_out_test_templates.yml new file mode 100644 index 000000000..487319f2a --- /dev/null +++ b/ansible/scale_out_test_templates.yml @@ -0,0 +1,52 @@ +# 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: + num_vnfs: "{{ item }}" + +- debug: + var: num_vnfs + verbosity: 2 + +- template: + src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-scale-out.yaml + dest: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt-scale-out.yaml + dest: ../samples/vnf_samples/traffic_profiles/ipv4_throughput_cgnapt-{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_correlated_traffic_scale_out.yaml + dest: ../samples/vnf_samples/nsut/acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_correlated_traffic_scale_{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/acl/acl-tg-topology-3node-scale-out.yaml + dest: ../samples/vnf_samples/nsut/acl/acl-tg-topology-3node-{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_correlated_scale_out.yaml + dest: ../samples/vnf_samples/nsut/vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex_correlated_scale_{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-3node-scale-out.yaml + dest: ../samples/vnf_samples/nsut/vfw/vfw-tg-topology-3node-{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/cgnapt/tc_heat_rfc2544_ipv4_1flow_64B_trex_correlated_scale_out.yaml + dest: ../samples/vnf_samples/nsut/cgnapt/tc_heat_rfc2544_ipv4_1flow_64B_trex_correlated_scale_{{ num_vnfs }}.yaml + +- template: + src: ../samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology-3node-scale-out.yaml + dest: ../samples/vnf_samples/nsut/cgnapt/cgnapt-vnf-topology-3node-{{ num_vnfs }}.yaml diff --git a/ansible/sriov_scale_out_test_ixia_correlated_templates.yml b/ansible/sriov_scale_out_test_ixia_correlated_templates.yml index 2a6c352b4..626030712 100644 --- a/ansible/sriov_scale_out_test_ixia_correlated_templates.yml +++ b/ansible/sriov_scale_out_test_ixia_correlated_templates.yml @@ -21,7 +21,7 @@ - template: - src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-ixia-scale-out.yaml + src: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-ixia-correlated-scale-out.yaml dest: ../samples/vnf_samples/traffic_profiles/ipv4_throughput-ixia-{{ num_vnfs }}.yaml - template: diff --git a/ansible/standalone_ovs_scale_out_ixia_correlated_test.yaml b/ansible/standalone_ovs_scale_out_ixia_correlated_test.yaml index e3c8c7ca1..516676576 100644 --- a/ansible/standalone_ovs_scale_out_ixia_correlated_test.yaml +++ b/ansible/standalone_ovs_scale_out_ixia_correlated_test.yaml @@ -55,7 +55,7 @@ ixchassis: "1.1.1.127" #ixia chassis ip tcl_port: "8009" # tcl server port lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0" - ""_dir: "/opt/ixia/ixos-api/8.01.0.2/" + root_dir: "/opt/ixia/ixos-api/8.01.0.2/" py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/" py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi" dut_result_dir: "/mnt/results" @@ -87,7 +87,7 @@ # Environment variables gen_1: user: "" - password: ""! + password: "" key_filename: /""/.ssh/id_rsa pcis: uplink: diff --git a/ansible/standalone_ovs_scale_out_ixia_test.yaml b/ansible/standalone_ovs_scale_out_ixia_test.yaml index d8ee224ac..ff665377f 100644 --- a/ansible/standalone_ovs_scale_out_ixia_test.yaml +++ b/ansible/standalone_ovs_scale_out_ixia_test.yaml @@ -27,6 +27,8 @@ socket_0: 2048 socket_1: 2048 flavor: + user: root + password: "" ram: 4096 image: "/var/lib/libvirt/images/ubuntu.qcow2" extra_specs: @@ -56,7 +58,7 @@ ixchassis: "1.1.1.127" #ixia chassis ip tcl_port: "8009" # tcl server port lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0" - ""_dir: "/opt/ixia/ixos-api/8.01.0.2/" + root_dir: "/opt/ixia/ixos-api/8.01.0.2/" py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/" py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi" dut_result_dir: "/mnt/results" diff --git a/ansible/standalone_ovs_scale_out_test.yaml b/ansible/standalone_ovs_scale_out_test.yaml index 2a0246c2d..996fc0f50 100644 --- a/ansible/standalone_ovs_scale_out_test.yaml +++ b/ansible/standalone_ovs_scale_out_test.yaml @@ -51,9 +51,9 @@ # Environment variables gen: - user: root + user: "" password: "" - key_filename: /root/.ssh/id_rsa + key_filename: ~ pcis: uplink: - "0000:05:00.0" @@ -80,9 +80,9 @@ host: ip: "192.168.100.101/24" - user: root + user: "" password: "" - key_filename: /root/.ssh/id_rsa + key_filename: ~ vnf: pcis: diff --git a/ansible/standalone_sriov_scale_out_ixia_correlated_test.yaml b/ansible/standalone_sriov_scale_out_ixia_correlated_test.yaml index 084dcbf7e..45a4a498b 100644 --- a/ansible/standalone_sriov_scale_out_ixia_correlated_test.yaml +++ b/ansible/standalone_sriov_scale_out_ixia_correlated_test.yaml @@ -47,7 +47,7 @@ ixchassis: "1.1.1.127" #ixia chassis ip tcl_port: "8009" # tcl server port lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0" - ""_dir: "/opt/ixia/ixos-api/8.01.0.2/" + root_dir: "/opt/ixia/ixos-api/8.01.0.2/" py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/" py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi" dut_result_dir: "/mnt/results" @@ -80,7 +80,7 @@ gen_1: user: "" password: "" - key_filename: /""/.ssh/id_rsa + key_filename: "~" pcis: uplink: - "0000:05:00.0" diff --git a/ansible/standalone_sriov_scale_out_ixia_test.yaml b/ansible/standalone_sriov_scale_out_ixia_test.yaml index 79ec0e68e..659dbef07 100644 --- a/ansible/standalone_sriov_scale_out_ixia_test.yaml +++ b/ansible/standalone_sriov_scale_out_ixia_test.yaml @@ -47,7 +47,7 @@ ixchassis: "1.1.1.127" #ixia chassis ip tcl_port: "8009" # tcl server port lib_path: "/opt/ixia/ixos-api/8.01.0.2/lib/ixTcl1.0" - ""_dir: "/opt/ixia/ixos-api/8.01.0.2/" + root_dir: "/opt/ixia/ixos-api/8.01.0.2/" py_bin_path: "/opt/ixia/ixload/8.01.106.3/bin/" py_lib_path: "/opt/ixia/ixnetwork/8.01.1029.14/lib/PythonApi" dut_result_dir: "/mnt/results" @@ -80,7 +80,7 @@ ip: "192.168.100.101/24" user: "" password: "" - key_filename: /""/.ssh/id_rsa + key_filename: "~" vnf: user: "" diff --git a/ansible/standalone_sriov_scale_out_test.yaml b/ansible/standalone_sriov_scale_out_test.yaml index e51e5617e..fe6989d54 100644 --- a/ansible/standalone_sriov_scale_out_test.yaml +++ b/ansible/standalone_sriov_scale_out_test.yaml @@ -19,7 +19,7 @@ - 2 flavor: user: root - password: ""! + password: "" ram: 4096 image: "/var/lib/libvirt/images/ubuntu.qcow2" extra_specs: diff --git a/ansible/ubuntu_server_baremetal_deploy_samplevnfs.yml b/ansible/ubuntu_server_baremetal_deploy_samplevnfs.yml index 42a7b2d08..479b45c92 100644 --- a/ansible/ubuntu_server_baremetal_deploy_samplevnfs.yml +++ b/ansible/ubuntu_server_baremetal_deploy_samplevnfs.yml @@ -12,10 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -- hosts: all +- hosts: yardstick-standalone:jumphost vars: clone_dir: /tmp/yardstick-clone - + environment: + "{{ proxy_env }}" roles: - add_custom_repos diff --git a/ansible/yardstick-install-inventory.ini b/ansible/yardstick-install-inventory.ini index e2647b033..e276076cc 100644 --- a/ansible/yardstick-install-inventory.ini +++ b/ansible/yardstick-install-inventory.ini @@ -1,4 +1,20 @@ # the group of systems on which to install yardstick # by default just localhost -[yardstick] +[jumphost] localhost ansible_connection=local + +# section below is only due backward compatibility. +# it will be removed later +[yardstick:children] +jumphost + +[yardstick-standalone] +# uncomment hosts below if you would to test yardstick-standalone/sriov scenarios +#yardstick-standalone-node ansible_host=192.168.1.2 +#yardstick-standalone-node-2 ansible_host=192.168.1.2 + +[all:vars] +# incomment credentials below for yardstick-standalone +#ansible_user=root +#ansible_pass=root + |