By default, devstack puts your GIT checkout in /opt/stack instead of your home directory. To choose a more sensible location set

By default, devstack puts your GIT checkout in /opt/stack instead of your home directory. To choose a more sensible location set

−

DESTDIR=$HOME/src/openstack

+

DEST=$HOME/src/openstack

+

DATA_DIR=$DEST/data

+

+

By default DevStack will spew 100000's of lines of shell script at your console while it works. This is less than helpful, because you can't understand what it is doing and if something goes wrong the important messages have probably scrolled off the screen. So turn off verbose output and instead save all shell output to log files. Also make each screen session log its output.

+

+

LOGFILE=$DATA_DIR/logs/stack.log

+

SCREEN_LOGDIR=$DATA_DIR/logs

+

VERBOSE=False

Set this if you would like to use Qpid instead of RabbitMQ. Qpid is set as the default in the Fedora OpenStack packages.

Set this if you would like to use Qpid instead of RabbitMQ. Qpid is set as the default in the Fedora OpenStack packages.

Revision as of 17:43, 2 January 2013

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

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:

By default, devstack puts your GIT checkout in /opt/stack instead of your home directory. To choose a more sensible location set

DEST=$HOME/src/openstack
DATA_DIR=$DEST/data

By default DevStack will spew 100000's of lines of shell script at your console while it works. This is less than helpful, because you can't understand what it is doing and if something goes wrong the important messages have probably scrolled off the screen. So turn off verbose output and instead save all shell output to log files. Also make each screen session log its output.

Set this if you would like to use Qpid instead of RabbitMQ. Qpid is set as the default in the Fedora OpenStack packages.

disable_service rabbit
enable_service qpid

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.

When creating the stack deployment for the first time, you are going to see prompts for multiple passwords. Your results will be stored in the localrc file. If you wish to bypass this, and provide the passwords up front, add in the following lines with your own password:

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.

NodeJSNote that the nodejs RPMs are not currently available in Fedora and devstack will not install them. Thus if you intend to run Horizon, you must to manually install the 'nodejs' and 'nodejs-compat-symlinks' RPMs from http://nodejs.tchol.org/

RootNote 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.