Share with friends and colleagues on social media

Yardstick is a project in the OPNFV community and its goal is to verify the infrastructure compliance when running VNF applications. The project web-page is

This short blog-post guides the user to the installation and setup of Yardstick on SUSE distribution and how to modify existing samples to use different guest-images.


Create the user stack on the system

$ sudo useradd -m -p stack stack

Add the user stack to the list of sudoers

$ sudo echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

Change user and working directory

$ su stack
$ cd
~/> git clone

In the devstack directory, edit the file lib/nova

~/> cd devstack
~/devstack> vim lib/nova

and remove the DifferentHostFilter from the FILTERS list

Create a local.conf file (see below for content)

~/devstack> vim local.conf

Content of the file:

[ [ local | localrc ] ]

#Enable heat services
enable_service h-eng h-api h-api-cfn h-api-cw

#Enable heat plugin
enable_plugin heat

Finally, export the Openstack environment variables and run the Devstack installation

~/devstack> source openrc
~/devstack> export OS_USERNAME=admin
~/devstack> export FORCE=yes
~/devstack> ./

Create the predefined Openstack flavour used by few Yardstick examples (ID: 100, RAM: 512 MB, DISK: 3 GB, vCPU: 1)

~/devstack> nova flavor-create yardstick-flavor 100 512 3 1

Download the predefined guest-image used by few Yardstick examples

~/devstack> cd /tmp
~/tmp> wget

Create an Openstack image with the downloaded cirros image

~/devstack> openstack image create --public \
--disk-format qcow2 \
--container-format bare \
--file /tmp/cirros-0.3.3-x86_64-disk.img \


The steps listed below are the ones required to install and run Yardstick on openSUSE distribution (tested on Leap 42.2, Leap 42.3 and Tumbleweed).


~/devstack> zypper -n install -y gcc \
wget \
git \
sshpass \
qemu-tools \
kpartx \
libffi-devel \
libopenssl-devel \
python \
python-devel \
python-virtualenv \
libxml2-devel \
libxslt-devel \

Virtual environment

~> virtualenv ~/yardstick_venv
~> source ~/yardstick_venv/bin/activate
(yardstick_venv) ~> easy_install -U setuptools

Cloning and setup

(yardstick_venv) ~> git clone
(yardstick_venv) ~> cd yardstick
(yardstick_venv) ~/yardstick> python install
(yardstick_venv) ~/yardstick> pip install -r requirements.txt

Install missing python modules

(yardstick_venv) ~/yardstick> pip install pyyaml \
oslo_utils \
oslo_serialization \
oslo_config \
paramiko \
python.heatclient \
python.novaclient \
python.glanceclient \
python.neutronclient \
scp \

Expose Openstack environment to Yardstick


Export the Openstack external network. The default installation of Devstack names the external network public

export EXTERNAL_NETWORK=public
export OS_USERNAME=demo

Change the API version used by Yardstick to v2.0 (the devstack openrc sets it to v3)

export OS_AUTH_URL=http://PUBLIC_IP_ADDRESS:5000/v2.0

At this point it should be possible to execute Yardstick and a sample test.

Let’s try to see yardstick help menu:

(yardstick_venv) ~/yardstick> yardstick -h

and now, let’s run the ping example:

(yardstick_venv) ~/yardstick> yardstick task start samples/ping.yaml

How to use a different guest-image

Let’s imagine we want to use the openSUSE Leap 42.3 Openstack cloud image.

~/devstack> cd /tmp
~/tmp> wget

Create a variation of the default Yardstick flavour since the openSUSE image is bigger than the cirros one (ID: 101, RAM: 4096 MB, DISK: 15 GB, vCPU: 4).

~/devstack> nova flavor-create yardstick-flavor-bigger 101 4096 15 4

Create the Openstack image for the downloaded image

~/devstack> openstack image create --public \
--disk-format qcow2 \
--container-format bare \
--file /tmp/openSUSE-Leap-42.3-OpenStack.x86_64.qcow2 \

Now, we are ready to edit the sample test YAML file.

~> virtualenv ~/yardstick_venv
~> source ~/yardstick_venv/bin/activate
(yardstick_venv) ~> cd yardstick
(yardstick_venv) ~/yardstick> vim samples/ping.yaml

Modify the image, flavor and user parameters to the one we have created before (and as below)

image: opensuse-leap-42.3-openstack
flavor: yardstick-flavor-bigger
user: root

Yardstick results

All Yardstick sample test generates a yardstick.out file in the /tmp folder. The file content is of JSON format and so it can always be possible to copy/paste its content to a JSON viewer (e.g.

However, another way is to integrate Yardstick with InfluxDB and Grafana hence storing data into a database and have Grafana plotting the results. In this regards, the existing OPNFV wiki-page is up-to-date and can be leveraged for the setup.

See section to deploy and configure InfluxDB and Grafana locally.

The only extra steps, to be performed before following the wiki page above, are:

(yardstick_venv) ~/:[127]# sudo zypper -n install -y docker
(yardstick_venv) ~/:[1]# service docker start
Share with friends and colleagues on social media
(Visited 1 times, 1 visits today)
Tags: , , ,
Category: openSUSE, Technical Solutions
This entry was posted Monday, 6 November, 2017 at 9:24 am
You can follow any responses to this entry via RSS.

Leave a Reply

Your email address will not be published. Required fields are marked *

No comments yet