ubuntu 12.04下devstack搭建openstack-havana

原文地址:http://blog.csdn.net/ustc_dylan/article/details/17582783

整理了下自己在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会报错,可能报如下错误:

[python]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. 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)代理问题

         如果你所在的网络设置了代理,则需要做好代理相关的配置。

[html]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. #vim /etc/enviroment  
  2. export http_proxy=http://proxy.com:port  
  3. export https_proxy=http://proxy.com:port  
  4. export no_proxy=127.0.0.1,localhost  
[html]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. export PIP_CONFIG_FILE=/home/dylan/.pip/pip.conf  

    (2)pip源问题

        官方的pip源由于各种原因可能不能访问,导致pip install的时候失败,修改为国内的pip源

[python]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. #vim ~/.pip/pip.conf  
  2. [global]  
  3. index-url=http://e.pypi.python.org/simple  
  4. [install]  
  5. use-mirrors=true  
  6. index-url=http://pypi.douban.com  

     (3)ceilometer dashboard bug: Unable to retrieve tenant list

      通过查看horizon的log,可以看到报如下错误:

[html]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. handle Recoverable error: marker cloud not be found (HTTP 400)  

     解决方法: 

[html]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. vim /opt/stack/horizon/openstack_dashboard/dashboards/admin/metering/views.py  
  2.   
  3. 第149行,删除参数"marker=tenant_marker"后,重启web服务即可!  

    (4)mkdir: cannot create directory '/opt/stack/status': Permission denied

      手动创建此目录即可!sudo mkdir /opt/stack/status -p


   2. devstack搭建openstack-havana

    搭建的主要过程是配置文件localrc的编写,下面给出一个经过验证的localrc。

[python]  view plain copy 在CODE上查看代码片 派生到我的代码片
  1. # Misc  
  2. DATABASE_PASSWORD=123456  
  3. ADMIN_PASSWORD=123456  
  4. SERVICE_PASSWORD=123456  
  5. SERVICE_TOKEN=123456  
  6. RABBIT_PASSWORD=123456  
  7.   
  8. # Reclone each time  
  9. #RECLONE=true  
  10.   
  11. # Python enviroments  
  12. #OFFLINE=true  
  13.   
  14. ## For Keystone  
  15. KEYSTONE_TOKEN_FORMAT=PKI  
  16.   
  17. ## For Swift  
  18. SWIFT_REPLICAS=1  
  19. SWIFT_HASH=011688b44136573e209e  
  20.   
  21. # Enable Logging  
  22. LOGFILE=/opt/stack/logs/stack.sh.log  
  23. VERBOSE=True  
  24. LOG_COLOR=True  
  25. SCREEN_LOGDIR=/opt/stack/logs  
  26.   
  27. # Pre-requisite  
  28. ENABLED_SERVICES=rabbit,mysql,key  
  29.   
  30. ## If you want ZeroMQ instead of RabbitMQ (don't forget to un-declare 'rabbit' from the pre-requesite)  
  31. ENABLED_SERVICES+=,-rabbit,-qpid,zeromq  
  32.   
  33. ## If you want Qpid instead of RabbitMQ (don't forget to un-declare 'rabbit' from the pre-requesite)  
  34. #ENABLED_SERVICES+=,-rabbit,-zeromq,qpid  
  35.   
  36. # Horizon (Dashboard UI) - (always use the trunk)  
  37. ENABLED_SERVICES+=,horizon  
  38. HORIZON_REPO=https://github.com/openstack/horizon  
  39. HORIZON_BRANCH=master  
  40.   
  41. # Nova - Compute Service  
  42. ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch  
  43. IMAGE_URLS+=",https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"  
  44.   
  45. ## Nova Cells  
  46. ENABLED_SERVICES+=,n-cell  
  47.   
  48. # Glance - Image Service  
  49. ENABLED_SERVICES+=,g-api,g-reg  
  50.   
  51. # Swift - Object Storage  
  52. ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account  
  53.   
  54. # Neutron - Networking Service  
  55. # If Neutron is not declared the old good nova-network will be used  
  56. ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron  
  57.   
  58. ## Neutron - Load Balancing  
  59. ENABLED_SERVICES+=,q-lbaas  
  60.   
  61. ## Neutron - VPN as a Service  
  62. ENABLED_SERVICES+=,q-vpn  
  63.   
  64. ## Neutron - Firewall as a Service  
  65. ENABLED_SERVICES+=,q-fwaas  
  66.   
  67. # VLAN configuration  
  68. Q_PLUGIN=ml2  
  69. ENABLE_TENANT_VLANS=True  
  70.   
  71. # GRE tunnel configuration  
  72. Q_PLUGIN=ml2  
  73. ENABLE_TENANT_TUNNELS=True  
  74.   
  75. # VXLAN tunnel configuration  
  76. Q_PLUGIN=ml2  
  77. Q_ML2_TENANT_NETWORK_TYPE=vxlan     
  78.   
  79. # Cinder - Block Device Service  
  80. ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch  
  81.   
  82. # Heat - Orchestration Service  
  83. ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng  
  84. IMAGE_URLS+=",http://fedorapeople.org/groups/heat/prebuilt-jeos-images/F17-x86_64-cfntools.qcow2"  
  85.   
  86. # Ceilometer - Metering Service (metering + alarming)  
  87. CEILOMETER_BACKEND=mysql  
  88. ENABLED_SERVICES+=,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api  
  89. ENABLED_SERVICES+=,ceilometer-alarm-notify,ceilometer-alarm-eval  
  90.   
  91. # Apache fronted for WSGI  
  92. APACHE_ENABLED_SERVICES+=keystone,swift  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值