Browse code

Remove Quantum V1 support

The update includes the following:
1. Removal of melange support (this is replaced by Quantum)
2. Removal of Quantum V1 support. This is all now pure V2.

Change-Id: Ief3982fe8fa7402eef5db3e115df741c2cc9f4d1

Gary Kotton authored on 2012/08/08 16:46:33
Showing 2 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 
3 3
 # ``stack.sh`` is an opinionated OpenStack developer installation.  It
4 4
 # installs and configures various combinations of **Glance**, **Horizon**,
5
-# **Keystone**, **Melange**, **Nova**, **Quantum** and **Swift**
5
+# **Keystone**, **Nova**, **Quantum** and **Swift**
6 6
 
7 7
 # This script allows you to specify configuration options of what git
8 8
 # repositories to use, enabled services, network configuration and various
... ...
@@ -251,8 +251,6 @@ SWIFT3_DIR=$DEST/swift3
251 251
 SWIFTCLIENT_DIR=$DEST/python-swiftclient
252 252
 QUANTUM_DIR=$DEST/quantum
253 253
 QUANTUM_CLIENT_DIR=$DEST/python-quantumclient
254
-MELANGE_DIR=$DEST/melange
255
-MELANGECLIENT_DIR=$DEST/python-melangeclient
256 254
 
257 255
 # Default Quantum Plugin
258 256
 Q_PLUGIN=${Q_PLUGIN:-openvswitch}
... ...
@@ -261,20 +259,12 @@ Q_PORT=${Q_PORT:-9696}
261 261
 # Default Quantum Host
262 262
 Q_HOST=${Q_HOST:-localhost}
263 263
 # Which Quantum API nova should use
264
-NOVA_USE_QUANTUM_API=${NOVA_USE_QUANTUM_API:-v1}
265 264
 # Default admin username
266 265
 Q_ADMIN_USERNAME=${Q_ADMIN_USERNAME:-quantum}
267 266
 # Default auth strategy
268 267
 Q_AUTH_STRATEGY=${Q_AUTH_STRATEGY:-keystone}
269 268
 
270 269
 
271
-# Default Melange Port
272
-M_PORT=${M_PORT:-9898}
273
-# Default Melange Host
274
-M_HOST=${M_HOST:-localhost}
275
-# Melange MAC Address Range
276
-M_MAC_RANGE=${M_MAC_RANGE:-FE-EE-DD-00-00-00/24}
277
-
278 270
 # Name of the lvm volume group to use/create for iscsi volumes
279 271
 VOLUME_GROUP=${VOLUME_GROUP:-stack-volumes}
280 272
 VOLUME_NAME_PREFIX=${VOLUME_NAME_PREFIX:-volume-}
... ...
@@ -419,14 +409,6 @@ FLAT_INTERFACE=${FLAT_INTERFACE:-$GUEST_INTERFACE_DEFAULT}
419 419
 #
420 420
 # With Quantum networking the NET_MAN variable is ignored.
421 421
 
422
-# Using Melange IPAM:
423
-#
424
-# Make sure that quantum and melange are enabled in ENABLED_SERVICES.
425
-# If they are then the melange IPAM lib will be set in the QuantumManager.
426
-# Adding m-svc to ENABLED_SERVICES will start the melange service on this
427
-# host.
428
-
429
-
430 422
 # MySQL & (RabbitMQ or Qpid)
431 423
 # --------------------------
432 424
 
... ...
@@ -785,13 +767,6 @@ if is_service_enabled quantum; then
785 785
     # quantum
786 786
     git_clone $QUANTUM_REPO $QUANTUM_DIR $QUANTUM_BRANCH
787 787
 fi
788
-if is_service_enabled m-svc; then
789
-    # melange
790
-    git_clone $MELANGE_REPO $MELANGE_DIR $MELANGE_BRANCH
791
-fi
792
-if is_service_enabled melange; then
793
-    git_clone $MELANGECLIENT_REPO $MELANGECLIENT_DIR $MELANGECLIENT_BRANCH
794
-fi
795 788
 if is_service_enabled cinder; then
796 789
     install_cinder
797 790
 fi
... ...
@@ -829,12 +804,6 @@ if is_service_enabled quantum; then
829 829
     setup_develop $QUANTUM_CLIENT_DIR
830 830
     setup_develop $QUANTUM_DIR
831 831
 fi
832
-if is_service_enabled m-svc; then
833
-    setup_develop $MELANGE_DIR
834
-fi
835
-if is_service_enabled melange; then
836
-    setup_develop $MELANGECLIENT_DIR
837
-fi
838 832
 if is_service_enabled cinder; then
839 833
     configure_cinder
840 834
 fi
... ...
@@ -1116,20 +1085,12 @@ if is_service_enabled quantum; then
1116 1116
         Q_PLUGIN_CONF_PATH=etc/quantum/plugins/openvswitch
1117 1117
         Q_PLUGIN_CONF_FILENAME=ovs_quantum_plugin.ini
1118 1118
         Q_DB_NAME="ovs_quantum"
1119
-        if [[ "$NOVA_USE_QUANTUM_API" = "v1" ]]; then
1120
-            Q_PLUGIN_CLASS="quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPlugin"
1121
-        elif [[ "$NOVA_USE_QUANTUM_API" = "v2" ]]; then
1122
-            Q_PLUGIN_CLASS="quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2"
1123
-        fi
1119
+        Q_PLUGIN_CLASS="quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2"
1124 1120
     elif [[ "$Q_PLUGIN" = "linuxbridge" ]]; then
1125 1121
         Q_PLUGIN_CONF_PATH=etc/quantum/plugins/linuxbridge
1126 1122
         Q_PLUGIN_CONF_FILENAME=linuxbridge_conf.ini
1127 1123
         Q_DB_NAME="quantum_linux_bridge"
1128
-        if [[ "$NOVA_USE_QUANTUM_API" = "v1" ]]; then
1129
-            Q_PLUGIN_CLASS="quantum.plugins.linuxbridge.LinuxBridgePlugin.LinuxBridgePlugin"
1130
-        elif [[ "$NOVA_USE_QUANTUM_API" = "v2" ]]; then
1131
-            Q_PLUGIN_CLASS="quantum.plugins.linuxbridge.lb_quantum_plugin.LinuxBridgePluginV2"
1132
-        fi
1124
+        Q_PLUGIN_CLASS="quantum.plugins.linuxbridge.lb_quantum_plugin.LinuxBridgePluginV2"
1133 1125
     else
1134 1126
         echo "Unknown Quantum plugin '$Q_PLUGIN'.. exiting"
1135 1127
         exit 1
... ...
@@ -1153,11 +1114,7 @@ if is_service_enabled quantum; then
1153 1153
         sudo sed -i -e "s/.*enable_tunneling = .*$/enable_tunneling = $OVS_ENABLE_TUNNELING/g" /$Q_PLUGIN_CONF_FILE
1154 1154
     fi
1155 1155
 
1156
-    if [[ "$NOVA_USE_QUANTUM_API" = "v1" ]]; then
1157
-        iniset /$Q_PLUGIN_CONF_FILE AGENT target_v2_api False
1158
-    elif [[ "$NOVA_USE_QUANTUM_API" = "v2" ]]; then
1159
-        iniset /$Q_PLUGIN_CONF_FILE AGENT target_v2_api True
1160
-    fi
1156
+    iniset /$Q_PLUGIN_CONF_FILE AGENT target_v2_api True
1161 1157
     Q_CONF_FILE=/etc/quantum/quantum.conf
1162 1158
     cp $QUANTUM_DIR/etc/quantum.conf $Q_CONF_FILE
1163 1159
 fi
... ...
@@ -1260,29 +1217,6 @@ screen_it q-agt "sudo python $AGENT_BINARY --config-file $Q_CONF_FILE --config-f
1260 1260
 # Start up the quantum agent
1261 1261
 screen_it q-dhcp "sudo python $AGENT_DHCP_BINARY --config-file=$Q_DHCP_CONF_FILE"
1262 1262
 
1263
-# Melange service
1264
-if is_service_enabled m-svc; then
1265
-    if is_service_enabled mysql; then
1266
-        mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'DROP DATABASE IF EXISTS melange;'
1267
-        mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'CREATE DATABASE melange CHARACTER SET utf8;'
1268
-    else
1269
-        echo "mysql must be enabled in order to use the $Q_PLUGIN Quantum plugin."
1270
-        exit 1
1271
-    fi
1272
-    MELANGE_CONFIG_FILE=$MELANGE_DIR/etc/melange/melange.conf
1273
-    cp $MELANGE_CONFIG_FILE.sample $MELANGE_CONFIG_FILE
1274
-    sed -i -e "s/^sql_connection =.*$/sql_connection = mysql:\/\/$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST\/melange?charset=utf8/g" $MELANGE_CONFIG_FILE
1275
-    cd $MELANGE_DIR && PYTHONPATH=.:$PYTHONPATH python $MELANGE_DIR/bin/melange-manage --config-file=$MELANGE_CONFIG_FILE db_sync
1276
-    screen_it m-svc "cd $MELANGE_DIR && PYTHONPATH=.:$PYTHONPATH python $MELANGE_DIR/bin/melange-server --config-file=$MELANGE_CONFIG_FILE"
1277
-    echo "Waiting for melange to start..."
1278
-    if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= wget -q -O- http://127.0.0.1:9898; do sleep 1; done"; then
1279
-      echo "melange-server did not start"
1280
-      exit 1
1281
-    fi
1282
-    melange mac_address_range create cidr=$M_MAC_RANGE
1283
-fi
1284
-
1285
-
1286 1263
 # Nova
1287 1264
 # ----
1288 1265
 
... ...
@@ -1827,28 +1761,13 @@ add_nova_opt "fixed_range=$FIXED_RANGE"
1827 1827
 add_nova_opt "s3_host=$SERVICE_HOST"
1828 1828
 add_nova_opt "s3_port=$S3_SERVICE_PORT"
1829 1829
 if is_service_enabled quantum; then
1830
-    if [[ "$NOVA_USE_QUANTUM_API" = "v1" ]]; then
1831
-        add_nova_opt "network_manager=nova.network.quantum.manager.QuantumManager"
1832
-        add_nova_opt "quantum_connection_host=$Q_HOST"
1833
-        add_nova_opt "quantum_connection_port=$Q_PORT"
1834
-        add_nova_opt "quantum_use_dhcp=True"
1835
-
1836
-        if is_service_enabled melange; then
1837
-            add_nova_opt "quantum_ipam_lib=nova.network.quantum.melange_ipam_lib"
1838
-            add_nova_opt "use_melange_mac_generation=True"
1839
-            add_nova_opt "melange_host=$M_HOST"
1840
-            add_nova_opt "melange_port=$M_PORT"
1841
-        fi
1842
-
1843
-    elif [[ "$NOVA_USE_QUANTUM_API" = "v2" ]]; then
1844
-        add_nova_opt "network_api_class=nova.network.quantumv2.api.API"
1845
-        add_nova_opt "quantum_admin_username=$Q_ADMIN_USERNAME"
1846
-        add_nova_opt "quantum_admin_password=$SERVICE_PASSWORD"
1847
-        add_nova_opt "quantum_admin_auth_url=$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0"
1848
-        add_nova_opt "quantum_auth_strategy=$Q_AUTH_STRATEGY"
1849
-        add_nova_opt "quantum_admin_tenant_name=$SERVICE_TENANT_NAME"
1850
-        add_nova_opt "quantum_url=http://$Q_HOST:$Q_PORT"
1851
-    fi
1830
+    add_nova_opt "network_api_class=nova.network.quantumv2.api.API"
1831
+    add_nova_opt "quantum_admin_username=$Q_ADMIN_USERNAME"
1832
+    add_nova_opt "quantum_admin_password=$SERVICE_PASSWORD"
1833
+    add_nova_opt "quantum_admin_auth_url=$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_AUTH_PORT/v2.0"
1834
+    add_nova_opt "quantum_auth_strategy=$Q_AUTH_STRATEGY"
1835
+    add_nova_opt "quantum_admin_tenant_name=$SERVICE_TENANT_NAME"
1836
+    add_nova_opt "quantum_url=http://$Q_HOST:$Q_PORT"
1852 1837
 
1853 1838
     if [[ "$Q_PLUGIN" = "openvswitch" ]]; then
1854 1839
         NOVA_VIF_DRIVER="nova.virt.libvirt.vif.LibvirtOpenVswitchDriver"
... ...
@@ -2148,25 +2067,23 @@ fi
2148 2148
 
2149 2149
 # If we're using Quantum (i.e. q-svc is enabled), network creation has to
2150 2150
 # happen after we've started the Quantum service.
2151
-if is_service_enabled mysql && is_service_enabled nova; then
2152
-    if [[ "$NOVA_USE_QUANTUM_API" = "v1" ]]; then
2153
-        # Create a small network
2154
-        $NOVA_DIR/bin/nova-manage network create private $FIXED_RANGE 1 $FIXED_NETWORK_SIZE $NETWORK_CREATE_ARGS
2155
-
2156
-        # Create some floating ips
2157
-        $NOVA_DIR/bin/nova-manage floating create $FLOATING_RANGE
2158
-
2159
-        # Create a second pool
2160
-        $NOVA_DIR/bin/nova-manage floating create --ip_range=$TEST_FLOATING_RANGE --pool=$TEST_FLOATING_POOL
2161
-    elif [[ "$NOVA_USE_QUANTUM_API" = "v2" ]]; then
2162
-        TENANT_ID=$(keystone tenant-list | grep " demo " | get_field 1)
2163
-
2164
-        # Create a small network
2165
-        # Since quantum command is executed in admin context at this point,
2166
-        # --tenant_id needs to be specified.
2167
-        NET_ID=$(quantum net-create --tenant_id $TENANT_ID net1 | grep ' id ' | get_field 2)
2168
-        quantum subnet-create --tenant_id $TENANT_ID --ip_version 4 --gateway $NETWORK_GATEWAY $NET_ID $FIXED_RANGE
2169
-    fi
2151
+if is_service_enabled q-svc; then
2152
+    TENANT_ID=$(keystone tenant-list | grep " demo " | get_field 1)
2153
+
2154
+    # Create a small network
2155
+    # Since quantum command is executed in admin context at this point,
2156
+    # --tenant_id needs to be specified.
2157
+    NET_ID=$(quantum net-create --tenant_id $TENANT_ID net1 | grep ' id ' | get_field 2)
2158
+    quantum subnet-create --tenant_id $TENANT_ID --ip_version 4 --gateway $NETWORK_GATEWAY $NET_ID $FIXED_RANGE
2159
+elif is_service_enabled mysql && is_service_enabled nova; then
2160
+    # Create a small network
2161
+    $NOVA_DIR/bin/nova-manage network create private $FIXED_RANGE 1 $FIXED_NETWORK_SIZE $NETWORK_CREATE_ARGS
2162
+
2163
+    # Create some floating ips
2164
+    $NOVA_DIR/bin/nova-manage floating create $FLOATING_RANGE
2165
+
2166
+    # Create a second pool
2167
+    $NOVA_DIR/bin/nova-manage floating create --ip_range=$TEST_FLOATING_RANGE --pool=$TEST_FLOATING_POOL
2170 2168
 fi
2171 2169
 
2172 2170
 # Launching nova-compute should be as simple as running ``nova-compute`` but
... ...
@@ -91,14 +91,6 @@ QUANTUM_CLIENT_BRANCH=master
91 91
 TEMPEST_REPO=${GIT_BASE}/openstack/tempest.git
92 92
 TEMPEST_BRANCH=master
93 93
 
94
-# melange service
95
-MELANGE_REPO=${GIT_BASE}/openstack/melange.git
96
-MELANGE_BRANCH=master
97
-
98
-# python melange client library
99
-MELANGECLIENT_REPO=${GIT_BASE}/openstack/python-melangeclient.git
100
-MELANGECLIENT_BRANCH=master
101
-
102 94
 # Nova hypervisor configuration.  We default to libvirt with **kvm** but will
103 95
 # drop back to **qemu** if we are unable to load the kvm module.  ``stack.sh`` can
104 96
 # also install an **LXC** or **OpenVZ** based system.