From 79918c54fa28dbc9eb6f5679c46418f6d649f2d7 Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Tue, 13 Sep 2011 19:43:14 -0700 Subject: [PATCH] configure mysql password for keystone and glance --- files/glance-registry.conf | 2 +- files/keystone.conf | 2 +- stack.sh | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) mode change 100755 => 100644 files/keystone.conf diff --git a/files/glance-registry.conf b/files/glance-registry.conf index cefb4d9..252702c 100644 --- a/files/glance-registry.conf +++ b/files/glance-registry.conf @@ -21,7 +21,7 @@ use_syslog = False # SQLAlchemy connection string for the reference implementation # registry server. Any valid SQLAlchemy connection string is fine. # See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine -sql_connection = mysql://root:nova@localhost/glance +sql_connection = mysql://root:%MYSQL_PASS%@localhost/glance # Period in seconds after which SQLAlchemy should reestablish its connection # to the database. diff --git a/files/keystone.conf b/files/keystone.conf old mode 100755 new mode 100644 index 4e775ab..5923c85 --- a/files/keystone.conf +++ b/files/keystone.conf @@ -49,7 +49,7 @@ keystone-service-admin-role = KeystoneServiceAdmin # server. Any valid SQLAlchemy connection string is fine. # See: http://bit.ly/ideIpI #sql_connection = sqlite:///keystone.db -sql_connection = mysql://root:nova@localhost/keystone +sql_connection = mysql://root:%MYSQL_PASS%@localhost/keystone backend_entities = ['UserRoleAssociation', 'Endpoints', 'Role', 'Tenant', 'User', 'Credentials', 'EndpointTemplates', 'Token', 'Service'] diff --git a/stack.sh b/stack.sh index e0250bb..62198b2 100755 --- a/stack.sh +++ b/stack.sh @@ -178,7 +178,9 @@ rm -rf /var/lib/glance/images/* mysql -uroot -p$MYSQL_PASS -e 'DROP DATABASE glance;' || true mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE glance;' # Copy over our glance-registry.conf -cp $DIR/files/glance-registry.conf $GLANCE_DIR/etc/glance-registry.conf +$GLANCE_CONF=$GLANCE_DIR/etc/glance-registry.conf +cp $DIR/files/glance-registry.conf $GLANCE_CONF +sudo sed -e "s,%MYSQL_PASS%,$MYSQL_PASS,g" -i $GLANCE_CONF # Nova # ---- @@ -251,6 +253,7 @@ mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE keystone;' # FIXME (anthony) keystone should use keystone.conf.example KEYSTONE_CONF=$KEYSTONE_DIR/etc/keystone.conf cp $DIR/files/keystone.conf $KEYSTONE_CONF +sudo sed -e "s,%MYSQL_PASS%,$MYSQL_PASS,g" -i $KEYSTONE_CONF # initialize keystone with default users/endpoints BIN_DIR=$KEYSTONE_DIR/bin bash $DIR/files/keystone_data.sh