Jump to: navigation, search

OpenDaylight OpenStack Quantum Plugin:Main

OpenDaylight logo.jpg

OpenDaylight Openstack Quantum Plug-in

This procedure will install Devstack with the OpenDaylight OpenStack Quantum Plugin, on a single node.

Prerequisites

Configure Openstack support in OpenDaylight Network Virtualization. View the section called OpenDaylight Network Virtualization - OpenStack

Location of Repositories

The following lists the different code repositories and their relevance:

1. The OpenStack/Quantum community accepted version of our code resides in the OpenStack Quantum repo's master branch:

https://github.com/openstack/quantum

In this tree you will need to navigate to: quantum/plugins/oscp

Note that the plugin directory is "oscp", not "restproxy" (the plugin implementation class is called RestProxy). This version of the code is actively maintained by us, however it lags our latest version since we have decided to push changes periodically (to avoid getting bogged down by review cycles) unless it's a critical bug that needs to be fixed.


Installation Instructions

Install a standalone Openstack node

Start with a fresh Ubuntu server 12.04.1 (64-bit) VM.  You probably want to configure two interfaces: eth0 for mgmt and eth1 for data.

Note: Please do not run these instructions as 'root'. The script will 'sudo' for you when needed.

Install devstack and configure each of the nodes

Install Ubuntu VM image

cd ~/devstack
 wget http://uec-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img
 source openrc admin admin
 glance image-create --name=ubuntu --is-public=true --container-format=bare --disk-format=qcow2 <  precise-server-cloudimg-amd64-disk1.img

Set up an SSH Key

source openrc admin admin
 ssh-keygen
 cd ~/.ssh
 nova keypair-add --pub_key id_rsa.pub mykey


Loosen security group settings

cd ~/devstack
 source openrc admin admin
 nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
 nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0
 nova secgroup-add-rule default udp 1 65535 0.0.0.0/0


Configure External Gateway

First, create the external ONV and add the MAC of the gw.

onv-controller-1# configure 

 onv-controller-1(config)# tenant external
 onv-controller-1(config-tenant)# onv-definition external
 onv-controller-1(config-tenant-def-onv)# priority 1100
 onv-controller-1(config-tenant-def-onv)# interface-rule default-gw-mac
 onv-controller-1(config-tenant-def-onv-if-rule)# match mac <insert_your_gw_mac>
 onv-controller-1(config-tenant-def-onv-if-rule)# allow-multiple
 onv-controller-1(config-tenant-def-onv-if-rule)# end


Next, create the external router:


onv-controller-1# configure 
onv-controller-1(config)# tenant external
 onv-controller-1(config-tenant)# router external
 onv-controller-1(config-tenant-router)# interface to_onv_external onv external
 onv-controller-1(config-tenant-router-intf)# exit
 onv-controller-1(config-tenant-router)# interface to_vrsystem tenant system vrsystem
 onv-controller-1(config-tenant-router-intf)# exit
 onv-controller-1(config-tenant-router)# route from onv external to any permit
 onv-controller-1(config-tenant-router)# route from any to <your_supernet_cidr> deny
 onv-controller-1(config-tenant-router)# route from any to <gw_ip> permit
 onv-controller-1(config-tenant-router)# route from any to any <gw_ip> to_onv_external permit
 onv-controller-1(config-tenant-router)# end


Next, edit the system router:


onv-controller-1# configure 
 onv-controller-1(config)# tenant system
 onv-controller-1(config-tenant)# router vrsystem
 onv-controller-1(config-tenant-router)# interface to_external tenant external external
 onv-controller-1(config-tenant-router-intf)# exit
 onv-controller-1(config-tenant-router)# route from tenant external to any permit
 onv-controller-1(config-tenant-router)# route from any to any to_external permit
 onv-controller-1(config-tenant-router)# end


Finally, create a static arp entry:


onv-controller-1# configure
 onv-controller-1(config)# arp <gw_ip> <gw_mac>
 onv-controller-1(config)# end

Use openstack to create VMs

After successful installation, you can access the OpenStack web UI (Horizon) as a "demo" user. The password is what you provided when you executed the install-devstack.sh script (if you did not provide one, it's "nova" by default).

You can perform administrative tasks by logging in as "admin" user (the password is the same as that for the "demo" user).

Steps to Launch a VM:

  1. Create a Quantum Network and Subnet.   A default network called "private" will be automatically created after the devstack installation. You can choose to create more networks from the "Networks" panel.  When creating networks leave the "IP Gateway" field blank. A .1 IP in that subnet will be automatically chosen for the gateway.
  2. Launch Instance.  You should select "mykey" as ssh key and the network you chose as well.


Image notes

Ubuntu VM: It is recommended you use the ubuntu vm.  It comes  with a user "ubuntu" but no password configured.  To login, you must set up an ssh key via openstack.
Cirros VM: The cirros vm has an older version of dhcp client and cannot read routes from dhcp. As a result, the VNC console does not work.
The username and password for cirros vm (that is the image installed by default) are "cirros" and "cubswin:)"

Using Dataplane devices

If you have not yet configured it, you may want to configure tunnels or add an external interface to OVS.  Make sure both interfaces are configured and up:

/etc/network/intefaces
 # This file describes the network interfaces available on your system
 # and how to activate them. For more information, see interfaces(5).
 # The loopback network interface
 auto lo
 iface lo inet loopback
 # The primary network interface
 auto eth0
 iface eth0 inet dhcp
 auto eth1
 iface eth1 inet manual

Then attach eth1 to ovs.

$ sudo ovs-vsctl add-port br-int eth1
 $ sudo ifconfig eth1 up

Stopping Devstack

To stop the currently running devstack instance, unstack as:

$ cd ~/devstack; ./unstack.sh

Restarting Devstack

To restart the devstack instance, run as:

 $ sudo rm -rf ~/devstack/aarc
 $ sudo ~/deployment-support/openstack/configure-metadata-server.sh <management interface e.g. eth0> 8775
 $ cd ~/devstack; ./stack.sh


Troubleshooting

If you run into any issues you might find some solutions Troubleshooting Tips for OpenStack Installation/Deployment]

Notes

Floating IP Addresses

Horizon will display the widgets to set the floating IP addresses. However these are currently not supported by the plugin.