虛擬機網絡配置html
# The primary network interface vmnet 1 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 網絡配置python
相似 xxxx is not in global-requirements.txt 問題,好比git
2015-04-25 08:34:28.440 | 'wsgiref' is not in global-requirements.txtgithub
解決方法 :swift
找到openstack requirement project in https://github.com/openstack/requirements/tree/mastervim
將 branch 切換到對應的 branch ,好比juno。 打開global-requirements.txt 文件,搜索wsgiref 能夠看到wsgiref>=0.1.2網絡
將這一行加到/opt/stack/requirements/global-requirements.txtapp
echo "wsgiref>=0.1.2" >> /opt/stack/requirements/global-requirements.txtide
引發問題的緣由,由於源碼是git 的juno branch 可是運行devstak /stack.sh的時候,會自動去git master的requirements 項目,branch 不匹配。ui
git clone https://github.com/openstack-dev/devstack.git -b stable/kilo
#vim ~/.pip/pip.conf
[global]
timeout=180
index-url = http://pypi.douban.com/simple
# 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
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
#cd devstack/tools #sudo ./devstack/tools/create-stack-user.sh
#chown -R stack:stack /opt/stack
sudo nano /etc/sudoers
在root 下添加
stack ALL=(ALL:ALL) NOPASSWD:ALL
將 devstac 的owner 設置爲 stack
sudo chown -R stack:stack devstack
必須在devstack 執行,不然會遇到會遇到mktemp -d ----xxxxxx 權限不夠的錯誤。 由於當前路徑對stack 用戶來講,極可能沒有寫權限
#su stack #./stack.sh
安裝完成以後執行 sudo ovs-vsctl add-port br-ex eth2, 將eth2 藉口加入ovs 虛擬交換機