diff options
| author | Mihai Prica <prica.mihai@gmail.com> | 2013-07-16 17:07:03 +0300 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-28 18:41:58 -0400 |
| commit | 23921d0cbd5b729f056b600e39c0ad8883b010d7 (patch) | |
| tree | 2e9b21a8250f47478dd562f99eff8ecc8e6e3ef0 /meta-openstack | |
| parent | 603865a4f25ee784a56bb584fc7aa71afe903022 (diff) | |
| download | meta-cloud-services-23921d0cbd5b729f056b600e39c0ad8883b010d7.tar.gz | |
postgresql: Made the postgresql credentials configurable
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')
| -rw-r--r-- | meta-openstack/classes/identity.bbclass | 2 | ||||
| -rw-r--r-- | meta-openstack/recipes-support/postgresql/postgresql_8.4.7.bbappend | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/meta-openstack/classes/identity.bbclass b/meta-openstack/classes/identity.bbclass index 07c8efc..b86eb76 100644 --- a/meta-openstack/classes/identity.bbclass +++ b/meta-openstack/classes/identity.bbclass | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | SERVICE_TOKEN = "password" | 1 | SERVICE_TOKEN = "password" |
| 2 | SERVICE_PASSWORD = "password" | 2 | SERVICE_PASSWORD = "password" |
| 3 | SERVICE_TENANT_NAME = "service" | 3 | SERVICE_TENANT_NAME = "service" |
| 4 | DB_USER = "admin" | ||
| 5 | DB_PASSWORD = "admin" | ||
diff --git a/meta-openstack/recipes-support/postgresql/postgresql_8.4.7.bbappend b/meta-openstack/recipes-support/postgresql/postgresql_8.4.7.bbappend index a2390e4..98e7207 100644 --- a/meta-openstack/recipes-support/postgresql/postgresql_8.4.7.bbappend +++ b/meta-openstack/recipes-support/postgresql/postgresql_8.4.7.bbappend | |||
| @@ -3,7 +3,7 @@ PRINC := "${@int(PRINC) + 1}" | |||
| 3 | 3 | ||
| 4 | SRC_URI += "file://postgresql" | 4 | SRC_URI += "file://postgresql" |
| 5 | 5 | ||
| 6 | inherit useradd update-rc.d | 6 | inherit useradd update-rc.d identity |
| 7 | 7 | ||
| 8 | do_install_append() { | 8 | do_install_append() { |
| 9 | install -d ${D}${sysconfdir}/${PN} | 9 | install -d ${D}${sysconfdir}/${PN} |
| @@ -25,7 +25,7 @@ pkg_postinst_${PN} () { | |||
| 25 | 25 | ||
| 26 | sudo -u postgres initdb -D /etc/${PN}/ | 26 | sudo -u postgres initdb -D /etc/${PN}/ |
| 27 | /etc/init.d/postgresql start | 27 | /etc/init.d/postgresql start |
| 28 | sudo -u postgres psql -c "CREATE ROLE admin WITH SUPERUSER LOGIN PASSWORD 'admin'" | 28 | sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'" |
| 29 | ln -s /usr/share/zoneinfo /usr/share/postgresql/timezone | 29 | ln -s /usr/share/zoneinfo /usr/share/postgresql/timezone |
| 30 | } | 30 | } |
| 31 | 31 | ||
