Fast installation and configuration of OpenStack development environment tutorials with Devstack under KVM

Source: Internet
Author: User
Tags git clone

OpenStack installation and configuration is a bit complicated, especially for beginners, the first time you install OpenStack often encounter a lot of problems. However, in the OpenStack community, some developers have developed a number of automated scripts to facilitate the construction of OpenStack development environment, where Devstack is relatively perfect, It is also recommended by the official website of OpenStack to learn how to build an environment when OpenStack.

Devstack is a set of automated scripts written in bash by Rackspace Company for building and configuring a complete set of development environments for OpenStack. Devstack's official website is, where you can see how devstack scripts are used and how they work.

Currently, Devstack has better support for Ubuntu and Fedora Systems for Ubuntu 12.04 and Fedora 16 and above, and choosing to use Devstack on other operating systems may require some modification to work properly. So, the example here is to build the OpenStack development environment using the Devstack script on the Ubuntu 12.04 system, and the process is simple enough to be divided into the following two steps:

(1) Download the Devstack code warehouse, the command line is as follows:

git clone git://

(2) Run the script, the command line operation is as follows:

jay@my-ubuntu:~$ CD devstack/


<!– here omit the remaining tens of thousands of lines of output information –>

Horizon is now available at

Keystone is serving at

Examples on using novaclient command line are in

The default users Are:admin and demo

The Password:admin

This is your host ip: completed in 1663 seconds.

#看到最后这样的信息, stating that OpenStack has been successfully installed and configured

Because scripts automatically download a large number of dependent packages and OpenStack source code, there is also a variety of configuration files and database initialization, so the first execution of the script takes time and takes approximately 10 minutes to one hours (depending on processor speed and network bandwidth).

When running the script in an Ubuntu system, you may be prompted to enter the password for the current user because you need to frequently use the sudo command to install the package and write the configuration file, because you need to configure some database, OpenStack authentication, So there may be some database user name, password confirmation needs to interact with the user. Before performing Devstack, the user can also fill in the configuration file named LOCALRC that is locally configured, as shown in the following example:

database_password=123456 #请根据需要修改此配置文件






If such a local profile is prepared, the validation process for these passwords and authentication information is reduced when the script is run. For the configuration of the hypervisor, there are two lines of configuration in the default profile STACKRC of the Devstack source code library:



Therefore, when Devstack installs OpenStack, the default is to set Libvirt as Hypervisor driver, using QEMU/KVM as hypervisor, only if the "KVM" is not successfully loaded module, it returns to the virtualization approach of using QEMU pure software emulation. After the script has been installed OpenStack, you can also see if the "KVM" and "Kvm_intel" (or "KVM_AMD") modules are loaded successfully, and you can view the following two items in the/etc/nova/nova.conf file:


Compute_driver=libvirt. Libvirtdriver

In general, after normal execution of the script in Devstack, the OpenStack services (such as calculations, mirrors, control panels, networks, and so on) have been turned on for active use. Of course, if there are some errors during installation, you can fix or bypass some of the problems by modifying them according to their source code. When you need to manage these openstack services, or when you need to clean up the environment before running, you can perform scripts in Devstack to stop OpenStack related services and to clean up some errors in the middle of the installation.

Of course, devstack This set of scripts is typically used to deploy the OpenStack development environment and is not perfect for large-scale deployment of OpenStack cloud infrastructure in a real-world production environment. However, a personalized OpenStack production environment can be built on a devstack basis based on some of the official OpenStack deployment reference documents (see "Reference reading" at the end of this chapter) and practical scenarios.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.