summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools
diff options
context:
space:
mode:
authorMihai Prica <prica.mihai@gmail.com>2013-07-16 17:37:16 +0300
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:58 -0400
commitb7513ae56a129f223c1db088722e87a56500c95e (patch)
tree5df4221dc86d7b4cc45fe808a363e880597251fd /meta-openstack/recipes-devtools
parent16ac96c5c6a925045eb570d269015e27149fd94c (diff)
downloadmeta-cloud-services-b7513ae56a129f223c1db088722e87a56500c95e.tar.gz
python-glance: 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 <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack/recipes-devtools')
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance_2013.1.bb4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb b/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb
index d8cd97b..56997d8 100644
--- a/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb
+++ b/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb
@@ -29,7 +29,7 @@ do_install_append() {
29 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/glance-$file.conf 29 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/glance-$file.conf
30 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ 30 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
31 -i ${WORKDIR}/glance-$file.conf 31 -i ${WORKDIR}/glance-$file.conf
32 sed -e "s#^sql_conn.*#sql_connection = postgresql://admin:admin@localhost/glance#g" \ 32 sed -e "s#^sql_conn.*#sql_connection = postgresql://${DB_USER}:${DB_PASSWORD}@localhost/glance#g" \
33 -i ${WORKDIR}/glance-$file.conf 33 -i ${WORKDIR}/glance-$file.conf
34 done 34 done
35 sed -e "s:^filesystem_store_datadir =.*:filesystem_store_datadir = ${sysconfdir}/${SRCNAME}/images/:g" \ 35 sed -e "s:^filesystem_store_datadir =.*:filesystem_store_datadir = ${sysconfdir}/${SRCNAME}/images/:g" \
@@ -68,7 +68,7 @@ pkg_postinst_${SRCNAME} () {
68 sudo -u postgres initdb -D /etc/postgresql/ 68 sudo -u postgres initdb -D /etc/postgresql/
69 /etc/init.d/postgresql start 69 /etc/init.d/postgresql start
70 sleep 0.2 70 sleep 0.2
71 sudo -u postgres psql -c "CREATE ROLE admin WITH SUPERUSER LOGIN PASSWORD 'admin'" 71 sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'"
72 fi 72 fi
73 73
74 mkdir /var/log/glance 74 mkdir /var/log/glance