Also change the Quantum support around a bit.. now if you want Quantum
networking you can specify "quantum" in enabled_services -- if you actually
want to run the service then you need to add "q-svc" to enabled services.
Finally, move some of the openvswitch plugin logic into the openvswitch block.
Change-Id: I4b45e40f9670d2288d7714864a76e83972bec2c0
... | ... |
@@ -154,6 +154,10 @@ QUANTUM_DIR=$DEST/quantum |
154 | 154 |
|
155 | 155 |
# Default Quantum Plugin |
156 | 156 |
Q_PLUGIN=${Q_PLUGIN:-openvswitch} |
157 |
+# Default Quantum Port |
|
158 |
+Q_PORT=${Q_PORT:-9696} |
|
159 |
+# Default Quantum Host |
|
160 |
+Q_HOST=${Q_HOST:-localhost} |
|
157 | 161 |
|
158 | 162 |
# Specify which services to launch. These generally correspond to screen tabs |
159 | 163 |
ENABLED_SERVICES=${ENABLED_SERVICES:-g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,horizon,mysql,rabbit,openstackx} |
... | ... |
@@ -280,8 +284,9 @@ FLAT_INTERFACE=${FLAT_INTERFACE:-eth0} |
280 | 280 |
|
281 | 281 |
# Using Quantum networking: |
282 | 282 |
# |
283 |
-# Make sure that q-svc is enabled in ENABLED_SERVICES. If it is the network |
|
284 |
-# manager will be set to the QuantumManager. |
|
283 |
+# Make sure that quantum is enabled in ENABLED_SERVICES. If it is the network |
|
284 |
+# manager will be set to the QuantumManager. If you want to run Quantum on |
|
285 |
+# this host, make sure that q-svc is also in ENABLED_SERVICES. |
|
285 | 286 |
# |
286 | 287 |
# If you're planning to use the Quantum openvswitch plugin, set Q_PLUGIN to |
287 | 288 |
# "openvswitch" and make sure the q-agt service is enabled in |
... | ... |
@@ -531,7 +536,7 @@ if [[ "$ENABLED_SERVICES" =~ "openstackx" ]]; then |
531 | 531 |
# that is *deprecated*. The code is being moved into python-novaclient & nova. |
532 | 532 |
git_clone $OPENSTACKX_REPO $OPENSTACKX_DIR $OPENSTACKX_BRANCH |
533 | 533 |
fi |
534 |
-if [[ "$ENABLED_SERVICES" =~ "quantum" ]]; then |
|
534 |
+if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then |
|
535 | 535 |
# quantum |
536 | 536 |
git_clone $QUANTUM_REPO $QUANTUM_DIR $QUANTUM_BRANCH |
537 | 537 |
fi |
... | ... |
@@ -565,7 +570,7 @@ if [[ "$ENABLED_SERVICES" =~ "horizon" ]]; then |
565 | 565 |
cd $HORIZON_DIR/horizon; sudo python setup.py develop |
566 | 566 |
cd $HORIZON_DIR/openstack-dashboard; sudo python setup.py develop |
567 | 567 |
fi |
568 |
-if [[ "$ENABLED_SERVICES" =~ "quantum" ]]; then |
|
568 |
+if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then |
|
569 | 569 |
cd $QUANTUM_DIR; sudo python setup.py develop |
570 | 570 |
fi |
571 | 571 |
|
... | ... |
@@ -967,9 +972,11 @@ add_nova_flag "--allow_admin_api" |
967 | 967 |
add_nova_flag "--scheduler_driver=$SCHEDULER" |
968 | 968 |
add_nova_flag "--dhcpbridge_flagfile=$NOVA_DIR/bin/nova.conf" |
969 | 969 |
add_nova_flag "--fixed_range=$FIXED_RANGE" |
970 |
-if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then |
|
970 |
+if [[ "$ENABLED_SERVICES" =~ "quantum" ]]; then |
|
971 | 971 |
add_nova_flag "--network_manager=nova.network.quantum.manager.QuantumManager" |
972 |
- if [[ "$Q_PLUGIN" = "openvswitch" ]]; then |
|
972 |
+ add_nova_flag "--quantum_connection_host=$Q_HOST" |
|
973 |
+ add_nova_flag "--quantum_connection_port=$Q_PORT" |
|
974 |
+ if [[ "$ENABLED_SERVICES" =~ "q-svc" && "$Q_PLUGIN" = "openvswitch" ]]; then |
|
973 | 975 |
add_nova_flag "--libvirt_vif_type=ethernet" |
974 | 976 |
add_nova_flag "--libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtOpenVswitchDriver" |
975 | 977 |
add_nova_flag "--linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver" |
... | ... |
@@ -1156,25 +1163,23 @@ if [[ "$ENABLED_SERVICES" =~ "n-api" ]]; then |
1156 | 1156 |
fi |
1157 | 1157 |
fi |
1158 | 1158 |
|
1159 |
-# Quantum |
|
1159 |
+# Quantum service |
|
1160 | 1160 |
if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then |
1161 |
- # Install deps |
|
1162 |
- # FIXME add to files/apts/quantum, but don't install if not needed! |
|
1163 |
- apt_get install openvswitch-switch openvswitch-datapath-dkms |
|
1164 |
- |
|
1165 |
- # Create database for the plugin/agent |
|
1166 | 1161 |
if [[ "$Q_PLUGIN" = "openvswitch" ]]; then |
1162 |
+ # Install deps |
|
1163 |
+ # FIXME add to files/apts/quantum, but don't install if not needed! |
|
1164 |
+ apt_get install openvswitch-switch openvswitch-datapath-dkms |
|
1165 |
+ # Create database for the plugin/agent |
|
1167 | 1166 |
if [[ "$ENABLED_SERVICES" =~ "mysql" ]]; then |
1168 | 1167 |
mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'CREATE DATABASE IF NOT EXISTS ovs_quantum;' |
1169 | 1168 |
else |
1170 | 1169 |
echo "mysql must be enabled in order to use the $Q_PLUGIN Quantum plugin." |
1171 | 1170 |
exit 1 |
1172 | 1171 |
fi |
1172 |
+ QUANTUM_PLUGIN_INI_FILE=$QUANTUM_DIR/etc/plugins.ini |
|
1173 |
+ # Make sure we're using the openvswitch plugin |
|
1174 |
+ sed -i -e "s/^provider =.*$/provider = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPlugin/g" $QUANTUM_PLUGIN_INI_FILE |
|
1173 | 1175 |
fi |
1174 |
- |
|
1175 |
- QUANTUM_PLUGIN_INI_FILE=$QUANTUM_DIR/etc/plugins.ini |
|
1176 |
- # Make sure we're using the openvswitch plugin |
|
1177 |
- sed -i -e "s/^provider =.*$/provider = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPlugin/g" $QUANTUM_PLUGIN_INI_FILE |
|
1178 | 1176 |
screen_it q-svc "cd $QUANTUM_DIR && PYTHONPATH=.:$PYTHONPATH python $QUANTUM_DIR/bin/quantum-server $QUANTUM_DIR/etc/quantum.conf" |
1179 | 1177 |
fi |
1180 | 1178 |
|