Install Floodlight and OpenStack on Your Own Ubuntu VM

Overview

The following instructions are for installing Floodlight (latest build) and OpenStack (Grizzly) on a Ubuntu VM using devstack scripts developed by Big Switch.

Prerequisite

  • A virtual machine with Ubuntu Server version of 12.04.1 or later is required.
  • At least 2 GB RAM (Expand for more VMs)
  • At least 30GB storage

What You Will Get 

  • A single node OpenStack installation with Floodlight as its neutron backend.
  • Via the OpenStack Horizon GUI, tenants, virtual networks, and virtual instances can be created. See Verify OpenStack and Floodlight Installation for usage examples.

Install Floodlight

You will need to run a Floodlight controller for the OpenStack Neutron networking support to work.  The floodlight controller can be running on a separate floodlight VM you downloaded earlier, or you can download the floodlight source as a zip file, unzip it, compile and run it with the following simple steps on your Ubuntu VM:

Make sure you have Internet connectivity before proceeding.

$ sudo apt-get update
$ sudo apt-get install zip default-jdk ant
$ wget --no-check-certificate https://github.com/floodlight/floodlight/archive/master.zip
$ unzip master.zip
$ cd floodlight-master; ant
$ mkdir /var/lib/floodlight
$ chmod 777 /var/lib/floodlight
$ java -jar target/floodlight.jar -cf src/main/resources/neutron.properties

To confirm the VirtualNetworkFilter is successfully activated, do the following on your Ubuntu VM:

$ curl 127.0.0.1:8080/networkService/v1.1
{"status":"ok"}

Installing OpenStack with the RestProxy Neutron Plugin using Devstack

Once Floodlight is confirmed running, we are ready to install OpenStack using the install-devstack script. The following steps 1) configures OVS switch on the VM to listen to floodlight and 2) installs OpenStack and the BigSwitch REST proxy plugin on the VM.

If you want the OpenStack Grizzly release:

$ wget https://github.com/openstack-dev/devstack/archive/stable/grizzly.zip
$ unzip grizzly.zip
$ cd devstack-stable-grizzly

If you want the OpenStack Folsom release:

$ wget https://github.com/bigswitch/devstack/archive/floodlight/folsom.zip
$ unzip folsom.zip
$ cd devstack-floodlight-folsom

your favorite editor to create a file named localrc and fill in the following. Remember to replace <password> to your chosen password and update 'BS_FL_CONTROLLERS_PORT=<floodlight IP address>:8080'. If you have run floodlight in the same VM, them use 127.0.0.1 for <floodlight IP address>; otherwise, use the IP address of whichever VM or host where you run floodlight.

disable_service n-net
enable_service q-svc
enable_service q-dhcp
enable_service neutron
enable_service bigswitch_floodlight
Q_PLUGIN=bigswitch_floodlight
Q_USE_NAMESPACE=False
NOVA_USE_NEUTRON_API=v2
SCHEDULER=nova.scheduler.simple.SimpleScheduler
MYSQL_PASSWORD=<password>
RABBIT_PASSWORD=<password>
ADMIN_PASSWORD=<password>
SERVICE_PASSWORD=<password>
SERVICE_TOKEN=tokentoken
DEST=/opt/stack
SCREEN_LOGDIR=$DEST/logs/screen
SYSLOG=True
#IP:Port for the BSN controller
#if more than one, separate with commas
BS_FL_CONTROLLERS_PORT=<ip_address:port>
BS_FL_CONTROLLER_TIMEOUT=10

Then:

$ ./stack.sh

(info)

Note that OpenStack installation is a LONG process that cannot be interrupted. Any interruption or loss of network connectivity results in unknown states that cannot be resumed. It is recommended that you take a "snapshot" using VirtualBox before you begin the installation, such that you can easily power down and restore the original snapshot if indeed the process is interrupted. install-devstack.sh requires uninterrupted IP connectivity to run.

Installation Completes

If the installation completes successfully, it will show the following:

Horizon is now available at http://10.10.2.15/
Keystone is serving at http://10.10.2.15:5000/v2.0/
Examples on using novaclient command line is in exercise.sh
The default users are: admin and demo
The password: nova
This is your host ip: 10.10.2.15
stack.sh completed in 102 seconds.