Devstack For Beginners PDF
Devstack For Beginners PDF
Devstack For Beginners PDF
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
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.
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.
Once your Ubuntu 14.04 OS is ready, Make sure you update it as below.
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
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:
```
SERVICE_TOKEN=mytoken123
ADMIN_PASSWORD=openstack123
MYSQL_PASSWORD=mysql123
RABBIT_PASSWORD=rabbit123
SERVICE_PASSWORD=$ADMIN_PASSWORD```
```
disable_service n-net
enable_service q-svc q-agt q-dhcp q-l3 q-meta ```
5
Basic Installation
Also, disabled the cinder services, as i dont require. if you need, you can enable
that.
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
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$
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 :
8
Basic Installation
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
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.
10
Basic Installation
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.
./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
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
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
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$
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
Role in OpenStack
Devstack Screens
In the devstack screens,
15
Keystone
Stop/Start Keystone
To be updated
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
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
16
Keystone
3. Delete a Project
17
Keystone
5. List users
18
Keystone
6.List Roles
19
Keystone
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.
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
Note : To upgrade the openstack client sudo pip install --upgrade python-
openstackclient
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$
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
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
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$
30
Exercises
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$
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
enable_service q-qos
To enable LBAASv1
To enable LBAASv2
To Enable FWaasv2
To Enable FWAASv1
36
Neutron Networking explained
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).
In the devstack linux console, execute the sudo ip netns list command.
37
Neutron Networking explained
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$
38
Neutron Networking explained
cloud@devstack:~/devstack$
We can login to this namespace console and execute all the linux commands.
Example
39
Neutron Networking explained
root@devstack:~/devstack#
40
Neutron Networking explained
41
Neutron Networking explained
"neutron-l3-agent-snat" tale , the below line enables SNAT for all the private
networks connected to this router. this is the default configuration.
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
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
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 '^#')
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.
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
solution:
46
DevStack with OpenContrail
Failure2
solution
3.Screens
You will get two screens, one screen for openstack, other one for opencontrail.
47
DevStack with OpenContrail
cloud@devstack1:~/devstack$
Openstack Screen
Opencontrail Screen
48
DevStack with OpenContrail
49
DevStack with OpenContrail
4.How to Use
To be updated
5.Exercises
To be updated
50
Devstack with BagPipe Driver
[[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
Q_PLUGIN=ml2
Q_ML2_PLUGIN_TYPE_DRIVERS=vxlan
Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,l2population
51
Devstack with BagPipe Driver
[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
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
54
Devstack with LBAAS
Ref:
http://docs.openstack.org/mitaka/networking-guide/adv-config-lbaas.html
[[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
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.
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
Introduction
Rally is a Benchmark-as-a-Service project for OpenStack.
How to run
Installation
Execute the following command
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.
* 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
59
Rally - Openstack Benchmarking Project
HINTS:
* To get your cloud resources, run:
rally show [flavors|images|keypairs|networks|secgroups]
60
Rally - Openstack Benchmarking Project
61
Rally - Openstack Benchmarking Project
For sample execution, we will just modify this test input to run 1 VM as below.
62
Rally - Openstack Benchmarking Project
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
----------------------------------------------------------------
----------------
{
"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
}
}
}
]
}
65
Rally - Openstack Benchmarking Project
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
----------------------------------------------------------------
----------------
Task 5887aaba-7f49-4467-8fe5-2b4fa392f65d: finished
----------------------------------------------------------------
----------------
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 |
+--------------------+-----------+--------------+--------------+
--------------+-----------+-----------+---------+-------+
HINTS:
69
Rally - Openstack Benchmarking Project
(rally)cloud@stack-2:~/mytest$
Next generate the HTML output for the test execution as below,
70
Rally - Openstack Benchmarking Project
If you look the above test case boot-and-delete.json file, There are three input
category
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.
"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.
In our example,
(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)
74
Rally - Openstack Benchmarking Project
75
Rally - Openstack Benchmarking Project
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
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
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
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
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
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
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
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
100
Rally - Openstack Benchmarking Project
tenant. |
+---------------------------------------------------------------
-+-----------+--------------------------------------------------
-----------------------+
(rally)cloud@stack-2:~/rally$
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
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.
Not supported:
Test Environment
My Test bed is like below I am using TWO VMs
102
Networking-ODL - Openstack Neturon + ODL integreation Project
ODL Setup:
ODL must be installed and configured before devstack.
Verify the ODL neutron plugin using the below curl request
Thats all
Devstack setup
Mitaka release being used .
http://www.flaviof.com/blog/work/how-to-odl-with-openstack-part1.html
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
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.
104
Networking-ODL - Openstack Neturon + ODL integreation Project
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:~#
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
http://www.flaviof.com/blog/work/how-to-odl-with-openstack-part1.html
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
[[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