summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python
diff options
context:
space:
mode:
authorMihai Prica <prica.mihai@gmail.com>2013-07-16 17:37:56 +0300
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:58 -0400
commita5e335de4b26f58c3ec7c7f9b1b90953b381aea4 (patch)
treed06d9a8d8e55d91ab556c294d2f150bc19ebcedb /meta-openstack/recipes-devtools/python
parent9d06f8b343a0db944d34991af071b29028af1028 (diff)
downloadmeta-cloud-services-a5e335de4b26f58c3ec7c7f9b1b90953b381aea4.tar.gz
python-quantum: 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')
-rw-r--r--meta-openstack/recipes-devtools/python/python-quantum/linuxbridge_conf.ini2
-rw-r--r--meta-openstack/recipes-devtools/python/python-quantum/ovs_quantum_plugin.ini2
-rw-r--r--meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb8
3 files changed, 9 insertions, 3 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-quantum/linuxbridge_conf.ini b/meta-openstack/recipes-devtools/python/python-quantum/linuxbridge_conf.ini
index 13f5428..7779621 100644
--- a/meta-openstack/recipes-devtools/python/python-quantum/linuxbridge_conf.ini
+++ b/meta-openstack/recipes-devtools/python/python-quantum/linuxbridge_conf.ini
@@ -26,7 +26,7 @@
26# sql_connection = mysql://root:nova@127.0.0.1:3306/quantum_linux_bridge 26# sql_connection = mysql://root:nova@127.0.0.1:3306/quantum_linux_bridge
27# Replace 127.0.0.1 above with the IP address of the database used by the 27# Replace 127.0.0.1 above with the IP address of the database used by the
28# main quantum server. (Leave it as is if the database runs on this host.) 28# main quantum server. (Leave it as is if the database runs on this host.)
29sql_connection = postgresql://admin:admin@localhost/quantum 29sql_connection = postgresql://%DB_USER%:%DB_PASSWORD%@localhost/quantum
30# Database reconnection retry times - in event connectivity is lost 30# Database reconnection retry times - in event connectivity is lost
31# set to -1 implies an infinite retry count 31# set to -1 implies an infinite retry count
32# sql_max_retries = 10 32# sql_max_retries = 10
diff --git a/meta-openstack/recipes-devtools/python/python-quantum/ovs_quantum_plugin.ini b/meta-openstack/recipes-devtools/python/python-quantum/ovs_quantum_plugin.ini
index 8b46a4b..171da27 100644
--- a/meta-openstack/recipes-devtools/python/python-quantum/ovs_quantum_plugin.ini
+++ b/meta-openstack/recipes-devtools/python/python-quantum/ovs_quantum_plugin.ini
@@ -4,7 +4,7 @@
4# sql_connection = mysql://root:nova@127.0.0.1:3306/ovs_quantum 4# sql_connection = mysql://root:nova@127.0.0.1:3306/ovs_quantum
5# Replace 127.0.0.1 above with the IP address of the database used by the 5# Replace 127.0.0.1 above with the IP address of the database used by the
6# main quantum server. (Leave it as is if the database runs on this host.) 6# main quantum server. (Leave it as is if the database runs on this host.)
7sql_connection = postgresql://admin:admin@localhost/quantum 7sql_connection = postgresql://%DB_USER%:%DB_PASSWORD%@localhost/quantum
8# Database reconnection retry times - in event connectivity is lost 8# Database reconnection retry times - in event connectivity is lost
9# set to -1 implies an infinite retry count 9# set to -1 implies an infinite retry count
10# sql_max_retries = 10 10# sql_max_retries = 10
diff --git a/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb b/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb
index 357cbae..8f0fa43 100644
--- a/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb
+++ b/meta-openstack/recipes-devtools/python/python-quantum_2013.1.2.bb
@@ -34,6 +34,12 @@ do_install_append() {
34 sed -e "s:^# core_plugin.*:core_plugin = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2:g" \ 34 sed -e "s:^# core_plugin.*:core_plugin = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2:g" \
35 -i ${WORKDIR}/quantum.conf 35 -i ${WORKDIR}/quantum.conf
36 36
37 for file in ovs_quantum_plugin.ini linuxbridge_conf.ini
38 do
39 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/${file}
40 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/${file}
41 done
42
37 install -d ${QUANTUM_CONF_DIR} 43 install -d ${QUANTUM_CONF_DIR}
38 install -d ${QUANTUM_CONF_DIR}/plugins/openvswitch 44 install -d ${QUANTUM_CONF_DIR}/plugins/openvswitch
39 install -d ${QUANTUM_CONF_DIR}/plugins/linuxbridge 45 install -d ${QUANTUM_CONF_DIR}/plugins/linuxbridge
@@ -65,7 +71,7 @@ pkg_postinst_${SRCNAME} () {
65 sudo -u postgres initdb -D /etc/postgresql/ 71 sudo -u postgres initdb -D /etc/postgresql/
66 /etc/init.d/postgresql start 72 /etc/init.d/postgresql start
67 sleep 0.2 73 sleep 0.2
68 sudo -u postgres psql -c "CREATE ROLE admin WITH SUPERUSER LOGIN PASSWORD 'admin'" 74 sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'"
69 fi 75 fi
70 76
71 sudo -u postgres createdb quantum 77 sudo -u postgres createdb quantum