OpenStack devstack

From FedoraProject

Revision as of 13:48, 22 March 2012 by Admiyo (Talk | contribs)

Jump to: navigation, search

Devstack is a script used primarily for upstream OpenStack development. This wiki page documents usage information for devstack on Fedora.

Contents

Feedback

Stop (medium size).png
Work in Progress
You should be aware up front that Devstack support for Fedora is still a work in progress. You may run into problems. If you do, please provide feedback on the review so we can get the problems resolved. Also, if you come up with any tips that Fedora users should be aware of, please update this page. Thanks!

Getting Devstack for Fedora

Devstack does not currently officially support Fedora. However, there is a patch that adds support for Fedora 16 which you can find here. Optionally, you can grab a version from github that includes support for using Qpid as the messaging system instead of RabbitMq: russellb's github repo.

In either case, start by clong the upstream devstack repo.

 $ git clone git://github.com/openstack-dev/devstack.git

Using the patch from gerrit

Go to the gerrit page for the patch and find the Download section. It will provide a git command to use to get the latest version of the patch.

Using russellb's github repo

 $ git remote add russellb git://github.com/russellb/devstack.git
 $ git remote update
 $ git checkout -b fedora-support russellb/fedora-support

Initial Setup

Devstack allows you to create a localrc file with settings specific to your environment. Creating this file isn't strictly necessary, but it's likely you'll want to use it at some point. Here are some options commonly used that are worth noting:

  • MESSAGING_SYSTEM=qpid
    • Set this option if you are using the version from russellb's github repo and would like to use Qpid instead of RabbitMQ.
  • HOST_IP_IFACE=em1
  • PUBLIC_INTERFACE=em1
  • VLAN_INTERFACE=em1
  • FLAT_INTERFACE=em1
    • By default, devstack assumes your primary network interface is eth0. Ethernet and other network device naming has changed in recent versions of Fedora. To see what your machine actually uses for a network device, run ifconfig and use the device that your machine uses to talk to the outside world. It is likely that this is em1.

For a list of other variables that can be specified, including ones that allow you specify custom git repos and branches to use for testing, see the stackrc file.

Running Devstack

To run devstack, you just run the stack.sh script.

Note.png
Root
Note that this script expects to be run as non-root, but with sudo access. If you run the script as root, it will automatically create a new user.
$ ./stack.sh

Using the environment

Once the stack is up and running, you can use it like you would any other OpenStack deployment. Devstack includes a couple of files that will populate your environment with the needed variables for various tools to work: openrc and eucarc.

$ . ./openrc
$ nova list
$ . ./eucarc
$ euca-describe-instances

Running the devstack exercises

Devstack includes a set of exercise scripts to do some basic testing of the running stack. These tests are used by jenkins to gate commits to various OpenStack projects. To run them, run the exercise.sh script.

$ ./exercise.sh

To see a list of tests:

$ ls exercises/
boot_from_volume.sh  bundle.sh  client-args.sh  client-env.sh  euca.sh  floating_ips.sh  swift.sh  volumes.sh

To skip a set of exercises, specify a comma separated list of exercise names in the SKIP_EXERCISES variable:

$ SKIP_EXERCISES=switft,volumes
$ ./exercise.sh