From 2cb593be19116404c8fd9a3ddd34649a5be7b9fe Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Wed, 25 Sep 2013 17:04:47 +0800 Subject: [PATCH] Added automatic Debconf configuration of RabbitMQ Rewritten-From: 11f6f4d42a3cd74925757626c919918ba548b9b4 --- xenial/debian/cinder-common.config.in | 1 + xenial/debian/cinder-common.install | 2 -- xenial/debian/cinder-common.postinst.in | 2 ++ xenial/debian/cinder-common.templates | 26 +++++++++++++++++++++++++ xenial/debian/rules | 2 ++ 5 files changed, 31 insertions(+), 2 deletions(-) diff --git a/xenial/debian/cinder-common.config.in b/xenial/debian/cinder-common.config.in index 7c8c3f967..23b24951f 100644 --- a/xenial/debian/cinder-common.config.in +++ b/xenial/debian/cinder-common.config.in @@ -26,6 +26,7 @@ CINDER_ENABLE=${CINDER_ENABLE}" >${CINDER_COM_DEF} pkgos_var_user_group cinder pkgos_dbc_read_conf -pkg cinder-common ${CINDER_CONF} DEFAULT sql_connection cinder $@ +pkgos_rabbit_read_conf ${CINDER_CONF} DEFAULT cinder pkgos_read_admin_creds ${CINDER_API} filter:authtoken cinder manage_cinder_enable diff --git a/xenial/debian/cinder-common.install b/xenial/debian/cinder-common.install index aed6cd489..f95c62507 100644 --- a/xenial/debian/cinder-common.install +++ b/xenial/debian/cinder-common.install @@ -1,5 +1,3 @@ -debian/cinder.conf /usr/share/cinder-common -debian/logging.conf /etc/cinder etc/cinder/api-paste.ini /usr/share/cinder-common etc/cinder/policy.json /etc/cinder etc/cinder/rootwrap.conf /etc/cinder diff --git a/xenial/debian/cinder-common.postinst.in b/xenial/debian/cinder-common.postinst.in index 61ae7e12d..d7e3b9046 100644 --- a/xenial/debian/cinder-common.postinst.in +++ b/xenial/debian/cinder-common.postinst.in @@ -21,7 +21,9 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then pkgos_write_new_conf cinder cinder.conf pkgos_write_new_conf cinder api-paste.ini + pkgos_write_new_conf cinder logging.conf pkgos_dbc_postinst ${CINDER_CONF} DEFAULT sql_connection cinder $@ + pkgos_rabbit_write_conf ${CINDER_CONF} DEFAULT cinder pkgos_write_admin_creds ${CINDER_API} filter:authtoken cinder db_get cinder/volume_group if [ -n "${RET}" ] ; then diff --git a/xenial/debian/cinder-common.templates b/xenial/debian/cinder-common.templates index 1508e552e..902381a5e 100644 --- a/xenial/debian/cinder-common.templates +++ b/xenial/debian/cinder-common.templates @@ -50,3 +50,29 @@ Type: string _Description: Cinder volume group: Please specify the name of the LVM volume group (vg) on which Cinder will create partitions. + +Template: cinder/rabbit_host +Type: string +Default: localhost +_Description: IP address of your RabbitMQ host: + In order to interoperate with other components of OpenStack, this package + needs to connect to a central RabbitMQ server. + . + Please specify the IP address of that server. + +Template: cinder/rabbit_userid +Type: string +Default: guest +_Description: Username for connection to the RabbitMQ server: + In order to interoperate with other components of OpenStack, this package + needs to connect to a central RabbitMQ server. + . + Please specify the username used to connect to the RabbitMQ server. + +Template: cinder/rabbit_password +Type: password +_Description: Password for connection to the RabbitMQ server: + In order to interoperate with other components of OpenStack, this package + needs to connect to a central RabbitMQ server. + . + Please specify the password used to connect to the RabbitMQ server. diff --git a/xenial/debian/rules b/xenial/debian/rules index 212b3b692..ea4530192 100755 --- a/xenial/debian/rules +++ b/xenial/debian/rules @@ -20,6 +20,8 @@ override_dh_clean: override_dh_install: dh_install --fail-missing -Xbin/cinder-all install -D -m 0440 debian/cinder-common.sudoers $(CURDIR)/debian/cinder-common/etc/sudoers.d/cinder-common + install -D -m 0644 $(CURDIR)/etc/cinder/cinder.conf.sample $(CURDIR)/debian/cinder-common/usr/share/cinder-common/cinder.conf + install -D -m 0644 $(CURDIR)/etc/cinder/logging_sample.conf $(CURDIR)/debian/cinder-common/usr/share/cinder-common/logging.conf override_dh_fixperms: dh_fixperms -Xcinder_tgt.conf -- 2.45.2