diff options
Diffstat (limited to 'yardstick/vTC/apexlake/tests/data')
19 files changed, 1651 insertions, 0 deletions
diff --git a/yardstick/vTC/apexlake/tests/data/common/conf.cfg b/yardstick/vTC/apexlake/tests/data/common/conf.cfg new file mode 100644 index 000000000..9266647e8 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/common/conf.cfg @@ -0,0 +1,43 @@ +[General] +template_base_name = t_name +benchmarks = b_marks +iterations = 1 + +[OpenStack] +ip_controller = +heat_url = +user = +password = +auth_uri = +project = + + +[Experiment-VNF] +VNIC1_TYPE = @string "normal" "direct" @costs '0', '1' +VNIC2_TYPE = @string "normal", "direct" @costs '0', '1' +VCPU = @numeric "4" +RAM = @numeric "4096" + + +[PacketGen] +packet_generator = dpdk_pktgen +pktgen_directory = pktgen_dir +dpdk_directory = dpdk_dir +program_name = app/app/x86_64-native-linuxapp-gcc/pktgen +coremask = 1f +memory_channels = 3 +bus_slot_nic_1 = 01:00.0 +name_if_1 = enp1s0f0 +bus_slot_nic_2 = 01:00.1 +name_if_2 = enp1s0f2 + + +[Deployment-parameters] +param_1 = val_1 +param_2 = val_2 +param_3 = val_3 +param_4 = val_4 + + +[Testcase-parameters] +test_case_param = 1280 diff --git a/yardstick/vTC/apexlake/tests/data/common/file_replacement.txt b/yardstick/vTC/apexlake/tests/data/common/file_replacement.txt new file mode 100644 index 000000000..8122d9a91 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/common/file_replacement.txt @@ -0,0 +1 @@ +Test for the replacement of strings into a file diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait.tmp b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait.tmp new file mode 100644 index 000000000..aa3959fc1 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait.tmp @@ -0,0 +1,199 @@ +heat_template_version: 2014-10-16 +description: HOT template to create a DPI + +parameters: + default_net: + type: string + default_subnet: + type: string + source_net: + type: string + source_subnet: + type: string + destination_net: + type: string + destination_subnet: + type: string + internal_net: + type: string + internal_subnet: + type: string + node: + type: string + default: compB + name: + type: string + default: vtc + ip_family: + type: string + timeout: + type: number + description: Timeout for WaitCondition, depends on your image and environment + default: 1000 + +resources: + wait_condition: + type: OS::Heat::WaitCondition + properties: + handle: {get_resource: wait_handle} + count: 1 + timeout: {get_param: timeout} + + wait_handle: + type: OS::Heat::WaitConditionHandle + + + ### DEFAULT NETWORK FOR MERLIN DATA + port_1: + type: OS::Neutron::Port + properties: + network: { get_param: default_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: default_subnet } + + ### NETWORK FOR RECEIVING TRAFFIC + port_2: + type: OS::Neutron::Port + properties: + network: { get_param: source_net } + binding:vnic_type: #vnic_type + fixed_ips: + - subnet: { get_param: source_subnet } + + ### NETWORK FOR SENDING TRAFFIC + port_3: + type: OS::Neutron::Port + properties: + network: { get_param: destination_net } + binding:vnic_type: #vnic_type + fixed_ips: + - subnet: { get_param: destination_subnet } + + flavor: + type: OS::Nova::Flavor + properties: + disk: 20 + ram: #ram + vcpus: #vcpus + #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } + extra_specs: { node: { get_param: node } } + + server: + type: OS::Nova::Server + properties: + name: vTC + key_name: test + image: ubuntu1404 + user_data: + str_replace: + template: | + #!/bin/sh + + # Creation of a user + NAME=$name + echo "Creating custom user..." + useradd clouduser -g admin -s /bin/bash -m + echo clouduser:secrete | chpasswd + echo "Enabling ssh password login..." + sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config + service ssh restart + sleep 1 + + # wake up interfaces + ifconfig eth1 up + ifconfig eth2 up + dhclient eth1 + dhclient eth2 + + sed -i 's/localhost/localhost vtc/g' /etc/hosts + ip route del 0/0 + route add default gw 192.168.200.1 + + AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') + BB=$(echo $AA | awk '{ print $1 }') + + # Setup Instrumentation Agent + rm -rf cimmaron + mkdir cimmaron + cd cimmaron + apt-get install -y zip + wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip + unzip MerlinAgent-12-06-2015-TNovaVM-001.zip + ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm + ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" + nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & + cd .. + + # Setup for PF_RING and bridge between interfaces + apt-get update + apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config + + # Setup multicast + echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf + cd /home/clouduser/ + git clone https://github.com/troglobit/smcroute.git + cd smcroute + sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh + sed -i 's/automake-1.11/automake/g' ./autogen.sh + ./autogen.sh + ./configure + make + make install + cd .. + touch multicast.sh + echo "#!/bin/bash" > multicast.sh + echo "while [ true ]" >> multicast.sh + echo "do" >> multicast.sh + echo " smcroute -k" >> multicast.sh + echo " smcroute -d" >> multicast.sh + echo " sleep 50" >> multicast.sh + echo "done" >> multicast.sh + chmod +x multicast.sh + ./multicast.sh & + + # Setup for PF_RING and bridge between interfaces + # Akis Repository + #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git + #cd vtc + #git checkout stable + + # Intel Repository + git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git + cd vtc_master + + cd nDPI + NDPI_DIR=$(pwd) + echo $NDPI_DIR + NDPI_INCLUDE=$(pwd)/src/include + echo $NDPI_INCLUDE + ./autogen.sh + ./configure + make + make install + cd .. + cd PF_RING + make + cd userland/examples/ + sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile + sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile + make + cd ../.. + cd .. + cd .. + #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + wc_notify --data-binary '{"status": "SUCCESS"}' + params: + wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } + $name: { get_param: name } + $IP_FAMILY: { get_param: ip_family } + + flavor: { get_resource: flavor } + networks: + - port: { get_resource: port_1 } + - port: { get_resource: port_2 } + - port: { get_resource: port_3 } +outputs:
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_1.yaml b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_1.yaml new file mode 100644 index 000000000..5788980b0 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_1.yaml @@ -0,0 +1,199 @@ +heat_template_version: 2014-10-16 +description: HOT template to create a DPI + +parameters: + default_net: + type: string + default_subnet: + type: string + source_net: + type: string + source_subnet: + type: string + destination_net: + type: string + destination_subnet: + type: string + internal_net: + type: string + internal_subnet: + type: string + node: + type: string + default: compB + name: + type: string + default: vtc + ip_family: + type: string + timeout: + type: number + description: Timeout for WaitCondition, depends on your image and environment + default: 1000 + +resources: + wait_condition: + type: OS::Heat::WaitCondition + properties: + handle: {get_resource: wait_handle} + count: 1 + timeout: {get_param: timeout} + + wait_handle: + type: OS::Heat::WaitConditionHandle + + + ### DEFAULT NETWORK FOR MERLIN DATA + port_1: + type: OS::Neutron::Port + properties: + network: { get_param: default_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: default_subnet } + + ### NETWORK FOR RECEIVING TRAFFIC + port_2: + type: OS::Neutron::Port + properties: + network: { get_param: source_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: source_subnet } + + ### NETWORK FOR SENDING TRAFFIC + port_3: + type: OS::Neutron::Port + properties: + network: { get_param: destination_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: destination_subnet } + + flavor: + type: OS::Nova::Flavor + properties: + disk: 20 + ram: 1024 + vcpus: 2 + #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } + extra_specs: { node: { get_param: node } } + + server: + type: OS::Nova::Server + properties: + name: vTC + key_name: test + image: ubuntu1404 + user_data: + str_replace: + template: | + #!/bin/sh + + # Creation of a user + NAME=$name + echo "Creating custom user..." + useradd clouduser -g admin -s /bin/bash -m + echo clouduser:secrete | chpasswd + echo "Enabling ssh password login..." + sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config + service ssh restart + sleep 1 + + # wake up interfaces + ifconfig eth1 up + ifconfig eth2 up + dhclient eth1 + dhclient eth2 + + sed -i 's/localhost/localhost vtc/g' /etc/hosts + ip route del 0/0 + route add default gw 192.168.200.1 + + AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') + BB=$(echo $AA | awk '{ print $1 }') + + # Setup Instrumentation Agent + rm -rf cimmaron + mkdir cimmaron + cd cimmaron + apt-get install -y zip + wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip + unzip MerlinAgent-12-06-2015-TNovaVM-001.zip + ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm + ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" + nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & + cd .. + + # Setup for PF_RING and bridge between interfaces + apt-get update + apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config + + # Setup multicast + echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf + cd /home/clouduser/ + git clone https://github.com/troglobit/smcroute.git + cd smcroute + sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh + sed -i 's/automake-1.11/automake/g' ./autogen.sh + ./autogen.sh + ./configure + make + make install + cd .. + touch multicast.sh + echo "#!/bin/bash" > multicast.sh + echo "while [ true ]" >> multicast.sh + echo "do" >> multicast.sh + echo " smcroute -k" >> multicast.sh + echo " smcroute -d" >> multicast.sh + echo " sleep 50" >> multicast.sh + echo "done" >> multicast.sh + chmod +x multicast.sh + ./multicast.sh & + + # Setup for PF_RING and bridge between interfaces + # Akis Repository + #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git + #cd vtc + #git checkout stable + + # Intel Repository + git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git + cd vtc_master + + cd nDPI + NDPI_DIR=$(pwd) + echo $NDPI_DIR + NDPI_INCLUDE=$(pwd)/src/include + echo $NDPI_INCLUDE + ./autogen.sh + ./configure + make + make install + cd .. + cd PF_RING + make + cd userland/examples/ + sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile + sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile + make + cd ../.. + cd .. + cd .. + #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + wc_notify --data-binary '{"status": "SUCCESS"}' + params: + wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } + $name: { get_param: name } + $IP_FAMILY: { get_param: ip_family } + + flavor: { get_resource: flavor } + networks: + - port: { get_resource: port_1 } + - port: { get_resource: port_2 } + - port: { get_resource: port_3 } +outputs: diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_1.yaml.json b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_1.yaml.json new file mode 100644 index 000000000..3af9a1cc7 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_1.yaml.json @@ -0,0 +1 @@ +{"vnic_type": "normal", "ram": "1024", "vcpus": "2"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_2.yaml b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_2.yaml new file mode 100644 index 000000000..44a81d081 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_2.yaml @@ -0,0 +1,199 @@ +heat_template_version: 2014-10-16 +description: HOT template to create a DPI + +parameters: + default_net: + type: string + default_subnet: + type: string + source_net: + type: string + source_subnet: + type: string + destination_net: + type: string + destination_subnet: + type: string + internal_net: + type: string + internal_subnet: + type: string + node: + type: string + default: compB + name: + type: string + default: vtc + ip_family: + type: string + timeout: + type: number + description: Timeout for WaitCondition, depends on your image and environment + default: 1000 + +resources: + wait_condition: + type: OS::Heat::WaitCondition + properties: + handle: {get_resource: wait_handle} + count: 1 + timeout: {get_param: timeout} + + wait_handle: + type: OS::Heat::WaitConditionHandle + + + ### DEFAULT NETWORK FOR MERLIN DATA + port_1: + type: OS::Neutron::Port + properties: + network: { get_param: default_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: default_subnet } + + ### NETWORK FOR RECEIVING TRAFFIC + port_2: + type: OS::Neutron::Port + properties: + network: { get_param: source_net } + binding:vnic_type: direct + fixed_ips: + - subnet: { get_param: source_subnet } + + ### NETWORK FOR SENDING TRAFFIC + port_3: + type: OS::Neutron::Port + properties: + network: { get_param: destination_net } + binding:vnic_type: direct + fixed_ips: + - subnet: { get_param: destination_subnet } + + flavor: + type: OS::Nova::Flavor + properties: + disk: 20 + ram: 1024 + vcpus: 2 + #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } + extra_specs: { node: { get_param: node } } + + server: + type: OS::Nova::Server + properties: + name: vTC + key_name: test + image: ubuntu1404 + user_data: + str_replace: + template: | + #!/bin/sh + + # Creation of a user + NAME=$name + echo "Creating custom user..." + useradd clouduser -g admin -s /bin/bash -m + echo clouduser:secrete | chpasswd + echo "Enabling ssh password login..." + sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config + service ssh restart + sleep 1 + + # wake up interfaces + ifconfig eth1 up + ifconfig eth2 up + dhclient eth1 + dhclient eth2 + + sed -i 's/localhost/localhost vtc/g' /etc/hosts + ip route del 0/0 + route add default gw 192.168.200.1 + + AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') + BB=$(echo $AA | awk '{ print $1 }') + + # Setup Instrumentation Agent + rm -rf cimmaron + mkdir cimmaron + cd cimmaron + apt-get install -y zip + wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip + unzip MerlinAgent-12-06-2015-TNovaVM-001.zip + ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm + ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" + nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & + cd .. + + # Setup for PF_RING and bridge between interfaces + apt-get update + apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config + + # Setup multicast + echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf + cd /home/clouduser/ + git clone https://github.com/troglobit/smcroute.git + cd smcroute + sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh + sed -i 's/automake-1.11/automake/g' ./autogen.sh + ./autogen.sh + ./configure + make + make install + cd .. + touch multicast.sh + echo "#!/bin/bash" > multicast.sh + echo "while [ true ]" >> multicast.sh + echo "do" >> multicast.sh + echo " smcroute -k" >> multicast.sh + echo " smcroute -d" >> multicast.sh + echo " sleep 50" >> multicast.sh + echo "done" >> multicast.sh + chmod +x multicast.sh + ./multicast.sh & + + # Setup for PF_RING and bridge between interfaces + # Akis Repository + #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git + #cd vtc + #git checkout stable + + # Intel Repository + git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git + cd vtc_master + + cd nDPI + NDPI_DIR=$(pwd) + echo $NDPI_DIR + NDPI_INCLUDE=$(pwd)/src/include + echo $NDPI_INCLUDE + ./autogen.sh + ./configure + make + make install + cd .. + cd PF_RING + make + cd userland/examples/ + sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile + sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile + make + cd ../.. + cd .. + cd .. + #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + wc_notify --data-binary '{"status": "SUCCESS"}' + params: + wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } + $name: { get_param: name } + $IP_FAMILY: { get_param: ip_family } + + flavor: { get_resource: flavor } + networks: + - port: { get_resource: port_1 } + - port: { get_resource: port_2 } + - port: { get_resource: port_3 } +outputs: diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_2.yaml.json b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_2.yaml.json new file mode 100644 index 000000000..9f246891d --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/generated_templates/VTC_base_single_vm_wait_2.yaml.json @@ -0,0 +1 @@ +{"vnic_type": "direct", "ram": "1024", "vcpus": "2"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_1.yaml b/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_1.yaml new file mode 100644 index 000000000..5788980b0 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_1.yaml @@ -0,0 +1,199 @@ +heat_template_version: 2014-10-16 +description: HOT template to create a DPI + +parameters: + default_net: + type: string + default_subnet: + type: string + source_net: + type: string + source_subnet: + type: string + destination_net: + type: string + destination_subnet: + type: string + internal_net: + type: string + internal_subnet: + type: string + node: + type: string + default: compB + name: + type: string + default: vtc + ip_family: + type: string + timeout: + type: number + description: Timeout for WaitCondition, depends on your image and environment + default: 1000 + +resources: + wait_condition: + type: OS::Heat::WaitCondition + properties: + handle: {get_resource: wait_handle} + count: 1 + timeout: {get_param: timeout} + + wait_handle: + type: OS::Heat::WaitConditionHandle + + + ### DEFAULT NETWORK FOR MERLIN DATA + port_1: + type: OS::Neutron::Port + properties: + network: { get_param: default_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: default_subnet } + + ### NETWORK FOR RECEIVING TRAFFIC + port_2: + type: OS::Neutron::Port + properties: + network: { get_param: source_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: source_subnet } + + ### NETWORK FOR SENDING TRAFFIC + port_3: + type: OS::Neutron::Port + properties: + network: { get_param: destination_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: destination_subnet } + + flavor: + type: OS::Nova::Flavor + properties: + disk: 20 + ram: 1024 + vcpus: 2 + #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } + extra_specs: { node: { get_param: node } } + + server: + type: OS::Nova::Server + properties: + name: vTC + key_name: test + image: ubuntu1404 + user_data: + str_replace: + template: | + #!/bin/sh + + # Creation of a user + NAME=$name + echo "Creating custom user..." + useradd clouduser -g admin -s /bin/bash -m + echo clouduser:secrete | chpasswd + echo "Enabling ssh password login..." + sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config + service ssh restart + sleep 1 + + # wake up interfaces + ifconfig eth1 up + ifconfig eth2 up + dhclient eth1 + dhclient eth2 + + sed -i 's/localhost/localhost vtc/g' /etc/hosts + ip route del 0/0 + route add default gw 192.168.200.1 + + AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') + BB=$(echo $AA | awk '{ print $1 }') + + # Setup Instrumentation Agent + rm -rf cimmaron + mkdir cimmaron + cd cimmaron + apt-get install -y zip + wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip + unzip MerlinAgent-12-06-2015-TNovaVM-001.zip + ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm + ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" + nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & + cd .. + + # Setup for PF_RING and bridge between interfaces + apt-get update + apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config + + # Setup multicast + echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf + cd /home/clouduser/ + git clone https://github.com/troglobit/smcroute.git + cd smcroute + sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh + sed -i 's/automake-1.11/automake/g' ./autogen.sh + ./autogen.sh + ./configure + make + make install + cd .. + touch multicast.sh + echo "#!/bin/bash" > multicast.sh + echo "while [ true ]" >> multicast.sh + echo "do" >> multicast.sh + echo " smcroute -k" >> multicast.sh + echo " smcroute -d" >> multicast.sh + echo " sleep 50" >> multicast.sh + echo "done" >> multicast.sh + chmod +x multicast.sh + ./multicast.sh & + + # Setup for PF_RING and bridge between interfaces + # Akis Repository + #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git + #cd vtc + #git checkout stable + + # Intel Repository + git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git + cd vtc_master + + cd nDPI + NDPI_DIR=$(pwd) + echo $NDPI_DIR + NDPI_INCLUDE=$(pwd)/src/include + echo $NDPI_INCLUDE + ./autogen.sh + ./configure + make + make install + cd .. + cd PF_RING + make + cd userland/examples/ + sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile + sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile + make + cd ../.. + cd .. + cd .. + #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + wc_notify --data-binary '{"status": "SUCCESS"}' + params: + wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } + $name: { get_param: name } + $IP_FAMILY: { get_param: ip_family } + + flavor: { get_resource: flavor } + networks: + - port: { get_resource: port_1 } + - port: { get_resource: port_2 } + - port: { get_resource: port_3 } +outputs: diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_1.yaml.json b/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_1.yaml.json new file mode 100644 index 000000000..3af9a1cc7 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_1.yaml.json @@ -0,0 +1 @@ +{"vnic_type": "normal", "ram": "1024", "vcpus": "2"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_2.yaml b/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_2.yaml new file mode 100644 index 000000000..44a81d081 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_2.yaml @@ -0,0 +1,199 @@ +heat_template_version: 2014-10-16 +description: HOT template to create a DPI + +parameters: + default_net: + type: string + default_subnet: + type: string + source_net: + type: string + source_subnet: + type: string + destination_net: + type: string + destination_subnet: + type: string + internal_net: + type: string + internal_subnet: + type: string + node: + type: string + default: compB + name: + type: string + default: vtc + ip_family: + type: string + timeout: + type: number + description: Timeout for WaitCondition, depends on your image and environment + default: 1000 + +resources: + wait_condition: + type: OS::Heat::WaitCondition + properties: + handle: {get_resource: wait_handle} + count: 1 + timeout: {get_param: timeout} + + wait_handle: + type: OS::Heat::WaitConditionHandle + + + ### DEFAULT NETWORK FOR MERLIN DATA + port_1: + type: OS::Neutron::Port + properties: + network: { get_param: default_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: default_subnet } + + ### NETWORK FOR RECEIVING TRAFFIC + port_2: + type: OS::Neutron::Port + properties: + network: { get_param: source_net } + binding:vnic_type: direct + fixed_ips: + - subnet: { get_param: source_subnet } + + ### NETWORK FOR SENDING TRAFFIC + port_3: + type: OS::Neutron::Port + properties: + network: { get_param: destination_net } + binding:vnic_type: direct + fixed_ips: + - subnet: { get_param: destination_subnet } + + flavor: + type: OS::Nova::Flavor + properties: + disk: 20 + ram: 1024 + vcpus: 2 + #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } + extra_specs: { node: { get_param: node } } + + server: + type: OS::Nova::Server + properties: + name: vTC + key_name: test + image: ubuntu1404 + user_data: + str_replace: + template: | + #!/bin/sh + + # Creation of a user + NAME=$name + echo "Creating custom user..." + useradd clouduser -g admin -s /bin/bash -m + echo clouduser:secrete | chpasswd + echo "Enabling ssh password login..." + sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config + service ssh restart + sleep 1 + + # wake up interfaces + ifconfig eth1 up + ifconfig eth2 up + dhclient eth1 + dhclient eth2 + + sed -i 's/localhost/localhost vtc/g' /etc/hosts + ip route del 0/0 + route add default gw 192.168.200.1 + + AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') + BB=$(echo $AA | awk '{ print $1 }') + + # Setup Instrumentation Agent + rm -rf cimmaron + mkdir cimmaron + cd cimmaron + apt-get install -y zip + wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip + unzip MerlinAgent-12-06-2015-TNovaVM-001.zip + ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm + ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" + nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & + cd .. + + # Setup for PF_RING and bridge between interfaces + apt-get update + apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config + + # Setup multicast + echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf + cd /home/clouduser/ + git clone https://github.com/troglobit/smcroute.git + cd smcroute + sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh + sed -i 's/automake-1.11/automake/g' ./autogen.sh + ./autogen.sh + ./configure + make + make install + cd .. + touch multicast.sh + echo "#!/bin/bash" > multicast.sh + echo "while [ true ]" >> multicast.sh + echo "do" >> multicast.sh + echo " smcroute -k" >> multicast.sh + echo " smcroute -d" >> multicast.sh + echo " sleep 50" >> multicast.sh + echo "done" >> multicast.sh + chmod +x multicast.sh + ./multicast.sh & + + # Setup for PF_RING and bridge between interfaces + # Akis Repository + #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git + #cd vtc + #git checkout stable + + # Intel Repository + git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git + cd vtc_master + + cd nDPI + NDPI_DIR=$(pwd) + echo $NDPI_DIR + NDPI_INCLUDE=$(pwd)/src/include + echo $NDPI_INCLUDE + ./autogen.sh + ./configure + make + make install + cd .. + cd PF_RING + make + cd userland/examples/ + sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile + sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile + make + cd ../.. + cd .. + cd .. + #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + wc_notify --data-binary '{"status": "SUCCESS"}' + params: + wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } + $name: { get_param: name } + $IP_FAMILY: { get_param: ip_family } + + flavor: { get_resource: flavor } + networks: + - port: { get_resource: port_1 } + - port: { get_resource: port_2 } + - port: { get_resource: port_3 } +outputs: diff --git a/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_2.yaml.json b/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_2.yaml.json new file mode 100644 index 000000000..9f246891d --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/generated_templates/experiment_2.yaml.json @@ -0,0 +1 @@ +{"vnic_type": "direct", "ram": "1024", "vcpus": "2"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/test_experiments/experiment_1/benchmark_1.csv b/yardstick/vTC/apexlake/tests/data/test_experiments/experiment_1/benchmark_1.csv new file mode 100644 index 000000000..f5f2932d0 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/test_experiments/experiment_1/benchmark_1.csv @@ -0,0 +1,3 @@ +conf_1;conf_3;conf_2;point_4;point_5;point_6;point_1;point_2;point_3
+conf_value_1;conf_value_3;conf_value_2;?;?;?;value_1;value_2;value_3
+conf_value_1;conf_value_3;conf_value_2;value_4;value_5;value_6;?;?;?
diff --git a/yardstick/vTC/apexlake/tests/data/test_experiments/experiment_1/metadata.json b/yardstick/vTC/apexlake/tests/data/test_experiments/experiment_1/metadata.json new file mode 100644 index 000000000..ff4cebf41 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/test_experiments/experiment_1/metadata.json @@ -0,0 +1 @@ +{"location": "tests/data/experiments/experiment_1/metadata.json", "item_2": "value_2", "item_3": "value_3", "item_1": "value_1"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/test_experiments/results_benchmark_1.csv b/yardstick/vTC/apexlake/tests/data/test_experiments/results_benchmark_1.csv new file mode 100644 index 000000000..4662dd2be --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/test_experiments/results_benchmark_1.csv @@ -0,0 +1,5 @@ +conf_5;conf_4;conf_6;conf_1;conf_3;conf_2;point_12;point_10;point_11;point_4;point_5;point_6;point_8;point_9;point_7;point_1;point_2;point_3
+?;?;?;conf_value_1;conf_value_3;conf_value_2;?;?;?;?;?;?;?;?;?;value_1;value_2;value_3
+?;?;?;conf_value_1;conf_value_3;conf_value_2;?;?;?;value_4;value_5;value_6;?;?;?;?;?;?
+conf_value_5;conf_value_4;conf_value_6;?;?;?;?;?;?;?;?;?;value_8;value_9;value_7;?;?;?
+conf_value_5;conf_value_4;conf_value_6;?;?;?;value_12;value_10;value_11;?;?;?;?;?;?;?;?;?
diff --git a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait.tmp b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait.tmp new file mode 100644 index 000000000..aa3959fc1 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait.tmp @@ -0,0 +1,199 @@ +heat_template_version: 2014-10-16 +description: HOT template to create a DPI + +parameters: + default_net: + type: string + default_subnet: + type: string + source_net: + type: string + source_subnet: + type: string + destination_net: + type: string + destination_subnet: + type: string + internal_net: + type: string + internal_subnet: + type: string + node: + type: string + default: compB + name: + type: string + default: vtc + ip_family: + type: string + timeout: + type: number + description: Timeout for WaitCondition, depends on your image and environment + default: 1000 + +resources: + wait_condition: + type: OS::Heat::WaitCondition + properties: + handle: {get_resource: wait_handle} + count: 1 + timeout: {get_param: timeout} + + wait_handle: + type: OS::Heat::WaitConditionHandle + + + ### DEFAULT NETWORK FOR MERLIN DATA + port_1: + type: OS::Neutron::Port + properties: + network: { get_param: default_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: default_subnet } + + ### NETWORK FOR RECEIVING TRAFFIC + port_2: + type: OS::Neutron::Port + properties: + network: { get_param: source_net } + binding:vnic_type: #vnic_type + fixed_ips: + - subnet: { get_param: source_subnet } + + ### NETWORK FOR SENDING TRAFFIC + port_3: + type: OS::Neutron::Port + properties: + network: { get_param: destination_net } + binding:vnic_type: #vnic_type + fixed_ips: + - subnet: { get_param: destination_subnet } + + flavor: + type: OS::Nova::Flavor + properties: + disk: 20 + ram: #ram + vcpus: #vcpus + #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } + extra_specs: { node: { get_param: node } } + + server: + type: OS::Nova::Server + properties: + name: vTC + key_name: test + image: ubuntu1404 + user_data: + str_replace: + template: | + #!/bin/sh + + # Creation of a user + NAME=$name + echo "Creating custom user..." + useradd clouduser -g admin -s /bin/bash -m + echo clouduser:secrete | chpasswd + echo "Enabling ssh password login..." + sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config + service ssh restart + sleep 1 + + # wake up interfaces + ifconfig eth1 up + ifconfig eth2 up + dhclient eth1 + dhclient eth2 + + sed -i 's/localhost/localhost vtc/g' /etc/hosts + ip route del 0/0 + route add default gw 192.168.200.1 + + AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') + BB=$(echo $AA | awk '{ print $1 }') + + # Setup Instrumentation Agent + rm -rf cimmaron + mkdir cimmaron + cd cimmaron + apt-get install -y zip + wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip + unzip MerlinAgent-12-06-2015-TNovaVM-001.zip + ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm + ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" + nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & + cd .. + + # Setup for PF_RING and bridge between interfaces + apt-get update + apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config + + # Setup multicast + echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf + cd /home/clouduser/ + git clone https://github.com/troglobit/smcroute.git + cd smcroute + sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh + sed -i 's/automake-1.11/automake/g' ./autogen.sh + ./autogen.sh + ./configure + make + make install + cd .. + touch multicast.sh + echo "#!/bin/bash" > multicast.sh + echo "while [ true ]" >> multicast.sh + echo "do" >> multicast.sh + echo " smcroute -k" >> multicast.sh + echo " smcroute -d" >> multicast.sh + echo " sleep 50" >> multicast.sh + echo "done" >> multicast.sh + chmod +x multicast.sh + ./multicast.sh & + + # Setup for PF_RING and bridge between interfaces + # Akis Repository + #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git + #cd vtc + #git checkout stable + + # Intel Repository + git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git + cd vtc_master + + cd nDPI + NDPI_DIR=$(pwd) + echo $NDPI_DIR + NDPI_INCLUDE=$(pwd)/src/include + echo $NDPI_INCLUDE + ./autogen.sh + ./configure + make + make install + cd .. + cd PF_RING + make + cd userland/examples/ + sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile + sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile + make + cd ../.. + cd .. + cd .. + #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + wc_notify --data-binary '{"status": "SUCCESS"}' + params: + wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } + $name: { get_param: name } + $IP_FAMILY: { get_param: ip_family } + + flavor: { get_resource: flavor } + networks: + - port: { get_resource: port_1 } + - port: { get_resource: port_2 } + - port: { get_resource: port_3 } +outputs:
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_1.yaml b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_1.yaml new file mode 100644 index 000000000..5788980b0 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_1.yaml @@ -0,0 +1,199 @@ +heat_template_version: 2014-10-16 +description: HOT template to create a DPI + +parameters: + default_net: + type: string + default_subnet: + type: string + source_net: + type: string + source_subnet: + type: string + destination_net: + type: string + destination_subnet: + type: string + internal_net: + type: string + internal_subnet: + type: string + node: + type: string + default: compB + name: + type: string + default: vtc + ip_family: + type: string + timeout: + type: number + description: Timeout for WaitCondition, depends on your image and environment + default: 1000 + +resources: + wait_condition: + type: OS::Heat::WaitCondition + properties: + handle: {get_resource: wait_handle} + count: 1 + timeout: {get_param: timeout} + + wait_handle: + type: OS::Heat::WaitConditionHandle + + + ### DEFAULT NETWORK FOR MERLIN DATA + port_1: + type: OS::Neutron::Port + properties: + network: { get_param: default_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: default_subnet } + + ### NETWORK FOR RECEIVING TRAFFIC + port_2: + type: OS::Neutron::Port + properties: + network: { get_param: source_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: source_subnet } + + ### NETWORK FOR SENDING TRAFFIC + port_3: + type: OS::Neutron::Port + properties: + network: { get_param: destination_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: destination_subnet } + + flavor: + type: OS::Nova::Flavor + properties: + disk: 20 + ram: 1024 + vcpus: 2 + #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } + extra_specs: { node: { get_param: node } } + + server: + type: OS::Nova::Server + properties: + name: vTC + key_name: test + image: ubuntu1404 + user_data: + str_replace: + template: | + #!/bin/sh + + # Creation of a user + NAME=$name + echo "Creating custom user..." + useradd clouduser -g admin -s /bin/bash -m + echo clouduser:secrete | chpasswd + echo "Enabling ssh password login..." + sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config + service ssh restart + sleep 1 + + # wake up interfaces + ifconfig eth1 up + ifconfig eth2 up + dhclient eth1 + dhclient eth2 + + sed -i 's/localhost/localhost vtc/g' /etc/hosts + ip route del 0/0 + route add default gw 192.168.200.1 + + AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') + BB=$(echo $AA | awk '{ print $1 }') + + # Setup Instrumentation Agent + rm -rf cimmaron + mkdir cimmaron + cd cimmaron + apt-get install -y zip + wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip + unzip MerlinAgent-12-06-2015-TNovaVM-001.zip + ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm + ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" + nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & + cd .. + + # Setup for PF_RING and bridge between interfaces + apt-get update + apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config + + # Setup multicast + echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf + cd /home/clouduser/ + git clone https://github.com/troglobit/smcroute.git + cd smcroute + sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh + sed -i 's/automake-1.11/automake/g' ./autogen.sh + ./autogen.sh + ./configure + make + make install + cd .. + touch multicast.sh + echo "#!/bin/bash" > multicast.sh + echo "while [ true ]" >> multicast.sh + echo "do" >> multicast.sh + echo " smcroute -k" >> multicast.sh + echo " smcroute -d" >> multicast.sh + echo " sleep 50" >> multicast.sh + echo "done" >> multicast.sh + chmod +x multicast.sh + ./multicast.sh & + + # Setup for PF_RING and bridge between interfaces + # Akis Repository + #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git + #cd vtc + #git checkout stable + + # Intel Repository + git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git + cd vtc_master + + cd nDPI + NDPI_DIR=$(pwd) + echo $NDPI_DIR + NDPI_INCLUDE=$(pwd)/src/include + echo $NDPI_INCLUDE + ./autogen.sh + ./configure + make + make install + cd .. + cd PF_RING + make + cd userland/examples/ + sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile + sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile + make + cd ../.. + cd .. + cd .. + #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + wc_notify --data-binary '{"status": "SUCCESS"}' + params: + wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } + $name: { get_param: name } + $IP_FAMILY: { get_param: ip_family } + + flavor: { get_resource: flavor } + networks: + - port: { get_resource: port_1 } + - port: { get_resource: port_2 } + - port: { get_resource: port_3 } +outputs: diff --git a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_1.yaml.json b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_1.yaml.json new file mode 100644 index 000000000..3af9a1cc7 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_1.yaml.json @@ -0,0 +1 @@ +{"vnic_type": "normal", "ram": "1024", "vcpus": "2"}
\ No newline at end of file diff --git a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_2.yaml b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_2.yaml new file mode 100644 index 000000000..44a81d081 --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_2.yaml @@ -0,0 +1,199 @@ +heat_template_version: 2014-10-16 +description: HOT template to create a DPI + +parameters: + default_net: + type: string + default_subnet: + type: string + source_net: + type: string + source_subnet: + type: string + destination_net: + type: string + destination_subnet: + type: string + internal_net: + type: string + internal_subnet: + type: string + node: + type: string + default: compB + name: + type: string + default: vtc + ip_family: + type: string + timeout: + type: number + description: Timeout for WaitCondition, depends on your image and environment + default: 1000 + +resources: + wait_condition: + type: OS::Heat::WaitCondition + properties: + handle: {get_resource: wait_handle} + count: 1 + timeout: {get_param: timeout} + + wait_handle: + type: OS::Heat::WaitConditionHandle + + + ### DEFAULT NETWORK FOR MERLIN DATA + port_1: + type: OS::Neutron::Port + properties: + network: { get_param: default_net } + binding:vnic_type: normal + fixed_ips: + - subnet: { get_param: default_subnet } + + ### NETWORK FOR RECEIVING TRAFFIC + port_2: + type: OS::Neutron::Port + properties: + network: { get_param: source_net } + binding:vnic_type: direct + fixed_ips: + - subnet: { get_param: source_subnet } + + ### NETWORK FOR SENDING TRAFFIC + port_3: + type: OS::Neutron::Port + properties: + network: { get_param: destination_net } + binding:vnic_type: direct + fixed_ips: + - subnet: { get_param: destination_subnet } + + flavor: + type: OS::Nova::Flavor + properties: + disk: 20 + ram: 1024 + vcpus: 2 + #extra_specs: { node: { get_param: node }, "hw:cpu_policy": "#core_pinning_enabled", "hw:cpu_threads_policy": "#core_pinning_mode", "hw:mem_page_size": "#hugepages" } + extra_specs: { node: { get_param: node } } + + server: + type: OS::Nova::Server + properties: + name: vTC + key_name: test + image: ubuntu1404 + user_data: + str_replace: + template: | + #!/bin/sh + + # Creation of a user + NAME=$name + echo "Creating custom user..." + useradd clouduser -g admin -s /bin/bash -m + echo clouduser:secrete | chpasswd + echo "Enabling ssh password login..." + sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config + service ssh restart + sleep 1 + + # wake up interfaces + ifconfig eth1 up + ifconfig eth2 up + dhclient eth1 + dhclient eth2 + + sed -i 's/localhost/localhost vtc/g' /etc/hosts + ip route del 0/0 + route add default gw 192.168.200.1 + + AA=$(netstat -ie | grep -B1 $IP_FAMILY | awk '{ print $1 }') + BB=$(echo $AA | awk '{ print $1 }') + + # Setup Instrumentation Agent + rm -rf cimmaron + mkdir cimmaron + cd cimmaron + apt-get install -y zip + wget http://10.2.1.65/~iolie/merlin/MerlinAgent-12-06-2015-TNovaVM-001.zip + unzip MerlinAgent-12-06-2015-TNovaVM-001.zip + ./updateConfiguration.py ./instrumentation.cfg tags source=tnova_vm + ./updateConfiguration.py ./instrumentation.cfg tags role="$NAME" + nohup ./Agent.py ./instrumentation.cfg >log.out 2>&1 & + cd .. + + # Setup for PF_RING and bridge between interfaces + apt-get update + apt-get install -y git build-essential gcc libnuma-dev flex byacc libjson0-dev dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config + + # Setup multicast + echo smcroute -d mgroup from $BB group 224.192.16.1 > /etc/smcroute.conf + cd /home/clouduser/ + git clone https://github.com/troglobit/smcroute.git + cd smcroute + sed -i 's/aclocal-1.11/aclocal/g' ./autogen.sh + sed -i 's/automake-1.11/automake/g' ./autogen.sh + ./autogen.sh + ./configure + make + make install + cd .. + touch multicast.sh + echo "#!/bin/bash" > multicast.sh + echo "while [ true ]" >> multicast.sh + echo "do" >> multicast.sh + echo " smcroute -k" >> multicast.sh + echo " smcroute -d" >> multicast.sh + echo " sleep 50" >> multicast.sh + echo "done" >> multicast.sh + chmod +x multicast.sh + ./multicast.sh & + + # Setup for PF_RING and bridge between interfaces + # Akis Repository + #git clone https://akiskourtis:ptindpi@bitbucket.org/akiskourtis/vtc.git + #cd vtc + #git checkout stable + + # Intel Repository + git clone http://vincenzox.m.riccobene%40intel.com:vincenzo@134.191.243.6:8081/t-nova/vtc_master.git + cd vtc_master + + cd nDPI + NDPI_DIR=$(pwd) + echo $NDPI_DIR + NDPI_INCLUDE=$(pwd)/src/include + echo $NDPI_INCLUDE + ./autogen.sh + ./configure + make + make install + cd .. + cd PF_RING + make + cd userland/examples/ + sed -i 's/EXTRA_LIBS =/EXTRA_LIBS = '"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c/g' ./Makefile + sed -i 's/ -Ithird-party/ -Ithird-party -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'/g' ./Makefile + make + cd ../.. + cd .. + cd .. + #insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + insmod ./vtc_master/PF_RING/kernel/pf_ring.ko min_num_slots=8192 enable_debug=1 quick_mode=1 enable_tx_capture=0 + ./vtc_master/PF_RING/userland/examples/pfbridge -a eth1 -b eth2 & + wc_notify --data-binary '{"status": "SUCCESS"}' + params: + wc_notify: { get_attr: ['wait_handle', 'curl_cli'] } + $name: { get_param: name } + $IP_FAMILY: { get_param: ip_family } + + flavor: { get_resource: flavor } + networks: + - port: { get_resource: port_1 } + - port: { get_resource: port_2 } + - port: { get_resource: port_3 } +outputs: diff --git a/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_2.yaml.json b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_2.yaml.json new file mode 100644 index 000000000..9f246891d --- /dev/null +++ b/yardstick/vTC/apexlake/tests/data/test_templates/VTC_base_single_vm_wait_2.yaml.json @@ -0,0 +1 @@ +{"vnic_type": "direct", "ram": "1024", "vcpus": "2"}
\ No newline at end of file |