diff options
| author | Mihai Prica <prica.mihai@gmail.com> | 2013-07-16 17:37:45 +0300 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-28 18:41:58 -0400 |
| commit | 9d06f8b343a0db944d34991af071b29028af1028 (patch) | |
| tree | 3a56a56259f777842e691b6c93ae34638c6a9e17 /meta-openstack/recipes-devtools/python/python-nova_2013.1.bb | |
| parent | 5fad2f75b6eb3614e908753b07dda48d94bf7ccf (diff) | |
| download | meta-cloud-services-9d06f8b343a0db944d34991af071b29028af1028.tar.gz | |
python-nova: 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-nova_2013.1.bb')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-nova_2013.1.bb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb b/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb index 5a3750a..aeeacbc 100644 --- a/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb +++ b/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb | |||
| @@ -54,6 +54,9 @@ do_install_append() { | |||
| 54 | sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ | 54 | sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ |
| 55 | -i ${WORKDIR}/api-paste.ini | 55 | -i ${WORKDIR}/api-paste.ini |
| 56 | 56 | ||
| 57 | sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/nova.conf | ||
| 58 | sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/nova.conf | ||
| 59 | |||
| 57 | #Copy the configuration file | 60 | #Copy the configuration file |
| 58 | install -m 664 ${WORKDIR}/nova.conf ${NOVA_CONF_DIR}/nova.conf | 61 | install -m 664 ${WORKDIR}/nova.conf ${NOVA_CONF_DIR}/nova.conf |
| 59 | install -m 664 ${WORKDIR}/api-paste.ini ${NOVA_CONF_DIR} | 62 | install -m 664 ${WORKDIR}/api-paste.ini ${NOVA_CONF_DIR} |
| @@ -85,7 +88,7 @@ pkg_postinst_${SRCNAME}-controller () { | |||
| 85 | sudo -u postgres initdb -D /etc/postgresql/ | 88 | sudo -u postgres initdb -D /etc/postgresql/ |
| 86 | /etc/init.d/postgresql start | 89 | /etc/init.d/postgresql start |
| 87 | sleep 0.2 | 90 | sleep 0.2 |
| 88 | sudo -u postgres psql -c "CREATE ROLE admin WITH SUPERUSER LOGIN PASSWORD 'admin'" | 91 | sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'" |
| 89 | fi | 92 | fi |
| 90 | 93 | ||
| 91 | sudo -u postgres createdb nova | 94 | sudo -u postgres createdb nova |
