ubuntu 12.04下devstack搭建openstack-havana
ubuntu 12.04下devstack搭建openstack-havana
整理了下自己在ubuntu 12.04下采用devstack搭建openstack-havana过程的笔记,与大家分享,主要是让大家少踩一些坑!
1. 在具体讲解部署步骤前,先描述一个比较大的坑:
ubuntu 12.04到现在为止发布了三个更新版本了: ubuntu-12.04.1, ubuntu-12.04.2和ubuntu-12.04.3,这三个版本分别对应着三个不同版本的内核:linux-3.2,linux-3.5和linux-3.8。 很多同学反馈,之前在ubuntu 12.04上采用devstack搭建openstack没有问题,但是进来缺碰到很多问题,尤其在搭建到neutron会报错,可能报如下错误:
service q-agt is not running!通过screen -x stack到q-agt窗口可能会看到ovs版本不匹配。ubuntu 12.04默认安装了ovs-1.4.0, 这个版本的ovs兼容linux-2.6到linux-3.2内核,但是如果升级到了12.04.2或12.04.3(即linux-3.5及以上的内核),ovs版本就不在兼容了,提示需要大于等于ovs-1.10的版本,所以重新安装ovs-1.10即可!
2. 比较小的坑
(1)代理问题
如果你所在的网络设置了代理,则需要做好代理相关的配置。
#vim /etc/enviroment export http_proxy=http://proxy.com:port export https_proxy=http://proxy.com:port export no_proxy=127.0.0.1,localhost
export PIP_CONFIG_FILE=/home/dylan/.pip/pip.conf
(2)pip源问题
官方的pip源由于各种原因可能不能访问,导致pip install的时候失败,修改为国内的pip源
#vim ~/.pip/pip.conf [global] index-url=http://e.pypi.python.org/simple [install] use-mirrors=true index-url=http://pypi.douban.com
(3)ceilometer dashboard bug: Unable to retrieve tenant list
通过查看horizon的log,可以看到报如下错误:
handle Recoverable error: marker cloud not be found (HTTP 400)
解决方法:
vim /opt/stack/horizon/openstack_dashboard/dashboards/admin/metering/views.py 第149行,删除参数"marker=tenant_marker"后,重启web服务即可!
2. devstack搭建openstack-havana
搭建的主要过程是配置文件localrc的编写,下面给出一个经过验证的localrc。
# Misc DATABASE_PASSWORD=123456 ADMIN_PASSWORD=123456 SERVICE_PASSWORD=123456 SERVICE_TOKEN=123456 RABBIT_PASSWORD=123456 # Reclone each time #RECLONE=true # Python enviroments #OFFLINE=true ## For Keystone KEYSTONE_TOKEN_FORMAT=PKI ## For Swift SWIFT_REPLICAS=1 SWIFT_HASH=011688b44136573e209e # Enable Logging LOGFILE=/opt/stack/logs/stack.sh.log VERBOSE=True LOG_COLOR=True SCREEN_LOGDIR=/opt/stack/logs # Pre-requisite ENABLED_SERVICES=rabbit,mysql,key ## If you want ZeroMQ instead of RabbitMQ (don't forget to un-declare 'rabbit' from the pre-requesite) ENABLED_SERVICES+=,-rabbit,-qpid,zeromq ## If you want Qpid instead of RabbitMQ (don't forget to un-declare 'rabbit' from the pre-requesite) #ENABLED_SERVICES+=,-rabbit,-zeromq,qpid # Horizon (Dashboard UI) - (always use the trunk) ENABLED_SERVICES+=,horizon HORIZON_REPO=https://github.com/openstack/horizon HORIZON_BRANCH=master # Nova - Compute Service ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch IMAGE_URLS+=",https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img" ## Nova Cells ENABLED_SERVICES+=,n-cell # Glance - Image Service ENABLED_SERVICES+=,g-api,g-reg # Swift - Object Storage ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account # Neutron - Networking Service # If Neutron is not declared the old good nova-network will be used ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron ## Neutron - Load Balancing ENABLED_SERVICES+=,q-lbaas ## Neutron - VPN as a Service ENABLED_SERVICES+=,q-vpn ## Neutron - Firewall as a Service ENABLED_SERVICES+=,q-fwaas # VLAN configuration Q_PLUGIN=ml2 ENABLE_TENANT_VLANS=True # GRE tunnel configuration Q_PLUGIN=ml2 ENABLE_TENANT_TUNNELS=True # VXLAN tunnel configuration Q_PLUGIN=ml2 Q_ML2_TENANT_NETWORK_TYPE=vxlan # Cinder - Block Device Service ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch # Heat - Orchestration Service ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng IMAGE_URLS+=",http://fedorapeople.org/groups/heat/prebuilt-jeos-images/F17-x86_64-cfntools.qcow2" # Ceilometer - Metering Service (metering + alarming) CEILOMETER_BACKEND=mysql ENABLED_SERVICES+=,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api ENABLED_SERVICES+=,ceilometer-alarm-notify,ceilometer-alarm-eval # Apache fronted for WSGI APACHE_ENABLED_SERVICES+=keystone,swift
评论暂时关闭