Browse code

Merge "Documentation: Using Neutron with DevStack"

Jenkins authored on 2014/11/25 07:22:48
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,195 @@
0
+======================================
1
+Using DevStack with Neutron Networking
2
+======================================
3
+
4
+This guide will walk you through using OpenStack Neutron with the ML2
5
+plugin and the Open vSwitch mechanism driver.
6
+
7
+Network Interface Configuration
8
+===============================
9
+
10
+To use Neutron, it is suggested that two network interfaces be present
11
+in the host operating system.
12
+
13
+The first interface, eth0 is used for the OpenStack management (API,
14
+message bus, etc) as well as for ssh for an administrator to access
15
+the machine.
16
+
17
+::
18
+
19
+        stack@compute:~$ ifconfig eth0
20
+        eth0      Link encap:Ethernet  HWaddr bc:16:65:20:af:fc
21
+                  inet addr:192.168.1.18
22
+
23
+eth1 is manually configured at boot to not have an IP address.
24
+Consult your operating system documentation for the appropriate
25
+technique. For Ubuntu, the contents of `/etc/networking/interfaces`
26
+contains:
27
+
28
+::
29
+
30
+        auto eth1
31
+        iface eth1 inet manual
32
+                up ifconfig $IFACE 0.0.0.0 up
33
+                down ifconfig $IFACE 0.0.0.0 down
34
+
35
+The second physical interface, eth1 is added to a bridge (in this case
36
+named br-ex), which is used to forward network traffic from guest VMs.
37
+Network traffic from eth1 on the compute nodes is then NAT'd by the
38
+controller node that runs Neutron's `neutron-l3-agent` and provides L3
39
+connectivity.
40
+
41
+::
42
+
43
+        stack@compute:~$ sudo ovs-vsctl add-br br-ex
44
+        stack@compute:~$ sudo ovs-vsctl add-port br-ex eth1
45
+        stack@compute:~$ sudo ovs-vsctl show
46
+        9a25c837-32ab-45f6-b9f2-1dd888abcf0f
47
+            Bridge br-ex
48
+                Port br-ex
49
+                    Interface br-ex
50
+                        type: internal
51
+                Port phy-br-ex
52
+                    Interface phy-br-ex
53
+                        type: patch
54
+                        options: {peer=int-br-ex}
55
+                Port "eth1"
56
+                    Interface "eth1"
57
+
58
+
59
+
60
+
61
+Neutron Networking with Open vSwitch
62
+====================================
63
+
64
+Configuring Neutron networking in DevStack is very similar to
65
+configuring `nova-network` - many of the same configuration variables
66
+(like `FIXED_RANGE` and `FLOATING_RANGE`) used by `nova-network` are
67
+used by Neutron, which is intentional.
68
+
69
+The only difference is the disabling of `nova-network` in your
70
+local.conf, and the enabling of the Neutron components.
71
+
72
+
73
+Configuration
74
+-------------
75
+
76
+::
77
+
78
+        FIXED_RANGE=10.0.0.0/24
79
+        FLOATING_RANGE=192.168.27.0/24
80
+        PUBLIC_NETWORK_GATEWAY=192.168.27.2
81
+
82
+        disable_service n-net
83
+        enable_service q-svc
84
+        enable_service q-agt
85
+        enable_service q-dhcp
86
+        enable_service q-meta
87
+        enable_service q-l3
88
+
89
+        Q_USE_SECGROUP=True
90
+        ENABLE_TENANT_VLANS=True
91
+        TENANT_VLAN_RANGE=1000:1999
92
+        PHYSICAL_NETWORK=default
93
+        OVS_PHYSICAL_BRIDGE=br-ex
94
+
95
+In this configuration we are defining FLOATING_RANGE to be a
96
+subnet that exists in the private RFC1918 address space - however in
97
+in a real setup FLOATING_RANGE would be a public IP address range.
98
+
99
+Neutron Networking with Open vSwitch and Provider Networks
100
+==========================================================
101
+
102
+In some instances, it is desirable to use Neutron's provider
103
+networking extension, so that networks that are configured on an
104
+external router can be utilized by Neutron, and instances created via
105
+Nova can attach to the network managed by the external router.
106
+
107
+For example, in some lab environments, a hardware router has been
108
+pre-configured by another party, and an OpenStack developer has been
109
+given a VLAN tag and IP address range, so that instances created via
110
+DevStack will use the external router for L3 connectivity, as opposed
111
+to the Neutron L3 service.
112
+
113
+
114
+Service Configuration
115
+---------------------
116
+
117
+**Control Node**
118
+
119
+In this example, the control node will run the majority of the
120
+OpenStack API and management services (Keystone, Glance,
121
+Nova, Neutron, etc..)
122
+
123
+
124
+**Compute Nodes**
125
+
126
+In this example, the nodes that will host guest instances will run
127
+the `neutron-openvswitch-agent` for network connectivity, as well as
128
+the compute service `nova-compute`.
129
+
130
+DevStack Configuration
131
+----------------------
132
+
133
+The following is a snippet of the DevStack configuration on the
134
+controller node.
135
+
136
+::
137
+
138
+        PUBLIC_INTERFACE=eth1
139
+
140
+        ## Neutron options
141
+        Q_USE_SECGROUP=True
142
+        ENABLE_TENANT_VLANS=True
143
+        TENANT_VLAN_RANGE=3001:4000
144
+        PHYSICAL_NETWORK=default
145
+        OVS_PHYSICAL_BRIDGE=br-ex
146
+
147
+        Q_USE_PROVIDER_NETWORKING=True
148
+        Q_L3_ENABLED=False
149
+
150
+        # Do not use Nova-Network
151
+        disable_service n-net
152
+
153
+        # Neutron
154
+        ENABLED_SERVICES+=,q-svc,q-dhcp,q-meta,q-agt
155
+
156
+        ## Neutron Networking options used to create Neutron Subnets
157
+
158
+        FIXED_RANGE="10.1.1.0/24"
159
+        PROVIDER_SUBNET_NAME="provider_net"
160
+        PROVIDER_NETWORK_TYPE="vlan"
161
+        SEGMENTATION_ID=2010
162
+
163
+In this configuration we are defining FIXED_RANGE to be a
164
+subnet that exists in the private RFC1918 address space - however in
165
+in a real setup FIXED_RANGE would be a public IP address range, so
166
+that you could access your instances from the public internet.
167
+
168
+The following is a snippet of the DevStack configuration on the
169
+compute node.
170
+
171
+::
172
+
173
+        # Services that a compute node runs
174
+        ENABLED_SERVICES=n-cpu,rabbit,q-agt
175
+
176
+        ## Neutron options
177
+        Q_USE_SECGROUP=True
178
+        ENABLE_TENANT_VLANS=True
179
+        TENANT_VLAN_RANGE=3001:4000
180
+        PHYSICAL_NETWORK=default
181
+        OVS_PHYSICAL_BRIDGE=br-ex
182
+        PUBLIC_INTERFACE=eth1
183
+        Q_USE_PROVIDER_NETWORKING=True
184
+        Q_L3_ENABLED=False
185
+
186
+When DevStack is configured to use provider networking (via
187
+`Q_USE_PROVIDER_NETWORKING` is True and `Q_L3_ENABLED` is False) -
188
+DevStack will automatically add the network interface defined in
189
+`PUBLIC_INTERFACE` to the `OVS_PHYSICAL_BRIDGE`
190
+
191
+For example, with the above  configuration, a bridge is
192
+created, named `br-ex` which is managed by Open vSwitch, and the
193
+second interface on the compute node, `eth1` is attached to the
194
+bridge, to forward traffic sent by guest vms.
... ...
@@ -63,6 +63,7 @@ Walk through various setups used by stackers
63 63
    guides/single-vm
64 64
    guides/single-machine
65 65
    guides/multinode-lab
66
+   guides/neutron
66 67
 
67 68
 All-In-One Single VM
68 69
 --------------------
... ...
@@ -84,6 +85,13 @@ Multi-Node Lab
84 84
 Setup a :doc:`multi-node cluster <guides/multinode-lab>` with dedicated VLANs for VMs & Management.
85 85
 :doc:`[Read] <guides/multinode-lab>`
86 86
 
87
+DevStack with Neutron Networking
88
+--------------------------------
89
+
90
+Building a DevStack cluster with :doc:`Neutron Networking <guides/neutron>`.
91
+This guide is meant for building lab environments with a dedicated
92
+control node and multiple compute nodes.
93
+
87 94
 DevStack Documentation
88 95
 ======================
89 96