Virtualization and Cloud

Jonathan Gershater

Subscribe to Jonathan Gershater: eMailAlertsEmail Alerts
Get Jonathan Gershater: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Related Topics: Cloud Computing, Rackspace Journal, Open Source and Cloud Computing, OpenStack Journal

OpenStack: Blog Post

Tutorial: Build a Private Cloud in Twenty Minutes

How to set up devstack, a single server instance for developing OpenStack

Install Devstack

  1. [email protected]:~$sudo passwd to set the root password
  2. [email protected]:~$ sudo apt-get install git -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  git-man liberror-perl
Suggested packages:
  git-doc git-el git-arch git-cvs git-svn git-email git-daemon-run git-gui
  gitk gitweb
The following NEW packages will be installed:
  git git-man liberror-perl
0 upgraded, 3 newly installed, 0 to remove and 65 not upgraded.
Need to get 5,347 kB of archives.
After this operation, 12.6 MB of additional disk space will be used.
Get:1 oneiric/main liberror-perl all 0.17-1 [23.8 kB]
Get:2 oneiric/main git-man all 1: [571 kB]
Get:3 oneiric/main git amd64 1: [4,752 kB]
Fetched 5,347 kB in 38s (138 kB/s)                                             
Selecting previously deselected package liberror-perl.
(Reading database ... 49116 files and directories currently installed.)
Unpacking liberror-perl (from .../liberror-perl_0.17-1_all.deb) ...
Selecting previously deselected package git-man.
Unpacking git-man (from .../git-man_1%3a1.7.5.4-1_all.deb) ...
Selecting previously deselected package git.
Unpacking git (from .../git_1%3a1.7.5.4-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up liberror-perl (0.17-1) ...
Setting up git-man (1: ...
Setting up git (1: ...

3. [email protected]:~$git clone git://

Cloning into devstack...
remote: Counting objects: 5029, done.
remote: Compressing objects: 100% (1688/1688), done.
remote: Total 5029 (delta 3379), reused 4891 (delta 3279)
Receiving objects: 100% (5029/5029), 828.62 KiB | 1.07 MiB/s, done.
Resolving deltas: 100% (3379/3379), done.

devstack is now installed by default in /home/stack/devstack

Configure devstack

Copy the sample localerc to the root devstack directory

1. [email protected]:~$cp /home/stack/devstack/samples/localerc /home/stack/devstack

Edit localerc so that it looks like this. In the example below, all passwords are set to password

# Sample ``localrc`` for user-configurable variables in ````
# NOTE: Copy this file to the root ``devstack`` directory for it to work properl
# ``localrc`` is a user-maintained setings file that is sourced at the end of
# ``stackrc``. This gives it the ability to override any variables set in ``stac
# Also, most of the settings in ```` are written to only be set if no
# value has already been set; this lets ``localrc`` effectively override the
# default values.
# This is a collection of some of the settings we have found to be useful
# in our DevStack development environments. Additional settings are described
# in
# These should be considered as samples and are unsupported DevStack code.

# Minimal Contents
# ----------------
# While ```` is happy to run without ``localrc``, devlife is better when
# there are a few minimal variables set:
# If the ``*_PASSWORD`` variables are not set here you will be prompted to enter
# values for them by ````.
# HOST_IP should be set manually for best results.  It is auto-detected during the
# first run of ```` but often is indeterminate on later runs due to the IP
# being moved from an Ethernet interface to a bridge on the host. Setting it here
# also makes it available for ``openrc`` to include when setting ``OS_AUTH_URL``.
# ``HOST_IP`` is not set by default.
# Set DevStack Install Directory
# ------------------------------
# The DevStack install directory is set by the ``DEST`` variable. By setting it
# early in ``localrc`` you can reference it in later variables. The default value
# is ``/opt/stack``. It can be useful to set it even though it is not changed from
# the default value.

# Using milestone-proposed branches
# ---------------------------------
# Uncomment these to grab the milestone-proposed branches from the repos:

# Swift
# -----
# Swift is now used as the back-end for the S3-like object store. If Nova's
# objectstore (``n-obj`` in ``ENABLED_SERVICES``) is enabled, it will NOT
# run if Swift is enabled. Setting the hash value is required and you will
# be prompted for it if Swift is enabled so just set it to something already:
# For development purposes the default of 3 replicas is usually not required.
# Set this to 1 to save some resources:
# The data for Swift is stored in the source tree by default (``$DEST/swift/data``)
# and can be moved by setting ``SWIFT_DATA_DIR``. The directory will be created
# if it does not exist.

Now run to perform a first time configuration and start the cloud controller

2. [email protected]:~$./

<many lines of output will be emitted by, but are omitted from this blog post>

Horizon is now available at
Keystone is serving at
Examples on using novaclient command line is in
The default users are: admin and demo
The password: password
This is your host ip: completed in 966 seconds.

OpenStack is up!

  1. Type in your browser
  2. Login as "admin", "password" (or whatever you chose for the password above).
  3. Click the "projects" tab
  4. Click "Instances and volumes"
  5. Click "Launch instance" and give it name "test1"
  6. Congratulations, you now have a Linux instance/virtual machine, running within your OpenStack cloud!

More Stories By Jonathan Gershater

Jonathan Gershater has lived and worked in Silicon Valley since 1996, primarily doing system and sales engineering specializing in: Web Applications, Identity and Security. At Red Hat, he provides Technical Marketing for Virtualization and Cloud. Prior to joining Red Hat, Jonathan worked at 3Com, Entrust (by acquisition) two startups, Sun Microsystems and Trend Micro.

(The views expressed in this blog are entirely mine and do not represent my employer - Jonathan).

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.