Now prevents more than one RPC backend selection.
(ZeroMQ, Qpid, and Rabbit are mutually exclusive)
Configure quantum and cinder to use ZeroMQ
Adds qpid to cinder config.
Change-Id: I229c4c632213a303d097d4a029e986598073665a
| ... | ... |
@@ -57,6 +57,22 @@ If the EC2 API is your cup-o-tea, you can create credentials and use euca2ools: |
| 57 | 57 |
|
| 58 | 58 |
You can override environment variables used in `stack.sh` by creating file name `localrc`. It is likely that you will need to do this to tweak your networking configuration should you need to access your cloud from a different host. |
| 59 | 59 |
|
| 60 |
+# RPC Backend |
|
| 61 |
+ |
|
| 62 |
+Multiple RPC backends are available. Currently, this |
|
| 63 |
+includes RabbitMQ (default), Qpid, and ZeroMQ. Your backend of |
|
| 64 |
+choice may be selected via the `localrc`. |
|
| 65 |
+ |
|
| 66 |
+Note that selecting more than one RPC backend will result in a failure. |
|
| 67 |
+ |
|
| 68 |
+Example (ZeroMQ): |
|
| 69 |
+ |
|
| 70 |
+ ENABLED_SERVICES="$ENABLED_SERVICES,-rabbit,-qpid,zeromq" |
|
| 71 |
+ |
|
| 72 |
+Example (Qpid): |
|
| 73 |
+ |
|
| 74 |
+ ENABLED_SERVICES="$ENABLED_SERVICES,-rabbit,-zeromq,qpid" |
|
| 75 |
+ |
|
| 60 | 76 |
# Swift |
| 61 | 77 |
|
| 62 | 78 |
Swift is not installed by default, you can enable easily by adding this to your `localrc`: |
| ... | ... |
@@ -115,6 +115,8 @@ function configure_cinder() {
|
| 115 | 115 |
|
| 116 | 116 |
if is_service_enabled qpid ; then |
| 117 | 117 |
iniset $CINDER_CONF DEFAULT rpc_backend cinder.openstack.common.rpc.impl_qpid |
| 118 |
+ elif is_service_enabled zeromq; then |
|
| 119 |
+ iniset $CINDER_CONF DEFAULT rpc_backend nova.openstack.common.rpc.impl_zmq |
|
| 118 | 120 |
elif [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; then |
| 119 | 121 |
iniset $CINDER_CONF DEFAULT rabbit_host $RABBIT_HOST |
| 120 | 122 |
iniset $CINDER_CONF DEFAULT rabbit_password $RABBIT_PASSWORD |
| ... | ... |
@@ -142,6 +142,23 @@ if type -p screen >/dev/null && screen -ls | egrep -q "[0-9].stack"; then |
| 142 | 142 |
exit 1 |
| 143 | 143 |
fi |
| 144 | 144 |
|
| 145 |
+# Make sure we only have one rpc backend enabled. |
|
| 146 |
+rpc_backend_cnt=0 |
|
| 147 |
+for svc in qpid zeromq rabbit; do |
|
| 148 |
+ is_service_enabled $svc && |
|
| 149 |
+ ((rpc_backend_cnt++)) |
|
| 150 |
+done |
|
| 151 |
+if [ "$rpc_backend_cnt" -gt 1 ]; then |
|
| 152 |
+ echo "ERROR: only one rpc backend may be enabled," |
|
| 153 |
+ echo " set only one of 'rabbit', 'qpid', 'zeromq'" |
|
| 154 |
+ echo " via ENABLED_SERVICES." |
|
| 155 |
+elif [ "$rpc_backend_cnt" == 0 ]; then |
|
| 156 |
+ echo "ERROR: at least one rpc backend must be enabled," |
|
| 157 |
+ echo " set one of 'rabbit', 'qpid', 'zeromq'" |
|
| 158 |
+ echo " via ENABLED_SERVICES." |
|
| 159 |
+fi |
|
| 160 |
+unset rpc_backend_cnt |
|
| 161 |
+ |
|
| 145 | 162 |
# Make sure we only have one volume service enabled. |
| 146 | 163 |
if is_service_enabled cinder && is_service_enabled n-vol; then |
| 147 | 164 |
echo "ERROR: n-vol and cinder must not be enabled at the same time" |
| ... | ... |
@@ -655,6 +672,12 @@ elif is_service_enabled qpid; then |
| 655 | 655 |
else |
| 656 | 656 |
install_package qpidd |
| 657 | 657 |
fi |
| 658 |
+elif is_service_enabled zeromq; then |
|
| 659 |
+ if [[ "$os_PACKAGE" = "rpm" ]]; then |
|
| 660 |
+ install_package zeromq python-zmq |
|
| 661 |
+ else |
|
| 662 |
+ install_package libzmq1 python-zmq |
|
| 663 |
+ fi |
|
| 658 | 664 |
fi |
| 659 | 665 |
|
| 660 | 666 |
if is_service_enabled mysql; then |
| ... | ... |
@@ -893,8 +916,8 @@ EOF |
| 893 | 893 |
fi |
| 894 | 894 |
|
| 895 | 895 |
|
| 896 |
-# Rabbit or Qpid |
|
| 897 |
-# -------------- |
|
| 896 |
+# Finalize queue instllation |
|
| 897 |
+# -------------------------- |
|
| 898 | 898 |
|
| 899 | 899 |
if is_service_enabled rabbit; then |
| 900 | 900 |
# Start rabbitmq-server |
| ... | ... |
@@ -1274,6 +1297,8 @@ if is_service_enabled quantum; then |
| 1274 | 1274 |
iniset $Q_CONF_FILE DEFAULT control_exchange quantum |
| 1275 | 1275 |
if is_service_enabled qpid ; then |
| 1276 | 1276 |
iniset $Q_CONF_FILE DEFAULT rpc_backend quantum.openstack.common.rpc.impl_qpid |
| 1277 |
+ elif is_service_enabled zeromq; then |
|
| 1278 |
+ iniset $Q_CONF_FILE DEFAULT rpc_backend quantum.openstack.common.rpc.impl_zmq |
|
| 1277 | 1279 |
elif [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; then |
| 1278 | 1280 |
iniset $Q_CONF_FILE DEFAULT rabbit_host $RABBIT_HOST |
| 1279 | 1281 |
iniset $Q_CONF_FILE DEFAULT rabbit_password $RABBIT_PASSWORD |
| ... | ... |
@@ -1898,7 +1923,9 @@ add_nova_opt "vncserver_proxyclient_address=$VNCSERVER_PROXYCLIENT_ADDRESS" |
| 1898 | 1898 |
add_nova_opt "api_paste_config=$NOVA_CONF_DIR/api-paste.ini" |
| 1899 | 1899 |
add_nova_opt "image_service=nova.image.glance.GlanceImageService" |
| 1900 | 1900 |
add_nova_opt "ec2_dmz_host=$EC2_DMZ_HOST" |
| 1901 |
-if is_service_enabled qpid ; then |
|
| 1901 |
+if is_service_enabled zeromq; then |
|
| 1902 |
+ add_nova_opt "rpc_backend=nova.openstack.common.rpc.impl_zmq" |
|
| 1903 |
+elif is_service_enabled qpid; then |
|
| 1902 | 1904 |
add_nova_opt "rpc_backend=nova.rpc.impl_qpid" |
| 1903 | 1905 |
elif [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; then |
| 1904 | 1906 |
add_nova_opt "rabbit_host=$RABBIT_HOST" |
| ... | ... |
@@ -2142,6 +2169,8 @@ if is_service_enabled key; then |
| 2142 | 2142 |
fi |
| 2143 | 2143 |
fi |
| 2144 | 2144 |
|
| 2145 |
+screen_it zeromq "cd $NOVA_DIR && $NOVA_DIR/bin/nova-rpc-zmq-receiver" |
|
| 2146 |
+ |
|
| 2145 | 2147 |
# Launch the nova-api and wait for it to answer before continuing |
| 2146 | 2148 |
if is_service_enabled n-api; then |
| 2147 | 2149 |
add_nova_opt "enabled_apis=$NOVA_ENABLED_APIS" |