configure mysql password for keystone and glance

This commit is contained in:
Anthony Young 2011-09-13 19:43:14 -07:00
parent 963d2eb1c6
commit 79918c54fa
3 changed files with 6 additions and 3 deletions

View file

@ -21,7 +21,7 @@ use_syslog = False
# SQLAlchemy connection string for the reference implementation # SQLAlchemy connection string for the reference implementation
# registry server. Any valid SQLAlchemy connection string is fine. # registry server. Any valid SQLAlchemy connection string is fine.
# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine # 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 # Period in seconds after which SQLAlchemy should reestablish its connection
# to the database. # to the database.

2
files/keystone.conf Executable file → Normal file
View file

@ -49,7 +49,7 @@ keystone-service-admin-role = KeystoneServiceAdmin
# server. Any valid SQLAlchemy connection string is fine. # server. Any valid SQLAlchemy connection string is fine.
# See: http://bit.ly/ideIpI # See: http://bit.ly/ideIpI
#sql_connection = sqlite:///keystone.db #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', backend_entities = ['UserRoleAssociation', 'Endpoints', 'Role', 'Tenant',
'User', 'Credentials', 'EndpointTemplates', 'Token', 'User', 'Credentials', 'EndpointTemplates', 'Token',
'Service'] 'Service']

View file

@ -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 'DROP DATABASE glance;' || true
mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE glance;' mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE glance;'
# Copy over our glance-registry.conf # 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 # Nova
# ---- # ----
@ -251,6 +253,7 @@ mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE keystone;'
# FIXME (anthony) keystone should use keystone.conf.example # FIXME (anthony) keystone should use keystone.conf.example
KEYSTONE_CONF=$KEYSTONE_DIR/etc/keystone.conf KEYSTONE_CONF=$KEYSTONE_DIR/etc/keystone.conf
cp $DIR/files/keystone.conf $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 # initialize keystone with default users/endpoints
BIN_DIR=$KEYSTONE_DIR/bin bash $DIR/files/keystone_data.sh BIN_DIR=$KEYSTONE_DIR/bin bash $DIR/files/keystone_data.sh