Chinaunix首页 | 论坛 | 博客
  • 博客访问: 54307
  • 博文数量: 16
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 80
  • 用 户 组: 普通用户
  • 注册时间: 2016-01-21 10:05
文章分类

全部博文(16)

文章存档

2017年(1)

2016年(15)

我的朋友

分类: LINUX

2017-01-17 12:20:01

参考链接:
搭建OpenStack开发环境
openStack项目系列介绍(3)Devstack


一、虚拟机环境




eth0 为NAT类型,eth1为 host-only类型


二、安装前准备
安装git、pip;
Devstack安装时会下载许多代码及配置,为加速下载速度,可以优化下载源

点击(此处)折叠或打开

  1. # vim ~/.pip/pip.conf
  2. [global]
  3. timeout = 6000
  4. trusted-host = pypi.douban.com
  5. index-url = http://pypi.douban.com/simple/
三、Devstack环境安装

3.1 下载Devstack代码并创建用户
代码可以直接下载到/home下,即使下载到其他文件夹,创建用户时也会copy到/home下

点击(此处)折叠或打开

  1. # 下载devstack
  2. git clone https://git.openstack.org/openstack-dev/devstack

执行devstack中stack.sh脚本时,不能用root用户,可以用devstack/tools/create-stack-user.sh脚本创建用户 stack

点击(此处)折叠或打开

  1. cd /home/devstack/tools
  2. ./create-stack-user.sh
  3. su stack
3.2 修改localrc 
修改配置文件以使其适合本机配置

点击(此处)折叠或打开

  1. #[[local|localrc]]
  2. # use TryStack git mirror
  3. # 下载openstack 各个项目代码时,用国内的下载源
  4. GIT_BASE=http://git.trystack.cn
  5. NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
  6. SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git

  7. #GIT_BASE=https://github.com
  8. # Define images to be automatically downloaded during the DevStack built process.
  9. #IMAGE_URLS=""
  10. # Credentials
  11. # 登录dashboard等的密码
  12. DATABASE_PASSWORD=1
  13. ADMIN_PASSWORD=1
  14. SERVICE_PASSWORD=1
  15. SERVICE_TOKEN=1
  16. RABBIT_PASSWORD=1
  #此处将地址改为ubuntu 系统nat网卡地址
  1. HOST_IP=192.168.80.128
  2. SERVICE_HOST=192.168.80.128
  3. MYSQL_HOST=192.168.80.128
  4. RABBIT_HOST=192.168.80.128
  5. GLANCE_HOSTPORT=192.168.80.128:9292

  6. # Work offline(不需要更新时打开)
  7. # OFFLINE=True
  8. # Reclone each time(需要更新时打开)
  9. RECLONE=yes

  10. # Logging
  11. # -------
  12. # By default ``stack.sh`` output only goes to the terminal where it runs. It can
  13. # be configured to additionally log to a file by setting ``LOGFILE`` to the full
  14. # path of the destination log file. A timestamp will be appended to the given name.
  15. #LOGFILE=/opt/stack/logs/stack.sh.log
  16. VERBOSE=True
  17. LOG_COLOR=True
  18. SCREEN_LOGDIR=/opt/stack/logs

  19. # the number of days by setting ``LOGDAYS``.
  20. LOGDAYS=1

  21. # Database Backend MySQL
  22. enable_service mysql

  23. # RPC Backend RabbitMQ
  24. enable_service rabbit

  25. # Enable Keystone - OpenStack Identity Service
  26. enable_service key

  27. # Horizon - OpenStack Dashboard Service
  28. enable_service horizon

  29. # Enable Swift - Object Storage Service without replication.
  30. enable_service s-proxy s-object s-container s-account
  31. SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5
  32. SWIFT_REPLICAS=1

  33. # Enable Glance - OpenStack Image service
  34. enable_service g-api g-reg

  35. # Enable Cinder - Block Storage service for OpenStack
  36. enable_service cinder c-api c-vol c-sch c-bak

  37. # Branches
  38. # 各个项目,默认下载master,可以改为其他分支
  39. KEYSTONE_BRANCH=master
  40. NOVA_BRANCH=master
  41. NEUTRON_BRANCH=master
  42. SWIFT_BRANCH=master
  43. GLANCE_BRANCH=master
  44. CINDER_BRANCH=master
  45. HEAT_BRANCH=master
  46. TROVE_BRANCH=master
  47. HORIZON_BRANCH=master
  48. SAHARA_BRANCH=master
  49. CEILOMETER_BRANCH=master
  50. TROVE_BRANCH=master
3.3 安装

点击(此处)折叠或打开

  1. cd /home/devstack; ./stack.sh
安装成功会显示

登录虚拟机或者本机浏览器 
阅读(1228) | 评论(0) | 转发(0) |
0

上一篇:Linux内核NAPI机制分析

下一篇:没有了

给主人留下些什么吧!~~