1、安装git
sudo apt-get install git
2、获取devstack脚本
git clone https://github.com/openstack-dev/devstack.git
3、执行(不要用root执行)
cd devstack
./stack.sh
可能遇到的问题:
1、./stac.sh:191 if you wish to run this script anyway run with FORCE=yes /home/dexstack/functions-commom:232: /opt/stack/logs/error.log:No such file or directory
解决:用这个启动脚本FORCE=yes ./stack.sh
2、 ./stack.sh: line 463: generate-subunit: command not found
解决:pip install -U os-testr
3、每次失败都要执行./unstack.sh
4、ReadTimeoutError: HTTPSConnectionPool(host=’pypi.python.org’, port=443): Read timed out.
这是由于默认devstack在使用pip下载django框架,由于国外的源不稳定,经常会出现超时情况,所以建议使用国内的源,例如使用豆瓣源。
1)在root用户根目录创建.pip文件夹(前面有一个“.”)
2)进入.pip文件夹里创建pip.conf文件,输入以下内容即可
[global]
trusted-host = pypi.douban.com
index-url = http://pypi.douban.com/simple