aboutsummaryrefslogtreecommitdiffstats
path: root/samples
AgeCommit message (Collapse)AuthorFilesLines
2018-06-25Add "duration" parameter to test case definitionRodolfo Alonso Hernandez20-38/+21
Add "duration" parameter to test case definition, in scenario:options section. This parameter will be rendered in the traffic profile. If the parameter is not present in the test case scenario options, the default time written in the traffic profile options will be 30 seconds (TrafficProfile.DEFAULT_DURATION = 30). If the traffic profile injection time is not defined, the default injection time will be 30 seconds. testcase:scenario:options:duration (default = 30) render --> traffic_profile:duration parse --> TrafficProfile.duration (default = 30) Target traffic profiles (RFC2544): - RFC2544Profile - IXIARFC2544Profile JIRA: YARDSTICK-1194 Change-Id: I968922e6bb882d7ee15aa1c4db4037face7a3492 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> (cherry picked from commit 1517319fd210d71db72c5e4bfa00fc49ae4fa877)
2018-06-22Add IxNetwork API Python Binding packageRodolfo Alonso Hernandez3-3/+0
Add IxNetwork python package to the requirements list. This module is needed for the "NSPerf" scenarios using IXIA as traffic generator, when IxNetwork is the program used to handle the IXIA generator. The latest version of this module is 8.40.1124.9 [1]. The license type is MIT. [1] https://pypi.python.org/pypi/ixnetwork JIRA: YARDSTICK-1106 Change-Id: I279933c95994f5120930256a104c4192a0b9900d Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-06-22Configure ACL via static fileMytnyk, Volodymyr4-136/+108
This patch allows user to configure ACL/vFW SampleVNF ACL via configuration file provided in TC definition. The Yardstick applies the rules to SampleVNF from specified config file + rules generated by Yardstick (default rules). The example of SampleVNF ACL CLI commands generated/applied by Yardstick can be found at (using default ACL config file): ACL VNF ACL CLI commands: acl/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml http://paste.openstack.org/show/723303/ vFW VNF ACL CLI commands: vfw/tc_heat_rfc2544_ipv4_1rule_1flow_64B_trex.yaml http://paste.openstack.org/show/723304/ Change-Id: I76a630261a982083b628e3985fc3bec14ca495db Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> (cherry picked from commit 3fdca97ff5053770161059a34a95fd39463eaecd)
2018-06-22Add scale out TCs with availability zone supportMytnyk, Volodymyr5-0/+435
Add PROX and vFW scale out TCs with availability zone configuration. To be able to specify the availability zone for specific VNF or TG the following example of command line option shoud be used: yardstick -d task start --task-args='{ "num_vnfs": 2, "availability_zone": { "vnf_0": "az_0", "tg_0": "az_0", "vnf_1": "az_1", "tg_1": "az_1", ... }}' <SCALE-OUT-TC-FILE> The steps to run new scale-out TCs is documented in the userguide. JIRA: YARDSTICK-1203 Change-Id: Ib3878485c5483981fe9b48ab02995712bcc31ae5 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> (cherry picked from commit 0156b5c37e08f91a37dda08edb854758bbba7413)
2018-06-19Update pmd/lcore mask for OVS-DPDK contextStepan Andrushko1-3/+5
Added default values for pmd/lcore mask to the SampleVNF test case for Trex TG. lcore mask - specifies the CPU cores used for non-datapath OVS-DPDK threads. pmd mask - specifies the CPU cores used for data path packet processing. Updated documentation for Standalone OVS-DPDK context. JIRA: YARDSTICK-1246 Change-Id: I8d008a185c94d2047ffa4
#!/bin/sh
set -e
declare -i CNT

RDO_RELEASE=kilo
SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null)

# RDO Manager expects a stack user to exist, this checks for one
# and creates it if you are root
if ! id stack > /dev/null; then
    sudo useradd stack;
    sudo echo 'stack ALL=(root) NOPASSWD:ALL' | sudo tee -a /etc/sudoers.d/stack
    sudo echo 'Defaults:stack !requiretty' | sudo tee -a /etc/sudoers.d/stack
    sudo chmod 0440 /etc/sudoers.d/stack
    echo 'Added user stack'
fi

# ensure that I can ssh as the stack user
if ! sudo grep "$(cat ~/.ssh/id_rsa.pub)" /home/stack/.ssh/authorized_keys; then
    if ! sudo ls -d /home/stack/.ssh/ ; then
        sudo mkdir /home/stack/.ssh
        sudo chown stack:stack /home/stack/.ssh
        sudo chmod 700 /home/stack/.ssh
    fi
    USER=$(whoami) sudo sh -c "cat ~$USER/.ssh/id_rsa.pub >> /home/stack/.ssh/authorized_keys"
    sudo chown stack:stack /home/stack/.ssh/authorized_keys
fi

# clean up stack user previously build instack disk images
ssh -T -o "StrictHostKeyChecking no" stack@localhost "rm -f instack*.qcow2"

# Yum repo setup for building the undercloud
if ! rpm -q epel-release > /dev/null; then
    sudo yum install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
fi

if ! rpm -q rdo-release > /dev/null; then
    sudo yum install -y https://rdoproject.org/repos/openstack-${RDO_RELEASE}/rdo-release-${RDO_RELEASE}.rpm
fi

if ! rpm -q rdo-release > /dev/null && [ "$1" != "-master" ]; then
    sudo yum install -y https://rdoproject.org/repos/openstack-${RDO_RELEASE}/rdo-release-${RDO_RELEASE}.rpm
    sudo rm -rf /etc/yum.repos.d/delorean.repo
    sudo rm -rf /etc/yum.repos.d/delorean-current.repo
    sudo rm -rf /etc/yum.repos.d/delorean-deps.repo
elif [ "$1" == "-master" ]; then
    sudo yum -y install yum-plugin-priorities
    sudo yum-config-manager --disable openstack-${RDO_RELEASE}
    sudo curl -o /etc/yum.repos.d/delorean.repo http://trunk.rdoproject.org/centos7-liberty/current-passed-ci/delorean.repo
    sudo curl -o /etc/yum.repos.d/delorean-current.repo http://trunk.rdoproject.org/centos7-liberty/current/delorean.repo
    sudo sed -i 's/\[delorean\]/\[delorean-current\]/' /etc/yum.repos.d/delorean-current.repo
    sudo curl -o /etc/yum.repos.d/delorean-deps.repo http://trunk.rdoproject.org/centos7-liberty/delorean-deps.repo
fi

# ensure the undercloud package is installed so we can build the undercloud
if ! rpm -q instack-undercloud > /dev/null; then
    sudo yum install -y instack-undercloud
fi

# ensure openvswitch is installed
if ! rpm -q openvswitch > /dev/null; then
    sudo yum install -y openvswitch
fi

# ensure libvirt is installed
if ! rpm -q libvirt-daemon-kvm > /dev/null; then
    sudo yum install -y libvirt-daemon-kvm
fi

# ensure that no previous undercloud VMs are running
# and rebuild the bare undercloud VMs
ssh -T -o "StrictHostKeyChecking no" stack@localhost <<EOI
set -e
virsh destroy instack 2> /dev/null || echo -n ''
virsh undefine instack 2> /dev/null || echo -n ''
virsh destroy baremetalbrbm_0 2> /dev/null || echo -n ''
virsh undefine baremetalbrbm_0 2> /dev/null || echo -n ''
virsh destroy baremetalbrbm_1 2> /dev/null || echo -n ''
virsh undefine baremetalbrbm_1 2> /dev/null || echo -n ''
instack-virt-setup
EOI

# attach undercloud to the underlay network for
# baremetal installations
#if ! ovs-vsctl show | grep brbm; then
#    ovs-vsctl add-port brbm em2
#fi

# let dhcp happen so we can get the ip
# just wait instead of checking until we see an address
# because there may be a previous lease that needs
# to be cleaned up
sleep 5

# get the undercloud ip address
UNDERCLOUD=$(grep instack /var/lib/libvirt/dnsmasq/default.leases | awk '{print $3}' | head -n 1)

# ensure that we can ssh to the undercloud
CNT=10
while ! ssh -T -o "StrictHostKeyChecking no" "root@$UNDERCLOUD" "echo ''" > /dev/null && [ $CNT -gt 0 ]; do
    echo -n "."
    sleep 3
    CNT=CNT-1
done
# TODO fail if CNT=0

# yum repo, triple-o package and ssh key setup for the undercloud
ssh -T -o "StrictHostKeyChecking no" "root@$UNDERCLOUD" <<EOI
set -e
if ! rpm -q epel-release > /dev/null; then
    yum install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
fi

curl -o /etc/yum.repos.d/delorean.repo http://trunk.rdoproject.org/centos7-liberty/current-passed-ci/delorean.repo
curl -o /etc/yum.repos.d/delorean-current.repo http://trunk.rdoproject.org/centos7-liberty/current/delorean.repo
sed -i 's/\\[delorean\\]/\\[delorean-current\\]/' /etc/yum.repos.d/delorean-current.repo
echo "\\nincludepkgs=diskimage-builder,openstack-heat,instack,instack-undercloud,openstack-ironic,openstack-ironic-inspector,os-cloud-config,python-ironic-inspector-client,python-tripleoclient,tripleo-common,openstack-tripleo-heat-templates,openstack-tripleo-image-elements,openstack-tripleo-puppet-elements,openstack-tuskar-ui-extras,openstack-puppet-modules" >> /etc/yum.repos.d/delorean-current.repo
curl -o /etc/yum.repos.d/delorean-deps.repo http://trunk.rdoproject.org/centos7-liberty/delorean-deps.repo
yum install -y python-tripleoclient
cp /root/.ssh/authorized_keys /home/stack/.ssh/authorized_keys
chown stack:stack /home/stack/.ssh/authorized_keys
EOI

# install undercloud on Undercloud VM
ssh -o "StrictHostKeyChecking no" "stack@$UNDERCLOUD" "openstack undercloud install"

# make a copy of instack VM's definitions, and disk image
# it must be stopped to make a copy of its disk image
ssh -T -o "StrictHostKeyChecking no" stack@localhost <<EOI
set -e
echo "Shutting down instack to take snapshot"
virsh shutdown instack

echo "Waiting for instack VM to shutdown"
CNT=20
while virsh list | grep instack > /dev/null && [ $CNT -gt 0 ]; do
    echo -n "."
    sleep 5
    CNT=CNT-1
done
if virsh list | grep instack > /dev/null; then
    echo "instack failed to shutdown for copy"
    exit 1
fi

echo "\nCopying instack disk image and starting instack VM."
virsh dumpxml baremetalbrbm_0 > baremetalbrbm_0.xml
virsh dumpxml baremetalbrbm_1 > baremetalbrbm_1.xml
cp -f /var/lib/libvirt/images/instack.qcow2 .
virsh dumpxml instack > instack.xml
#virsh vol-dumpxml instack.qcow2 --pool default > instack.qcow2.xml
virsh net-dumpxml brbm > brbm.xml
virsh start instack
EOI

# copy off the instack artifacts
echo "Copying instack files to build directory"
scp -o "StrictHostKeyChecking no" stack@localhost:baremetalbrbm_0.xml .
scp -o "StrictHostKeyChecking no" stack@localhost:baremetalbrbm_1.xml .
scp -o "StrictHostKeyChecking no" stack@localhost:instack.xml .
scp -o "StrictHostKeyChecking no" stack@localhost:brbm.xml .
scp -o "StrictHostKeyChecking no" stack@localhost:instack.qcow2 .


# start the instack VM back up to continue installation
echo "Waiting for instack VM to start"
CNT=10
while ! ping -c 1 "$UNDERCLOUD" > /dev/null  && [ $CNT -gt 0 ]; do
    echo -n "."
    sleep 5
    CNT=CNT-1
done
CNT=10
while ! ssh -T -o "StrictHostKeyChecking no" "root@$UNDERCLOUD" "echo ''" > /dev/null && [ $CNT -gt 0 ]; do
    echo -n "."
    sleep 3
    CNT=CNT-1
done

# inject the already downloaded cloud image so it's not downloaded again
echo "Copying CentOS Cache to instack VM"
ssh -o "StrictHostKeyChecking no" "stack@$UNDERCLOUD" "mkdir .cache"
ssh -T -o "StrictHostKeyChecking no" stack@localhost "scp -r -o 'StrictHostKeyChecking no' /home/stack/.cache/image-create/CentOS-7-x86_64-GenericCloud* \"stack@$UNDERCLOUD\":.cache/"

# build the overcloud images
echo "Building overcloud images"
ssh -T -o "StrictHostKeyChecking no" "stack@$UNDERCLOUD" <<EOI
set -e
export DIB_YUM_REPO_CONF="/etc/yum.repos.d/delorean.repo /etc/yum.repos.d/delorean-current.repo /etc/yum.repos.d/delorean-deps.repo"
openstack overcloud image build --all
EOI

# copy off the built images
echo "Copying overcloud images"
if [ ! -d stack ]; then mkdir stack; fi
IMAGES="deploy-ramdisk-ironic.initramfs deploy-ramdisk-ironic.kernel"
#IMAGES+=" ironic-python-agent.initramfs ironic-python-agent.kernel ironic-python-agent.vmlinuz"
IMAGES+=" overcloud-full.initrd overcloud-full.qcow2  overcloud-full.vmlinuz"
IMAGES+=" fedora-user.qcow2 instackenv.json"

for i in $IMAGES; do
scp -o "StrictHostKeyChecking no" stack@$UNDERCLOUD:$i stack/
done

# move and Sanitize private keys from instack.json file
mv stack/instackenv.json instackenv-virt.json
sed -i '/pm_password/c\      "pm_password": "INSERT_STACK_USER_PRIV_KEY",' instackenv-virt.json 
sed -i '/ssh-key/c\  "ssh-key": "INSERT_STACK_USER_PRIV_KEY",' instackenv-virt.json

# clean up the VMs
ssh -T -o "StrictHostKeyChecking no" stack@localhost <<EOI
set -e
virsh destroy instack 2> /dev/null || echo -n ''
virsh undefine instack 2> /dev/null || echo -n ''
virsh destroy baremetalbrbm_0 2> /dev/null || echo -n ''
virsh undefine baremetalbrbm_0 2> /dev/null || echo -n ''
virsh destroy baremetalbrbm_1 2> /dev/null || echo -n ''
virsh undefine baremetalbrbm_1 2> /dev/null || echo -n ''
EOI
nge-Id: Id0e2d6d47f459c7e6a3370735bab74f7ce502b24 Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
2018-01-23Cleanup of redundant files from Prox directoryAbhijit Sinha15-631/+0
JIRA: YARDSTICK-965 Removed the redundant files and directory from Prox test folder. Change-Id: I6167f0a4ccdd581153dad3ec9f5eaaf2619aacbd Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com>
2018-01-02Merge "Adding vFW RFC2544 and ixload test cases with various packet sizes"Ross Brattain11-0/+714
2017-12-16samples: Add generic L3 forwarder testsDino Madarang64-0/+7134
A generic throughput test case that can be used as a stub code for a Linux-based VNF configured as an L3 forwarder. Supported context: * Standalone OVSDPDK and SRIOV * Baremetal Code changes: * Allow pmd-cpu-mask and lcore mask for OVS DPDK * router_vnf.py - configures interface IP addresses and static arp entries using ip command * NFVi KPIs * Allow cputune tag for standalone context to be able to PIN on NUMA 1 cpus SRIOV Test cases: * RFC2544 Ethernet framesizes, 128K Flows * 2,4 and 6 ports * 2 and 3 vcpus per port * OVSDPDK Test cases: * RFC2544 Ethernet framesizes, 128K Flows * 2 and 4 ports * 2 vcpus per port * 2 PMD threads per port TODO: * Documentation * Add 6 ports tests References: * router_vnf.py is based on sample_vnf.py * tc_*.yaml files are based on acl/vfw test case files Added unitests Added get_stats to parse ip -s link Change-Id: Id1b969d5420dfcab7c1e695acbd2cd1655747efe Signed-off-by: Dino Simeon Madarang <dinox.madarang@intel.com> Signed-off-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Reviewed-by: Alain Jebara <alain.jebara@intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Emma Foley <emma.l.foley@intel.com> Reviewed-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> Reviewed-by: Edward MacGillivray <edward.s.macgillivray@intel.com> Signed-off-by: Dhaval Patel <dhaval.r.patel@intel.com> Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-12-14Change testcases 'cirros' image to 'yardstick-image'Rodolfo Alonso Hernandez14-31/+31
The default OpenStack 'cirros-0.3.5' image doesn't exist anymore. The image included by default in any testing OpenStack deployment is now called 'cirros-0.3.5-x86_64-disk', but this name can change. Because Yardstick, during the installation, deploys a customized image, 'yardstick-image', it makes sense to use it as the default image. JIRA: YARDSTICK-873 Change-Id: I8fd7cbc01d4fa52e9107f2fac7d2d9ff5d1091c7 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-12-12Merge "Adding vFirewall HTTP Traffic Profiles for tests including ↵Ross Brattain40-0/+73520
Concurrency, CPS, TPUT, TPS for 2Ports and 4Ports"
2017-12-12Adding vFirewall HTTP Traffic Profiles.Phani Kiran Thaticharla6-1/+121
Modified http_locator location for 64K, 256K, 512K and 1024K concurrency files. The traffic profiles include various http locator image sizes i.e 4K,64K,256K,512K and 1024K The traffic schema is changed to "nsb" from "isb" for all the traffic profiles Change-Id: I012da8daaa880ca80db2d3b08cebd9a73c19cd47 Signed-off-by: Phani Kiran Thaticharla <phani.kiran.thaticharla@intel.com> Reviewed-by: Oscar Medina-Duran <oscar.medina-duran@intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> 
2017-12-11Adding vFW RFC2544 and ixload test cases with various packet sizesPhani Kiran Thaticharla11-0/+714
Changed private to uplink and public to downlink Change-Id: Id9273d9489f58bd45b60a00fc9e5bcbe9e136c84 Signed-off-by: Phani Kiran Thaticharla <phani.kiran.thaticharla@intel.com> Reviewed-by: Oscar Medina-Duran <oscar.medina-duran@intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> 
2017-12-04Adding vFirewall HTTP Traffic Profiles for tests including Concurrency, CPS, ↵Phani Kiran Thaticharla40-0/+73520
TPUT, TPS for 2Ports and 4Ports Change-Id: I3c7f047dc6d1545093aed6f64ccaed9f90d85af3 Signed-off-by: Phani Kiran Thaticharla <phani.kiran.thaticharla@intel.com> Reviewed-by: Oscar Medina-Duran <oscar.medina-duran@intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> 
2017-12-04Adding new vFirewall Test cases based on Concurrency, Connections per ↵Phani Kiran Thaticharla59-0/+2980
second, Throughput and Transactions per second for various http locator image sizes including 1b, 4k, 64k, 256k, 1024k Change-Id: I253d1fa20a0324bc9efeaa4da1a24560e644734c Signed-off-by: Phani Kiran Thaticharla <phani.kiran.thaticharla@intel.com> Reviewed-by: Oscar Medina-Duran <oscar.medina-duran@intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Ross Brattain <ross.b.brattain@intel.com> 
2017-11-17Merge "Add vfw ixload testcase for heat"Ross Brattain7-11/+2953
2017-11-17Merge "NSB: update vfw tc_heat_external tests"Ross Brattain2-11/+107
2017-11-17Merge "NSB Prox BM test case fixes for scale up"Ross Brattain28-337/+99
2017-11-16NSB "Prox" : Cleanup duplicated traffic profileAbhijit Sinha1-1/+1
JIRA: YARDSTICK-848 The NSB PROX MPLS test uses Binsearch traffic profile and the mpls traffic profile is a duplicate. Change-Id: Ie2124cebf306fd6917b70ecd7c23ae12ef4850dc Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com>
2017-11-14NSB Prox BM test case fixes for scale upAbhijit Sinha28-337/+99
YARDSTICK-839 In a scale-up test the VNF number can start from 0 to MAX (num_vnf-1) The NSB PROX BM test nodes are currently marked as: tg__0: trafficgen_1.yardstick vnf__0: vnf.yardstick They need to be changed to the below: tg__0: tg_0.yardstick vnf__0: vnf_0.yardstick Changes done are: - All BM Prox test cases have tg_0 and vnf_0 as default test nodes - The prox-baremetal-1/2/4.yaml sample pod file - Cleaned Up some unused Prox test/config files Change-Id: I819011bcb35eda62b17dd3e1035918918c582b13 Signed-off-by: Abhijit Sinha <abhijit.sinha@intel.com>
2017-11-10NSB: fix vpe_config licenseRoss Brattain1-27/+10
Use Apache 2.0 Change-Id: I199d09f04a5c84a25bd91dceba5e4ed1f93075f6 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-11-09Merge "NSB Prox LW_AFTR Test"Ross Brattain6-0/+66112
2017-11-07Fixed incorrect Copyright NoticeDanielMartinBuckley1-27/+10
Changed Copyright notice on tuples.lua from "Intel Copyright" to Apache 2.0 Change-Id: I85e6f9eb86c116d552f86cddf05b3b368b32f776 Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>