Skip to content

Commit 4a22145

Browse files
russellbDean Troyer
authored andcommitted
Add support for using Qpid instead of RabbitMQ.
To use Qpid instead of RabbitMQ, you set 'qpid' instead of 'rabbit' in ENABLED_SERVICES in your localrc file. Otherwise, RabbitMQ is still used by default. (dtroyer) fixed problem with service test that failed to configure rabbitmq if it was still selected. Change-Id: I8c62b588a461a068463821b2c079ffa4bfa1f804
1 parent 461203b commit 4a22145

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

files/apts/nova

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ libvirt-bin # NOPRIME
1919
vlan
2020
curl
2121
rabbitmq-server # NOPRIME
22+
qpidd # NOPRIME
2223
socat # used by ajaxterm
2324
python-mox
2425
python-paste
@@ -42,3 +43,4 @@ python-boto
4243
python-kombu
4344
python-feedparser
4445
python-iso8601
46+
python-qpid # dist:precise

files/rpms/nova

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ python-netaddr
2929
python-paramiko
3030
python-paste
3131
python-paste-deploy
32+
python-qpid
3233
python-routes
3334
python-sqlalchemy
3435
python-suds
3536
python-tempita
3637
rabbitmq-server # NOPRIME
38+
qpid-cpp-server # NOPRIME
3739
sqlite
3840
sudo
3941
vconfig

stack.sh

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ if [[ ! ${DISTRO} =~ (oneiric|precise|quantal|f16) ]]; then
9494
fi
9595
fi
9696

97+
if [ "${DISTRO}" = "oneiric" ] && is_service_enabled qpid ; then
98+
# Qpid was introduced in precise
99+
echo "You must use Ubuntu Precise or newer for Qpid support."
100+
exit 1
101+
fi
102+
97103
# Set the paths of certain binaries
98104
if [[ "$os_PACKAGE" = "deb" ]]; then
99105
NOVA_ROOTWRAP=/usr/local/bin/nova-rootwrap
@@ -381,8 +387,8 @@ FLAT_INTERFACE=${FLAT_INTERFACE:-$GUEST_INTERFACE_DEFAULT}
381387
# host.
382388

383389

384-
# MySQL & RabbitMQ
385-
# ----------------
390+
# MySQL & (RabbitMQ or Qpid)
391+
# --------------------------
386392

387393
# We configure Nova, Horizon, Glance and Keystone to use MySQL as their
388394
# database server. While they share a single server, each has their own
@@ -400,8 +406,10 @@ read_password MYSQL_PASSWORD "ENTER A PASSWORD TO USE FOR MYSQL."
400406
BASE_SQL_CONN=${BASE_SQL_CONN:-mysql://$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST}
401407

402408
# Rabbit connection info
403-
RABBIT_HOST=${RABBIT_HOST:-localhost}
404-
read_password RABBIT_PASSWORD "ENTER A PASSWORD TO USE FOR RABBIT."
409+
if is_service_enabled rabbit; then
410+
RABBIT_HOST=${RABBIT_HOST:-localhost}
411+
read_password RABBIT_PASSWORD "ENTER A PASSWORD TO USE FOR RABBIT."
412+
fi
405413

406414
# Glance connection info. Note the port must be specified.
407415
GLANCE_HOSTPORT=${GLANCE_HOSTPORT:-$SERVICE_HOST:9292}
@@ -756,8 +764,8 @@ EOF
756764
fi
757765

758766

759-
# Rabbit
760-
# ------
767+
# Rabbit or Qpid
768+
# --------------
761769

762770
if is_service_enabled rabbit; then
763771
# Install and start rabbitmq-server
@@ -772,6 +780,13 @@ if is_service_enabled rabbit; then
772780
fi
773781
# change the rabbit password since the default is "guest"
774782
sudo rabbitmqctl change_password guest $RABBIT_PASSWORD
783+
elif is_service_enabled qpid; then
784+
if [[ "$os_PACKAGE" = "rpm" ]]; then
785+
install_package qpid-cpp-server
786+
restart_service qpidd
787+
else
788+
install_package qpidd
789+
fi
775790
fi
776791

777792

@@ -1653,8 +1668,12 @@ add_nova_opt "vncserver_proxyclient_address=$VNCSERVER_PROXYCLIENT_ADDRESS"
16531668
add_nova_opt "api_paste_config=$NOVA_CONF_DIR/api-paste.ini"
16541669
add_nova_opt "image_service=nova.image.glance.GlanceImageService"
16551670
add_nova_opt "ec2_dmz_host=$EC2_DMZ_HOST"
1656-
add_nova_opt "rabbit_host=$RABBIT_HOST"
1657-
add_nova_opt "rabbit_password=$RABBIT_PASSWORD"
1671+
if is_service_enabled rabbit ; then
1672+
add_nova_opt "rabbit_host=$RABBIT_HOST"
1673+
add_nova_opt "rabbit_password=$RABBIT_PASSWORD"
1674+
elif is_service_enabled qpid ; then
1675+
add_nova_opt "rpc_backend=nova.rpc.impl_qpid"
1676+
fi
16581677
add_nova_opt "glance_api_servers=$GLANCE_HOSTPORT"
16591678
add_nova_opt "force_dhcp_release=True"
16601679
if [ -n "$INSTANCES_PATH" ]; then

0 commit comments

Comments
 (0)