Jump to: navigation, search

Difference between revisions of "QuantumDevstackOvsXcp"

Line 72: Line 72:
  
 
<pre><nowiki>
 
<pre><nowiki>
# The OVS+XCP-supporting quantum branch, currently in review                                                                                                                        
+
# The OVS+XCP-supporting quantum branch, currently in review
 +
 
QUANTUM_REPO=https://review.openstack.org/openstack/quantum
 
QUANTUM_REPO=https://review.openstack.org/openstack/quantum
 
QUANTUM_BRANCH=refs/changes/23/15023/4
 
QUANTUM_BRANCH=refs/changes/23/15023/4
  
# 12.04 is only supported with XCP 1.6                                                                                                                                              
+
# 12.04 is only supported with XCP 1.6                  
 
UBUNTU_INST_RELEASE="precise"
 
UBUNTU_INST_RELEASE="precise"
 
UBUNTU_INST_TEMPLATE_NAME="Ubuntu 12.04 (64-bit) for DevStack"
 
UBUNTU_INST_TEMPLATE_NAME="Ubuntu 12.04 (64-bit) for DevStack"
  
# Devstack's XCP support requires this setting for 12.04                                                                                                                            
+
# Devstack's XCP support requires this setting for 12.04  
 
PUB_IP=dhcp
 
PUB_IP=dhcp
  
# Configure Q_PLUGIN with openvswitch when running in XS/XCP.  This is                                                                                                              
+
# Configure Q_PLUGIN with openvswitch when running in XS/XCP.  This is
# the default in stack.sh, but not in the xen installer, so it needs                                                                                                                
+
# the default in stack.sh, but not in the xen installer, so it needs
# to be set explicitly in localrc                                                                                                                                                  
+
# to be set explicitly in localrc
 
Q_PLUGIN=openvswitch
 
Q_PLUGIN=openvswitch
  
## Configure the vm network to support the Quantum OVS DHCP agent                                                                                                                  
+
## Configure the vm network to support the Quantum OVS DHCP agent
# Trunk all VLANS                                                                                                                                                                  
+
# Trunk all VLANS                                        
 
VM_VLAN=-1
 
VM_VLAN=-1
# Avoid associating the VM network with a device                                                                                                                                    
+
# Avoid associating the VM network with a device          
 
VM_DEV=invalid
 
VM_DEV=invalid
  
# This is the password for your guest (for both stack and root users)                                                                                                              
+
# This is the password for your guest (for both stack and root users)
 
GUEST_PASSWORD="<CHANGEME>"
 
GUEST_PASSWORD="<CHANGEME>"
# IMPORTANT: The following must be set to your dom0 root password!                                                                                                                  
+
# IMPORTANT: The following must be set to your dom0 root password!
 
XENAPI_PASSWORD=${GUEST_PASSWORD}
 
XENAPI_PASSWORD=${GUEST_PASSWORD}
# Explicitly set virt driver here                                                                                                                                                  
+
# Explicitly set virt driver here                        
 
VIRT_DRIVER=xenserver
 
VIRT_DRIVER=xenserver
# Explicitly set multi-host                                                                                                                                                        
+
# Explicitly set multi-host                                    
 
MULTI_HOST=False
 
MULTI_HOST=False
# Give extra time for boot                                                                                                                                                          
+
# Give extra time for boot                              
 
ACTIVE_TIMEOUT=360
 
ACTIVE_TIMEOUT=360
# Interface on which you would like to access services                                                                                                                              
+
# Interface on which you would like to access services      
 
HOST_IP_IFACE=eth3
 
HOST_IP_IFACE=eth3
 
NETINSTALLIP="dhcp"
 
NETINSTALLIP="dhcp"
Line 111: Line 112:
 
GATEWAY=""
 
GATEWAY=""
  
# Service overrides                                                                                                                                                                
+
# Service overrides                                          
# Add quantum, remove nova network                                                                                                                                                  
+
# Add quantum, remove nova network                          
 
ENABLED_SERVICES+=,quantum,q-svc,q-agt,q-dhcp,q-l3,-n-net
 
ENABLED_SERVICES+=,quantum,q-svc,q-agt,q-dhcp,q-l3,-n-net
# Enable tempest                                                                                                                                                                    
+
# Enable tempest                                            
 
ENABLED_SERVICES+=,tempest
 
ENABLED_SERVICES+=,tempest
  
# Disable rate limit to support tempest                                                                                                                                            
+
# Disable rate limit to support tempest                    
 
API_RATE_LIMIT=False
 
API_RATE_LIMIT=False
 
</nowiki></pre>
 
</nowiki></pre>

Revision as of 03:56, 25 December 2012

Install XCP

Installation has been tested with XCP 1.6, which can be downloaded here (http://www.xen.org/download/xcp/index_1.6.0.html).

Presuming installation in a virtual machine:

  • ensure that nested virtualization is configured
  • ensure that 2 hard disks of type scsi are available
    • 1 for xcp installation (10gb dynamic allocation suggested)
    • 1 for vm storage (40gb dynamic allocation suggested)

NOTE - Do not provision storage for virtual machines during installation of XCP.  OpenStack requires that virtual machine storage be ext, and the installer has no way to specify this. When the XCP installation prompts for the creation of virtual machine storage, deselect all devices and thin provisioning before continuing.

Configure a Storage Repository

To configure a storage repository, login as root to the dom0 host and execute the following:


## List the machine’s UUID
$ xe host-list

## Create an EXT storage repository (SR) with thin provisioning support and direct access to the VHD files.  
# This example uses /dev/sdb, but this may differ for your host.
$ xe sr-create host-uuid=<hit TAB should match UUID above> content-type=user name-label=”Local EXT3 SR” shared=false device-config:device=/dev/sdb type=ext

## Set the SR to use thin provisioning. Otherwise, nova won’t be able to find the SR when it needs to write to disk.
# Look for 'Local EXT3 SR', making note of the associated UUID.
$ xe sr-list
$ xe sr-param-set uuid=<SR uuid> other-config:i18n-key=local-storage

## Set the configured SR as the default.
$ xe pool-list
$ xe pool-param-set uuid=<hit TAB> default-SR=<SR uuid>


Install git in dom0 (optional)

Installing software in dom0 is generally frowned upon, but will make it easier to ensure a devstack working tree in dom0. Copying the devstack tree from another host is also an option.

To install git, execute the following commands in dom0:


## Configure epel repo 
$ rpm --upgrade --replacepkgs http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

## Disable the epel repos, just to be safe
$ sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/epel.repo

## Install git
$ yum --enablerepo=epel -y install git


Prepare dom0 devstack

Whether on dom0 or a local workstation, execute the following git commands to prepare a devstack tree that supports OVS+XCP:


$ git clone https://github.com/openstack-dev/devstack.git
$ cd devstack
$ git fetch https://review.openstack.org/openstack-dev/devstack refs/changes/76/15076/3 && git checkout FETCH_HEAD


A suggested localrc for OVS+XCP is as follows:


# The OVS+XCP-supporting quantum branch, currently in review
 
QUANTUM_REPO=https://review.openstack.org/openstack/quantum
QUANTUM_BRANCH=refs/changes/23/15023/4

# 12.04 is only supported with XCP 1.6                   
UBUNTU_INST_RELEASE="precise"
UBUNTU_INST_TEMPLATE_NAME="Ubuntu 12.04 (64-bit) for DevStack"

# Devstack's XCP support requires this setting for 12.04   
PUB_IP=dhcp

# Configure Q_PLUGIN with openvswitch when running in XS/XCP.  This is
# the default in stack.sh, but not in the xen installer, so it needs
# to be set explicitly in localrc
Q_PLUGIN=openvswitch

## Configure the vm network to support the Quantum OVS DHCP agent
# Trunk all VLANS                                          
VM_VLAN=-1
# Avoid associating the VM network with a device            
VM_DEV=invalid

# This is the password for your guest (for both stack and root users)
GUEST_PASSWORD="<CHANGEME>"
# IMPORTANT: The following must be set to your dom0 root password!
XENAPI_PASSWORD=${GUEST_PASSWORD}
# Explicitly set virt driver here                         
VIRT_DRIVER=xenserver
# Explicitly set multi-host                                     
MULTI_HOST=False
# Give extra time for boot                                
ACTIVE_TIMEOUT=360
# Interface on which you would like to access services        
HOST_IP_IFACE=eth3
NETINSTALLIP="dhcp"
NAMESERVERS=""
NETMASK=""
GATEWAY=""

# Service overrides                                            
# Add quantum, remove nova network                           
ENABLED_SERVICES+=,quantum,q-svc,q-agt,q-dhcp,q-l3,-n-net
# Enable tempest                                             
ENABLED_SERVICES+=,tempest

# Disable rate limit to support tempest                      
API_RATE_LIMIT=False


Execute devstack

To invoke devstack on XCP, execute the following in dom0:


$ cd devstack/tools/xen
$ ./install_os_domU.sh


The initial run of devstack may take a long time (depending on the available internet connection), since devstack has to create a new VM (domU) and install ubuntu on it before installing OpenStack. Devstack saves the domU VM as a template after the first install, so subsequent runs will be much faster. If issues occur during installation (an unfortunately common occurrence when XCP is running in a VM), the XenCenter tool (unfortunately Windows-only) will aid in troubleshooting the problem.

Devstack should provide instructions once installation has completed as to how to log in to the domU instance, which will be the equivalent of a regular devstack'd host.

Verify with tempest

After a successful devstack run using the provided localrc, tempest can be used to verify that Quantum+OVS+XCP can correctly provision networking to OpenStack VM's. To run the quantum smoke tests, execute the following in domU:


$ cd /opt/stack/tempest 
$ nosetests tempest/tests/network/test_network_basic_ops.py