Devstack- openstack 自动化安装整理
openstack的一种自动化安装方式,虚拟机系统:ubuntu16.04,单节点安装
1. 配置pip源
OpenStack大部分项目是python项目,安装过程中要下载大量python包,为了更顺畅的安装,需要修改pip源。
mkdir ~/.pip
vim ~/.pip/pip.conf
添加
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple //这里我用的是清华源
2.下载devstack包
git clone https://git.openstack.org/openstack-dev/devstack
3.在非root用户下运行脚本创建stack用户
sudo chown -R $USER:$USER /home/bee/devstack
cd /home/bee/devstack/tools/
./create-stack-user.sh
4.配置stack用户密码
passwd stack
5.编辑/etc/sudoers, 在root用户下增加stack用户权限
添加
root ALL=(ALL:ALL) ALL
stack ALL=(ALL:ALL) ALL
6.修改/home/lby/devstack, /opt/stack权限
sudo chown -R stack:stack /home/bee/devstack
sudo chown -R stack:stack /opt/stack
7.修改部署配置文件
cp /home/bee/devstack/samples/local.conf /home/bee/devstack
vim local.conf
在配置文件最后加入内容:
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
disable_service tempest
8.以stack用户身份运行脚本安装
su stack
./stack.sh