12
HP SDN VM and Ubuntu Setup Technical Configuration Guide Version: 1 September 2013

Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013

Embed Size (px)

Citation preview

Page 1: Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013

HP SDN VM and Ubuntu Setup Technical Configuration Guide

Version: 1 September 2013

Page 2: Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013
Page 3: Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013

Table of Contents

Introduction .................................................................................................................................................................................... 2 Option 1: VirtualBox Preconfigured Setup ............................................................................................................................... 2 Option 2: VMware Setup (from scratch) ................................................................................................................................... 5 Resources, contacts, or additional links ................................................................................................................................. 10

Learn more at hp.com/Networking..................................................................................................................................... 10

Page 4: Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013

Introduction This document describes the setup of two Ubuntu virtual machines necessary to setup an HP SDN development environment:

• Ubuntu 12.10 Desktop: Developer Host

• Ubuntu 12.04 Server LTS: HP SDN Controller and Mininet

These VMs must be connected via an internal adapter within VMWare.

Figure 1: SDN Environment

There are two options to install these VMs:

• VirtualBox preconfigured setup

• VMWare setup

In subsequent documents it is assumed that these VMs have been installed following one of these two procedures.

Option 1: VirtualBox Preconfigured Setup Open Virtualization Format (OVF) is an open standard for distributing virtual appliances or virtual machines.

These files can be used across multiple hypervisors and processor architectures. The OVF package consists of server files within a directory. The directory can be distributed as an OVA package, which is a tar archive file with the OVF directory inside.

Two OVA files are provided which contain all the required files for Mininet and the SDN controller.

To use the preconfigured OVA files, import both files into virtual box by double clicking on them (see next slides for more details). The developer OVA file is larger than the controller OVA file.

Preconfigured OVA files:

• SDN Controller.ova

– Ubuntu Server (No GUI interface)

– Controller software and Mininet

– 1.2 GB size

• SDN Developer.ova

– Ubuntu Desktop (GUI interface)

– Developer tools

– 3GB in size

• Import both files into Virtual box (or other)

Software platform options

2

Page 5: Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013

HP SD VM and Ubuntu Setup

– VirtualBox 4.2.12+ (https://www.virtualbox.org/wiki/Downloads)

– These can be imported into VMWARE for example

• Setup VitualBox

– Download the appropriate version for your operating system from

https://www.virtualbox.org/wiki/Downloads

– and follow the prompts to install the software

Figure 2: VM VirtualBox setup

• The two preconfigured OVA files available that include all the required software. The two machines are a Developer Host running the Ubuntu 12.10 Desktop version, and the second one runs Ubuntu 12.04 Server LTS. The server version is where the HP SDN Controller and Mininet are installed.

They are connected via an internal adapter within VirtualBox. The SDN developer host has an IP address of 192.168.56.8 and the SDN Controller host has an IP address of 192.168.56.7. All pre-requisite software is installed allowing for immediate install of the HP SDN controller software. The SDN developer host is not an absolute requirement. This could be replaced and the host operating system could be used to connect to the controller. However, to be consistent, both these machines will be used in the labs in this course. The two machines are connected internally and the developer machine is also bridged so that it can be used to connect to the Internet. Software installed on the Controller host includes:

– Open jdk 7 jre headless

– Postgresql

– Keystone

– Mininet

Software installed on the Developer host includes:

– Openjdk

– Maven

– Eclipse

– Curl

– Samples

• Download the Controller OVA file from: This link will be updatd when the controller is publicly available.

Then double click on the OVA file to import the appliance into VirtualBox.

• Download the Controller OVA file from: This link will be updatd when the controller is publicly available.

Then double click on the OVA file to import the appliance into VirtualBox.

3

Page 6: Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013

Figure 3: VM VirtualBox appliance importation

Once imported, both machines should show in VirtualBox and they can now be started by clicking on the “Start” button.

Figure 4: VM VirtualBox Manager

• Start SDN Controller VM

– Select SDN Controller VM and press Start

– Press Change Network Settings button on the dialog

– Press the OK button to accept the default network adapter

– Login as user sdn with password skyline to verify, then logout

• Start SDN Developer VM

– Select SDN Developer VM and press Start

– Press Change Network Settings button on the dialog

– Press the OK button to accept the default network adapters

– Login as user sdn with password skyline.

• Configure VM VirtualBox network

An error may display stating that a physical network interface was not found. This is an expected error. Click on the “Change Network Settings” button and then click “OK” to correct the error. You may need to do this for both the Controller and Developer virtual machines.

Figure 5: VM VirtualBox - network interface was not found error

If no Host-Only adapter exists, add one to VirtualBox by following these steps:

– Select File & Preferences in VirtualBox

– Select Network category

– Add a new VirtualBox Host-Only Ethernet Adapter if you already do not have one

– Press the OK button

Once imported, two virtual machines should be available and have connectivity between them.

4

Page 7: Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013

HP SD VM and Ubuntu Setup

Figure 6: VM VirtualBox Ubuntu VMs

• Login and test connectivity.

Click on Terminal to start a terminal session. Then ping the Controller VM:192.168.56.7.

The following steps have been used to prepare the SDN Controller VM and are not required if the OVA files are used within VirtualBox

– Base OS

– Ubuntu 12.04 Server LTS amd64

– Patch to latest updates and 3.5 kernel

• Install Additional Packages

The additional required packages can be installed using the following commands:

sudo apt-get install python-software-properties ubuntu-cloud-keyring sudo add-apt-repository "deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/folsom main"

sudo apt-get update sudo apt-get install openjdk-7-jre-headless postgresql keystone keystone-doc python-keyston

Note The development environment is ready to be used. Installation of the HP SDN controller and Mininet is described in the corresponding documents in this portfolio.

Option 2: VMware Setup (from scratch) The following list shows the steps to install the SDN Controller from scratch.

• Configure VMWare

• Install Ubuntu - Controller

• Controller requires: Ubuntu 12.04 Server LTS amd64

• Patch to latest updates and 3.5 kernel

• Install Ubuntu – Developer

• Ubuntu 12.10 Desktop Version

• Configure networking

• Configure IP addresses

• Install prerequisite software on Controller VM

5

Page 8: Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013

– OpenJDK 7 JRE

– PostgreSQL 9.1

– Keystone 2012.2

• Install Curl on Developer VM

• Enable SSH on Developer and Controller VMs

• Download Ubuntu

The HP SDN Controller requires: Ubuntu 12.04 Server LTS amd64 patched to latest updates and 3.5 kernel. To download Ubuntu, use the following links. Ubuntu Server: http://www.ubuntu.com/download/server Ubuntu Desktop: http://www.ubuntu.com/download/desktop

• Create a new virtual machine (VM) for new install of Ubuntu 12.04

Follow the Wizard’s instructions.

Figure 7: VM Creation

– Point VMWare to the downloaded ISO image

– Select a username and password

– Configure install directory and machine name

– Select 20GB as disk size

– Click Finish to confirm

• VMWare restarts and Ubuntu is installed.

Figure 8: Ubuntu VM Installation

This process needs to be done twice:

– For the SDN controller VM – Ubuntu Server

6

Page 9: Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013

HP SD VM and Ubuntu Setup

– For the SDN developer VM – Ubuntu Desktop

Figure 9: Controller VM – Ubuntu Server

Note The Controller VM still requires the installation of pre-requisite software including Mininet.

Figure 10: Developer VM – Ubuntu Desktop

Note Once the installation process ends, both Ubuntu VMs are ready for login. However, before logging in, network adapters must be configured on each VM.

• Configure two network adapters on the Developer VM:

Network Adapter 1:

– Custom connection

– Connected to VMnet2

– IP address manually configured

Network Adapter 2:

– Bridged connection

7

Page 10: Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013

– Connected to physical network

– Requires IP address from DHCP server and Internet access

• Configure two network adapters on the Controller VM:

Network Adapter 1:

– Custom connection

– Connected to VMnet2

– IP address manually configured

Network Adapter 2:

– Bridged connection

– Connected to physical network

– Requires IP address from DHCP server and Internet access

Figure 11: Developer and controller VM’s network adapters

• Configure connectivity between the Developer VM and the Controller VM within VMWare

– Select the VM, then Settings, and ensure that a virtual network is configured between the Developer and Controller using VMnet2.

– Another network adapter is added to both the Developer and Controller VMs and bridged to the external network. This second interface will be used for updating the software from Ubuntu.com

• Login to both VMs.

The controller VM offers the CLI by default while the developer VM offers the GUI by default. On the developer VM:

– Select Dash home

– Search for “terminal”

– Select terminal

– Type commands in terminal window

• Configure IP addresses for internal communication

SDN Controller VMnet2 interface

sudo ifconfig eth1 192.168.56.7 netmask 255.255.255.0

SDN Developer VMnet2 interface

sudo ifconfig eth1 192.168.56.8 netmask 255.255.255.0

Ping Controller VM from the Developer VM

ping 192.168.56.7

• Configure IP addresses for external communication

SDN Controller Outside interface – either configure statically or use DHCP

sudo ifconfig eth0 x.x.x.x netmask 255.255.255.0

or

8

Page 11: Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013

HP SD VM and Ubuntu Setup

sudo ifconfig eth0 dhcp

SDN Developer Outside interface – either configure statically or use DHCP

sudo ifconfig eth0 x.x.x.x netmask 255.255.255.0

or

sudo ifconfig eth0 dhcp

• Install the following dependencies on the HP SDN Controller VM:

– OpenJDK 7 JRE

– PostgreSQL 9.1

– Keystone 2012.2

To do this, connect via the CLI and type the commands:

sudo apt-get install python-software-properties ubuntu-cloud-keyring sudo add-apt-repository “deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/folsom main”

sudo apt-get update

• Install Headless Open JDK using the following command:

sudo apt-get install openjdk-7-jre-headless postgresql keystone keystone-doc python-keyston

• Install Curl on the Developer VM machine. Curl is used in the REST API labs.

Use the following commands to install curl and restart the web service:

$ sudo apt-get install curl libcurl3 libcurl3-dev php5-curl $ sudo /etc/init.d/apache2 restart

• Enable SSH on both VMs

$ sudo apt-get install openssh-server

• The sample scripts and files need to be downloaded and uploaded to the Developer virtual machine.

• Ask your instructor for the files or download from:

• This link will be updatd when the controller is publicly available.Configure IP addresses for external communication

SDN Developer – needs an IP address via DHCP or manually configured

sudo ifconfig eth1 x.x.x.x netmask 255.255.255.0

• Copy SDN files via FileZilla

Use SFTP – SSH File Transfer Protocol. Configure settings such as username and password. Accept keys when prompted.

Note The development environment is ready to be used. Installation of the HP SDN controller and Mininet is described in the corresponding documents in this portfolio.

9

Page 12: Technical Configuration Guide Version: 1 September …h17007. · HP SDN VM and Ubuntu Setup . Technical Configuration Guide . Version: 1 . September 2013

Resources, contacts, or additional links HP SDN: http://hp.com/sdn

HP SDN SDK and documentation: http://sdndevcenter.hp.com

Learn more at hp.com/Networking

Sign up for updates

hp.com/go/getupdated

Share with colleagues

Rate this document

© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.

October 2013