Sie sind auf Seite 1von 111

Table

of Contents
Introduction 1.1
Basic Installation 1.2
Services Explained 1.3
Keystone 1.3.1
Glance 1.3.2
Exercises 1.4
Devstack Neutron services 1.5
Neutron Networking explained 1.6
DevStack with OpenContrail 1.7
Devstack with BagPipe Driver 1.8
Devstack with LBAAS 1.9
Tempest - Openstack Testing Project 1.10
Rally - Openstack Benchmarking Project 1.11
Networking-ODL - Openstack Neturon + ODL integreation Project 1.12
Devstack Neutron services 1.13
Example configurations 1.14

1
Introduction

Introduction
This book intends for beginners, who wants to learn ,practice or develop
openstack in step by step manner. As Many of you know, devstack is first step to
learn openstack. Devstack provides the flexibilty of install it in a single
machine/VM, easy installation procedure,etc.

This book travels in the following manner Minimum installation explaining the
screens (what is it, how to access,some screen commands) Explaining each
components (keystone,glance,nova,neutron -- access with CLI commands, REST
APIs, how to stop and start) Explaining the workflow - create a new vm, associate
the security policy etc

2
Basic Installation

Installation
To install a devstack, we require a Desktop/Laptop/VM with below requirements,

Requirements
Recommended Hardware

8GB RAM
2 Core Processors
1 Ethernet (Virtual Ethernet in case of VM)
Internet access

Recommended OS

Ubuntu 14.04 or Ubuntu 16.04

Devstack can be installed on other Linux flavors also, such as CentOS. But
Ubuntu has a native support. Hence I prefer Ubuntu. Also I prefer to install it in a
VM, as we have many advantages in it.

Note : I am using a VM(8GB Ram) and Ubuntu 14.04 OS to install devstack.


Throughout the book, all the examples, exercise,screenshot are
executed/captured in the VM.

Decide on Openstack release


Openstack has many releases(icehouse,kilo,juno,liberty,mitaka,newton,ocata),
and new release is happening every year. The preferred release for installation is
the latest stable one. The latest stable release is OCATA.

Keystone,Glance,Nova,Neutron are minimum projects required to run devstack.


Other projects include cinder,swift,heat,etc can be added.

If you like to install older eol version(ex: Mitaka), you have to specifiy the branch
details in the local.conf file.

3
Basic Installation

Installation Procedure
Note : Devstack can not be installed with root user. So the following steps needs
to be done with normal user with sudo access.

Update the Ubuntu Packages

Once your Ubuntu 14.04 OS is ready, Make sure you update it as below.

sudo apt-get update


sudo apt-get upgrade
sudo apt-get install git

Download the devstack

In your home folder, Clone the devstack from the openstack git repository and
change it to the ocata release

cd
git clone https://github.com/openstack-dev/devstack
cd devstack
git checkout stable/ocata

create local.conf file

create a local.conf file in your devstack folder with below contents

For Ocata openstack Release:

4
Basic Installation

[[local|localrc]]
RECLONE=True
HOST_IP=10.0.1.6
SERVICE_TOKEN=mytoken123
ADMIN_PASSWORD=openstack123
MYSQL_PASSWORD=mysql123
RABBIT_PASSWORD=rabbit123
SERVICE_PASSWORD=$ADMIN_PASSWORD
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
enable_plugin neutron-lbaas https://github.com/openstack/neutron
-lbaas.git stable/ocata
disable_service n-net c-api c-sch c-vol
enable_service q-svc q-agt q-dhcp q-l3 q-meta q-lbaasv2

Note:

local.conf file is a configuration file for devstack installation. All passwords,


openstack services details, openstack services configuration, are configured here.
Devstack uses this configuration file for installing and configuring the openstack
components.

we are configuring the passwords as below,

```
SERVICE_TOKEN=mytoken123
ADMIN_PASSWORD=openstack123
MYSQL_PASSWORD=mysql123
RABBIT_PASSWORD=rabbit123
SERVICE_PASSWORD=$ADMIN_PASSWORD```

And, we are enabling neutron networking instead of nova networking(old) using


the below commands.

```
disable_service n-net
enable_service q-svc q-agt q-dhcp q-l3 q-meta ```

5
Basic Installation

Specify the system IP in HOST_IP=10.0.1.6 field.

Also, disabled the cinder services, as i dont require. if you need, you can enable
that.

Starts the installation

cd
cd devstack
./stack.sh

Thats all. Installation may take 1 Hour+ to complete it. On Successful installation,
you will see this message.

=======================
DevStack Components Timed
========================

run_process - 57 secs
test_with_retry - 2 secs
apt-get-update - 3 secs
pip_install - 277 secs
restart_apache_server - 10 secs
wait_for_service - 10 secs
git_timed - 156 secs
apt-get - 70 secs

This is your host IP address: 10.10.10.5


This is your host IPv6 address: ::1
Horizon is now available at http://10.10.10.5/dashboard
Keystone is serving at http://10.10.10.5:5000/
The default users are: admin and demo
The password: openstack123

The installation log file is located in /opt/stack/log/stack.sh.log

Devstack downloads the required repositories from git in the /opt/stack folder.

6
Basic Installation

cloud@devstack1:/opt/stack$ pwd
/opt/stack
cloud@devstack1:/opt/stack$ ls -lrt
total 52
drwxr-xr-x 13 cloud cloud 4096 Jul 30 14:32 keystone
drwxr-xr-x 10 cloud cloud 4096 Jul 30 14:34 glance
drwxr-xr-x 10 cloud cloud 4096 Jul 30 14:34 cinder
drwxr-xr-x 12 cloud cloud 4096 Jul 30 14:35 neutron
drwxr-xr-x 8 cloud cloud 4096 Jul 30 14:36 noVNC
drwxr-xr-x 13 cloud cloud 4096 Jul 30 14:37 nova
drwxr-xr-x 3 cloud cloud 4096 Jul 30 14:38 status
drwxr-xr-x 7 cloud cloud 4096 Jul 30 14:41 requirements
drwxr-xr-x 11 cloud cloud 4096 Jul 30 14:42 horizon
drwxr-xr-x 7 cloud root 4096 Jul 30 14:45 data
drwxr-xr-x 11 cloud cloud 4096 Jul 30 14:45 tempest
-rw-r--r-- 1 cloud cloud 44 Jul 30 14:45 devstack.subunit
drwxr-xr-x 2 cloud cloud 4096 Jul 31 05:40 logs
cloud@devstack1:/opt/stack$

Now let us explore the openstack components etc

Installing the older openstack versions:


Assume, i would like to install openstack Mitaka version, Mitaka is End of Life
version. So In Openstack Repositories(Neutron, nova etc),it is moved out from
stable branch.

cd
git clone https://github.com/openstack-dev/devstack
cd devstack
git checkout mitaka-eol

Local.conf

7
Basic Installation

[[local|localrc]]
RECLONE=True
SERVICE_TOKEN=mytoken123
ADMIN_PASSWORD=openstack123
MYSQL_PASSWORD=mysql123
RABBIT_PASSWORD=rabbit123
SERVICE_PASSWORD=$ADMIN_PASSWORD
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
GLANCE_BRANCH=mitaka-eol
NOVA_BRANCH=mitaka-eol
NEUTRON_BRANCH=mitaka-eol
KEYSTONE_BRANCH=mitaka-eol
CINDER_BRANCH=mitaka-eol
HORIZON_BRANCH=mitaka-eol
REQUIREMENTS_BRANCH=mitaka-eol
disable_service n-net c-api c-sch c-vol tempest
enable_service q-svc q-agt q-dhcp q-l3 q-meta

Openstack Screens
devstack creates a screen named 'stack' with x windows. Each window represents
the process/logs of the openstack components

If you are not familiar with screen Screen is a full-screen window manager that
multiplexes a physical terminal between several processes, typically interactive
shells.
Reference :

1. List the available screens

stack@sureshdev:~$ screen -ls

There is a screen on:


8146.stack (07/12/16 20:00:04) (Detached)
1 Socket in /var/run/screen/S-stack.

8
Basic Installation

1. Attach with devstack screen

stack@sureshdev:~$ screen -x stack

You will see the below(similar) screen

Some Important Screen Shortcuts

CTRL + A + " To list all screen windows and select the screen with UP/DOWN
ARROW
CTRL + A + n Move to next screen window
CTRL + A + p Move to previous screen window
CTRL + D Detach(exit) from screen

9
Basic Installation

The below picture lists all screen windows (CTRL+A+" output)

key,key-access are for keystone component, which displays the keystone log
files
g-reg,g-api are glance component windows. glance registry process runs on
g-reg window and glance api process runs on g-api window.
n-api,n-cond,n-sch,n-novnc,n-cauth,n-cpu are nova component window. n-api
window run nova-api process, n-cond window runs nova-conductor
process,n-sch window runs with nova-scheduler,n-novnc runs with nova-vnc
console process,n-cauth window runs with nova auth module,n-cpu window
runs with nova compute.
q-svc,q-agt,q-dhcp,q-l3,q-meta are neutron compoents.
c-api,c-vol,c-sch are cinder components
horizon is horizon(webui) component.

Debugging the Failure installation


Devstack installation may fail, due to the following reasons.

Failure related to third party software/services/dependent libraries


openstack software error(untested patches),
Wrong configuration and credentials in the openstack services etc.
Dependent Services are not running/misconfigured(such as mysql,rabbitmq
etc)

10
Basic Installation

Uncleaned Installation (Previous devstack was not cleaned properly)

The log file is present in /opt/stack/log/stack.log file. First we need to check the log
file to understand the reason for failure, and correct it.

Most of the times,simply restart the installation will work.

Restart the installation using below commands.

./unstack.sh
./stack.sh

You may get in to the situation, that you want to cleanly uninstall the devstack with
no foot prints.

cd
cd devstack
./unstack.sh
./clean.sh
cd .. && rm -rf devstack
rm -rf /opt/stack

How to use Use


we can use the openstack via Web UI(Horizon) or Openstack CLI.

By default demo project is created with "demo" user. The default admistrative
username is admin. we have specified the password in local.conf file. In my
example, it is "openstack123".

Horizon

1. Access with UI http://

CLI

To access via openstack CLI, openrc script needs to be executed first with the
project name and username as a parameter.

11
Basic Installation

source openrc
cd
cd devstack
source openrc admin admin

Now client is ready to use, execute some sample operations as below,

cloud@devstack1:~/devstack$ openstack server list

cloud@devstack1:~/devstack$ openstack image list


+--------------------------------------+------------------------
---------+--------+
| ID | Name
| Status |
+--------------------------------------+------------------------
---------+--------+
| 32d7cb58-aadc-4853-a888-2b56556c914e | cirros-0.3.4-x86_64-uec
| active |
| 7ca2ec87-ad98-4149-92d5-4c7bf02ea2b0 | cirros-0.3.4-x86_64-uec
-ramdisk | active |
| c8595f74-2318-454e-a012-99322bb5589d | cirros-0.3.4-x86_64-uec
-kernel | active |
+--------------------------------------+------------------------
---------+--------+
cloud@devstack1:~/devstack$ openstack flavor list
+----+-----------+-------+------+-----------+-------+-----------
+
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public
|
+----+-----------+-------+------+-----------+-------+-----------
+
| 1 | m1.tiny | 512 | 1 | 0 | 1 | True
|
| 2 | m1.small | 2048 | 20 | 0 | 1 | True
|
| 3 | m1.medium | 4096 | 40 | 0 | 2 | True
|
| 4 | m1.large | 8192 | 80 | 0 | 4 | True
|

12
Basic Installation

| 42 | m1.nano | 64 | 0 | 0 | 1 | True
|
| 5 | m1.xlarge | 16384 | 160 | 0 | 8 | True
|
| 84 | m1.micro | 128 | 0 | 0 | 1 | True
|
+----+-----------+-------+------+-----------+-------+-----------
+
cloud@devstack1:~/devstack$

Good, Your installation is perfect and works.

13
Services Explained

Services Explained
This chapter discuss about openstack
components(keystone,glance,nova,neutron) and respective CLI commands to
access it.

14
Keystone

Keystone

KeyStone Introduction
Keystone is an OpenStack project that provides Identity, Token, Catalog and
Policy services for use specifically by projects in the OpenStack family. It
implements OpenStack’s Identity API. All openstack services uses keystone for
authentication and verification

Concepts A tenant also known as project . It has resources such as users,


images, instances, networks and security groups. These resources are only
visible to that particular project. A user can belong to one or more tenants and is
able to switch between these projects to gain access to those resources. Users
can have various roles assigned such as member,Admin.

Role in OpenStack

1. Manages the Projects/Tenants,


2. Manages the Users,Roles
3. Manages the tokens and catalogs
4.

keystone is developed on WSGI framework. The devstack installation uses


apache2 as a webserver for keystone.

Apache keystone wsgi configuration file is located in /etc/apache2/sites-


available/keystone.conf.
keystone config file is located in /etc/keystone/keystone.conf

Devstack Screens
In the devstack screens,

Screen numbers 2-key,3-key-access are for keystone screens.


Both screens are used for displaying the log files.
Key screen displays the /var/log/apache2/keystone.log file
Key-access screen displays /var/log/apache2/keystone-access.log file.

15
Keystone

Stop/Start Keystone
To be updated

Accessing the Keystone from CLI


The following operations are frequently used by the user, which are served by the
keystone.

create/delete/list project
create/delete/list user
Assign/Remove roles to the user

Note : These operations are administrative operations, hence admin users are
allowed to perform this.

Openstack CLI is a integreated CLI used for managing all the services.

Before using the CLI, localrc script file needs be sourced. localrc script file is
present in the devstack directory. The project name and user name is the input to
the localrc script file as below, localrc

Sourcing openrc file

cloud@devstack1:~$ cd devstack/
cloud@devstack1:~/devstack$ source openrc admin admin
WARNING: setting legacy OS_TENANT_NAME to support cli tools.
cloud@devstack1:~/devstack$ echo $OS_USERNAME
admin
cloud@devstack1:~/devstack$ echo $OS_PASSWORD
openstack123
cloud@devstack1:~/devstack

1. List the Projects (Tenants)

16
Keystone

cloud@devstack1:~/devstack$ openstack project list


+----------------------------------+--------------------+
| ID | Name |
+----------------------------------+--------------------+
| 3314475b00c54ecab56cedf094d98502 | alt_demo |
| 62b948dd49004bc48964262685631632 | admin |
| 84f868958c7941ad9f661f46a0150a45 | service |
| a01b133bfbd04cf8b4b189857d723aaf | demo |
| a18314bc67c64d7a904622da3436ae89 | red |
| fb2f50c7ecec4338acb4614253fae61d | invisible_to_admin |
+----------------------------------+--------------------+
cloud@devstack1:~/devstack$

2.Create a new Project

cloud@devstack1:~/devstack$ openstack project create --descripti


on "Blue Tenant" blue
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Blue Tenant |
| enabled | True |
| id | 98445401d0334a03a3c2e01fd6023fb3 |
| name | blue |
+-------------+----------------------------------+
cloud@devstack1:~/devstack$

3. Delete a Project

17
Keystone

cloud@devstack1:~/devstack$ openstack project delete blue


cloud@devstack1:~/devstack$ openstack project list
+----------------------------------+--------------------+
| ID | Name |
+----------------------------------+--------------------+
| 3314475b00c54ecab56cedf094d98502 | alt_demo |
| 62b948dd49004bc48964262685631632 | admin |
| 84f868958c7941ad9f661f46a0150a45 | service |
| a01b133bfbd04cf8b4b189857d723aaf | demo |
| a18314bc67c64d7a904622da3436ae89 | red |
| fb2f50c7ecec4338acb4614253fae61d | invisible_to_admin |
+----------------------------------+--------------------+
cloud@devstack1:~/devstack$

4. Create a new user

cloud@devstack1:~/devstack$ openstack user create --password blu


e123 blue
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | True |
| id | 9a4028db0936422a86313bb0b18411df |
| name | blue |
| username | blue |
+----------+----------------------------------+

5. List users

18
Keystone

cloud@devstack1:~/devstack$ openstack user list


+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 9d84fb2c650c4f8b9e24d069f5068fc3 | admin |
| 78fdfa16ec21402ca757c8f9eed32af1 | demo |
| 4ead3faa8f3d4ea8b10a17896fe2b078 | alt_demo |
| d3585b3a6f144a2e9bb9f6fda737e750 | nova |
| f00c1a8e0ddd4a9ab3526aada79260b9 | glance |
| c01b8b8c816f4b90b31e3ba2497e4e32 | cinder |
| 262528a5706c480eac2047887b9ad923 | neutron |
| 9216fdbb2fdf424c8215bd8d6b668105 | red |
| 9a4028db0936422a86313bb0b18411df | blue |
+----------------------------------+----------+
cloud@devstack1:~/devstack$

6.List Roles

cloud@devstack1:~/devstack$ openstack role list


+----------------------------------+---------------+
| ID | Name |
+----------------------------------+---------------+
| 473478d424034fb18f38765ba3f23a75 | anotherrole |
| 523dc876b6da436ba87dd390d1e44faf | Member |
| 77847571ea8842cc92addddcebccebce | service |
| 9fe2ff9ee4384b1894a90878d3e92bab | _member_ |
| e45766b55038491db7c02dead141c01f | ResellerAdmin |
| e64dbb4bea08458aabaa186c977429a7 | admin |
+----------------------------------+---------------+

7. Associate a Role,Project to the user

19
Keystone

cloud@devstack1:~/devstack$ openstack role add --project blue -


-user blue Member
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | None |
| id | 523dc876b6da436ba87dd390d1e44faf |
| name | Member |
+-----------+----------------------------------+
cloud@devstack1:~/devstack$

Exercises
1. Create a DEMO1 project with member user(name:demo1member) and
admin(name:admin) user.
2. Change the demo1member role to admin of DEMO1 project
3. Delete the demo1member user and DEMO1 project

References:
1. http://docs.openstack.org/developer/keystone/index.html
2. http://docs.openstack.org/developer/python-openstackclient/commands.html

20
Glance

Glance

Introduction
The Glance project provides a service where users can upload and discover data
assets that are meant to be used with other services. This currently includes
images and metadata definitions.

Glance image services include discovering, registering, and retrieving virtual


machine images. Glance has a RESTful API that allows querying of VM image
metadata as well as retrieval of the actual image.

Devstack Screens
OpenStack Image Service is split into two running services glance-api and glance-
registry

screen number (4) g-reg, (5) g-api are glance screen windows.
g-reg is a short form of glance-registry
g-api is a short form glance-api.

/usr/local/bin/glance-registry --config-file=/etc/glance/glance-registry.conf
/usr/local/bin/glance-api --config-file=/etc/glance/glance-api.conf

21
Exercises

Exercises

Exercise 1 :
Lets try our first exercise with CLI.

The objective

1. Create a new project named "red"


2. Create a new user named "red" and associate with "red" Project as a
MEMBER(Role).
3. Associate the admin user as admin Role for RED Project.
4. Create a private network named RED-PRIVATE1 with Subnet RED-
SUBNET1 192.168.101.0/24
5. create a security group "red-sec-group" to allow TCP,ICMP Traffic on both
sides
6. Create a instance redinstance1 with cirros image,64Mb Ram, RED-
PRIVATE1 network, red-sec-group security group
7. Create a floating IP and associate with the redinstance1
8. SSH to the redinstance1 and ping google.com

Before starting the

Note : To upgrade the openstack client sudo pip install --upgrade python-
openstackclient

cloud@devstack1:~/devstack$ source openrc admin admin


WARNING: setting legacy OS_TENANT_NAME to support cli tools.
cloud@devstack1:~/devstack$ openstack project create --descripti
on "Red Tenant" red
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Red Tenant |
| enabled | True |
| id | a18314bc67c64d7a904622da3436ae89 |

22
Exercises

| name | red |
+-------------+----------------------------------+
cloud@devstack1:~/devstack$ openstack project list
+----------------------------------+--------------------+
| ID | Name |
+----------------------------------+--------------------+
| 3314475b00c54ecab56cedf094d98502 | alt_demo |
| 62b948dd49004bc48964262685631632 | admin |
| 84f868958c7941ad9f661f46a0150a45 | service |
| a01b133bfbd04cf8b4b189857d723aaf | demo |
| a18314bc67c64d7a904622da3436ae89 | red |
| fb2f50c7ecec4338acb4614253fae61d | invisible_to_admin |
+----------------------------------+--------------------+
cloud@devstack1:~/devstack$
cloud@devstack1:~/devstack$ openstack user create --password red
123 red
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | True |
| id | 9216fdbb2fdf424c8215bd8d6b668105 |
| name | red |
| username | red |
+----------+----------------------------------+
cloud@devstack1:~/devstack$ openstack user list
+----------------------------------+----------+
| ID | Name |
+----------------------------------+----------+
| 9d84fb2c650c4f8b9e24d069f5068fc3 | admin |
| 78fdfa16ec21402ca757c8f9eed32af1 | demo |
| 4ead3faa8f3d4ea8b10a17896fe2b078 | alt_demo |
| d3585b3a6f144a2e9bb9f6fda737e750 | nova |
| f00c1a8e0ddd4a9ab3526aada79260b9 | glance |
| c01b8b8c816f4b90b31e3ba2497e4e32 | cinder |
| 262528a5706c480eac2047887b9ad923 | neutron |
| 9216fdbb2fdf424c8215bd8d6b668105 | red |
+----------------------------------+----------+
cloud@devstack1:~/devstack$ openstack role add --project red --u
ser red Member

23
Exercises

+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | None |
| id | 523dc876b6da436ba87dd390d1e44faf |
| name | Member |
+-----------+----------------------------------+
cloud@devstack1:~/devstack$
cloud@devstack1:~/devstack$ openstack role add --project red --u
ser admin admin
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | None |
| id | e64dbb4bea08458aabaa186c977429a7 |
| name | admin |
+-----------+----------------------------------+
cloud@devstack1:~/devstack$

cloud@devstack1:~/devstack$ source openrc red red


WARNING: setting legacy OS_TENANT_NAME to support cli tools.
cloud@devstack1:~/devstack$ export OS_PASSWORD=red123
cloud@devstack1:~/devstack$ echo $OS_PASSWORD
red123
cloud@devstack1:~/devstack$ openstack network create RED-PRIVAT
E1
+-------------------------+-------------------------------------
-+
| Field | Value
|
+-------------------------+-------------------------------------
-+
| admin_state_up | UP
|
| availability_zone_hints |
|
| availability_zones |
|
| created_at | 2016-07-31T06:17:36
|

24
Exercises

| description |
|
| headers |
|
| id | d1fedac3-5916-47bc-9dec-3c7211bc5168
|
| ipv4_address_scope | None
|
| ipv6_address_scope | None
|
| mtu | 1450
|
| name | RED-PRIVATE1
|
| port_security_enabled | True
|
| project_id | a18314bc67c64d7a904622da3436ae89
|
| router_external | Internal
|
| shared | False
|
| status | ACTIVE
|
| subnets |
|
| tags | []
|
| updated_at | 2016-07-31T06:17:36
|
+-------------------------+-------------------------------------
-+
cloud@devstack1:~/devstack$
cloud@devstack1:~/devstack$ openstack network list
+--------------------------------------+--------------+---------
----------------------------------------------------------------
---+
| ID | Name | Subnets

|

25
Exercises

+--------------------------------------+--------------+---------
----------------------------------------------------------------
---+
| 92f6d3cb-fa04-47b4-916d-5ccea2d91642 | public | 0d6f7d8d
-3482-45d2-a8b6-e3e1ff85799b, d0609613-802a-4f48-9de3-435735badf
d3 |
| d1fedac3-5916-47bc-9dec-3c7211bc5168 | RED-PRIVATE1 |

|
+--------------------------------------+--------------+---------
----------------------------------------------------------------
---+
cloud@devstack1:~/devstack$
cloud@devstack1:~/devstack$ openstack subnet create --subnet-ra
nge 192.168.101.0/24 --dhcp --gateway 192.168.101.1 --network RE
D-PRIVATE1 RED-SUBNET1
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| allocation_pools | 192.168.101.2-192.168.101.254 |
| cidr | 192.168.101.0/24 |
| created_at | 2016-07-31T06:21:43 |
| description | |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 192.168.101.1 |
| headers | |
| host_routes | |
| id | 1fa576c7-13f4-463e-99e2-38c5610dccd4 |
| ip_version | 4 |
| ipv6_address_mode | None |
| ipv6_ra_mode | None |
| name | RED-SUBNET1 |
| network_id | d1fedac3-5916-47bc-9dec-3c7211bc5168 |
| project_id | a18314bc67c64d7a904622da3436ae89 |
| subnetpool_id | None |
| updated_at | 2016-07-31T06:21:43 |
+-------------------+--------------------------------------+
cloud@devstack1:~/devstack$

26
Exercises

cloud@devstack1:~/devstack$ openstack network list


+--------------------------------------+--------------+---------
----------------------------------------------------------------
---+
| ID | Name | Subnets

|
+--------------------------------------+--------------+---------
----------------------------------------------------------------
---+
| 92f6d3cb-fa04-47b4-916d-5ccea2d91642 | public | 0d6f7d8d
-3482-45d2-a8b6-e3e1ff85799b, d0609613-802a-4f48-9de3-435735badf
d3 |
| d1fedac3-5916-47bc-9dec-3c7211bc5168 | RED-PRIVATE1 | 1fa576c7
-13f4-463e-99e2-38c5610dccd4
|
+--------------------------------------+--------------+---------
----------------------------------------------------------------
---+
cloud@devstack1:~/devstack$ openstack subnet list
+--------------------------------------+-------------+----------
----------------------------+------------------+
| ID | Name | Network
| Subnet |
+--------------------------------------+-------------+----------
----------------------------+------------------+
| 1fa576c7-13f4-463e-99e2-38c5610dccd4 | RED-SUBNET1 | d1fedac3-
5916-47bc-9dec-3c7211bc5168 | 192.168.101.0/24 |
+--------------------------------------+-------------+----------
----------------------------+------------------+
cloud@devstack1:~/devstack$ openstack security group create --de
scription "red security group" red-sec-group
+-------------+-------------------------------------------------
--------------------------------+
| Field | Value
|
+-------------+-------------------------------------------------
--------------------------------+
| description | red security group

27
Exercises

|
| headers |
|
| id | 7d614891-ffbb-4711-bf9c-eedf4262e9af
|
| name | red-sec-group
|
| project_id | a18314bc67c64d7a904622da3436ae89
|
| rules | direction='egress', ethertype='IPv4', id='db7e35
d9-2ace-429a-861e-97181cba1d8b' |
| | direction='egress', ethertype='IPv6', id='2f9618
bd-e63a-4995-990f-34d225716a63' |
+-------------+-------------------------------------------------
--------------------------------+
cloud@devstack1:~/devstack$
cloud@devstack1:~/devstack$ openstack security group rule delete
db7e35d9-2ace-429a-861e-97181cba1d8b
cloud@devstack1:~/devstack$ openstack security group rule delete
2f9618bd-e63a-4995-990f-34d225716a63
cloud@devstack1:~/devstack$
cloud@devstack1:~/devstack$ openstack security group rule create
--protocol icmp --egress red-sec-group
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| description | |
| direction | egress |
| ethertype | IPv4 |
| headers | |
| id | 72d638c3-ca2f-475b-9cc2-cfc24c6c06f0 |
| port_range_max | None |
| port_range_min | None |
| project_id | a18314bc67c64d7a904622da3436ae89 |
| protocol | icmp |
| remote_group_id | None |
| remote_ip_prefix | 0.0.0.0/0 |
| security_group_id | 7d614891-ffbb-4711-bf9c-eedf4262e9af |
+-------------------+--------------------------------------+
cloud@devstack1:~/devstack$ openstack security group rule create

28
Exercises

--protocol tcp --ingress red-sec-group


+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| description | |
| direction | ingress |
| ethertype | IPv4 |
| headers | |
| id | 9b2c9ba4-6463-4c3c-8b72-871125999fb2 |
| port_range_max | None |
| port_range_min | None |
| project_id | a18314bc67c64d7a904622da3436ae89 |
| protocol | tcp |
| remote_group_id | None |
| remote_ip_prefix | 0.0.0.0/0 |
| security_group_id | 7d614891-ffbb-4711-bf9c-eedf4262e9af |
+-------------------+--------------------------------------+

cloud@devstack1:~/devstack$ openstack security group rule create


--protocol tcp --egress red-sec-group
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| description | |
| direction | egress |
| ethertype | IPv4 |
| headers | |
| id | c861cfc6-0776-4b91-a4e4-1f6988175f88 |
| port_range_max | None |
| port_range_min | None |
| project_id | a18314bc67c64d7a904622da3436ae89 |
| protocol | tcp |
| remote_group_id | None |
| remote_ip_prefix | 0.0.0.0/0 |
| security_group_id | 7d614891-ffbb-4711-bf9c-eedf4262e9af |
+-------------------+--------------------------------------+
cloud@devstack1:~/devstack$
cloud@devstack1:~/devstack$ openstack security group rule create
--protocol icmp --ingress red-sec-group
+-------------------+--------------------------------------+

29
Exercises

| Field | Value |
+-------------------+--------------------------------------+
| description | |
| direction | ingress |
| ethertype | IPv4 |
| headers | |
| id | bdaf151b-56d7-4d84-853b-154bcf87a9d8 |
| port_range_max | None |
| port_range_min | None |
| project_id | a18314bc67c64d7a904622da3436ae89 |
| protocol | icmp |
| remote_group_id | None |
| remote_ip_prefix | 0.0.0.0/0 |
| security_group_id | 7d614891-ffbb-4711-bf9c-eedf4262e9af |
+-------------------+--------------------------------------+
cloud@devstack1:~/devstack$

cloud@devstack1:~/devstack$ openstack security group show red-se


c-group
+-------------+-------------------------------------------------
----------------------------------------------------------------
----------------+
| Field | Value

|
+-------------+-------------------------------------------------
----------------------------------------------------------------
----------------+
| description | red security group

|
| id | 7d614891-ffbb-4711-bf9c-eedf4262e9af

|
| name | red-sec-group

|
| project_id | a18314bc67c64d7a904622da3436ae89

|

30
Exercises

| rules | direction='egress', ethertype='IPv4', id='72d638


c3-ca2f-475b-9cc2-cfc24c6c06f0', protocol='icmp', remote_ip_pref
ix='0.0.0.0/0' |
| | direction='ingress', ethertype='IPv4', id='9b2c9
ba4-6463-4c3c-8b72-871125999fb2', protocol='tcp', remote_ip_pref
ix='0.0.0.0/0' |
| | direction='ingress', ethertype='IPv4', id='bdaf1
51b-56d7-4d84-853b-154bcf87a9d8', protocol='icmp', remote_ip_pre
fix='0.0.0.0/0' |
| | direction='egress', ethertype='IPv4', id='c861cf
c6-0776-4b91-a4e4-1f6988175f88', protocol='tcp', remote_ip_prefi
x='0.0.0.0/0' |
+-------------+-------------------------------------------------
----------------------------------------------------------------
----------------+
cloud@devstack1:~/devstack$

cloud@devstack1:~/devstack$ openstack server create


usage: openstack server create [-h] [-f {json,shell,table,value,
yaml}]
[-c COLUMN] [--max-width <integer
>]
[--noindent] [--prefix PREFIX]
(--image <image> | --volume <volu
me>) --flavor
<flavor>
[--security-group <security-group
-name>]
[--key-name <key-name>]
[--property <key=value>]
[--file <dest-filename=source-fil
ename>]
[--user-data <user-data>]
[--availability-zone <zone-name>]
[--block-device-mapping <dev-name
=mapping>]
[--nic <net-id=net-uuid,v4-fixed-
ip=ip-addr,v6-fixed-ip=ip-addr,port-id=port-uuid>]

31
Exercises

[--hint <key=value>]
[--config-drive <config-drive-vol
ume>|True]
[--min <count>] [--max <count>] [
--wait]
<server-name>
openstack server create: error: too few arguments
cloud@devstack1:~/devstack$ openstack image list
+--------------------------------------+------------------------
---------+--------+
| ID | Name
| Status |
+--------------------------------------+------------------------
---------+--------+
| 32d7cb58-aadc-4853-a888-2b56556c914e | cirros-0.3.4-x86_64-uec
| active |
| 7ca2ec87-ad98-4149-92d5-4c7bf02ea2b0 | cirros-0.3.4-x86_64-uec
-ramdisk | active |
| c8595f74-2318-454e-a012-99322bb5589d | cirros-0.3.4-x86_64-uec
-kernel | active |
+--------------------------------------+------------------------
---------+--------+
cloud@devstack1:~/devstack$ openstack flavor list
+----+-----------+-------+------+-----------+-------+-----------
+
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public
|
+----+-----------+-------+------+-----------+-------+-----------
+
| 1 | m1.tiny | 512 | 1 | 0 | 1 | True
|
| 2 | m1.small | 2048 | 20 | 0 | 1 | True
|
| 3 | m1.medium | 4096 | 40 | 0 | 2 | True
|
| 4 | m1.large | 8192 | 80 | 0 | 4 | True
|
| 42 | m1.nano | 64 | 0 | 0 | 1 | True
|
| 5 | m1.xlarge | 16384 | 160 | 0 | 8 | True

32
Exercises

|
| 84 | m1.micro | 128 | 0 | 0 | 1 | True
|
+----+-----------+-------+------+-----------+-------+-----------
+
cloud@devstack1:~/devstack$

cloud@devstack1:~/devstack$ openstack network list



+--------------------------------------+--------------+---------
----------------------------------------------------------------
---+
| ID | Name | Subnets

|
+--------------------------------------+--------------+---------
----------------------------------------------------------------
---+
| 92f6d3cb-fa04-47b4-916d-5ccea2d91642 | public | 0d6f7d8d
-3482-45d2-a8b6-e3e1ff85799b, d0609613-802a-4f48-9de3-435735badf
d3 |
| d1fedac3-5916-47bc-9dec-3c7211bc5168 | RED-PRIVATE1 | 1fa576c7
-13f4-463e-99e2-38c5610dccd4
|
+--------------------------------------+--------------+---------
----------------------------------------------------------------
---+
cloud@devstack1:~/devstack$
cloud@devstack1:~/devstack$ openstack server create --image cirr
os-0.3.4-x86_64-uec --flavor m1.nano --security-group red-sec-gr
oup --nic net-id=d1fedac3-5916-47bc-9dec-3c7211bc5168 redinstanc
e1
+--------------------------------------+------------------------
----------------------------------------+
| Field | Value
|
+--------------------------------------+------------------------
----------------------------------------+
| OS-DCF:diskConfig | MANUAL

33
Exercises

|
| OS-EXT-AZ:availability_zone |
|
| OS-EXT-STS:power_state | NOSTATE
|
| OS-EXT-STS:task_state | scheduling
|
| OS-EXT-STS:vm_state | building
|
| OS-SRV-USG:launched_at | None
|
| OS-SRV-USG:terminated_at | None
|
| accessIPv4 |
|
| accessIPv6 |
|
| addresses |
|
| adminPass | 3u5eVjCj9MBA
|
| config_drive |
|
| created | 2016-07-31T06:36:23Z
|
| flavor | m1.nano (42)
|
| hostId |
|
| id | dae3ce19-7f67-474b-956b
-2265d31d09ae |
| image | cirros-0.3.4-x86_64-uec
(32d7cb58-aadc-4853-a888-2b56556c914e) |
| key_name | None
|
| name | redinstance1
|
| os-extended-volumes:volumes_attached | []
|
| progress | 0

34
Exercises

|
| project_id | a18314bc67c64d7a904622d
a3436ae89 |
| properties |
|
| security_groups | [{u'name': u'red-sec-gr
oup'}] |
| status | BUILD
|
| updated | 2016-07-31T06:36:24Z
|
| user_id | 9216fdbb2fdf424c8215bd8
d6b668105 |
+--------------------------------------+------------------------
----------------------------------------+
cloud@devstack1:~/devstack$

35
Devstack Neutron services

Neutron optional services


To enable the qos

enable_service q-qos

To enable LBAASv1

enable_plugin neutron-lbaas https://github.com/openstack/neutron


-lbaas.git stable/ocata
enable_service q-lbaas

To enable LBAASv2

enable_plugin neutron-lbaas https://github.com/openstack/neutron


-lbaas.git stable/ocata
enable_service q-lbaasv2

To Enable FWaasv2

enable_plugin neutron-fwaas https://git.openstack.org/openstack/


neutron-fwaas stable/ocata
enable_service q-fwaas-v2

To Enable FWAASv1

enable_plugin neutron-fwaas https://git.openstack.org/openstack/


neutron-fwaas stable/ocata
enable_service q-fwaas-v1

36
Neutron Networking explained

Neutron Networking explained


This is going to be huge topic, Lets go chapter or concepts wise.

How VMs(instances) communicate with internet(NAT Explained)*


xxx
xxx

Basics explained
1. The default logical router(Router1), private network(10.0.0.x) and public
network (172.24.4.x) is created as part of the default installation.
2. This Router1 is connected with the private network and public network, to
route traffic. It has the capability to do SNAT(PAT), DNAT(for meta service)
and One to One NAT(floating IP).
3. Router1 is running in the separate Linux network namespace.
4. Router1 has attached with two ports(interfaces) (private interface -10.0.0.1
and public interface - 172.24.4.2), and it does NATing using iptables to enable
the VMs to communicate the external world.
5. SNAT is enabled by default.
6. User can create a Router and attach with the private networks and set the
gateway(public network).

How to check the Router

In the devstack linux console, execute the sudo ip netns list command.

37
Neutron Networking explained

cloud@devstack:~/devstack$ sudo ip netns list


qrouter-ebd609d2-5b34-44b0-91f6-96658fbbf7e1

qdhcp-15e84436-77ba-45e9-a478-705a354749e4

qdhcp-def791d3-9e2c-433e-b839-6faf93ee0270

qrouter-e0b7340e-e412-4401-9101-1a4797eff44c

qdhcp-7359af35-d185-451c-ad97-bfc732c2189a

cloud@devstack:~/devstack$

In the above output, it displays two routers (qrouter-ebd609d2-5b34-44b0-91f6-


96658fbbf7e1, qrouter-e0b7340e-e412-4401-9101-1a4797eff44c). I have created
one for testing.

To Check the interfaces available in the router ip netns exec

ip netns exec qrouter-e0b7340e-e412-4401-9101-1a4797eff44c ifconfig

cloud@devstack:~/devstack$ sudo ip netns exec qrouter-e0b7340e-e


412-4401-9101-1a4797eff44c ifconfig

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

qg-4a4c7003-ed Link encap:Ethernet HWaddr fa:16:3e:1c:ba:e9


inet addr:172.24.4.2 Bcast:172.24.4.255 Mask:255.255
.255.0
inet6 addr: fe80::f816:3eff:fe1c:bae9/64 Scope:Link
UP BROADCAST RUNNING MTU:1450 Metric:1
RX packets:37 errors:0 dropped:0 overruns:0 frame:0

38
Neutron Networking explained

TX packets:20 errors:0 dropped:0 overruns:0 carrier:0


collisions:0 txqueuelen:0
RX bytes:2540 (2.5 KB) TX bytes:1336 (1.3 KB)

qr-7443f2c0-35 Link encap:Ethernet HWaddr fa:16:3e:9d:4c:15


inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255
.0
inet6 addr: fe80::f816:3eff:fe9d:4c15/64 Scope:Link
UP BROADCAST RUNNING MTU:1450 Metric:1
RX packets:1239 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:146142 (146.1 KB) TX bytes:874 (874.0 B)

qr-87bd7eff-53 Link encap:Ethernet HWaddr fa:16:3e:fc:03:da


inet6 addr: fe80::f816:3eff:fefc:3da/64 Scope:Link
inet6 addr: fd55:5b78:8eb1::1/64 Scope:Global
UP BROADCAST RUNNING MTU:1450 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1244 errors:0 dropped:0 overruns:0 carrier:
0
collisions:0 txqueuelen:0
RX bytes:78 (78.0 B) TX bytes:146640 (146.6 KB)

cloud@devstack:~/devstack$

In this , qr-7443f2c0-35(10.0.0.1) connected to the private nework and qr-


7443f2c0-35(172.24.4.2) connected to the public network(external network).

We can login to this namespace console and execute all the linux commands.

ip netns exec bash

Example

cloud@devstack:~/devstack$ sudo ip netns exec qrouter-e0b7340e-e


412-4401-9101-1a4797eff44c bash
root@devstack:~/devstack# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0

39
Neutron Networking explained

inet6 addr: ::1/128 Scope:Host


UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

qg-4a4c7003-ed Link encap:Ethernet HWaddr fa:16:3e:1c:ba:e9


inet addr:172.24.4.2 Bcast:172.24.4.255 Mask:255.255
.255.0
inet6 addr: fe80::f816:3eff:fe1c:bae9/64 Scope:Link
UP BROADCAST RUNNING MTU:1450 Metric:1
RX packets:37 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2540 (2.5 KB) TX bytes:1336 (1.3 KB)

qr-7443f2c0-35 Link encap:Ethernet HWaddr fa:16:3e:9d:4c:15


inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255
.0
inet6 addr: fe80::f816:3eff:fe9d:4c15/64 Scope:Link
UP BROADCAST RUNNING MTU:1450 Metric:1
RX packets:1249 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:147322 (147.3 KB) TX bytes:874 (874.0 B)

qr-87bd7eff-53 Link encap:Ethernet HWaddr fa:16:3e:fc:03:da


inet6 addr: fe80::f816:3eff:fefc:3da/64 Scope:Link
inet6 addr: fd55:5b78:8eb1::1/64 Scope:Global
UP BROADCAST RUNNING MTU:1450 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1254 errors:0 dropped:0 overruns:0 carrier:
0
collisions:0 txqueuelen:0
RX bytes:78 (78.0 B) TX bytes:147820 (147.8 KB)

root@devstack:~/devstack#

root@devstack:~/devstack# iptables -t nat -L

40
Neutron Networking explained

Chain PREROUTING (policy ACCEPT)


target prot opt source destination
neutron-l3-agent-PREROUTING all -- anywhere anywh
ere

Chain INPUT (policy ACCEPT)


target prot opt source destination

Chain OUTPUT (policy ACCEPT)


target prot opt source destination
neutron-l3-agent-OUTPUT all -- anywhere anywhere

Chain POSTROUTING (policy ACCEPT)


target prot opt source destination
neutron-l3-agent-POSTROUTING all -- anywhere anyw
here
neutron-postrouting-bottom all -- anywhere anywhe
re

Chain neutron-l3-agent-OUTPUT (1 references)


target prot opt source destination

Chain neutron-l3-agent-POSTROUTING (1 references)


target prot opt source destination
ACCEPT all -- anywhere anywhere !
ctstate DNAT

Chain neutron-l3-agent-PREROUTING (1 references)


target prot opt source destination
REDIRECT tcp -- anywhere 169.254.169.254 tc
p dpt:http redir ports 9697

Chain neutron-l3-agent-float-snat (1 references)


target prot opt source destination

Chain neutron-l3-agent-snat (1 references)


target prot opt source destination
neutron-l3-agent-float-snat all -- anywhere anywh
ere

41
Neutron Networking explained

SNAT all -- anywhere anywhere to


:172.24.4.2
SNAT all -- anywhere anywhere ma
rk match ! 0x2/0xffff ctstate DNAT to:172.24.4.2

Chain neutron-postrouting-bottom (1 references)


target prot opt source destination
neutron-l3-agent-snat all -- anywhere anywhere
/* Perform source NAT on outgoing traffic. */
root@devstack:~/devstack#

In this, iptables nat table,

"neutron-l3-agent-snat" tale , the below line enables SNAT for all the private
networks connected to this router. this is the default configuration.

SNAT all -- anywhere anywhere to


:172.24.4.2

In this, iptables nat table, "neutron-l3-agent-float-snat" table is for FLOATING


IP(one to one mapping. In out above example we dont have any VMs associated
with floating IP. Hence its empty.

Chain neutron-l3-agent-float-snat (1 references)


target prot opt source destination

References
http://docs.openstack.org/mitaka/networking-guide/intro-nat.html
https://www.mirantis.com/blog/identifying-and-troubleshooting-neutron-
namespaces/
https://www.cyberciti.biz/faq/howto-iptables-show-nat-rules/
http://www.dasblinkenlichten.com/an-introduction-to-network-namespaces/
http://docs.openstack.org/newton/networking-guide/intro-network-
namespaces.html
http://blog.scottlowe.org/2013/09/04/introducing-linux-network-namespaces/

42
Neutron Networking explained

43
DevStack with OpenContrail

DevStack with OpenContrail


In this chapter, we will learn about opencontrail installation in devstack.

1.Introduction
What is opencontrail?

To do

2.Installation Procedure
Installation procedure is same as DEVSTACK installation, only local.conf file
needs to be updated with opencontrail information.

In your home folder, Clone the devstack from the openstack git repository and
change it to the mitaka release

cd
git clone https://github.com/openstack-dev/devstack
cd devstack
git checkout stable/mitaka

create local.conf file

create a local.conf file in your devstack folder with below contents

local.conf

44
DevStack with OpenContrail

[[local|localrc]]
SERVICE_TOKEN=azertytoken
ADMIN_PASSWORD=contrail123
MYSQL_PASSWORD=stackdb
RABBIT_PASSWORD=stackqueue
SERVICE_PASSWORD=$ADMIN_PASSWORD
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
enable_plugin contrail https://github.com/zioc/contrail-
devstack-plugin.git
CONTRAIL_REPO=https://github.com/Juniper/contrail-vnc.gi
t
CONTRAIL_BRANCH=R3.1
SCONS_JOBS=$(lscpu -p | grep -cve '^#')

In the local.conf file,

Included the contrail devstack plugin details which builds the contr
Mentioned the contrail official repo details in CONTRAIL_REPO variable
Mentioned the contrail branch(version) details in CONTRAIL_BRANCH
variable
SCONS_JOBS mentions the number of processors to be used for building
the contrail.

On successful installation, you will see the below output

45
DevStack with OpenContrail

========================
DevStack Components Timed
========================

run_process - 85 secs
test_with_retry - 3 secs
apt-get-update - 4 secs
pip_install - 86 secs
restart_apache_server - 10 secs
wait_for_service - 11 secs
git_timed - 229 secs
apt-get - 28 secs

This is your host IP address: 10.10.10.5


This is your host IPv6 address: ::1
Horizon is now available at http://10.10.10.5/dashboard
Keystone is serving at http://10.10.10.5:5000/
The default users are: admin and demo
The password: contrail123

Debugging the Failed installation


During my exercise, The installation was failed two times.

Failure1 First time, installation failed with the below error,

2016-08-02 13:34:34.369 | Unable to find pgen, not compiling


formal grammar.
2016-08-02 13:34:34.369 | Traceback (most recent call last):
2016-08-02 13:34:34.369 | File "<string>", line 1, in <mod
ule>

This error is due to missing of cython3 package in the system.

solution:

46
DevStack with OpenContrail

Install the cycthon3 package as below,

sudo apt-get install cython3

Failure2

Second time, installation failed with below error

2016-08-02 13:55:10.156 | Issuing command: ['npm', 'install', '/


tmp/cache/cloud/webui_third_party/webworker-threads-0.7.4.tar.gz
', '--prefix', '/tmp/cache/cloud/webui_third_party']
2016-08-02 13:55:10.156 | Terminating: ProcessPackage with retur
n code: 1
2016-08-02 13:55:10.158 | make: *** [fetch-pkgs-prod] Error 1
2016-08-02 13:55:10.164 | +^[[3242m/opt/stack/contrail/devstack/
plugin.sh:configure_webui:1 ^[[m^O exit_trap
2016-08-02 13:55:10.168 | +^[[3242m./stack.sh:exit_trap:474
^[[m^O local r=2

This error is due to missing of nodejs-legacy package.

solution

Install the nodejs-legacy package as below,

sudo apt-get install nodejs-legacy

3.Screens
You will get two screens, one screen for openstack, other one for opencontrail.

cloud@devstack1:~/devstack$ screen -ls


There are screens on:
7981.contrail (08/02/16 15:07:55) (Detached)
27734.stack (08/02/16 15:04:38) (Detached)
2 Sockets in /var/run/screen/S-cloud.

47
DevStack with OpenContrail

cloud@devstack1:~/devstack$

Openstack Screen

To enter in to openstack screen,

cloud@devstack1:~/devstack$ screen -x stack

Openstack screen consists of shell,dstat,key,key-access,g-reg,g-api,q-svc,n-


api,n-cond,n-sch,n-novnc,n-cauth,n-cpu,c-api,c-vol,horizon screen windows.
In Horizon,Keystone,Glance,Nova services, Screen Windows are not
changed
In Neutron service , only q-svc window is present. Remainig processes are
not (q-agt,q-dhcp,q-l3,q-meta) are not enabled in the local.conf, as these
functionalities are handled by opencontrail.

Opencontrail Screen

To enter in to opencontrail screen,

cloud@devstack1:~/devstack$ screen -x contrail

48
DevStack with OpenContrail

opencontrail screen consists of shell,vrouter,api-srv,disco,svc-


mon,schema,control,collector, analytic-api,auery-engine,dns,named,ui-jobs,ui-
webs windows.

OpenContrail UI is running on port 8080 http:// :8080

The default username is "admin" , and the password is mentioned in the


local.conf. In our case, it is "contrail123"

49
DevStack with OpenContrail

4.How to Use
To be updated

5.Exercises
To be updated

50
Devstack with BagPipe Driver

Devstack with BagPipe Driver


cloud@bagpipe-2:~/devstack$ cat local.conf

[[local|localrc]]
#USE_CONSTRAINTS=True
ROOTSLEEP=0
DATA_DIR=$TOP_DIR/data
SCREEN_LOGDIR=/opt/stack/logs/screen
#VERBOSE=True
LOGFILE=/opt/stack/logs/stack.sh.log

ADMIN_PASSWORD=password
MYSQL_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=token

ENABLED_SERVICES=q-svc,q-meta,q-agt,q-dhcp,q-l3,key,mysql,rabbit
,heat,h-api,h-api-cfn,h-api-cw,h-eng,b-bgp
if [ ! -z $FAKERR ]; then ENABLED_SERVICES+=,b-fakerr; fi
#ENABLED_SERVICES+=,g-api,g-reg,n-api,n-crt,n-cpu,n-cond,n-sch,n
-obj,horizon

### NEUTRON ###


### ML2 core plugin ###
NEUTRON_CREATE_INITIAL_NETWORKS=False

Q_PLUGIN=ml2
Q_ML2_PLUGIN_TYPE_DRIVERS=vxlan
Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,l2population

### BGPVPN Service Plugin ###


enable_plugin networking-bgpvpn git://git.openstack.org/openstac
k/networking-bgpvpn.git

51
Devstack with BagPipe Driver

### Activate bagpipe devstack plugins ###


enable_plugin networking-bagpipe git://git.openstack.org/opensta
ck/networking-bagpipe.git

### Configure bagpipe ###


BAGPIPE_DATAPLANE_DRIVER_IPVPN=mpls_ovs_dataplane.MPLSOVSDatapla
neDriver

### Set bagpipe as the bgpvpn driver ###


NETWORKING_BGPVPN_DRIVER=BGPVPN:BaGPipe:networking_bgpvpn.neutro
n.services.service_drivers.bagpipe.bagpipe.BaGPipeBGPVPNDriver:d
efault

### ML2/ovs_agent config ###


[[post-config|/$Q_PLUGIN_CONF_FILE]]
[ml2]
tenant_network_types=vxlan

[openvswitch]
tunnel_types=vxlan

[ml2_type_vxlan]
vni_ranges = 1001:2000

[agent]
l2_population=True
arp_responder=True

cloud@bagpipe-2:~/devstack$

52
Devstack with LBAAS

Devstack with LBAAS


The below local.conf will build the devstack with neutron LBAAS (+haproxy)

cloud@lbaas2:~$ git clone https://github.com/openstack-dev/devst


ack
Cloning into 'devstack'...
remote: Counting objects: 35002, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 35002 (delta 5), reused 0 (delta 0), pack-reused 3
4990
Receiving objects: 100% (35002/35002), 10.94 MiB | 10.90 MiB/s,
done.
Resolving deltas: 100% (24412/24412), done.
Checking connectivity... done.
cloud@lbaas2:~$ cd devstack/
cloud@lbaas2:~/devstack$ git checkout stable/mitaka
Branch stable/mitaka set up to track remote branch stable/mitaka
from origin.
Switched to a new branch 'stable/mitaka'
cloud@lbaas2:~/devstack$

Local.conf

53
Devstack with LBAAS

[[local|localrc]]
enable_plugin neutron-lbaas https://github.com/openstack/neutron
-lbaas.git stable/mitaka
SERVICE_TOKEN=mytoken123
ADMIN_PASSWORD=openstack123
MYSQL_PASSWORD=mysql123
RABBIT_PASSWORD=rabbit123
SERVICE_PASSWORD=$ADMIN_PASSWORD
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
VERBOSE=True
LOG_COLOR=True
NEUTRON_LBASS_CONF=/etc/neutron/neutron_lbaas.conf

disable_service n-net
enable_service q-svc q-agt q-dhcp q-l3 q-meta q-lbaasv2
[[post-config|$NEUTRON_CONF]]
[DEFAULT]
service_plugins+=,neutron_lbaas.services.loadbalancer.plugin.Loa
dBalancerPluginv2
[[post-config|NEUTRON_LBAAS_CONF]]
[service_providers]
service_provider = LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.
haproxy.plugin_driver.HaproxyOnHostPluginDriver:default

Install the haproxy manually(apt-get),before start the devstack.

Create the lbaas_agent.ini file as below

cloud@dev1:/etc/neutron$ cat lbaas_agent.ini


[DEFAULT]
interface_driver = openvswitch
cloud@dev1:/etc/neutron$

Start the LBAAS agent manually

54
Devstack with LBAAS

neutron-lbaasv2-agent --config-file /etc/neutron/neutron.conf --


config-file /etc/neutron/neutron_lbaas.conf --config-file /etc/n
eutron/lbaas_agent.ini

Enable LBAAS in HORIZON DASHBOARD

Ref:
http://docs.openstack.org/mitaka/networking-guide/adv-config-lbaas.html

Devstack + opencontrail + Lbaas

[[local|localrc]]
SERVICE_TOKEN=azertytoken
ADMIN_PASSWORD=contrail123
MYSQL_PASSWORD=stackdb
RABBIT_PASSWORD=stackqueue
SERVICE_PASSWORD=$ADMIN_PASSWORD
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
SWIFT_REPLICAS=1
SWIFT_DATA_DIR=$DEST/data

enable_service tempest

enable_plugin contrail https://github.com/zioc/contrail-devstack


-plugin.git
enable_plugin neutron-lbaas https://github.com/openstack/neutron
-lbaas.git stable/mitaka

CONTRAIL_REPO=https://github.com/eonpatapon/contrail-vnc.git
CONTRAIL_BRANCH=R2.21-cloudwatt
SCONS_JOBS=$(lscpu -p | grep -cve '^#')

[[post-config|$NEUTRON_CONF]]
[DEFAULT]
service_plugins = neutron_plugin_contrail.plugins.opencontrail.l
oadbalancer.plugin.LoadBalancerPlugin

55
Devstack with LBAAS

[quotas]
quota_driver = neutron_plugin_contrail.plugins.opencontrail.quot
a.driver.QuotaDriver

[service_providers]
service_provider = LOADBALANCER:Haproxy:neutron_plugin_contrail.
plugins.opencontrail.loadbalancer.driver.OpencontrailLoadbalance
rDriver:default

[[post-config|$NOVA_CONF]]
[libvirt]
vif_driver = nova_contrail_vif.contrailvif.VRouterVIFDriver
virt_type = qemu

56
Tempest - Openstack Testing Project

Tempest Tests

Introduction
Tempest is a set of integration tests to be run against a live OpenStack cluster.
Tempest has batteries of tests for OpenStack API validation, Scenarios, and other
specific tests useful in validating an OpenStack deployment.

Tempest tests are available in two methods

As part of tempest project source code.


As part of their own project and available to tempest via plugin interface (eg:
networking_bgpvpn project)

How to run
1. Download the tempest code
2. Create the tempest workspace
3. configure the tempest config file
4. Execute the tests

Ref:

http://docs.openstack.org/infra/manual/developers.html
http://docs.openstack.org/infra/manual/sandbox.html#sandbox

57
Rally - Openstack Benchmarking Project

Rally - Openstack Benchmarking Project

Introduction
Rally is a Benchmark-as-a-Service project for OpenStack.

Rally is intended to provide the community with a benchmarking tool that is


capable of performing specific, complicated and reproducible test cases on real
deployment scenarios.

How to run

Installation
Execute the following command

wget -q -O- https://raw.githubusercontent.com/openstack/rally/ma


ster/install_rally.sh | bash

Once installation is successful, the output is below,

58
Rally - Openstack Benchmarking Project

==============================
Installation of Rally is done!
==============================

In order to work with Rally you have to enable the virtual envir
onment
with the command:

. /home/cloud/rally/bin/activate

You need to run the above command on every new shell you open be
fore
using Rally, but just once per session.

Information about your Rally installation:

* Method: virtualenv
* Virtual Environment at: /home/cloud/rally
* Database at: /home/cloud/rally/database
* Configuration file at: /home/cloud/rally/etc/rally
* Samples at: /home/cloud/rally/samples

Setting up
1. Setting up

. /home/cloud/rally/bin/activate

1. source the openrc file

(rally)cloud@stack-2:~/devstack$ source openrc admin admin


WARNING: setting legacy OS_TENANT_NAME to support cli tools.
(rally)cloud@stack-2:~/devstack$

2. Add the openstack deployment details in rally for testing

59
Rally - Openstack Benchmarking Project

(rally)cloud@stack-2:~/devstack$ rally deployment create --frome


nv --name=mydevstack
2016-08-19 04:19:20.738 18145 INFO rally.common.plugin.discover
[-] Loading plugins from directories /home/cloud/.rally/plugins/
*
2016-08-19 04:19:20.743 18145 INFO rally.common.plugin.discover
[-] Loaded module with plugins: /home/cloud/.rally/plugins/
samples/context/context_plugin.py
2016-08-19 04:19:20.744 18145 INFO rally.common.plugin.discover
[-] Loaded module with plugins: /home/cloud/.rally/plugins/
samples/sla/sla_plugin.py
2016-08-19 04:19:20.744 18145 INFO rally.common.plugin.discover
[-] Loaded module with plugins: /home/cloud/.rally/plugins/
samples/runner/runner_plugin.py
2016-08-19 04:19:20.747 18145 INFO rally.common.plugin.discover
[-] Loaded module with plugins: /home/cloud/.rally/plugins/
samples/scenario/scenario_plugin.py
2016-08-19 04:19:21.105 18145 INFO rally.deployment.engine [-] D
eployment 0bed832c-d663-49fe-9c2e-fe47fbb4cae9 | Starting: Open
Stack cloud deployment.
2016-08-19 04:19:21.125 18145 INFO rally.deployment.engine [-] D
eployment 0bed832c-d663-49fe-9c2e-fe47fbb4cae9 | Completed: Open
Stack cloud deployment.
+--------------------------------------+------------------------
----+------------+------------------+--------+
| uuid | created_at
| name | status | active |
+--------------------------------------+------------------------
----+------------+------------------+--------+
| 0bed832c-d663-49fe-9c2e-fe47fbb4cae9 | 2016-08-19 04:19:21.093
411 | mydevstack | deploy->finished | |
+--------------------------------------+------------------------
----+------------+------------------+--------+
Using deployment: 0bed832c-d663-49fe-9c2e-fe47fbb4cae9
~/.rally/openrc was updated

HINTS:
* To get your cloud resources, run:
rally show [flavors|images|keypairs|networks|secgroups]

60
Rally - Openstack Benchmarking Project

* To use standard OpenStack clients, set up your env by running:


source ~/.rally/openrc
OpenStack clients are now configured, e.g run:
openstack image list
(rally)cloud@stack-2:~/devstack$

1. Execute sample rally commands

(rally)cloud@stack-2:~/devstack$ rally deployment check


keystone endpoints are valid and following services are availabl
e:
+-------------+----------------+-----------+
| services | type | status |
+-------------+----------------+-----------+
| __unknown__ | compute_legacy | Available |
| __unknown__ | volumev2 | Available |
| cinder | volume | Available |
| glance | image | Available |
| keystone | identity | Available |
| neutron | network | Available |
| nova | compute | Available |
+-------------+----------------+-----------+
NOTE: '__unknown__' service name means that Keystone service cat
alog doesn't return name for this service and Rally can not iden
tify service by its type. BUT you still can use such services wi
th api_versions context, specifying type of service (execute `ra
lly plugin show api_versions` for more details).
(rally)cloud@stack-2:~/devstack$
(rally)cloud@stack-2:~/devstack$ rally show flavors

Flavors for user `admin` in tenant `admin`:


+----+-----------+-------+----------+-----------+-----------+
| ID | Name | vCPUs | RAM (MB) | Swap (MB) | Disk (GB) |
+----+-----------+-------+----------+-----------+-----------+
| 1 | m1.tiny | 1 | 512 | n/a | 1 |
| 2 | m1.small | 1 | 2048 | n/a | 20 |
| 3 | m1.medium | 2 | 4096 | n/a | 40 |
| 4 | m1.large | 4 | 8192 | n/a | 80 |
| 42 | m1.nano | 1 | 64 | n/a | 0 |

61
Rally - Openstack Benchmarking Project

| 5 | m1.xlarge | 8 | 16384 | n/a | 160 |


| 84 | m1.micro | 1 | 128 | n/a | 0 |
+----+-----------+-------+----------+-----------+-----------+
(rally)cloud@stack-2:~/devstack$ rally show images

Images for user `admin` in tenant `admin`:


+--------------------------------------+------------------------
---------+----------+
| UUID | Name
| Size (B) |
+--------------------------------------+------------------------
---------+----------+
| 24737fab-4909-467e-8061-6ddeaef468c8 | cirros-0.3.4-x86_64-uec
-ramdisk | 3740163 |
| 35bad9a6-10e7-4c04-a519-448f0d1fb672 | cirros-0.3.4-x86_64-uec
-kernel | 4979632 |
| 39a32d0b-a957-4c85-b065-2066f56846fc | cirros-0.3.4-x86_64-uec
| 25165824 |
+--------------------------------------+------------------------
---------+----------+
(rally)cloud@stack-2:~/devstack$

Execute sample test


sample tests are available inside rally/samples/tasks/scenarios folder. boot-and-
delete.json is one of the test file which boots and deletes a 100 VM in parallel.
This test may take long time to finish.

For sample execution, we will just modify this test input to run 1 VM as below.

62
Rally - Openstack Benchmarking Project

(rally)cloud@stack-2:~$ mkdir mytest


(rally)cloud@stack-2:~$ cd mytest/
(rally)cloud@stack-2:~/mytest$
(rally)cloud@stack-2:~/mytest$ cp /home/cloud/rally/samples/task
s/scenarios/nova/boot-and-delete.json .
(rally)cloud@stack-2:~/mytest$ vi boot-and-delete.json
(rally)cloud@stack-2:~/mytest$ cat boot-and-delete.json
{% set flavor_name = flavor_name or "m1.tiny" %}
{
"NovaServers.boot_and_delete_server": [
{
"args": {
"flavor": {
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"
},
"force_delete": false
},
"runner": {
"type": "constant",
"times": 1,
"concurrency": 1
},
"context": {
"users": {
"tenants": 1,
"users_per_tenant": 1
}
}
}
]
}
(rally)cloud@stack-2:~/mytest$

we will run this test as below,

(rally)cloud@stack-2:~/mytest$ rally task start boot-and-delete.

63
Rally - Openstack Benchmarking Project

json
2016-08-19 04:55:08.066 19107 INFO rally.common.plugin.discover
[-] Loading plugins from directories /home/cloud/.rally/plugins/
*
2016-08-19 04:55:08.067 19107 INFO rally.common.plugin.discover
[-] Loaded module with plugins: /home/cloud/.rally/plugins/
samples/context/context_plugin.py
2016-08-19 04:55:08.067 19107 INFO rally.common.plugin.discover
[-] Loaded module with plugins: /home/cloud/.rally/plugins/
samples/sla/sla_plugin.py
2016-08-19 04:55:08.067 19107 INFO rally.common.plugin.discover
[-] Loaded module with plugins: /home/cloud/.rally/plugins/
samples/runner/runner_plugin.py
2016-08-19 04:55:08.070 19107 INFO rally.common.plugin.discover
[-] Loaded module with plugins: /home/cloud/.rally/plugins/
samples/scenario/scenario_plugin.py
----------------------------------------------------------------
----------------
Preparing input task
----------------------------------------------------------------
----------------

Input task is:

{
"NovaServers.boot_and_delete_server": [
{
"args": {
"flavor": {
"name": "m1.tiny"
},
"image": {
"name": "^cirros.*uec$"
},
"force_delete": false
},
"runner": {
"type": "constant",
"times": 1,
"concurrency": 1

64
Rally - Openstack Benchmarking Project

},
"context": {
"users": {
"tenants": 1,
"users_per_tenant": 1
}
}
}
]
}

Task syntax is correct :)


2016-08-19 04:55:08.322 19107 INFO rally.task.engine [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | Starting: Task validation.
2016-08-19 04:55:08.334 19107 INFO rally.task.engine [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | Starting: Task validation
of scenarios names.
2016-08-19 04:55:08.335 19107 INFO rally.task.engine [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | Completed: Task validation
of scenarios names.
2016-08-19 04:55:08.335 19107 INFO rally.task.engine [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | Starting: Task validation
of syntax.
2016-08-19 04:55:08.339 19107 INFO rally.task.engine [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | Completed: Task validation
of syntax.
2016-08-19 04:55:08.339 19107 INFO rally.task.engine [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | Starting: Task validation
of semantic.
2016-08-19 04:55:08.339 19107 INFO rally.task.engine [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | Starting: Task validation
check cloud.
2016-08-19 04:55:08.492 19107 INFO rally.task.engine [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | Completed: Task validation
check cloud.
2016-08-19 04:55:08.498 19107 INFO rally.plugins.openstack.conte
xt.keystone.users [-] Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d
| Starting: Enter context: `users`
2016-08-19 04:55:08.731 19107 INFO rally.plugins.openstack.conte
xt.keystone.users [-] Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d

65
Rally - Openstack Benchmarking Project

| Completed: Enter context: `users`


2016-08-19 04:55:09.234 19107 INFO rally.plugins.openstack.conte
xt.keystone.users [-] Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d
| Starting: Exit context: `users`
2016-08-19 04:55:10.802 19107 INFO rally.plugins.openstack.conte
xt.keystone.users [-] Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d
| Completed: Exit context: `users`
2016-08-19 04:55:10.802 19107 INFO rally.task.engine [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | Completed: Task validation
of semantic.
2016-08-19 04:55:10.802 19107 INFO rally.task.engine [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | Completed: Task validation.
Task config is valid :)
----------------------------------------------------------------
----------------
Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d: started
----------------------------------------------------------------
----------------

Benchmarking... This can take a while...

To track task status use:

rally task status


or
rally task detailed

Using task: 5887aaba-7f49-4467-8fe5-2b4fa392f65d


2016-08-19 04:55:10.811 19107 INFO rally.api [-] Benchmark Task
5887aaba-7f49-4467-8fe5-2b4fa392f65d on Deployment 0bed832c-d663
-49fe-9c2e-fe47fbb4cae9
2016-08-19 04:55:10.813 19107 INFO rally.task.engine [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | Starting: Benchmarking.
2016-08-19 04:55:10.822 19107 INFO rally.task.engine [-] Running
benchmark with key:
{
"kw": {
"runner": {
"type": "constant",
"concurrency": 1,

66
Rally - Openstack Benchmarking Project

"times": 1
},
"args": {
"force_delete": false,
"flavor": {
"name": "m1.tiny"
},
"image": {
"name": "^cirros.*uec$"
}
},
"context": {
"users": {
"users_per_tenant": 1,
"tenants": 1
}
}
},
"name": "NovaServers.boot_and_delete_server",
"pos": 0
}
2016-08-19 04:55:10.828 19107 INFO rally.plugins.openstack.conte
xt.keystone.users [-] Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d
| Starting: Enter context: `users`
2016-08-19 04:55:11.043 19107 INFO rally.plugins.openstack.conte
xt.keystone.users [-] Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d
| Completed: Enter context: `users`
2016-08-19 04:55:11.294 19236 INFO rally.task.runner [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | ITER: 1 START
2016-08-19 04:55:13.125 19236 WARNING rally.common.logging [-] '
wait_for' is deprecated in Rally v0.1.2: Use wait_for_status ins
tead.
2016-08-19 04:55:18.126 19236 INFO rally.task.runner [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | ITER: 1 END: OK
2016-08-19 04:55:18.140 19107 INFO rally.plugins.openstack.conte
xt.cleanup.user [-] Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d |
Starting: user resources cleanup
2016-08-19 04:55:18.460 19107 INFO rally.plugins.openstack.conte
xt.cleanup.user [-] Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d |
Completed: user resources cleanup

67
Rally - Openstack Benchmarking Project

2016-08-19 04:55:18.460 19107 INFO rally.plugins.openstack.conte


xt.keystone.users [-] Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d
| Starting: Exit context: `users`
2016-08-19 04:55:19.241 19107 INFO rally.plugins.openstack.conte
xt.keystone.users [-] Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d
| Completed: Exit context: `users`
2016-08-19 04:55:20.854 19107 INFO rally.task.engine [-] Load du
ration is: 6.828932
2016-08-19 04:55:20.855 19107 INFO rally.task.engine [-] Full ru
nner duration is: 6.85798
2016-08-19 04:55:20.855 19107 INFO rally.task.engine [-] Full du
ration is 8.414313
2016-08-19 04:55:20.885 19107 INFO rally.task.engine [-] Task 58
87aaba-7f49-4467-8fe5-2b4fa392f65d | Completed: Benchmarking.

----------------------------------------------------------------
----------------
Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d: finished
----------------------------------------------------------------
----------------

test scenario NovaServers.boot_and_delete_server


args position 0
args values:
{
"runner": {
"type": "constant",
"concurrency": 1,
"times": 1
},
"args": {
"force_delete": false,
"flavor": {
"name": "m1.tiny"
},
"image": {
"name": "^cirros.*uec$"
}
},
"context": {

68
Rally - Openstack Benchmarking Project

"users": {
"users_per_tenant": 1,
"project_domain": "default",
"user_choice_method": "random",
"user_domain": "default",
"tenants": 1,
"resource_management_workers": 20
}
}
}

----------------------------------------------------------------
----------------
Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d has 0 error(s)
----------------------------------------------------------------
----------------

+---------------------------------------------------------------
--------------------------------------------------------+
| Response Times
(sec) |
+--------------------+-----------+--------------+--------------+
--------------+-----------+-----------+---------+-------+
| Action | Min (sec) | Median (sec) | 90%ile (sec) |
95%ile (sec) | Max (sec) | Avg (sec) | Success | Count |
+--------------------+-----------+--------------+--------------+
--------------+-----------+-----------+---------+-------+
| nova.boot_server | 4.372 | 4.372 | 4.372 |
4.372 | 4.372 | 4.372 | 100.0% | 1 |
| nova.delete_server | 2.457 | 2.457 | 2.457 |
2.457 | 2.457 | 2.457 | 100.0% | 1 |
| total | 6.829 | 6.829 | 6.829 |
6.829 | 6.829 | 6.829 | 100.0% | 1 |
+--------------------+-----------+--------------+--------------+
--------------+-----------+-----------+---------+-------+

Load duration: 6.828932


Full duration: 8.414313

HINTS:

69
Rally - Openstack Benchmarking Project

* To plot HTML graphics with this data, run:


rally task report 5887aaba-7f49-4467-8fe5-2b4fa392f65d --out
output.html

* To generate a JUnit report, run:


rally task report 5887aaba-7f49-4467-8fe5-2b4fa392f65d --jun
it --out output.xml

* To get raw JSON output of task results, run:


rally task results 5887aaba-7f49-4467-8fe5-2b4fa392f65d

(rally)cloud@stack-2:~/mytest$

Next generate the HTML output for the test execution as below,

(rally)cloud@stack-2:~/mytest$ rally task report 5887aaba-7f49-4


467-8fe5-2b4fa392f65d --out output.html
(rally)cloud@stack-2:~/mytest$ ls

The output screen snapshot is below,

Understand Basic concepts in the Test

70
Rally - Openstack Benchmarking Project

If you look the above test case boot-and-delete.json file, There are three input
category

scenario arguments - args {} runners - {} context - {}

Scenario args
Scenario arguments is the arguments passed to your scenario. The schema(input
parametes) is varies depends on your scenario. In the boot-and-delete-server
example, the arguments are flavor,image,force-delete.

"args": {
"flavor": {
"name": "{{flavor_name}}"
},
"image": {
"name": "^cirros.*uec$"
},
"force_delete": false
}

Looking the source code of this scenario, can help you to understand the available
arguments.

http://rally.readthedocs.io/en/latest/plugin/plugin_reference.html#task-scenarios

Runners
Runners are entities that control the execution type and order of benchmark
scenarios. They support different running strategies for creating load on the cloud,
including simulating concurrent requests from different users, periodic load,
gradually growing load and so on.

The scenario running strategy is specified by its type and also by some type-
specific parameters. constant - for creating a constant load by running the
scenario for a fixed number of times, possibly in parallel (that's controlled by the
"concurrency" parameter). constant_for_duration - that works exactly as constant,
but runs the benchmark scenario until a specified number of seconds elapses
("duration" parameter). periodic - which executes benchmark scenarios with

71
Rally - Openstack Benchmarking Project

intervals between two consecutive runs, specified in the "period" field in seconds.
serial - which is very useful to test new scenarios since it just runs the benchmark
scenario for a fixed number of times in a single thread.

In our earlier example, our runner configuration is below,

"runner": {
"type": "constant",
"times": 1,
"concurrency": 1
},

Context
Contexts in Rally is essentially used to define different types of environments in
which benchmark scenarios can be launched.

Those environments are usually specified by such parameters as the number of


tenants and users that should be present in an OpenStack project, the roles
granted to those users, extended or narrowed quotas and so on.

In our example,

"context": { "users": { "tenants": 1, "users_per_tenant": 1 } }

Tests available in Rally for execution


Rally comes with plenty of scenario tests. The default scenario tests are located
as below.

(rally)cloud@stack-2:~/rally$ ls samples/tasks/scenarios/
README.rst ceilometer designate ec2 glance ironic man
ila monasca neutron quotas sahara swift
vm workload
authenticate cinder dummy fuel heat keystone mis
tral murano nova requests senlin tempest-do-not-run-aga
inst-production watcher zaqar
(rally)cloud@stack-2:~/rally$

72
Rally - Openstack Benchmarking Project

(rally)cloud@stack-2:~/rally$ ls samples/tasks/scenarios/nova/
boot-and-associate-floating-ip.json boot-from-volume-sna
pshot.json create-and-list-secgroups.j
son
boot-and-associate-floating-ip.yaml boot-from-volume-sna
pshot.yaml create-and-list-secgroups.y
aml
boot-and-block-migrate.json boot-from-volume.jso
n create-and-update-secgroups
.json
boot-and-block-migrate.yaml boot-from-volume.yam
l create-and-update-secgroups
.yaml
boot-and-delete-multiple.json boot-lock-unlock-and
-delete.json create-flavor.json
boot-and-delete-multiple.yaml boot-lock-unlock-and
-delete.yaml create-flavor.yaml
boot-and-delete-server-with-keypairs.json boot-server-attach-c
reated-volume-and-live-migrate.json list-agents.json
boot-and-delete-server-with-keypairs.yaml boot-server-attach-c
reated-volume-and-live-migrate.yaml list-agents.yaml
boot-and-delete-server-with-secgroups.json boot-server-attach-c
reated-volume-and-resize.json list-aggregates.json
boot-and-delete-server-with-secgroups.yaml boot-server-attach-c
reated-volume-and-resize.yaml list-aggregates.yaml
boot-and-delete.json boot-server-from-vol
ume-and-live-migrate.json list-availability-zones.jso
n
boot-and-delete.yaml boot-server-from-vol
ume-and-live-migrate.yaml list-availability-zones.yam
l
boot-and-get-console-server.json boot-snapshot-boot-d
elete.json list-flavors.json
boot-and-get-console-server.yaml boot-snapshot-boot-d
elete.yaml list-flavors.yaml
boot-and-list.json boot.json
list-hosts.json
boot-and-list.yaml boot.yaml
list-hosts.yaml

73
Rally - Openstack Benchmarking Project

boot-and-live-migrate.json create-and-delete-fl
oating-ips-bulk.json list-hypervisors.json
boot-and-live-migrate.yaml create-and-delete-fl
oating-ips-bulk.yaml list-hypervisors.yaml
boot-and-migrate.json create-and-delete-ke
ypair.json list-images.json
boot-and-migrate.yaml create-and-delete-ke
ypair.yaml list-images.yaml
boot-and-rebuild.json create-and-delete-ne
twork.json list-servers.json
boot-and-rebuild.yaml create-and-delete-ne
twork.yaml list-servers.yaml
boot-and-show-server.json create-and-delete-se
cgroups.json list-services.json
boot-and-show-server.yaml create-and-delete-se
cgroups.yaml list-services.yaml
boot-and-update-server.json create-and-list-flav
or-access.json pause-and-unpause.json
boot-and-update-server.yaml create-and-list-flav
or-access.yaml pause-and-unpause.yaml
boot-bounce-delete.json create-and-list-floa
ting-ips-bulk.json resize-server.json
boot-bounce-delete.yaml create-and-list-floa
ting-ips-bulk.yaml resize-server.yaml
boot-from-volume-and-delete.json create-and-list-keyp
airs.json shelve-and-unshelve.json
boot-from-volume-and-delete.yaml create-and-list-keyp
airs.yaml shelve-and-unshelve.yaml
boot-from-volume-and-resize.json create-and-list-netw
orks.json suspend-and-resume.json
boot-from-volume-and-resize.yaml create-and-list-netw
orks.yaml suspend-and-resume.yaml
(rally)cloud@stack-2:~/rally$

These are predefined tests which can be modified as per the user requirements
(Test condition,SLA)

In Rally, plugin is a test interface, the plugins can be listed as below,

(rally)cloud@stack-2:~/rally$ rally plugin list

74
Rally - Openstack Benchmarking Project

2016-08-19 05:49:48.843 21101 INFO rally.common.plugin.discover


[-] Loading plugins from directories /home/cloud/.rally/plugins/
*
2016-08-19 05:49:48.844 21101 INFO rally.common.plugin.discover
[-] Loaded module with plugins: /home/cloud/.rally/plugins/
samples/context/context_plugin.py
2016-08-19 05:49:48.844 21101 INFO rally.common.plugin.discover
[-] Loaded module with plugins: /home/cloud/.rally/plugins/
samples/sla/sla_plugin.py
2016-08-19 05:49:48.844 21101 INFO rally.common.plugin.discover
[-] Loaded module with plugins: /home/cloud/.rally/plugins/
samples/runner/runner_plugin.py
2016-08-19 05:49:48.846 21101 INFO rally.common.plugin.discover
[-] Loaded module with plugins: /home/cloud/.rally/plugins/
samples/scenario/scenario_plugin.py
+---------------------------------------------------------------
-+-----------+--------------------------------------------------
-----------------------+
| name
| namespace | title
|
+---------------------------------------------------------------
-+-----------+--------------------------------------------------
-----------------------+
| Authenticate.keystone
| default | Check Keystone Client.
|
| Authenticate.validate_ceilometer
| default | Check Ceilometer Client to ensure validation of t
oken. |
| Authenticate.validate_cinder
| default | Check Cinder Client to ensure validation of token
. |
| Authenticate.validate_glance
| default | Check Glance Client to ensure validation of token
. |
| Authenticate.validate_heat
| default | Check Heat Client to ensure validation of token.
|
| Authenticate.validate_monasca

75
Rally - Openstack Benchmarking Project

| default | Check Monasca Client to ensure validation of toke


n. |
| Authenticate.validate_neutron
| default | Check Neutron Client to ensure validation of toke
n. |
| Authenticate.validate_nova
| default | Check Nova Client to ensure validation of token.
|
| CeilometerAlarms.create_alarm
| default | Create an alarm.
|
| CeilometerAlarms.create_alarm_and_get_history
| default | Create an alarm, get and set the state and get th
e alarm history. |
| CeilometerAlarms.create_and_delete_alarm
| default | Create and delete the newly created alarm.
|
| CeilometerAlarms.create_and_list_alarm
| default | Create and get the newly created alarm.
|
| CeilometerAlarms.create_and_update_alarm
| default | Create and update the newly created alarm.
|
| CeilometerAlarms.list_alarms
| default | Fetch all alarms.
|
| CeilometerEvents.create_user_and_get_event
| default | Create user and gets event.
|
| CeilometerEvents.create_user_and_list_event_types
| default | Create user and fetch all event types.
|
| CeilometerEvents.create_user_and_list_events
| default | Create user and fetch all events.
|
| CeilometerMeters.list_matched_meters
| default | Get meters that matched fields from context and a
rgs. |
| CeilometerMeters.list_meters
| default | Check all available queries for list resource req

76
Rally - Openstack Benchmarking Project

uest. |
| CeilometerQueries.create_and_query_alarm_history
| default | Create an alarm and then query for its history.
|
| CeilometerQueries.create_and_query_alarms
| default | Create an alarm and then query it with specific p
arameters. |
| CeilometerQueries.create_and_query_samples
| default | Create a sample and then query it with specific p
arameters. |
| CeilometerResource.get_tenant_resources
| default | Get all tenant resources.
|
| CeilometerResource.list_matched_resources
| default | Get resources that matched fields from context an
d args. |
| CeilometerResource.list_resources
| default | Check all available queries for list resource req
uest. |
| CeilometerSamples.list_matched_samples
| default | Get list of samples that matched fields from cont
ext and args. |
| CeilometerSamples.list_samples
| default | Fetch all available queries for list sample reque
st. |
| CeilometerStats.create_meter_and_get_stats
| default | Create a meter and fetch its statistics.
|
| CeilometerStats.get_stats
| default | Fetch statistics for certain meter.
|
| CeilometerTraits.create_user_and_list_trait_descriptions
| default | Create user and fetch all trait descriptions.
|
| CeilometerTraits.create_user_and_list_traits
| default | Create user and fetch all event traits.
|
| CinderVolumes.create_and_attach_volume
| default | Create a VM and attach a volume to it.
|

77
Rally - Openstack Benchmarking Project

| CinderVolumes.create_and_delete_snapshot
| default | Create and then delete a volume-snapshot.
|
| CinderVolumes.create_and_delete_volume
| default | Create and then delete a volume.
|
| CinderVolumes.create_and_extend_volume
| default | Create and extend a volume and then delete it.
|
| CinderVolumes.create_and_list_snapshots
| default | Create and then list a volume-snapshot.
|
| CinderVolumes.create_and_list_volume
| default | Create a volume and list all volumes.
|
| CinderVolumes.create_and_list_volume_backups
| default | Create and then list a volume backup.
|
| CinderVolumes.create_and_restore_volume_backup
| default | Restore volume backup.
|
| CinderVolumes.create_and_update_volume
| default | Create a volume and update its name and descripti
on. |
| CinderVolumes.create_and_upload_volume_to_image
| default | Create and upload a volume to image.
|
| CinderVolumes.create_from_volume_and_delete_volume
| default | Create volume from volume and then delete it.
|
| CinderVolumes.create_nested_snapshots_and_attach_volume
| default | Create a volume from snapshot and attach/detach t
he volume |
| CinderVolumes.create_snapshot_and_attach_volume
| default | Create volume, snapshot and attach/detach volume.
|
| CinderVolumes.create_volume
| default | Create a volume.
|
| CinderVolumes.create_volume_and_clone

78
Rally - Openstack Benchmarking Project

| default | Create a volume, then clone it to another volume.


|
| CinderVolumes.create_volume_backup
| default | Create a volume backup.
|
| CinderVolumes.create_volume_from_snapshot
| default | Create a volume-snapshot, then create a volume fr
om this snapshot. |
| CinderVolumes.list_volumes
| default | List all volumes.
|
| CinderVolumes.modify_volume_metadata
| default | Modify a volume's metadata.
|
| CobblerProvider
| default | Creates servers via PXE boot from given cobbler s
elector. |
| DesignateBasic.create_and_delete_domain
| default | Create and then delete a domain.
|
| DesignateBasic.create_and_delete_records
| default | Create and then delete records.
|
| DesignateBasic.create_and_delete_recordsets
| default | Create and then delete recordsets.
|
| DesignateBasic.create_and_delete_server
| default | Create and then delete a server.
|
| DesignateBasic.create_and_delete_zone
| default | Create and then delete a zone.
|
| DesignateBasic.create_and_list_domains
| default | Create a domain and list all domains.
|
| DesignateBasic.create_and_list_records
| default | Create and then list records.
|
| DesignateBasic.create_and_list_recordsets
| default | Create and then list recordsets.

79
Rally - Openstack Benchmarking Project

|
| DesignateBasic.create_and_list_servers
| default | Create a Designate server and list all servers.
|
| DesignateBasic.create_and_list_zones
| default | Create a zone and list all zones.
|
| DesignateBasic.create_and_update_domain
| default | Create and then update a domain.
|
| DesignateBasic.list_domains
| default | List Designate domains.
|
| DesignateBasic.list_records
| default | List Designate records.
|
| DesignateBasic.list_recordsets
| default | List Designate recordsets.
|
| DesignateBasic.list_servers
| default | List Designate servers.
|
| DesignateBasic.list_zones
| default | List Designate zones.
|
| DevstackEngine
| default | Deploy Devstack cloud.
|
| Dummy.dummy
| default | Do nothing and sleep for the given number of seco
nds (0 by default). |
| Dummy.dummy_exception
| default | Throw an exception.
|
| Dummy.dummy_exception_probability
| default | Throw an exception with given probability.
|
| Dummy.dummy_output
| default | Generate dummy output.
|

80
Rally - Openstack Benchmarking Project

| Dummy.dummy_random_action
| default | Sleep random time in dummy actions.
|
| Dummy.dummy_random_fail_in_atomic
| default | Randomly throw exceptions in atomic actions.
|
| Dummy.dummy_timed_atomic_actions
| default | Run some sleepy atomic actions for SLA atomic act
ion tests. |
| Dummy.dummy_with_scenario_output
| default | Return a dummy scenario output.
|
| EC2Servers.boot_server
| default | Boot a server.
|
| EC2Servers.list_servers
| default | List all servers.
|
| ExistingCloud
| default | Just use an existing OpenStack deployment without
deploying anything. |
| ExistingServers
| default | Just return endpoints from its own configuration.
|
| FuelEnvironments.create_and_delete_environment
| default | Create and delete Fuel environments.
|
| FuelEnvironments.create_and_list_environments
| default | Create and list Fuel environments
|
| FuelNodes.add_and_remove_node
| default | Add node to environment and remove
|
| GlanceImages.create_and_delete_image
| default | Create and then delete an image.
|
| GlanceImages.create_and_list_image
| default | Create an image and then list all images.
|
| GlanceImages.create_image_and_boot_instances

81
Rally - Openstack Benchmarking Project

| default | Create an image and boot several instances from i


t. |
| GlanceImages.list_images
| default | List all images.
|
| HeatStacks.create_and_delete_stack
| default | Create and then delete a stack.
|
| HeatStacks.create_and_list_stack
| default | Create a stack and then list all stacks.
|
| HeatStacks.create_check_delete_stack
| default | Create, check and delete a stack.
|
| HeatStacks.create_snapshot_restore_delete_stack
| default | Create, snapshot-restore and then delete a stack.
|
| HeatStacks.create_stack_and_list_output
| default | Create stack and list outputs by using new algori
thm. |
| HeatStacks.create_stack_and_list_output_via_API
| default | Create stack and list outputs by using old algori
thm. |
| HeatStacks.create_stack_and_scale
| default | Create an autoscaling stack and invoke a scaling
policy. |
| HeatStacks.create_stack_and_show_output
| default | Create stack and show output by using new algorit
hm. |
| HeatStacks.create_stack_and_show_output_via_API
| default | Create stack and show output by using old algorit
hm. |
| HeatStacks.create_suspend_resume_delete_stack
| default | Create, suspend-resume and then delete a stack.
|
| HeatStacks.create_update_delete_stack
| default | Create, update and then delete a stack.
|
| HeatStacks.list_stacks_and_events
| default | List events from tenant stacks.

82
Rally - Openstack Benchmarking Project

|
| HeatStacks.list_stacks_and_resources
| default | List all resources from tenant stacks.
|
| HttpRequests.check_random_request
| default | Benchmark the list of requests
|
| HttpRequests.check_request
| default | Standard way to benchmark web services.
|
| IronicNodes.create_and_delete_node
| default | Create and delete node.
|
| IronicNodes.create_and_list_node
| default | Create and list nodes.
|
| KeystoneBasic.add_and_remove_user_role
| default | Create a user role add to a user and disassociate
. |
| KeystoneBasic.create_add_and_list_user_roles
| default | Create user role, add it and list user roles for
given user. |
| KeystoneBasic.create_and_delete_ec2credential
| default | Create and delete keystone ec2-credential.
|
| KeystoneBasic.create_and_delete_role
| default | Create a user role and delete it.
|
| KeystoneBasic.create_and_delete_service
| default | Create and delete service.
|
| KeystoneBasic.create_and_list_ec2credentials
| default | Create and List all keystone ec2-credentials.
|
| KeystoneBasic.create_and_list_services
| default | Create and list services.
|
| KeystoneBasic.create_and_list_tenants
| default | Create a keystone tenant with random name and lis
t all tenants. |

83
Rally - Openstack Benchmarking Project

| KeystoneBasic.create_and_list_users
| default | Create a keystone user with random name and list
all users. |
| KeystoneBasic.create_delete_user
| default | Create a keystone user with random name and then
delete it. |
| KeystoneBasic.create_tenant
| default | Create a keystone tenant with random name.
|
| KeystoneBasic.create_tenant_with_users
| default | Create a keystone tenant and several users belong
ing to it. |
| KeystoneBasic.create_update_and_delete_tenant
| default | Create, update and delete tenant.
|
| KeystoneBasic.create_user
| default | Create a keystone user with random name.
|
| KeystoneBasic.create_user_set_enabled_and_delete
| default | Create a keystone user, enable or disable it, and
delete it. |
| KeystoneBasic.create_user_update_password
| default | Create user and update password for that user.
|
| KeystoneBasic.get_entities
| default | Get instance of a tenant, user, role and service
by id's. |
| Lines
| default | Display results as generic chart with lines.
|
| LxcEngine
| default | Deploy with other engines in lxc containers.
|
| LxcProvider
| default | Provide lxc container(s) on given host.
|
| ManilaShares.attach_security_service_to_share_network
| default | Attaches security service to share network.
|
| ManilaShares.create_and_delete_share

84
Rally - Openstack Benchmarking Project

| default | Create and delete a share.


|
| ManilaShares.create_security_service_and_delete
| default | Creates security service and then deletes.
|
| ManilaShares.create_share_network_and_delete
| default | Creates share network and then deletes.
|
| ManilaShares.create_share_network_and_list
| default | Creates share network and then lists it.
|
| ManilaShares.list_share_servers
| default | Lists share servers.
|
| ManilaShares.list_shares
| default | Basic scenario for 'share list' operation.
|
| MistralWorkbooks.create_workbook
| default | Scenario tests workbook creation and deletion.
|
| MistralWorkbooks.list_workbooks
| default | Scenario test mistral workbook-list command.
|
| MonascaMetrics.list_metrics
| default | Fetch user's metrics.
|
| MultihostEngine
| default | Deploy multihost cloud with existing engines.
|
| MuranoEnvironments.create_and_delete_environment
| default | Create environment, session and delete environmen
t. |
| MuranoEnvironments.create_and_deploy_environment
| default | Create environment, session and deploy environmen
t. |
| MuranoEnvironments.list_environments
| default | List the murano environments.
|
| MuranoPackages.import_and_delete_package
| default | Import Murano package and then delete it.

85
Rally - Openstack Benchmarking Project

|
| MuranoPackages.import_and_filter_applications
| default | Import Murano package and then filter packages by
some criteria. |
| MuranoPackages.import_and_list_packages
| default | Import Murano package and get list of packages.
|
| MuranoPackages.package_lifecycle
| default | Import Murano package, modify it and then delete
it. |
| NeutronLoadbalancerV1.create_and_delete_healthmonitors
| default | Create a healthmonitor(v1) and delete healthmonit
ors(v1). |
| NeutronLoadbalancerV1.create_and_delete_pools
| default | Create pools(v1) and delete pools(v1).
|
| NeutronLoadbalancerV1.create_and_delete_vips
| default | Create a vip(v1) and then delete vips(v1).
|
| NeutronLoadbalancerV1.create_and_list_healthmonitors
| default | Create healthmonitors(v1) and list healthmonitors
(v1). |
| NeutronLoadbalancerV1.create_and_list_pools
| default | Create a pool(v1) and then list pools(v1).
|
| NeutronLoadbalancerV1.create_and_list_vips
| default | Create a vip(v1) and then list vips(v1).
|
| NeutronLoadbalancerV1.create_and_update_healthmonitors
| default | Create a healthmonitor(v1) and update healthmonit
ors(v1). |
| NeutronLoadbalancerV1.create_and_update_pools
| default | Create pools(v1) and update pools(v1).
|
| NeutronLoadbalancerV1.create_and_update_vips
| default | Create vips(v1) and update vips(v1).
|
| NeutronNetworks.create_and_delete_floating_ips
| default | Create and delete floating IPs.
|

86
Rally - Openstack Benchmarking Project

| NeutronNetworks.create_and_delete_networks
| default | Create and delete a network.
|
| NeutronNetworks.create_and_delete_ports
| default | Create and delete a port.
|
| NeutronNetworks.create_and_delete_routers
| default | Create and delete a given number of routers.
|
| NeutronNetworks.create_and_delete_subnets
| default | Create and delete a given number of subnets.
|
| NeutronNetworks.create_and_list_floating_ips
| default | Create and list floating IPs.
|
| NeutronNetworks.create_and_list_networks
| default | Create a network and then list all networks.
|
| NeutronNetworks.create_and_list_ports
| default | Create and a given number of ports and list all p
orts. |
| NeutronNetworks.create_and_list_routers
| default | Create and a given number of routers and list all
routers. |
| NeutronNetworks.create_and_list_subnets
| default | Create and a given number of subnets and list all
subnets. |
| NeutronNetworks.create_and_update_networks
| default | Create and update a network.
|
| NeutronNetworks.create_and_update_ports
| default | Create and update a given number of ports.
|
| NeutronNetworks.create_and_update_routers
| default | Create and update a given number of routers.
|
| NeutronNetworks.create_and_update_subnets
| default | Create and update a subnet.
|
| NeutronSecurityGroup.create_and_delete_security_groups

87
Rally - Openstack Benchmarking Project

| default | Create and delete Neutron security-groups.


|
| NeutronSecurityGroup.create_and_list_security_groups
| default | Create and list Neutron security-groups.
|
| NeutronSecurityGroup.create_and_update_security_groups
| default | Create and update Neutron security-groups.
|
| NovaAgents.list_agents
| default | List all builds.
|
| NovaAggregates.list_aggregates
| default | List all nova aggregates.
|
| NovaAvailabilityZones.list_availability_zones
| default | List all availability zones.
|
| NovaFlavors.create_and_list_flavor_access
| default | Create a non-public flavor and list its access ru
les |
| NovaFlavors.create_flavor
| default | Create a flavor.
|
| NovaFlavors.list_flavors
| default | List all flavors.
|
| NovaFloatingIpsBulk.create_and_delete_floating_ips_bulk
| default | Create nova floating IP by range and delete it.
|
| NovaFloatingIpsBulk.create_and_list_floating_ips_bulk
| default | Create nova floating IP by range and list it.
|
| NovaHosts.list_hosts
| default | List all nova hosts.
|
| NovaHypervisors.list_hypervisors
| default | List hypervisors.
|
| NovaImages.list_images
| default | List all images.

88
Rally - Openstack Benchmarking Project

|
| NovaKeypair.boot_and_delete_server_with_keypair
| default | Boot and delete server with keypair.
|
| NovaKeypair.create_and_delete_keypair
| default | Create a keypair with random name and delete keyp
air. |
| NovaKeypair.create_and_list_keypairs
| default | Create a keypair with random name and list keypai
rs. |
| NovaNetworks.create_and_delete_network
| default | Create nova network and delete it.
|
| NovaNetworks.create_and_list_networks
| default | Create nova network and list all networks.
|
| NovaSecGroup.boot_and_delete_server_with_secgroups
| default | Boot and delete server with security groups attac
hed. |
| NovaSecGroup.create_and_delete_secgroups
| default | Create and delete security groups.
|
| NovaSecGroup.create_and_list_secgroups
| default | Create and list security groups.
|
| NovaSecGroup.create_and_update_secgroups
| default | Create and update security groups.
|
| NovaServers.boot_and_associate_floating_ip
| default | Boot a server and associate a floating IP to it.
|
| NovaServers.boot_and_bounce_server
| default | Boot a server and run specified actions against i
t. |
| NovaServers.boot_and_delete_multiple_servers
| default | Boot multiple servers in a single request and del
ete them. |
| NovaServers.boot_and_delete_server
| default | Boot and delete a server.
|

89
Rally - Openstack Benchmarking Project

| NovaServers.boot_and_get_console_output
| default | Get text console output from server.
|
| NovaServers.boot_and_list_server
| default | Boot a server from an image and then list all ser
vers. |
| NovaServers.boot_and_live_migrate_server
| default | Live Migrate a server.
|
| NovaServers.boot_and_migrate_server
| default | Migrate a server.
|
| NovaServers.boot_and_rebuild_server
| default | Rebuild a server.
|
| NovaServers.boot_and_show_server
| default | Show server details.
|
| NovaServers.boot_and_update_server
| default | Boot a server, then update its name and descripti
on. |
| NovaServers.boot_lock_unlock_and_delete
| default | Boot a server, lock it, then unlock and delete it
. |
| NovaServers.boot_server
| default | Boot a server.
|
| NovaServers.boot_server_attach_created_volume_and_live_migrate
| default | Create a VM, attach a volume to it and live migra
te. |
| NovaServers.boot_server_attach_created_volume_and_resize
| default | Create a VM from image, attach a volume to it and
resize. |
| NovaServers.boot_server_from_volume
| default | Boot a server from volume.
|
| NovaServers.boot_server_from_volume_and_delete
| default | Boot a server from volume and then delete it.
|
| NovaServers.boot_server_from_volume_and_live_migrate

90
Rally - Openstack Benchmarking Project

| default | Boot a server from volume and then migrate it.


|
| NovaServers.boot_server_from_volume_and_resize
| default | Boot a server from volume, then resize and delete
it. |
| NovaServers.boot_server_from_volume_snapshot
| default | Boot a server from a snapshot.
|
| NovaServers.list_servers
| default | List all servers.
|
| NovaServers.pause_and_unpause_server
| default | Create a server, pause, unpause and then delete i
t |
| NovaServers.resize_server
| default | Boot a server, then resize and delete it.
|
| NovaServers.shelve_and_unshelve_server
| default | Create a server, shelve, unshelve and then delete
it |
| NovaServers.snapshot_server
| default | Boot a server, make its snapshot and delete both.
|
| NovaServers.suspend_and_resume_server
| default | Create a server, suspend, resume and then delete
it |
| NovaServices.list_services
| default | List all nova services.
|
| OpenStackProvider
| default | Provide VMs using an existing OpenStack cloud.
|
| Pie
| default | Display results as pie, calculate average values
for additive data. |
| Quotas.cinder_update
| default | Update quotas for Cinder.
|
| Quotas.cinder_update_and_delete
| default | Update and Delete quotas for Cinder.

91
Rally - Openstack Benchmarking Project

|
| Quotas.neutron_update
| default | Update quotas for neutron.
|
| Quotas.nova_update
| default | Update quotas for Nova.
|
| Quotas.nova_update_and_delete
| default | Update and delete quotas for Nova.
|
| SaharaClusters.create_and_delete_cluster
| default | Launch and delete a Sahara Cluster.
|
| SaharaClusters.create_scale_delete_cluster
| default | Launch, scale and delete a Sahara Cluster.
|
| SaharaJob.create_launch_job
| default | Create and execute a Sahara EDP Job.
|
| SaharaJob.create_launch_job_sequence
| default | Create and execute a sequence of the Sahara EDP J
obs. |
| SaharaJob.create_launch_job_sequence_with_scaling
| default | Create and execute Sahara EDP Jobs on a scaling C
luster. |
| SaharaNodeGroupTemplates.create_and_list_node_group_templates
| default | Create and list Sahara Node Group Templates.
|
| SaharaNodeGroupTemplates.create_delete_node_group_templates
| default | Create and delete Sahara Node Group Templates.
|
| ScenarioPlugin.list_flavors
| default | List flavors.
|
| SenlinClusters.create_and_delete_profile_cluster
| default | Create a profile and a cluster and then delete th
em. |
| StackedArea
| default | Display results as stacked area.
|

92
Rally - Openstack Benchmarking Project

| StatsTable
| default | Calculate statistics for additive data and displa
y it as table. |
| SwiftObjects.create_container_and_object_then_delete_all
| default | Create container and objects then delete everythi
ng created. |
| SwiftObjects.create_container_and_object_then_download_object
| default | Create container and objects then download all ob
jects. |
| SwiftObjects.create_container_and_object_then_list_objects
| default | Create container and objects then list all object
s. |
| SwiftObjects.list_and_download_objects_in_containers
| default | List and download objects in all containers.
|
| SwiftObjects.list_objects_in_containers
| default | List objects in all containers.
|
| Table
| default | Display complete output as table, can not be used
for additive data. |
| TempestScenario.all
| default | Launch all discovered Tempest tests by their name
s. |
| TempestScenario.list_of_tests
| default | Launch all Tempest tests from a given list of the
ir names. |
| TempestScenario.set
| default | Launch all Tempest tests from a given set.
|
| TempestScenario.single_test
| default | Launch a single Tempest test by its name.
|
| TempestScenario.specific_regex
| default | Launch Tempest tests whose names match a given re
gular expression. |
| VMTasks.boot_runcommand_delete
| default | Boot a server, run script specified in command an
d delete server. |
| VMTasks.boot_runcommand_delete_custom_image

93
Rally - Openstack Benchmarking Project

| default | Boot a server from a custom image, run a command


that outputs JSON. |
| VMTasks.runcommand_heat
| default | Run workload on stack deployed by heat.
|
| VirshProvider
| default | Create VMs from prebuilt templates.
|
| Watcher.create_audit_template_and_delete
| default | Create audit template and delete it.
|
| ZaqarBasic.create_queue
| default | Create a Zaqar queue with a random name.
|
| ZaqarBasic.producer_consumer
| default | Serial message producer/consumer.
|
| admin_cleanup
| default | Context class for admin resources cleanup.
|
| allow_ssh
| default | Sets up security groups for all users to access V
M via SSH. |
| api_versions
| default | Context for specifying OpenStack clients versions
and service types. |
| ceilometer
| default | Context for creating samples and collecting resou
rces for benchmarks. |
| ceilometer
| openstack |
|
| cinder
| openstack |
|
| cinder_volume_type
| default |
|
| cleanup
| default | Context class for user resources cleanup.

94
Rally - Openstack Benchmarking Project

|
| constant
| default | Creates constant load executing a scenario a spec
ified number of times. |
| constant_for_duration
| default | Creates constant load executing a scenario for an
interval of time. |
| create_flavor
| default | Create sample flavor
|
| cue
| openstack |
|
| custom_image
| default | Base class for the contexts providing customized
image with. |
| designate
| openstack |
|
| dummy.failure
| default | Dummy benchmarks for testing Rally benchmark engi
ne at scale. |
| dummy_context
| default | Dummy context.
|
| ec2
| openstack |
|
| ec2_flavor
| default |
|
| ec2_image
| default |
|
| ec2_servers
| default | Context class for adding temporary servers for be
nchmarks. |
| existing_network
| default | This context supports using existing networks in
Rally. |

95
Rally - Openstack Benchmarking Project

| existing_users
| default | This context supports using existing users in Ral
ly. |
| failure_rate
| default | Failure rate minimum and maximum in percents.
|
| file
| default |
|
| file
| default |
|
| file-exporter
| default | DEPRECATED.
|
| file_dict
| default |
|
| flavors
| default | Context creates a list of flavors.
|
| fuel
| openstack | FuelClient factory for osclients.Clients.
|
| fuel_environments
| default | Context for generating Fuel environments.
|
| glance
| openstack |
|
| glance_image
| default |
|
| gnocchi
| openstack |
|
| heat
| openstack |
|
| heat_dataplane

96
Rally - Openstack Benchmarking Project

| default | Context class for create stack by given template.


|
| image_command_customizer
| default | Context class for generating image customized by
a command execution. |
| images
| default | Context class for adding images to each user for
benchmarks. |
| ironic
| openstack |
|
| keypair
| default |
|
| keystone
| openstack |
|
| lbaas
| default |
|
| magnum
| openstack |
|
| manila
| openstack |
|
| manila_share_networks
| default | This context creates resources specific for Manil
a project. |
| max_avg_duration
| default | Maximum average duration of one iteration in seco
nds. |
| max_avg_duration_per_atomic
| default | Maximum average duration of one iterations atomic
actions in seconds. |
| max_duration_range
| default | Maximum allowed duration range in seconds.
|
| max_seconds_per_iteration
| default | Maximum time for one iteration in seconds.

97
Rally - Openstack Benchmarking Project

|
| mistral
| openstack |
|
| monasca
| openstack |
|
| monasca_metrics
| default | Context for creating metrics for benchmarks.
|
| murano
| openstack |
|
| murano_environments
| default | Context class for creating murano environments.
|
| murano_packages
| default | Context class for uploading applications for mura
no. |
| network
| default | Create networking resources.
|
| neutron
| openstack |
|
| neutron_network
| default |
|
| nova
| openstack |
|
| nova_flavor
| default |
|
| outliers
| default | Limit the number of outliers (iterations that tak
e too much time). |
| path_or_url
| default |
|

98
Rally - Openstack Benchmarking Project

| performance_degradation
| default | Calculates perfomance degradation based on iterat
ion time |
| quotas
| default | Context class for updating benchmarks' tenants qu
otas. |
| random_times
| default | Sample of scenario runner plugin.
|
| roles
| default | Context class for adding temporary roles for benc
hmarks. |
| rps
| default | Scenario runner that does the job with specified
frequency. |
| sahara
| openstack |
|
| sahara_cluster
| default | Context class for setting up the Cluster an EDP j
ob. |
| sahara_image
| default | Context class for adding and tagging Sahara image
s. |
| sahara_input_data_sources
| default | Context class for setting up Input Data Sources f
or an EDP job. |
| sahara_job_binaries
| default | Context class for setting up Job Binaries for an
EDP job. |
| sahara_output_data_sources
| default | Context class for setting up Output Data Sources
for an EDP job. |
| senlin
| openstack |
|
| serial
| default | Scenario runner that executes benchmark scenarios
serially. |
| servers

99
Rally - Openstack Benchmarking Project

| default | Context class for adding temporary servers for be


nchmarks. |
| stacks
| default | Context class for create temporary stacks with re
sources. |
| swift
| openstack |
|
| swift_objects
| default |
|
| tempest
| default |
|
| trove
| openstack |
|
| users
| default | Context class for generating temporary users/tena
nts for benchmarks. |
| volume_types
| default | Context class for adding volumes types for benchm
arks. |
| volumes
| default | Context class for adding volumes to each user for
benchmarks. |
| watcher
| openstack |
|
| watcher_goal
| default |
|
| watcher_strategy
| default |
|
| zaqar
| openstack |
|
| zones
| default | Context to add `zones_per_tenant` zones for each

100
Rally - Openstack Benchmarking Project

tenant. |
+---------------------------------------------------------------
-+-----------+--------------------------------------------------
-----------------------+
(rally)cloud@stack-2:~/rally$

In our earlier sample test execution , we have used


NovaServers.boot_and_delete_server plugin.

Write a new plugin(scenario tests)


http://rally.readthedocs.io/en/latest/plugins.html

How to include the new plugin in the rally

1. create .rally/plugins/<plugin name> folder in your HOME folde


r
2. copy the plugin source files(*.py) present in this reposito
ry, to this newly created folder.
3. Now your plugin can be detected by the RALLY.
4. Place the input file (test.json) to your convenient directory
(Lets assume, your home directory)
5. Execute the test as below,
rally task start --task /home/cloud/test.json

References:

1. https://wiki.openstack.org/wiki/Rally/Concepts
2. http://rally.readthedocs.io/en/latest/tutorial/step_0_installation.html
3. https://github.com/openstack/rally

101
Networking-ODL - Openstack Neturon + ODL integreation Project

Networking-ODL - Openstack Neturon +


ODL integreation Project

Introduction
Neutron using OVS for underlying networking. It creates br-int,br-ext,br-tun
bridges for wiring the VMs L2/L3 Purpose. Refer Neutron networking concepts

https://blogs.oracle.com/ronen/entry/diving_into_openstack_network_architecture

OVS operates in normal mode and SDN mode. In normal mode, its like a
traditional Switch. In SDN Mode, SDN controller controlls the OVS flows using OF
Protocol.

The default behavior is Normal Mode.

Networking-ODL is a neutron plugin project, which intent to manage the Neutron


OVS via ODL SDN Controller.

ODL has a specific applications(odl-ovsdb-openstack) for managing openstack


neutron ovs.

Openstack + ODL integreation (L2 Mode)


This guide demonstrates the ODL integration(only L2) in devstack environment.
L2 Mode means , only VM connectivity in tenants are managed by ODL. Ex. VMs
can ping each other(same tenant)

Not supported:

1. No floating IP Association,No Router,No Nat etc.

The default Neutron L3 can be used(which i am not focusing in this guide)

Test Environment
My Test bed is like below I am using TWO VMs

102
Networking-ODL - Openstack Neturon + ODL integreation Project

1. ODL VM(8GB Ram), Ubuntu 14.04, IP - 10.10.10.3


2. Devstack VM(16GB RAM), Ubuntut 14.04 , IP - 10.10.10.4 Both VMs can
ping each other.

ODL Setup:
ODL must be installed and configured before devstack.

Installing ODL in the ODL VM as below,

sudo apt-get install openjdk-7-jdk


wget
https://nexus.opendaylight.org/content/repositories/public/org/opendaylight/int
egration/distribution-karaf/0.4.3-Beryllium-SR3/distribution-karaf-0.4.3-
Beryllium-SR3.tar.gz
tar xvzf distribution-karaf-0.4.3-Beryllium-SR3.tar.gz
cd distribution-karaf-0.4.3-Beryllium-SR3/
./bin/karaf
Install the below odl features in the karaf shell feature:install odl-ovsdb-
openstack feature:install odl-dlux-core feature:install odl-dlux-all feature.install
odl-openflowplugin-app-lldp-speaker-li

Verify the ODL neutron plugin using the below curl request

$ curl -u admin:admin http://10.10.10.3:8080/controller/nb/v2/neutron/networks {


"networks" : [ ] }

Thats all

Devstack setup
Mitaka release being used .

The reference is below,

http://www.flaviof.com/blog/work/how-to-odl-with-openstack-part1.html

The local.conf is below,

103
Networking-ODL - Openstack Neturon + ODL integreation Project

[[local|localrc]]
SERVICE_TOKEN=mytoken123
ADMIN_PASSWORD=openstack123
MYSQL_PASSWORD=mysql123
RABBIT_PASSWORD=rabbit123
SERVICE_PASSWORD=$ADMIN_PASSWORD
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
VERBOSE=True
LOG_COLOR=True
enable_plugin networking-odl https://github.com/openstack/networ
king-odl
disable_service n-net c-api c-vol c-sch
enable_service q-svc q-agt q-dhcp q-l3 q-meta

ODL_MODE=externalodl
ODL_PORT=8080
ODL_MGR_IP=10.10.10.3 #
ODL_ENDPOINT=http://10.10.10.3:8080/controller/nb/v2/neutron
ODL_USERNAME=admin
ODL_PASSWORD=admin

run ./stack.sh to install this.

ODL_MODE - as we are using external ODL (means extenrally installed ODL) the
"externalodl" is mentioned. ther are allinone, odlcompute modes are available.

Thats all.

Note: br-ex bridge will not get created , dont get surprise.

Execrcise:
Now your Openstack ODL integreation is done. Now create Two VMs, and ping
each other. And observe the flows in the br-int.

After VMs are created, Ping each other as below;

1. run bash shell in the dhcpd network namespace


2. ssh to VM IP and ping other VM IP

104
Networking-ODL - Openstack Neturon + ODL integreation Project

cloud@stackodl1:~$ sudo ip netns


qdhcp-ed1d3519-ff41-4b8c-a606-fbcc7eccb5db
cloud@stackodl1:~$ sudo ip netns qdhcp-ed1d3519-ff41-4b8c-a606-f
bcc7eccb5db exec ifconfig
Command "qdhcp-ed1d3519-ff41-4b8c-a606-fbcc7eccb5db" is unknown,
try "ip netns help".
cloud@stackodl1:~$ sudo ip netns exec qdhcp-ed1d3519-ff41-4b8c-a
606-fbcc7eccb5db bash
root@stackodl1:~# ssh cirros@10.0.0.3
cirros@10.0.0.3's password:
$ ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2): 56 data bytes
64 bytes from 10.0.0.2: seq=0 ttl=64 time=0.891 ms
64 bytes from 10.0.0.2: seq=1 ttl=64 time=0.349 ms
^C
--- 10.0.0.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.349/0.620/0.891 ms
$ ping 10.0.0.4
PING 10.0.0.4 (10.0.0.4): 56 data bytes
64 bytes from 10.0.0.4: seq=0 ttl=64 time=3.228 ms
64 bytes from 10.0.0.4: seq=1 ttl=64 time=0.950 ms
64 bytes from 10.0.0.4: seq=2 ttl=64 time=0.931 ms
64 bytes from 10.0.0.4: seq=3 ttl=64 time=1.006 ms
64 bytes from 10.0.0.4: seq=4 ttl=64 time=1.104 ms
64 bytes from 10.0.0.4: seq=5 ttl=64 time=1.214 ms
64 bytes from 10.0.0.4: seq=6 ttl=64 time=0.887 ms
64 bytes from 10.0.0.4: seq=7 ttl=64 time=1.128 ms
64 bytes from 10.0.0.4: seq=8 ttl=64 time=1.036 ms
^C
--- 10.0.0.4 ping statistics ---
9 packets transmitted, 9 packets received, 0% packet loss
round-trip min/avg/max = 0.887/1.276/3.228 ms
$ exit
Connection to 10.0.0.3 closed.
root@stackodl1:~# ssh cirros@10.0.0.4
The authenticity of host '10.0.0.4 (10.0.0.4)' can't be establis
hed.
RSA key fingerprint is 3f:de:dd:ba:13:db:78:8c:68:b3:18:62:16:e8

105
Networking-ODL - Openstack Neturon + ODL integreation Project

:9d:2c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.0.4' (RSA) to the list of known
hosts.
cirros@10.0.0.4's password:
$ ping 10.0.0.3
PING 10.0.0.3 (10.0.0.3): 56 data bytes
64 bytes from 10.0.0.3: seq=0 ttl=64 time=2.435 ms
64 bytes from 10.0.0.3: seq=1 ttl=64 time=0.904 ms
64 bytes from 10.0.0.3: seq=2 ttl=64 time=0.752 ms
64 bytes from 10.0.0.3: seq=3 ttl=64 time=0.743 ms
64 bytes from 10.0.0.3: seq=4 ttl=64 time=0.586 ms
64 bytes from 10.0.0.3: seq=5 ttl=64 time=0.694 ms
64 bytes from 10.0.0.3: seq=6 ttl=64 time=0.794 ms
^C
--- 10.0.0.3 ping statistics ---
7 packets transmitted, 7 packets received, 0% packet loss
round-trip min/avg/max = 0.586/0.986/2.435 ms
$ exit
Connection to 10.0.0.4 closed.
root@stackodl1:~#

The br-int flow details are below,

cloud@stackodl1:~/devstack$ sudo ovs-ofctl -O OpenFlow13 dump-fl


ows br-int
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x0, duration=432.588s, table=0, n_packets=111, n_bytes=
12222, in_port=2,dl_src=fa:16:3e:25:ca:a4 actions=set_field:0x41
5->tun_id,load:0x1->NXM_NX_REG0[],goto_table:20
cookie=0x0, duration=275.895s, table=0, n_packets=36, n_bytes=3
076, in_port=3,dl_src=fa:16:3e:70:11:b8 actions=set_field:0x415-
>tun_id,load:0x1->NXM_NX_REG0[],goto_table:20
cookie=0x0, duration=61816.785s, table=0, n_packets=153, n_byte
s=17433, in_port=1,dl_src=fa:16:3e:5c:45:d0 actions=set_field:0x
415->tun_id,load:0x1->NXM_NX_REG0[],goto_table:20
cookie=0x0, duration=275.889s, table=0, n_packets=0, n_bytes=0,
priority=8192,in_port=3 actions=drop
cookie=0x0, duration=61816.78s, table=0, n_packets=0, n_bytes=0

106
Networking-ODL - Openstack Neturon + ODL integreation Project

, priority=8192,in_port=1 actions=drop
cookie=0x0, duration=432.585s, table=0, n_packets=0, n_bytes=0,
priority=8192,in_port=2 actions=drop
cookie=0x0, duration=61856.695s, table=0, n_packets=0, n_bytes=
0, dl_type=0x88cc actions=CONTROLLER:65535
cookie=0x0, duration=61856.695s, table=0, n_packets=8, n_bytes=
648, priority=0 actions=goto_table:20
cookie=0x0, duration=61856.695s, table=20, n_packets=308, n_byt
es=33379, priority=0 actions=goto_table:30
cookie=0x0, duration=61856.695s, table=30, n_packets=308, n_byt
es=33379, priority=0 actions=goto_table:40
cookie=0x0, duration=218.432s, table=40, n_packets=0, n_bytes=0
, priority=61007,tcp,dl_src=fa:16:3e:70:11:b8,nw_dst=0.0.0.0 act
ions=goto_table:50
cookie=0x0, duration=218.44s, table=40, n_packets=0, n_bytes=0,
priority=61007,tcp,dl_src=fa:16:3e:25:ca:a4,nw_dst=0.0.0.0 acti
ons=goto_table:50
cookie=0x0, duration=61856.695s, table=40, n_packets=300, n_byt
es=32595, priority=0 actions=goto_table:50
cookie=0x0, duration=239.24s, table=40, n_packets=4, n_bytes=39
2, priority=61007,icmp,dl_src=fa:16:3e:25:ca:a4 actions=goto_tab
le:50
cookie=0x0, duration=239.227s, table=40, n_packets=4, n_bytes=3
92, priority=61007,icmp,dl_src=fa:16:3e:70:11:b8 actions=goto_ta
ble:50
cookie=0x0, duration=61856.69s, table=50, n_packets=308, n_byte
s=33379, priority=0 actions=goto_table:60
cookie=0x0, duration=61856.686s, table=60, n_packets=308, n_byt
es=33379, priority=0 actions=goto_table:70
cookie=0x0, duration=61856.683s, table=70, n_packets=308, n_byt
es=33379, priority=0 actions=goto_table:80
cookie=0x0, duration=61856.677s, table=80, n_packets=308, n_byt
es=33379, priority=0 actions=goto_table:90
cookie=0x0, duration=230.514s, table=90, n_packets=0, n_bytes=0
, priority=61007,tcp,dl_dst=fa:16:3e:70:11:b8,nw_src=0.0.0.0 act
ions=goto_table:100
cookie=0x0, duration=230.503s, table=90, n_packets=0, n_bytes=0
, priority=61007,tcp,dl_dst=fa:16:3e:25:ca:a4,nw_src=0.0.0.0 act
ions=goto_table:100
cookie=0x0, duration=61856.674s, table=90, n_packets=295, n_byt

107
Networking-ODL - Openstack Neturon + ODL integreation Project

es=32105, priority=0 actions=goto_table:100


cookie=0x0, duration=251.966s, table=90, n_packets=4, n_bytes=3
92, priority=61007,icmp,dl_dst=fa:16:3e:25:ca:a4 actions=goto_ta
ble:100
cookie=0x0, duration=251.972s, table=90, n_packets=9, n_bytes=8
82, priority=61007,icmp,dl_dst=fa:16:3e:70:11:b8 actions=goto_ta
ble:100
cookie=0x0, duration=61856.67s, table=100, n_packets=308, n_byt
es=33379, priority=0 actions=goto_table:110
cookie=0x0, duration=275.863s, table=110, n_packets=0, n_bytes=
0, priority=8192,tun_id=0x415 actions=drop
cookie=0x0, duration=432.582s, table=110, n_packets=135, n_byte
s=15364, tun_id=0x415,dl_dst=fa:16:3e:25:ca:a4 actions=output:2
cookie=0x0, duration=275.885s, table=110, n_packets=20, n_bytes
=2241, tun_id=0x415,dl_dst=fa:16:3e:70:11:b8 actions=output:3
cookie=0x0, duration=61816.776s, table=110, n_packets=99, n_byt
es=11230, tun_id=0x415,dl_dst=fa:16:3e:5c:45:d0 actions=output:1
cookie=0x0, duration=275.873s, table=110, n_packets=44, n_bytes
=3716, priority=16383,reg0=0x1,tun_id=0x415,dl_dst=01:00:00:00:0
0:00/01:00:00:00:00:00 actions=output:1,output:2,output:3
cookie=0x0, duration=275.879s, table=110, n_packets=0, n_bytes=
0, priority=16384,reg0=0x2,tun_id=0x415,dl_dst=01:00:00:00:00:00
/01:00:00:00:00:00 actions=output:1,output:2,output:3
cookie=0x0, duration=61856.667s, table=110, n_packets=10, n_byt
es=828, priority=0 actions=drop
cloud@stackodl1:~/devstack$

The details of the flow table is explained here;

http://www.flaviof.com/blog/work/how-to-odl-with-openstack-part1.html

The pipeline drawing is available in the below link,

https://docs.google.com/drawings/d/1ax9iYnVbaF49DZqrBihnOOHFjeOkMmdo77
9zO9xSdo0/edit

References
http://superuser.openstack.org/articles/open-daylight-integration-with-openstack-a-
tutorial

108
Networking-ODL - Openstack Neturon + ODL integreation Project

http://www.flaviof.com/blog/work/how-to-odl-with-openstack-part1.html

http://sciencecloud-community.cs.tu.ac.th/?p=238
http://abregman.com/2015/11/04/opendaylight-integration-with-openstack-using-
centosrhel-7/

https://github.com/openstack/networking-odl/tree/master/devstack
https://launchpad.net/networking-odl

https://www.youtube.com/watch?v=snomkVK35lk

http://www.siliconloons.com/opendaylight-integration-with-openstack-has-merged-
into-icehouse/#comment-810

109
Example configurations

Devstack with Qos Enabled

[[local|localrc]]
RECLONE=True
HOST_IP=10.0.1.5
SERVICE_TOKEN=mytoken123
ADMIN_PASSWORD=openstack123
MYSQL_PASSWORD=mysql123
RABBIT_PASSWORD=rabbit123
SERVICE_PASSWORD=$ADMIN_PASSWORD
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
disable_service n-net c-api c-sch c-vol
enable_service q-svc q-agt q-dhcp q-l3 q-meta
enable_service q-qos

sss

110
Example configurations

[[local|localrc]]
RECLONE=True
HOST_IP=10.0.1.5
SERVICE_TOKEN=mytoken123
ADMIN_PASSWORD=openstack123
MYSQL_PASSWORD=mysql123
RABBIT_PASSWORD=rabbit123
SERVICE_PASSWORD=$ADMIN_PASSWORD
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
enable_plugin neutron-lbaas https://github.com/openstack/neutron
-lbaas.git stable/ocata
enable_plugin neutron-fwaas https://git.openstack.org/openstack/
neutron-fwaas stable/ocata
disable_service n-net c-api c-sch c-vol
enable_service q-svc q-agt q-dhcp q-l3 q-meta
enable_service q-qos
enable_service q-lbaasv2
enable_service q-fwaas-v2

[[post-config|$NEUTRON_CONF]]
[DEFAULT]
service_plugins+=,neutron_lbaas.services.loadbalancer.plugin.Loa
dBalancerPluginv2
service_plugins+=,firewall_v2
[service_providers]
service_provider = LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.
haproxy.plugin_driver.HaproxyOnHostPluginDriver:default
service_provider += ,FIREWALL:Iptables:neutron.agent.linux.iptab
les_firewall.OVSHybridIptablesFirewallDriver:default

111

Das könnte Ihnen auch gefallen