Jump to: navigation, search

Difference between revisions of "NeutronDevstack"

(Basic Setup)
 
(42 intermediate revisions by 15 users not shown)
Line 1: Line 1:
__NOTOC__
+
 
 
== Basic Setup ==
 
== Basic Setup ==
  
In order to use Quantum with devstack (http://devstack.org) you'll need to add "quantum" and "q-svc" to ENABLED_SERVICES in your localrc. See this page for more details on localrc settings: http://devstack.org/stack.sh.html.
+
In order to use Neutron with devstack (http://devstack.org) a single node setup, you'll need the following settings in your local.conf (see [http://devstack.org/stack.sh.html   this page ] for more details on local.conf).
 
 
If you want to enable the openvswitch plugin, you'll have to set Q_PLUGIN to "openvswitch" and also add "q-agt" to ENABLED_SERVICES in order to start the openvswitch quantum agent (also in your localrc).
 
 
 
For example:
 
  
 
<pre><nowiki>
 
<pre><nowiki>
ENABLED_SERVICES="g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,horizon,mysql,rabbit,openstackx,q-svc,quantum,q-agt,q-dhcp"
+
[[local|localrc]]
Q_PLUGIN=openvswitch
+
disable_service n-net
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
+
enable_service q-svc
 +
enable_service q-agt
 +
enable_service q-dhcp
 +
enable_service q-l3
 +
enable_service q-meta
 +
# Optional, to enable tempest configuration as part of devstack
 +
enable_service tempest
 
</nowiki></pre>
 
</nowiki></pre>
  
Line 17: Line 19:
 
Then run stack.sh as normal.
 
Then run stack.sh as normal.
  
== Multi-Node Setup ==
+
If tempest has been successfully configured, a basic set of smoke tests can be run as follows:
 
 
A more interesting setup involves running multiple compute nodes, with Quantum networks connecting VMs on different compute nodes.  This is now possible with the latest (5/26/12) version of devstack. 
 
 
 
You should run at least one "controller node", which should have a stackrc that includes at least:  
 
 
 
  
 
<pre><nowiki>
 
<pre><nowiki>
ENABLED_SERVICES="g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,horizon,mysql,rabbit,openstackx,q-svc,quantum,q-agt"
+
$ cd /opt/stack/tempest
Q_PLUGIN=openvswitch
+
$ nosetests tempest/scenario/test_network_basic_ops.py
 
</nowiki></pre>
 
</nowiki></pre>
  
  
You likely want to change your localrc to run a scheduler that will balance VMs across hosts:  
+
See the Neutron Admin Guide for details on interacting with Neutron: http://docs.openstack.org/trunk/openstack-network/admin/content/index.html
 +
 
 +
== XS/XCP Setup ==
  
 +
See the following page for instructions on configuring Neutron (then called Quantum, which tells you how old the linked doc is) with OVS on XS/XCP: [[QuantumDevstackOvsXcp]]
  
<pre><nowiki>
+
== Multi-Node Setup ==
SCHEDULER=nova.scheduler.simple.SimpleScheduler
 
</nowiki></pre>
 
  
 +
A more interesting setup involves running multiple compute nodes, with Neutron networks connecting VMs on different compute nodes. 
  
You can then run many compute nodes, each of which should have a stackrc which includes:  
+
You should run at least one "controller node", which should have a localrc that includes at least:  
  
  
 
<pre><nowiki>
 
<pre><nowiki>
ENABLED_SERVICES="quantum,q-agt,n-cpu,g-api,rabbit"
+
disable_service n-net
Q_PLUGIN=openvswitch
+
enable_service q-svc
 +
enable_service q-agt
 +
enable_service q-dhcp
 +
enable_service q-l3
 +
enable_service q-meta
 +
enable_service neutron
 
</nowiki></pre>
 
</nowiki></pre>
  
  
Each compute node also needs to have a modified localrc to point to the "controller" for services that are only run once per deployment:  
+
You can then run many compute nodes, each of which should have a localrc which includes the following, with the IP address of the above controller node:  
  
  
 
<pre><nowiki>
 
<pre><nowiki>
 +
ENABLED_SERVICES=n-cpu,rabbit,neutron,q-agt
 
SERVICE_HOST=[IP of controller node]
 
SERVICE_HOST=[IP of controller node]
 
MYSQL_HOST=$SERVICE_HOST
 
MYSQL_HOST=$SERVICE_HOST
 
RABBIT_HOST=$SERVICE_HOST
 
RABBIT_HOST=$SERVICE_HOST
 +
Q_HOST=$SERVICE_HOST
 
</nowiki></pre>
 
</nowiki></pre>
  
  
'''Note:''' the need to include 'g-api' and 'rabbit' here seems to be a bug.  Without it, nova-compute dies because it can't import the glance.common library.  This process does not actually need to be running on this host, we just need a way to make sure the glance.common library is installed.  If 'rabbit' is not specified, nova-compute also will try to connect to rabbit on localhost, not the "controller host".  See the following link for info on both issues: https://answers.launchpad.net/devstack/+question/197749
+
'''Note:''' the need to include 'rabbit' here seems to be a bug, which may have been fixed by the time you're reading this.If 'rabbit' is not specified, nova-compute also will try to connect to rabbit on localhost, not the "controller host".  See the following link for info on both issues: https://answers.launchpad.net/devstack/+question/197749
 
 
== Running with Melange ==
 
 
 
To enable melange in devstack add "melange" and "m-svc" to the ENABLED_SERVICES (melange requires quantum to be enabled as well).
 
 
 
For example:
 
 
 
<pre><nowiki>
 
ENABLED_SERVICES=g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-novnc,n-xvnc,n-cauth,horizon,mysql,rabbit,openstackx,q-svc,q-agt,m-svc,quantum,melange
 
</nowiki></pre>
 

Latest revision as of 19:23, 21 August 2014

Basic Setup

In order to use Neutron with devstack (http://devstack.org) a single node setup, you'll need the following settings in your local.conf (see this page for more details on local.conf).

[[local|localrc]]
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
# Optional, to enable tempest configuration as part of devstack
enable_service tempest


Then run stack.sh as normal.

If tempest has been successfully configured, a basic set of smoke tests can be run as follows:

$ cd /opt/stack/tempest
$ nosetests tempest/scenario/test_network_basic_ops.py


See the Neutron Admin Guide for details on interacting with Neutron: http://docs.openstack.org/trunk/openstack-network/admin/content/index.html

XS/XCP Setup

See the following page for instructions on configuring Neutron (then called Quantum, which tells you how old the linked doc is) with OVS on XS/XCP: QuantumDevstackOvsXcp

Multi-Node Setup

A more interesting setup involves running multiple compute nodes, with Neutron networks connecting VMs on different compute nodes.

You should run at least one "controller node", which should have a localrc that includes at least:


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 neutron


You can then run many compute nodes, each of which should have a localrc which includes the following, with the IP address of the above controller node:


ENABLED_SERVICES=n-cpu,rabbit,neutron,q-agt
SERVICE_HOST=[IP of controller node]
MYSQL_HOST=$SERVICE_HOST
RABBIT_HOST=$SERVICE_HOST
Q_HOST=$SERVICE_HOST


Note: the need to include 'rabbit' here seems to be a bug, which may have been fixed by the time you're reading this.If 'rabbit' is not specified, nova-compute also will try to connect to rabbit on localhost, not the "controller host". See the following link for info on both issues: https://answers.launchpad.net/devstack/+question/197749