From Fedora Project Wiki

(move to OpenStack category)
(16 intermediate revisions by 2 users not shown)
Line 16: Line 16:


   #> sudo yum install openstack-quantum
   #> sudo yum install openstack-quantum
OpenStack has a preview [[OpenStack#Preview repository|repository]], allowing Fedora N-1 users to try out OpenStack packages from the latest Fedora release.


=== '''Configuration''' ===
=== '''Configuration''' ===
Line 23: Line 25:


The above script makes use of a number of default settings. Make use of the ''--help'' option to see what can be configured. This will ensure that Quantum database is installed, started and configured. In addition to this the user will be requested to supply the relevant plugin. The plugins are discussed below.
The above script makes use of a number of default settings. Make use of the ''--help'' option to see what can be configured. This will ensure that Quantum database is installed, started and configured. In addition to this the user will be requested to supply the relevant plugin. The plugins are discussed below.
Once the database has been created an configured the quantum service should be enabled and started.
  #> sudo systemctl enable quantum-server.service
  #> sudo systemctl start quantum-server.service
'''Note''' the Quantum server should always start after the mysqld. This can be addressed by the following command:
  #> sudo sed -i /usr/lib/systemd/system/quantum-server.service -e 's/^\(After=.*\)/\1 mysqld.service/'
'''Note''' if using Fedora 16, use /lib/systemd/... instead of /usr/lib/systemd/... in the above command.
'''Note''' the Quantum agent also needs to be enabled and started. Please see below.


=== '''OpenStack''' ===
=== '''OpenStack''' ===
Please note that the script ''quantum-server-setup'' will update the nova configuration file.
Please note that the script ''quantum-server-setup'' will update the nova configuration file.
''Keystone'' Integration - TBD
''Keystone'' Integration - TBD


== Quantum Plugins ==
== Quantum Agents ==
The plugin is responsible for the dynamic configuration of the switches. The following plugins are supported:
The agent is responsible for the dynamic configuration of the switches. The following plugin agents are supported:
 
* [http://wiki.openstack.org/cisco-quantum Cisco]
* [http://wiki.openstack.org/Quantum-Linux-Bridge-Plugin Linux Bridge]
* [http://nicira.com/en/platform-for-innovation Nicira]
* [http://openvswitch.org/openstack/documentation/ Open vSwitch]
* [http://www.osrg.net/ryu/index.html RYU]
 
=== '''Installation''' ===
Each agent has its own installation package:
 
* Cisco
* Cisco


Line 38: Line 64:
   #> sudo yum install openstack-quantum-linuxbridge
   #> sudo yum install openstack-quantum-linuxbridge


* [http://nicira.com/en/platform-for-innovation Nicira]
* Nicira


   #> sudo yum install openstack-quantum-nicira
   #> sudo yum install openstack-quantum-nicira


* [http://openvswitch.org/openstack/documentation/ Open vSwitch]
* Open vSwitch


   #> sudo yum install openstack-quantum-openvswitch
   #> sudo yum install openstack-quantum-openvswitch


* [http://www.osrg.net/ryu/index.html RYU]
An OVS “integration” bridge must be created. The VMs will connect to this bridge.
 
  #> sudo ovs-vsctl add-br br-int
 
If you wish to connect this to an physical NIC, for example eth0), then do:
 
  #> sudo ovs-vsctl add-port br-int eth0
 
'''Note''' that br-int is defined in the ovs-quantum_plugin.ini file.  
 
* RYU


   #> sudo yum install openstack-quantum-ryu
   #> sudo yum install openstack-quantum-ryu


The plugin needs to be installed on all of the nodes.  
The agents need to be installed on all of the compute nodes.


=== '''Configuration''' ===
=== '''Configuration''' ===
The Quatum plugin must be configured so that it can interface with the Quantum server. This can be achieved by running the following:
The Quantum plugin must be configured so that it can interface with the Quantum server. This can be achieved by running the following:


   #> sudo quantum-node-setup
   #> sudo quantum-node-setup


The above script makes use of a number of default settings. Make use of the ''--help'' option to see what can be configured. The Quantum hostname is very important. Please make sure that this is defined in the hosts file. This will ensure that Quantum plugin is installed, started and configured.
The above script makes use of a number of default settings. Make use of the ''--help'' option to see what can be configured. The Quantum database hostname is very important. Please make sure that this is defined in the hosts file.  
 
 
Both the linuxbridge and openvswitch plugins use qemu's "ethernet" network device, so to work around the problem described in https://bugzilla.redhat.com/show_bug.cgi?id=770020, do the following if using one of these plugins:
 
$> sudo systemctl stop libvirtd.service
$> cat >> /etc/libvirt/qemu.conf <<EOF
cgroup_device_acl = [
    "/dev/null", "/dev/full", "/dev/zero",
    "/dev/random", "/dev/urandom",
    "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
    "/dev/rtc", "/dev/hpet", "/dev/net/tun",
]
EOF
$> sudo systemctl start libvirtd.service
 
 
Please note that you need to enable and start the relevant plugin agents. These are listed below:
 
* Linux Bridge
 
  #> sudo systemctl enable quantum-linuxbridge-agent.service
  #> sudo systemctl start quantum-linuxbridge-agent.service
 
* Open vSwitch
 
  #> sudo systemctl enable quantum-openvswitch-agent.service
  #> sudo systemctl start quantum-openvswitch-agent.service
 
In addition to this make sure that the openvswitch service is enabled and running.
 
  #> sudo systemctl enable openvswitch.service
  #> sudo systemctl start openvswitch.service
 
* RYU
 
  #> sudo systemctl enable quantum-ryu-agent.service
  #> sudo systemctl start quantum-ryu-agent.service


=== '''OpenStack''' ===
=== '''OpenStack''' ===
Please note that the script ''quantum-node-setup'' will update the nova configuration file.
Please note that the script ''quantum-node-setup'' will update the nova configuration file.
''Keystone'' Integration - TBD
''Keystone'' Integration - TBD


Line 68: Line 142:
* ''/etc/quantum/plugins.ini'' contains the specific plugin module. Check that this matches the intended plugin
* ''/etc/quantum/plugins.ini'' contains the specific plugin module. Check that this matches the intended plugin
* ''/etc/quantum/quantum.conf'' contains information relevant to the server. Check that the server is running and that the ''bind_port'' is indeed up.
* ''/etc/quantum/quantum.conf'' contains information relevant to the server. Check that the server is running and that the ''bind_port'' is indeed up.
* If the Quantum server does not start after reboot, and you are using mysql, then make sure that the Quantum server starts after the ''mysqld.service''.


=== '''Quantum Plugin''' ===
=== '''Quantum Plugin''' ===
* ''/etc/quantum/plugins.ini'' contains the specific plugin module. Check that this matches the intended plugin
* ''/etc/quantum/plugins.ini'' contains the specific plugin module. Check that this matches the intended plugin
* ''/etc/quantum/quantum.conf'' contains the specific plugin module. Check that this matches the intended plugin
* ''/etc/quantum/quantum.conf'' contains the specific plugin module. Check that this matches the intended plugin
* ''/var/log/messages'' may contain information regarding the agent


=== '''OpenStack''' ===
=== '''OpenStack''' ===
Line 106: Line 182:
* [http://github.com/openstack/quantum Quantum Source Code]
* [http://github.com/openstack/quantum Quantum Source Code]


[[Category:Cloud SIG]]
[[Category:OpenStack]]

Revision as of 06:15, 25 April 2012

Quantum

The Quantum project provides "network connectivity as a service". This page tracks Fedora Cloud SIG's effort to maintain Quantum in Fedora.

This page will address the installation and configuration of the following:

  • Quantum Server
  • Quantum Plugins

The packaging can be found at:

Quantum Server

Installation

The Quantum service is installed as follows:

 #> sudo yum install openstack-quantum

OpenStack has a preview repository, allowing Fedora N-1 users to try out OpenStack packages from the latest Fedora release.

Configuration

The Quantum service requires the installation and configuration of a database. This can be achieved by running the following:

 #> sudo quantum-server-setup

The above script makes use of a number of default settings. Make use of the --help option to see what can be configured. This will ensure that Quantum database is installed, started and configured. In addition to this the user will be requested to supply the relevant plugin. The plugins are discussed below.

Once the database has been created an configured the quantum service should be enabled and started.

 #> sudo systemctl enable quantum-server.service
 #> sudo systemctl start quantum-server.service

Note the Quantum server should always start after the mysqld. This can be addressed by the following command:

 #> sudo sed -i /usr/lib/systemd/system/quantum-server.service -e 's/^\(After=.*\)/\1 mysqld.service/'

Note if using Fedora 16, use /lib/systemd/... instead of /usr/lib/systemd/... in the above command.

Note the Quantum agent also needs to be enabled and started. Please see below.

OpenStack

Please note that the script quantum-server-setup will update the nova configuration file.

Keystone Integration - TBD

Quantum Agents

The agent is responsible for the dynamic configuration of the switches. The following plugin agents are supported:

Installation

Each agent has its own installation package:

  • Cisco
 #> sudo yum install openstack-quantum-cisco
  • Linux Bridge
 #> sudo yum install openstack-quantum-linuxbridge
  • Nicira
 #> sudo yum install openstack-quantum-nicira
  • Open vSwitch
 #> sudo yum install openstack-quantum-openvswitch

An OVS “integration” bridge must be created. The VMs will connect to this bridge.

 #> sudo ovs-vsctl add-br br-int

If you wish to connect this to an physical NIC, for example eth0), then do:

 #> sudo ovs-vsctl add-port br-int eth0

Note that br-int is defined in the ovs-quantum_plugin.ini file.

  • RYU
 #> sudo yum install openstack-quantum-ryu

The agents need to be installed on all of the compute nodes.

Configuration

The Quantum plugin must be configured so that it can interface with the Quantum server. This can be achieved by running the following:

 #> sudo quantum-node-setup

The above script makes use of a number of default settings. Make use of the --help option to see what can be configured. The Quantum database hostname is very important. Please make sure that this is defined in the hosts file.


Both the linuxbridge and openvswitch plugins use qemu's "ethernet" network device, so to work around the problem described in https://bugzilla.redhat.com/show_bug.cgi?id=770020, do the following if using one of these plugins:

$> sudo systemctl stop libvirtd.service
$> cat >> /etc/libvirt/qemu.conf <<EOF
cgroup_device_acl = [
   "/dev/null", "/dev/full", "/dev/zero",
   "/dev/random", "/dev/urandom",
   "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
   "/dev/rtc", "/dev/hpet", "/dev/net/tun",
]
EOF
$> sudo systemctl start libvirtd.service


Please note that you need to enable and start the relevant plugin agents. These are listed below:

  • Linux Bridge
 #> sudo systemctl enable quantum-linuxbridge-agent.service
 #> sudo systemctl start quantum-linuxbridge-agent.service
  • Open vSwitch
 #> sudo systemctl enable quantum-openvswitch-agent.service
 #> sudo systemctl start quantum-openvswitch-agent.service

In addition to this make sure that the openvswitch service is enabled and running.

 #> sudo systemctl enable openvswitch.service
 #> sudo systemctl start openvswitch.service
  • RYU
 #> sudo systemctl enable quantum-ryu-agent.service
 #> sudo systemctl start quantum-ryu-agent.service

OpenStack

Please note that the script quantum-node-setup will update the nova configuration file.

Keystone Integration - TBD

Troubleshooting

Quantum Server

  • /etc/quantum/plugins.ini contains the specific plugin module. Check that this matches the intended plugin
  • /etc/quantum/quantum.conf contains information relevant to the server. Check that the server is running and that the bind_port is indeed up.
  • If the Quantum server does not start after reboot, and you are using mysql, then make sure that the Quantum server starts after the mysqld.service.

Quantum Plugin

  • /etc/quantum/plugins.ini contains the specific plugin module. Check that this matches the intended plugin
  • /etc/quantum/quantum.conf contains the specific plugin module. Check that this matches the intended plugin
  • /var/log/messages may contain information regarding the agent

OpenStack

  • It may be useful to look for errors in /var/log/nova/network.log and /var/log/nova/nova-dhcpbridge.log
  • Common configuration: /etc/nova/nova.conf contains the relevant quantum configuration.
   network_manager=nova.network.quantum.manager.QuantumManager
   quantum_connection_host=localhost
   quantum_connection_port=9696
   quantum_use_dhcp=True
  • Cisco
   scheduler_driver=quantum.plugins.cisco.nova.quantum_port_aware_scheduler.QuantumPortAwareScheduler
   libvirt_vif_type=802.1Qbh
   libvirt_vif_driver=quantum.plugins.cisco.nova.vifdirect.Libvirt802dot1QbhDriver
  • Linux Bridge:
   libvirt_vif_type=ethernet
   libvirt_vif_driver=nova.virt.libvirt.vif.QuantumLinuxBridgeVIFDriver
   linuxnet_interface_driver=nova.network.linux_net.QuantumLinuxBridgeInterfaceDriver
  • Open vSwitch:
   libvirt_vif_type=ethernet
   libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtOpenVswitchDriver
   linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver

Useful Quantum Links