1. System Preparation
Ubuntu 12.04 Server virtual machine. 2G of memory.
Run the following command in turn to install git:
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get install git
2. Download the installation package
$git clone https:
//github
.com
/openstack-dev/devstack
.git
#克隆devstack的Git代码仓库 3. ConfigurationFrom 2013/10 OpenStack introduces a new configuration method that uses the configuration file local.conf. From the official website, this file should exist in the Devstack directory and found in the Samples directory. The Create local.conf contains the following content:
#Admin密码 //Pre-set password so that no password is required when running stack.sh //Ibid . //Ibid.
Service_token=a682f596-76f3-11e3-b3b2-e716f9080d50
Other Available configuration items:
Installation path:
Default: Dest=/opt/stack
Example:dest=/opt/mystack
Screen Output directory:
Default is console output:screen_logdir= ""
Example: screen_logdir= $DEST/logs/screen #输出到文件, each screen output is a file named with a timestamp
Log:
Default: "logfile=" "logdays=7 log_color=true"//log related. Default log only in console output
Sample local.conf File:
[[LOCAL|LOCALRC]] logdays=1logfile= $DEST/logs/stack.sh.logscreen_logdir= $DEST/logs/screenadmin_password=1111database_password=$ admin_passwordrabbit_password= $ADMIN _passwordservice_password= $ADMIN _password
SERVICE_TOKEN=A682F596-76F3-11E3-B3B2-E716F9080D50
4. Run the following command as a non-root userCD devstack./stack.sh Note: 1. You cannot run the command using the root user, you can use the/devstack/tools/create-stack-user.sh command to create a user, such as Stack2. Ensure that the user under Sudo can run without password, or there will be a permissions issue during script execution
Method: Modify/etc/sudoers, add stack after line root all =(all:all) All all= (All) and then save the file
Some of the problems encountered and solutions:
1. Slow speed, Git clone failed: No way, except for a faster network
2. Some dependent packages are not installed, such as the following mysql-server-5.5: On Ubuntu mount these packages re-run stack.sh can
Reading Package Lists ...
Building Dependency Tree ...
Reading state information ...
Some packages could not be installed. This may mean.
Requested an impossible situation or if you are using the unstable
Distribution that some required packages has not yet been created
Or been moved out of Incoming.
The following information to resolve the situation:
The following packages has unmet dependencies:
mysql-server:depends:mysql-server-5.5 but it isn't going to being installed
E:unable to correct problems and you have held broken packages.
Success:
Horizon is now available at http://9.*.236.90/
Keystone is serving at http://9.*.236.90:5000/v2.0/
Examples on using novaclient command line was in exercise.sh
The default users Are:admin and demo
The password:1111
This is your host ip:9.*.236.90
5. Enter http://9.*.236.90/in the browser to open dashboard, login with admin and 1111Reference: http://docs.openstack.org/developer/devstack/configuration.html
Learn OpenStack (1): Install Devstack