From 16ac96c5c6a925045eb570d269015e27149fd94c Mon Sep 17 00:00:00 2001 From: Mihai Prica Date: Tue, 16 Jul 2013 17:37:02 +0300 Subject: python-cinder: Configure postgresql credentials The user and password for postgresql are defined in the identity class and are loaded by the recipes from this class. Signed-off-by: Mihai Prica --- meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb') diff --git a/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb b/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb index e3d2b7e..95fa45b 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb +++ b/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb @@ -29,6 +29,9 @@ do_install_append() { sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ -i ${WORKDIR}/api-paste.ini + sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/cinder.conf + sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/cinder.conf + install -d ${CINDER_CONF_DIR} install -m 600 ${WORKDIR}/cinder.conf ${CINDER_CONF_DIR}/ install -m 600 ${WORKDIR}/api-paste.ini ${CINDER_CONF_DIR}/ @@ -53,7 +56,7 @@ pkg_postinst_${SRCNAME} () { sudo -u postgres initdb -D /etc/postgresql/ /etc/init.d/postgresql start sleep 0.2 - sudo -u postgres psql -c "CREATE ROLE admin WITH SUPERUSER LOGIN PASSWORD 'admin'" + sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'" fi sudo -u postgres createdb cinder -- cgit v1.2.3-54-g00ecf