• 虚拟机中的网络配置 NET8 为nat net2 为host-only

虚拟机网络配置

# The primary network interface vmnet  nat type
auto eth0
iface eth0 inet static
address 192.168.30.80
netmask 255.255.255.0
network 192.168.30.0
broadcast 192.168.30.255
gateway 192.168.30.2
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 114.114.114.114 # vmnet 2 nat type openstack 内部网络
auto eth2
iface eth2 inet manual
up ip link set dev $IFACE up
down ip link set dev $IFACE down #vmnet 3 host only type openstack 外网
auto eth1
iface eth1 inet static
address 192.168.40.80
netmask 255.255.255.0

vmware 网络配置

  • trouble shooting

    类似  xxxx is not in global-requirements.txt 问题,比如

    2015-04-25 08:34:28.440 | 'wsgiref' is not in global-requirements.txt

    解决方法 :

    找到openstack requirement project in https://github.com/openstack/requirements/tree/master

    将 branch 切换到对应的 branch ,比如juno。 打开global-requirements.txt 文件,搜索wsgiref 可以看到wsgiref>=0.1.2

    将这一行加到/opt/stack/requirements/global-requirements.txt

    echo "wsgiref>=0.1.2" >> /opt/stack/requirements/global-requirements.txt

    引起问题的原因,因为源码是git 的juno branch 但是运行devstak  /stack.sh的时候,会自动去git master的requirements 项目,branch 不匹配。

  • 下载DevStack 这里的devstack 一定要和 git 出来的openstack 源代码的branch 一样,不然会出错。
  • git clone https://github.com/openstack-dev/devstack.git -b stable/kilo
  • 更改pip源
  • #vim ~/.pip/pip.conf
    [global]
    timeout=180
    index-url = http://pypi.douban.com/simple
  • 更改devstack/local.conf
  • stackrc文件中包含了各个服务的配置介绍,需要安装哪些服务,参照其中的配置进行修改。
  • # Sample ``local.conf`` for user-configurable variables in ``stack.sh``

    # NOTE: Copy this file to the root DevStack directory for it to work properly.

    # ``local.conf`` is a user-maintained settings file that is sourced from ``stackrc``.
    # This gives it the ability to override any variables set in ``stackrc``.
    # Also, most of the settings in ``stack.sh`` are written to only be set if no
    # value has already been set; this lets ``local.conf`` effectively override the
    # default values.

    # This is a collection of some of the settings we have found to be useful
    # in our DevStack development environments. Additional settings are described
    # in http://devstack.org/local.conf.html
    # These should be considered as samples and are unsupported DevStack code.

    # The ``localrc`` section replaces the old ``localrc`` configuration file.
    # Note that if ``localrc`` is present it will be used in favor of this section.
    [[local|localrc]]
    VERBOSE=True
    NEUTRON_CREATE_INITIAL_NETWORKS=False
    disable_service n-net
    enable_service q-svc
    enable_service q-agt
    enable_service q-dhcp
    enable_service q-l3
    enable_service q-meta
    enable_service q-metering

    Q_L3_ENABLED=True
    PUBLIC_INTERFACE=eth1
    OVS_PHYSICAL_BRIDGE=br-ex
    PUBLIC_BRIDGE=br-ex
    OVS_BRIDGE_MAPPINGS=public:br-ex

    #open v switch
    Q_USE_SECGROUP=True
    ENABLE_TENANT_VLANS=True
    TENANT_VLAN_RANGE=1000:1999
    PHYSICAL_NETWORK=default

    # Minimal Contents
    # ----------------

    # While ``stack.sh`` is happy to run without ``localrc``, devlife is better when
    # there are a few minimal variables set:

    # If the ``SERVICE_TOKEN`` and ``*_PASSWORD`` variables are not set
    # here you will be prompted to enter values for them by ``stack.sh``
    # and they will be added to ``local.conf``.
    SERVICE_TOKEN=azertytoken
    ADMIN_PASSWORD=secrete
    MYSQL_PASSWORD=$ADMIN_PASSWORD
    RABBIT_PASSWORD=$ADMIN_PASSWORD
    SERVICE_PASSWORD=$ADMIN_PASSWORD

    # ``HOST_IP`` should be set manually for best results if the NIC configuration
    # of the host is unusual, i.e. ``eth1`` has the default route but ``eth0`` is the
    # public interface. It is auto-detected in ``stack.sh`` but often is indeterminate
    # on later runs due to the IP moving from an Ethernet interface to a bridge on
    # the host. Setting it here also makes it available for ``openrc`` to include
    # when setting ``OS_AUTH_URL``.
    # ``HOST_IP`` is not set by default.
    HOST_IP=192.168.30.80

    # Logging
    # -------

    # By default ``stack.sh`` output only goes to the terminal where it runs. It can
    # be configured to additionally log to a file by setting ``LOGFILE`` to the full
    # path of the destination log file. A timestamp will be appended to the given name.
    LOGFILE=$DEST/logs/stack.sh.log

    # Old log files are automatically removed after 7 days to keep things neat. Change
    # the number of days by setting ``LOGDAYS``.
    LOGDAYS=2

    # Nova logs will be colorized if ``SYSLOG`` is not set; turn this off by setting
    # ``LOG_COLOR`` false.
    #LOG_COLOR=False

    # Using milestone-proposed branches
    # ---------------------------------

    # Uncomment these to grab the milestone-proposed branches from the repos:
    #CINDER_BRANCH=milestone-proposed
    #GLANCE_BRANCH=milestone-proposed
    #HORIZON_BRANCH=milestone-proposed
    #KEYSTONE_BRANCH=milestone-proposed
    #KEYSTONECLIENT_BRANCH=milestone-proposed
    #NOVA_BRANCH=milestone-proposed
    #NOVACLIENT_BRANCH=milestone-proposed
    #NEUTRON_BRANCH=milestone-proposed
    #SWIFT_BRANCH=milestone-proposed

    # Swift
    # -----

    # Swift is now used as the back-end for the S3-like object store. If Nova's
    # objectstore (``n-obj`` in ``ENABLED_SERVICES``) is enabled, it will NOT
    # run if Swift is enabled. Setting the hash value is required and you will
    # be prompted for it if Swift is enabled so just set it to something already:
    SWIFT_HASH=66a3d6b56c1f479c8b4e70ab5c2000f5

    # For development purposes the default of 3 replicas is usually not required.
    # Set this to 1 to save some resources:
    SWIFT_REPLICAS=1

    # The data for Swift is stored by default in (``$DEST/data/swift``),
    # or (``$DATA_DIR/swift``) if ``DATA_DIR`` has been set, and can be
    # moved by setting ``SWIFT_DATA_DIR``. The directory will be created
    # if it does not exist.
    SWIFT_DATA_DIR=$DEST/data

    # Tempest
    # -------

    # Install the tempest test suite
    enable_service tempest

  • 由于网络问题,手动下载OpenStack组件源码
  •    

    sudo git clone https://github.com/openstack/nova.git /opt/stack/nova -b stable/kilo
    sudo git clone https://github.com/openstack/glance.git /opt/stack/glance -b stable/kilo
    sudo git clone https://github.com/openstack/cinder.git /opt/stack/cinder -b stable/kilo
    sudo git clone https://github.com/openstack/horizon.git /opt/stack/horizon -b stable/kilo
    sudo git clone https://github.com/openstack/keystone.git /opt/stack/keystone -b stable/kilo
    sudo git clone https://github.com/openstack/neutron.git /opt/stack/neutron -b stable/kilo
    sudo git clone https://github.com/openstack/swift.git /opt/stack/swift -b stable/kilo
    sudo git clone https://github.com/openstack/heat.git /opt/stack/heat -b stable/kilo
    sudo git clone https://github.com/openstack/ceilometer.git /opt/stack/ceilometer -b stable/kilo
    sudo git clone https://github.com/openstack/tempest.git /opt/stack/tempest #这一项没有branch 可以到https://git.openstack.org/cgit/openstack/tempest/ 查看
    sudo git clone https://github.com/openstack/requirements.git /opt/stack/requirements -b stable/kilo
    sudo git clone https://github.com/kanaka/noVNC.git /opt/stack/noVNC
     
      
  • 创建stack用户/组
  • #cd devstack/tools
    #sudo ./devstack/tools/create-stack-user.sh
  • 修改/opt/stack用户/组
  • #chown -R stack:stack /opt/stack
  • 将 stack 赋予root 权限
  sudo nano /etc/sudoers
  在root 下添加
  stack ALL=(ALL:ALL) NOPASSWD:ALL

  

  将 devstac 的owner 设置为 stack

  

sudo chown -R stack:stack devstack

  

  • 执行stack.sh

  必须在devstack 执行,否则会遇到会遇到mktemp -d ----xxxxxx 权限不够的错误。 因为当前路径对stack 用户来说,很可能没有写权限

#su stack
#./stack.sh 
 安装完成之后
执行 sudo ovs-vsctl add-port br-ex eth2, 将eth2 借口加入ovs 虚拟交换机
												

Ubuntu14.04下安装DevStack的更多相关文章

  1. Ubuntu14.04下安装Hadoop2.5.1 (单机模式)

    本文地址:http://www.cnblogs.com/archimedes/p/hadoop-standalone-mode.html,转载请注明源地址. 欢迎关注我的个人博客:www.wuyudo ...

  2. 二、Ubuntu14.04下安装Hadoop2.4.0 (伪分布模式)

    在Ubuntu14.04下安装Hadoop2.4.0 (单机模式)基础上配置 一.配置core-site.xml /usr/local/hadoop/etc/hadoop/core-site.xml ...

  3. Ubuntu14.04下安装Flash Player

    Ubuntu14.04下安装Flash Player youhaidong@youhaidong:~$ sudo apt-get install flashplugin-nonfree [sudo] ...

  4. [原]在使用ubuntu14.04,安装devstack的时候报错./stack.sh: line 463: generate-subunit: command not found

    =======在使用ubuntu14.04,安装devstack的时候报错./stack.sh: line 463: generate-subunit: command not found 2016- ...

  5. Ubuntu14.04下 安装p4c

    参考: Github p4c README Ubuntu14.04下 安装p4c 这里提供一个直接安装p4c的脚本:install_p4c.sh. 1.git clone下来p4c: $ git cl ...

  6. Ubuntu14.04下安装Libsvm,并使用Libsvm

    (1)Ubuntu14.04下安装Libsvm 转载:https://blog.csdn.net/katrinawj/article/details/78915874 一.下载: 网址:http:// ...

  7. ubuntu14.04下安装ffmpeg

    ubuntu14.04下安装ffmpeg 一.安装各种依赖包 1.yasm(libx264需要依赖yasm) sudo apt-get install yasm 2.libx264 sudo apt- ...

  8. ubuntu14.04下安装cudnn5.1.3,opencv3.0,编译caffe及配置matlab和python接口过程记录

    已有条件: ubuntu14.04+cuda7.5+anaconda2(即python2.7)+matlabR2014a 上述已经装好了,开始搭建caffe环境. 1. 装cudnn5.1.3,参照: ...

  9. 在Ubuntu14.04下安装Docker CE(1) - repository篇

    从2017年3月开始,Docker开始分为社区版本和企业版,也就是Docker CE和Docker EE, 原来Ubuntu14.04下,通过sudo apt-get install docker.i ...

随机推荐

  1. 一站式学习Wireshark(四):网络性能排查之TCP重传与重复ACK

    作为网络管理员,很多时间必然会耗费在修复慢速服务器和其他终端.但用户感到网络运行缓慢并不意味着就是网络问题. 解决网络性能问题,首先从TCP错误恢复功能(TCP重传与重复ACK)和流控功能说起.之后阐 ...

  2. 使用平台调用(P/Invoke)

    使用平台调用 P/Invoke.它的全名叫平台调用(platform invoke).用于调用dll 中实现的非托管的单调(flat)编程接口.被称为使用C或C++ 调用约定(calling conv ...

  3. mysql pdo事务

    /* 开始一个事务,关闭自动提交 */直到调用commit结束事务时才提交 $dbh->beginTransaction(); bool PDO::commit ( void ) 提交一个事务, ...

  4. eclipse lua

    eclipse中的ldt插件是Lua Development Tools,开发lua专用的插件: 1.点击help->install new softWare,输入http://luaeclip ...

  5. MySql C++调用库Connector/c++编译 和 接口封装【三】Connector/c++ 使用总结及封装

    工程需要加上各个路径: 库使用需要几个文件: 1.include 文件夹 c/c++ /常规/附加包含目录 Connector/c++ 的安装版里面的Include 文件夹.或者把 /driver以及 ...

  6. main函数位置

    c语言中main函数的位置可以任意位置.在执行一个c语言编写的程序时,main函数就相当于是执行程序的入口.只要是没有语法和逻辑上的错误,main函数可以放在任意位置.

  7. 关于Cocos2d-x中对其他某个类的某个属性的获得

    类A要获得类B中的某个属性,可以是节点属性 方法一 1.先在B类中定义一个_edge的节点属性(可以在B类中进行各种对_edge的操作),然后写一个方法Node* GameController::ge ...

  8. R 中的do.call 函数

    do.call 函数是一个高阶函数, 其第一个参数为一个函数名,或者匿名函数,第二个参数是一个list 对象, 其实是参数列表 比如读取文件test.txt, 内容为 read.table(input ...

  9. iOS 图片切片的简单实现

    图片切片就是将一张图片按一定比例切分,中间部分系统自动填充空白, 这样在文本多行输入的时候,将具有特定形状的图片作为背景, 即使文本行数很多,也不会使图片走形. //即使你按5/5分,还是3/7分系统 ...

  10. jQuery on()方法绑定动态元素的点击事件无响应的解决办法

    $('#check_all').on('click' , function(){ alert(1); }); $("#yujinlist").append(html); count ...