2016-12-29

For developing and testing the F5 OpenStack agent and driver, I created a DevStack virtual machine on my MacBook Pro using VMware Fusion Pro for OSX version 7.1.3.  DevStack is a collection of scripts that allows users to rapidly deploy an OpenStack environment.  I run this DevStack virtual machine along with a BIG-IP Virtual Edition (VE) as a self-contained environment for quick development and test. If you would like to install this along with a BIG-IP Virtual Edition, I recommend reading Deploying F5 BIG-IP Virtual Edition on VMware Fusion by Chase Abbott.  I will build upon his article and use the same networks so that the reader can integrate the BIG-IP into an OpenStack environment.  In order to install both a DevStack VM and F5 BIG-IP Virtual Edition on the same host, I would recommend using a host with 16GB of RAM.

DevStack Install

Create VMware networks

Install Ubuntu 14.04

Install DevStack

Create Custom API and Provider Networks

If you have followed the instructions on how to install and configure additional networking, you can use vmnet2 and vmnet4 as OpenStack public and API networks.  If you do not wish to install VE and only need to set up VMware networks, then do the following:

Start VMware Fusion Pro, and select the menu VMware Fusion > Preferences

Click the Network icon

Click the lock icon to authenticate and create additional networks

Click the + icon to create an additional network, for my example I will use vmnet2 and vmnet4.

Select vmnet2 and configure the following (provider) network:

Select the option, "Allow virtual machines on this network to connect to external networks (using NAT).”

Select the option, “Connect the host Mac to this network.”

Select “Provide addresses on this network via DHCP.”

In the Subnet IP field, enter 10.128.1.0

In the Subnet Mask field, enter 255.255.255.0

Select vmnet4 and configure the following (OpenStack API) network:

Select the option, "Allow virtual machines on this network to connect to external networks (using NAT).”

Select the option, “Connect the host Mac to this network.”

Select “Provide addresses on this network via DHCP.”

In the Subnet IP field, enter 10.128.1.0

In the Subnet Mask field, enter 255.255.255.0

Create Ubuntu 14.04 Instance

Download an ISO image Ubuntu Server 14.04.5 Trusty for the DevStack VM.  There are more recent versions of Ubuntu available; however, these may not be supported by the OpenStack Mitaka release.

The VM that I create has 2 processor cores and 4GB RAM of -- it is not a very beefy setup, and more resources could be added, but this is good enough for a small development environment.  If you want to add a BIG-IP VE on the same development host, you should stay within these constraints.

Provision Processors and Memory

Start VMware Fusion Pro, and select the menu File > New, and click Continue.

Chose to install from the ubuntu-14.04.5-server-amd64.iso

Select Customize Settings

Chose a name for the virtual machine and click Save

Select Processors & Memory​

Select 2 processor cores from the Processors drop down

Change the Memory amount to 4096

Click on Advanced options and select Enable hypervisor applications in this virtual machine

Connect Network Adapters

Click Network Adapter, and click vmnet2

Click Show All, and click Add Device

Click Network Adapter, and Add…

Click vmnet4, and click Show All

Close the Settings window and start the install.

Install the Ubuntu 14.04.5 Server VM

Chose all the defaults during install until the network configuration.

Select eth0 as the primary network interface.  This will be the management interface.

Enter whatever you would like for hostname

Add a new user and add a password.

For disk partitioning:

Select the Guided – use entire disk and set up LVM method

Select Yes, when prompted, Write the changes to disks and configure LVM?

Accept the default when prompted, Amount of volume group to use for guided partitioning.  Click Continue

Select Yes, when prompted; Write the changes to disks?

Choose Continue when prompted for a proxy.

When prompted; “How do you want to manage upgrades on this system?”  Select: No automatic updates

Select OpenSSH server in the Software Selection screen.  Wait for software to install.

Select Yes, when prompted; Install the GRUB boot loader to the master boot record?

To finish the install select Continue

Configure the Virtual DevStack VM

After the DevStack VM reboots, you’ll be presented with a login screen.

Log in to the Ubuntu server with the username and password you created during the install

Update and install packages

$ sudo apt-get update

$ sudo apt-get upgrade -y

$ sudo apt-get install git -y

Reboot the host.

Configure the VM networking

It is a good idea to create static IP addresses on the guest interfaces for the OpenStack service API endpoints.  Edit the network configuration, /etc/network/interfaces.  I modified mine based on the VM’s network adapter configuration.

You must also update resolver configuration, /etc/resolvconf/resolv.conf.d/base

Once you have finished, you can either restart networking and resolvconf or just reboot the guest.

Install DevStack

These instructions are taken from the DevStack website:

http://docs.openstack.org/developer/devstack

Add Stack User

Download DevStack

Login as the stack user or as the user you created when installing Ubuntu and clone the devstack repository.  To work on Mitaka, checkout the stable mitaka branch.

Create a local.conf

The local.conf is used as configuration input to the DevStack deployment scripts.  It is very configurable, but not well documented.  Most of the default values in the configuration file are acceptable; however, if you want to explore the options available you will very likely find yourself delving into the deployment scripts.  What I am providing is a sparse configuration to get Keystone, Glance, Nova, Neutron and Neutron-LBaaS running.  The devstack repository contains a sample local.conf, devstack/samples/local.conf.

Copy the sample configuration into the devstack directory.

$ cp devstack/samples/local.conf devstack

Modify the HOST_IP and HOST_IP_IFACE to reference the API endpoint.  In the case of this example we use eth1

HOST_IP=10.128.20.150

HOST_IP_IFACE=eth1

Append a neutron configuration:

Disable swift, tempest and horizon and fix the noVNC version to 0.6.0

The swift project can be enabled, but I find it superfluous to manage object storage on a laptop virtual machine.  The current version of Horizon exposes a bug in the openstack-sdk package that breaks the installation.  It can be added back in on a subsequent build, but a change to the Mitaka requirements must be made first.  I will add details below.  The noVNC branch must be fixed at 0.6.0 or you will experience problems with console access to VM’s.

Deploy Stack

Now run the stack script.  This will take about 15 minutes the first time to install, but once the service repositories are cloned will be much shorter on subsequent runs.

Congratuations! You should now have a running Mitaka stack.

Teardown and cleanup stack

Once you are finished with the deployment you should teardown the services and cleanup the stack.

Install Horizon

In order to get Horizon to work on the current stable mitaka branch, you will need to teardown your current stack and restack.  Once the stack is cleaned up, edit the following file, /opt/stack/requirements/upper-constraints.txt by changing the upper constraint on openstacksdk.  You can uncomment the disable_service horizon line in local.conf and then restack.

Change the line:

To:

Show more