OpenStack -- DevStack安装
2015-10-23
文档
前期准备
在Windows7中安装VMware Workstation 10
下载Ubuntu 14.04 LTS, Download Ubuntu Desktop
DevStack支持的操作系统 图片来自DevStack Developer Documentation
在VMware中安装Ubuntu14.04
配置Ubuntu14.04网络
IPv4Settings --> Method --> Manual
IPv4Settings --> Address --> Add Address:172.31.2.123 NetMask:255.255.240.0 GateWay:172.31.0.1
IPv4Settings --> DNS servers --> 61.139.2.69
操作系统前期配置,纯属个人习惯
stack@stack:~$ sudo apt-get update stack@stack:~$ sudo apt-get install openssh-server stack@stack:~$ sudo apt-get install vim stack@stack:~$ sudo apt-get install git stack@stack:~$ git clone https://github.com/amix/vimrc.git ~/.vim_runtime stack@stack:~$ sh ~/.vim_runtime/install_awesome_vimrc.sh stack@stack:~$ rm -rf Desktop/ Documents/ Pictures/ Templates/ Music/ Public/ Videos/ examples.desktop Public/
修改apt-get源
stack@stack:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak stack@stack:~$ sudo vim /etc/apt/sources.list
在sources.list文件中输入阿里云的apt-get源
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
更新
stack@stack:~$ sudo apt-get update stack@stack:~$ sudo apt-get dist-upgrade
安装DevStack
获取DevStack
git clone git://github.com/openstack-dev/devstack.git
到这里之后可以使用VMware把虚拟机备份下来,下次就不用再做前面这些设置了
更改pypi源
stack@stack:~$ mkdir ~/.pip stack@stack:~$ cd ~/.pip stack@stack:~$ vim pip.conf
在pip.conf文件中添加豆瓣的pypi源
[global] trusted-host = pypi.douban.com index-url = http://pypi.douban.com/simple
准备local.conf
链接DevStack Juno local.conf中有一份适用于juno的local.conf,这里配置的服务越多,需要下载的东西就会越多,依赖关系就会越多,就越容易出错。
./stack.sh 出错了可以多运行几遍./stack.sh
结果
我是在没有写local.conf文件的情况下,执行./stack.sh,这样就成功了
而配置了local.conf都没安装成功,郁闷
后续
继续配置local.conf安装DevStack
熟悉DevStack,看看与我们的云操作系统有什么区别
分模块一步一步安装OpenStack