Tutorial: Build a Private Cloud in Twenty Minutes
How to set up devstack, a single server instance for developing OpenStack
May. 2, 2012 06:00 AM
- stack@ubuntu-server:~$sudo passwd to set the root password
- stack@ubuntu-server:~$ 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-doc git-el git-arch git-cvs git-svn git-email git-daemon-run git-gui
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 http://us.archive.ubuntu.com/ubuntu/ oneiric/main liberror-perl all 0.17-1 [23.8 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ oneiric/main git-man all 1:188.8.131.52-1 [571 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ oneiric/main git amd64 1:184.108.40.206-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%3a220.127.116.11-1_all.deb) ...
Selecting previously deselected package git.
Unpacking git (from .../git_1%3a18.104.22.168-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up liberror-perl (0.17-1) ...
Setting up git-man (1:22.214.171.124-1) ...
Setting up git (1:126.96.36.199-1) ...
3. stack@ubuntu-server:~$git clone git://github.com/openstack-dev/devstack.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
Copy the sample localerc to the root devstack directory
1. stack@ubuntu-server:~$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 ``stack.sh``
# 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 ``stack.sh`` 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 http://devstack.org/localrc.html
# These should be considered as samples and are unsupported DevStack code.
# Minimal Contents
# While ``stack.sh`` 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 ``stack.sh``.
# HOST_IP should be set manually for best results. It is auto-detected during the
# first run of ``stack.sh`` 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 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 stack.sh to perform a first time configuration and start the cloud controller
<many lines of output will be emitted by stack.sh, but are omitted from this blog post>
Horizon is now available at http://10.202.181.21/
Keystone is serving at http://10.202.181.21:5000/v2.0/
Examples on using novaclient command line is in exercise.sh
The default users are: admin and demo
The password: password
This is your host ip: 10.202.181.21
stack.sh completed in 966 seconds.
OpenStack is up!
- Type http://10.202.181.21 in your browser
- Login as "admin", "password" (or whatever you chose for the password above).
- Click the "projects" tab
- Click "Instances and volumes"
- Click "Launch instance" and give it name "test1"
- Congratulations, you now have a Linux instance/virtual machine, running within your OpenStack cloud!