|
...
|
...
|
@@ -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}
|
|
...
|
...
|
@@ -281,8 +285,9 @@ FLAT_INTERFACE=${FLAT_INTERFACE:-eth0}
|
|
281
|
281
|
|
|
282
|
282
|
# Using Quantum networking:
|
|
283
|
283
|
#
|
|
284
|
|
-# Make sure that q-svc is enabled in ENABLED_SERVICES. If it is the network
|
|
285
|
|
-# manager will be set to the QuantumManager.
|
|
|
284
|
+# Make sure that quantum is enabled in ENABLED_SERVICES. If it is the network
|
|
|
285
|
+# manager will be set to the QuantumManager. If you want to run Quantum on
|
|
|
286
|
+# this host, make sure that q-svc is also in ENABLED_SERVICES.
|
|
286
|
287
|
#
|
|
287
|
288
|
# If you're planning to use the Quantum openvswitch plugin, set Q_PLUGIN to
|
|
288
|
289
|
# "openvswitch" and make sure the q-agt service is enabled in
|
|
...
|
...
|
@@ -532,7 +537,7 @@ if [[ "$ENABLED_SERVICES" =~ "openstackx" ]]; then
|
|
532
|
532
|
# that is *deprecated*. The code is being moved into python-novaclient & nova.
|
|
533
|
533
|
git_clone $OPENSTACKX_REPO $OPENSTACKX_DIR $OPENSTACKX_BRANCH
|
|
534
|
534
|
fi
|
|
535
|
|
-if [[ "$ENABLED_SERVICES" =~ "quantum" ]]; then
|
|
|
535
|
+if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then
|
|
536
|
536
|
# quantum
|
|
537
|
537
|
git_clone $QUANTUM_REPO $QUANTUM_DIR $QUANTUM_BRANCH
|
|
538
|
538
|
fi
|
|
...
|
...
|
@@ -566,7 +571,7 @@ if [[ "$ENABLED_SERVICES" =~ "horizon" ]]; then
|
|
566
|
566
|
cd $HORIZON_DIR/horizon; sudo python setup.py develop
|
|
567
|
567
|
cd $HORIZON_DIR/openstack-dashboard; sudo python setup.py develop
|
|
568
|
568
|
fi
|
|
569
|
|
-if [[ "$ENABLED_SERVICES" =~ "quantum" ]]; then
|
|
|
569
|
+if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then
|
|
570
|
570
|
cd $QUANTUM_DIR; sudo python setup.py develop
|
|
571
|
571
|
fi
|
|
572
|
572
|
|
|
...
|
...
|
@@ -985,9 +990,11 @@ add_nova_flag "--allow_admin_api"
|
|
985
|
985
|
add_nova_flag "--scheduler_driver=$SCHEDULER"
|
|
986
|
986
|
add_nova_flag "--dhcpbridge_flagfile=$NOVA_DIR/bin/nova.conf"
|
|
987
|
987
|
add_nova_flag "--fixed_range=$FIXED_RANGE"
|
|
988
|
|
-if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then
|
|
|
988
|
+if [[ "$ENABLED_SERVICES" =~ "quantum" ]]; then
|
|
989
|
989
|
add_nova_flag "--network_manager=nova.network.quantum.manager.QuantumManager"
|
|
990
|
|
- if [[ "$Q_PLUGIN" = "openvswitch" ]]; then
|
|
|
990
|
+ add_nova_flag "--quantum_connection_host=$Q_HOST"
|
|
|
991
|
+ add_nova_flag "--quantum_connection_port=$Q_PORT"
|
|
|
992
|
+ if [[ "$ENABLED_SERVICES" =~ "q-svc" && "$Q_PLUGIN" = "openvswitch" ]]; then
|
|
991
|
993
|
add_nova_flag "--libvirt_vif_type=ethernet"
|
|
992
|
994
|
add_nova_flag "--libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtOpenVswitchDriver"
|
|
993
|
995
|
add_nova_flag "--linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver"
|
|
...
|
...
|
@@ -1175,25 +1182,23 @@ if [[ "$ENABLED_SERVICES" =~ "n-api" ]]; then
|
|
1175
|
1175
|
fi
|
|
1176
|
1176
|
fi
|
|
1177
|
1177
|
|
|
1178
|
|
-# Quantum
|
|
|
1178
|
+# Quantum service
|
|
1179
|
1179
|
if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then
|
|
1180
|
|
- # Install deps
|
|
1181
|
|
- # FIXME add to files/apts/quantum, but don't install if not needed!
|
|
1182
|
|
- apt_get install openvswitch-switch openvswitch-datapath-dkms
|
|
1183
|
|
-
|
|
1184
|
|
- # Create database for the plugin/agent
|
|
1185
|
1180
|
if [[ "$Q_PLUGIN" = "openvswitch" ]]; then
|
|
|
1181
|
+ # Install deps
|
|
|
1182
|
+ # FIXME add to files/apts/quantum, but don't install if not needed!
|
|
|
1183
|
+ apt_get install openvswitch-switch openvswitch-datapath-dkms
|
|
|
1184
|
+ # Create database for the plugin/agent
|
|
1186
|
1185
|
if [[ "$ENABLED_SERVICES" =~ "mysql" ]]; then
|
|
1187
|
1186
|
mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'CREATE DATABASE IF NOT EXISTS ovs_quantum;'
|
|
1188
|
1187
|
else
|
|
1189
|
1188
|
echo "mysql must be enabled in order to use the $Q_PLUGIN Quantum plugin."
|
|
1190
|
1189
|
exit 1
|
|
1191
|
1190
|
fi
|
|
|
1191
|
+ QUANTUM_PLUGIN_INI_FILE=$QUANTUM_DIR/etc/plugins.ini
|
|
|
1192
|
+ # Make sure we're using the openvswitch plugin
|
|
|
1193
|
+ sed -i -e "s/^provider =.*$/provider = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPlugin/g" $QUANTUM_PLUGIN_INI_FILE
|
|
1192
|
1194
|
fi
|
|
1193
|
|
-
|
|
1194
|
|
- QUANTUM_PLUGIN_INI_FILE=$QUANTUM_DIR/etc/plugins.ini
|
|
1195
|
|
- # Make sure we're using the openvswitch plugin
|
|
1196
|
|
- sed -i -e "s/^provider =.*$/provider = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPlugin/g" $QUANTUM_PLUGIN_INI_FILE
|
|
1197
|
1195
|
screen_it q-svc "cd $QUANTUM_DIR && PYTHONPATH=.:$PYTHONPATH python $QUANTUM_DIR/bin/quantum-server $QUANTUM_DIR/etc/quantum.conf"
|
|
1198
|
1196
|
fi
|
|
1199
|
1197
|
|