[TOC]
第一步:安装Ubuntu16.04 server并以stack为用户名创建用户
第二步:安装git及相关配置
- sudo apt-get update
- sudo apt-get install git-core
- git config --global user.name "testuser"
- git config --global user.email "testuser@example.com"
- sudo apt-get install software-properties-common
- sudo add-apt-repository cloud-archive:pike
第三步:安装Open vSwitch 2.5.X
- apt-cache policy openvswitch-switch ( make sure Candidate is 2.5.x)
- sudo apt-get install openvswitch-switch
- sudo ovs-vsctl -V (make sure you have Open vSwitch 2.5.xinstalled)
第四步:获取devstack脚本
- sudo mkdir /opt/stack
- sudo chown stack:stack /opt/stack
- cd /opt/stack/
- git clone git://git.openstack.org/openstack-dev/devstack.git -b stable/pike
第五步:修改部分配置文件避免访问国外网站网速过慢
-
github访问速度过慢:修改/opt/stack/devstack/stackrc 文件, 找到GIT_BASE=${GIT_BASE:-git://git.openstack.org} 将这一行的源地址改为https://github.com
-
pip 下载速度过慢: 修改pip.conf文件
找到pip.conf文件,没有的话在根目录下创建.pip目录,创建pip.conf,并写入
$ sudo find -name pip.conf
修改该文件:
[global]
index-url = http://pypi.douban.com/simple
trusted-host=pypi.douban.com
第六步:配置local.conf文件
注意控制节点和计算节点安装devstack的不同之处在于该配置文件内容不同,具体如下:
- 控制节点
[[local|localrc]]
############################################################
# Customize the following HOST_IP based on your installation
############################################################
MULTI_HOST=True
HOST_IP=192.168.100.30
SERVICE_HOST=192.168.100.30
SERVICE_PASSWORD=devstack
ADMIN_PASSWORD=devstack
SERVICE_TOKEN=devstack
DATABASE_PASSWORD=root
RABBIT_PASSWORD=password
ENABLE_HTTPD_MOD_WSGI_SERVICES=True
KEYSTONE_USE_MOD_WSGI=True
FIXED_RANGE=10.3.3.0/24
#ENABLED_SERVICES=placement-api
# Logging
LOGFILE=$DEST/logs/stack.sh.log
SCREEN_LOGDIR=$DEST/logs/screen
VERBOSE=True
ENABLE_DEBUG_LOG_LEVEL=True
ENABLE_VERBOSE_LOG_LEVEL=True
GIT_BASE=${GIT_BASE:-https://github.com}
USE_BARBICAN=True
TACKER_BRANCH=stable/pike
enable_plugin heat ${GIT_BASE}/openstack/heat $TACKER_BRANCH
enable_plugin networking-sfc ${GIT_BASE}/openstack/networking-sfc $TACKER_BRANCH
enable_plugin barbican ${GIT_BASE}/openstack/barbican $TACKER_BRANCH
enable_plugin mistral ${GIT_BASE}/openstack/mistral $TACKER_BRANCH
enable_plugin tacker https://gitee.com/SINET_gangliu/tacker stable/pike
# vnc config
NOVA_VNC_ENABLED=True
NOVNCPROXY_URL="http://$SERVICE_HOST:6080/vnc_auto.html"
VNCSERVER_LISTEN=$HOST_IP
VNCSERVER_PROXYCLIENT_ADDRESS=$VNCSERVER_LISTEN
- 计算节点
[[local|localrc]]
MULTI_HOST=True
HOST_IP=192.168.100.33
LOGFILE=/opt/stack/logs/stack.sh.log
# Credentials
ADMIN_PASSWORD=devstack
MYSQL_PASSWORD=root
RABBIT_PASSWORD=password
SERVICE_PASSWORD=devstack
SERVICE_TOKEN=devstack
# Service information
SERVICE_HOST=192.168.100.30
MYSQL_HOST=192.168.100.30
RABBIT_HOST=192.168.100.30
GLANCE_HOSTPORT=192.168.100.30:9292
Q_HOST=192.168.100.30
KEYSTONE_AUTH_HOST=192.168.100.30
KEYSTONE_SERVICE_HOST=192.168.100.30
DATABASE_TYPE=mysql
ENABLED_SERVICES=placement-client,placement-api,n-cpu,n-api,c-sch,c-api,c-vol,q-agt
#ENABLED_SERVICES=placement-client,placement-api,n-cpu,q-agt,neutron
Q_AGENT=openvswitch
# vnc config
NOVA_VNC_ENABLED=True
NOVNCPROXY_URL="http://192.168.100.30:6080/vnc_auto.html"
VNCSERVER_LISTEN=0.0.0.0
VNCSERVER_PROXYCLIENT_ADDRESS=$HOST_IP
#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
GIT_BASE=https://github.com
第七步:分别在控制节点和计算节点执行安装
cd devstack
./stack.sh
参考文档
- Devstack多节点部署实验
- 使用DevStack执行OpenStack Juno多节点安装过程总结
- openstack devstack 脚本安装(多结点,计算结点安装)
- Install via Devstack
来源:oschina
链接:https://my.oschina.net/u/4313987/blog/3983018