devstack 部署 openstack(pick/mitaka)
链接出处: https://blog.csdn.net/qiqishuang/article/details/51990662
报错处理出处:https://blog.csdn.net/wang1144/article/details/42277179
http://blog.51cto.com/wzlinux/1969781
1、操作系统 :ubuntu14.04
2、更新源(阿里源)
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb 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 main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
apt update && upgrade
3、安装环境所需包
apt-get install git
apt-get install ntpdate // 安装时间同步工具
apt-get install python-pip
pip install --upgrade pip
pip install -U os-testr (运行报错进行一下处理)
pip install -U os-testr 报错处理:
apt-get install libxml2-dev libxslt1-dev python-dev
apt-get install zlib1g-dev
apt-get install libevent-dev
pip install lxml
4、设定时间同步
设定时区:dpkg-reconfigure tzdata
选择Asia -> 再选择Shanghai -> OK
同步时间命令:
1、sudo apt-get install ntpdate // 安装时间同步工具
2、sudo ntpdate cn.pool.ntp.org // 与网络服务器同步时间
3、date // 查看时间是否已同步
5、devstack下载
$git clone https://github.com/openstack-dev/devstack.git #克隆devstack的Git代码仓库
cd devstack/;git branch -a #显示本地分支
git checkout -b mitaka origin/stable/mitaka #切换到指定mitaka分支或标签
6、创建stack用户
./home/devstack/tools/create-stack-user.sh
chown -R stack:stack /home/devstack
chmod 777 /dev/pts/0
sudo echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
su stack
7、配置local.conf
[[local|localrc]]
GIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=admin
RABBIT_PASSWORD=admin
SERVICE_PASSWORD=$ADMIN_PASSWORD
HOST_IP=192.168.108.128
LOGFILE=$DEST/logs/stack.sh.log
LOGDAYS=2
CINDER_BRANCH=stable/mitaka
GLANCE_BRANCH=stable/mitaka
HORIZON_BRANCH=stable/mitaka
KEYSTONE_BRANCH=stable/mitaka
KEYSTONECLIENT_BRANCH=stable/mitaka
NOVA_BRANCH=stable/mitaka
NOVACLIENT_BRANCH=stable/mitaka
NEUTRON_BRANCH=stable/mitaka
SWIFT_BRANCH=stable/mitaka
SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
SWIFT_REPLICAS=1
SWIFT_DATA_DIR=$DEST/data
修改pip源可以加快安装速度,国内可以使用豆瓣源。在/root主目录下创建.pip文件夹
mkdir ~/.pip
vi ~/.pip/pip.conf
然后在该目录下创建pip.conf文件编写如下内容:
[global]
trusted-host = pypi.douban.com
index-url = http://pypi.douban.com/simple
8、devstack安装
./stack.sh