summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-keystone_2013.1.bb
diff options
context:
space:
mode:
authorMihai Prica <prica.mihai@gmail.com>2013-07-16 17:37:31 +0300
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:58 -0400
commit5fad2f75b6eb3614e908753b07dda48d94bf7ccf (patch)
treed238961914ca3a377ffa9308961c918cc839d1b4 /meta-openstack/recipes-devtools/python/python-keystone_2013.1.bb
parentb7513ae56a129f223c1db088722e87a56500c95e (diff)
downloadmeta-cloud-services-5fad2f75b6eb3614e908753b07dda48d94bf7ccf.tar.gz
python-keystone: 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/python/python-keystone_2013.1.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-keystone_2013.1.bb6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-keystone_2013.1.bb b/meta-openstack/recipes-devtools/python/python-keystone_2013.1.bb
index d6ad46d..cad802a 100644
--- a/meta-openstack/recipes-devtools/python/python-keystone_2013.1.bb
+++ b/meta-openstack/recipes-devtools/python/python-keystone_2013.1.bb
@@ -29,7 +29,9 @@ do_install_append() {
29 29
30 install -d ${KEYSTONE_CONF_DIR} 30 install -d ${KEYSTONE_CONF_DIR}
31 31
32 sed -e "s:^admin_token=.*:admin_token=${SERVICE_TOKEN}:g" -i ${WORKDIR}/keystone.conf 32 sed -e "s:%SERVICE_TOKEN%:${SERVICE_TOKEN}:g" -i ${WORKDIR}/keystone.conf
33 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/keystone.conf
34 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/keystone.conf
33 35
34 install -m 600 ${WORKDIR}/keystone.conf ${KEYSTONE_CONF_DIR}/ 36 install -m 600 ${WORKDIR}/keystone.conf ${KEYSTONE_CONF_DIR}/
35 install -m 600 ${WORKDIR}/identity.sh ${KEYSTONE_CONF_DIR}/ 37 install -m 600 ${WORKDIR}/identity.sh ${KEYSTONE_CONF_DIR}/
@@ -57,7 +59,7 @@ pkg_postinst_${SRCNAME} () {
57 sudo -u postgres initdb -D /etc/postgresql/ 59 sudo -u postgres initdb -D /etc/postgresql/
58 /etc/init.d/postgresql start 60 /etc/init.d/postgresql start
59 sleep 0.2 61 sleep 0.2
60 sudo -u postgres psql -c "CREATE ROLE admin WITH SUPERUSER LOGIN PASSWORD 'admin'" 62 sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'"
61 fi 63 fi
62 64
63 sudo -u postgres createdb keystone 65 sudo -u postgres createdb keystone