#+SETUPFILE: ~/Dropbox/Doc/Org_Templates/level-1.org
packstack 是利用 puppet 来简化安装部署 openstack 各个组件的工具, 利用它, 安装部署 OpenStack 非常方便.
首先安装该软件包
# yum install -y http://rdo.fedorapeople.org/openstack-icehouse/rdo-release-icehouse.rpm
# yum install -y openstack-packstack
然后生成应答文件
# packstack --gen-answer-file=my-answer.txt
编辑应答文件
# emacsclient my-answer.txt
修改以下几项
# 不安装 swift 服务
CONFIG_SWIFT_INSTALL=n
# 安装 heat 服务
CONFIG_HEAT_INSTALL=y
CONFIG_COMPUTE_HOSTS=192.168.3.33
# 方便使用, 设置 web, admin 的密码为 admin
CONFIG_KEYSTONE_ADMIN_PW=admin
# 不要用文件模拟 LVM 作为 Cinder 的后端, 自己创建一个
CONFIG_CINDER_VOLUMES_CREATE=n
# 使用 gre, 不用 vxlan
CONFIG_NEUTRON_ML2_TYPE_DRIVERS=gre
CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=gre
CONFIG_NEUTRON_ML2_TUNNEL_ID_RANGES=1:1000
CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE=gre
CONFIG_NEUTRON_OVS_BRIDGE_IFACES=br-ex:eth2
CONFIG_NEUTRON_OVS_TUNNEL_RANGES=1:1000
CONFIG_NEUTRON_OVS_TUNNEL_IF=eth1
# 我不需要 demo 用户
CONFIG_PROVISION_DEMO=n
创建 cinder 使用的 LVM 卷
# pvcreate /dev/vdb
# vgcreate cinder-volumes /dev/vdb
# vgs | grep cinder
cinder-volumes 1 1 0 wz--n- 100.00g 99.00g
开始部署
# packstack --answer-file=my-answer.txt
安装完成后, 会看到以下信息:
Additional information:
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.3.31. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.3.31/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* To use Nagios, browse to http://192.168.3.31/nagios username: nagiosadmin, password: 73e840f902334646
* The installation log file is available at: /var/tmp/packstack/20140905-113333-bPPQjA/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20140905-113333-bPPQjA/manifests
接下来, 就可以打开浏览器开启 openstack 之旅了
bug issue
在安装过程中, 由于兼容性问题, 在 CentOS 7.0 中目前会出现一些问题, 主要参考以下文档解决