20 lines
476 B
Text
20 lines
476 B
Text
|
#!/bin/bash
|
||
|
set -e
|
||
|
set -o xtrace
|
||
|
|
||
|
source $(dirname $0)/defaults
|
||
|
#AUTH_TOKEN
|
||
|
#MYSQL_KEYSTONEPASS
|
||
|
#ADMIN_PASSWORD
|
||
|
#HOST_IP
|
||
|
|
||
|
KEYSTONE_FILE="/etc/keystone/keystone.conf"
|
||
|
|
||
|
SQL_CONNECTION="mysql://keystone:${MYSQL_KEYSTONEPASS}@localhost:3306/keystone"
|
||
|
|
||
|
sed -e "s,^connection\s*=\s*.\+$,connection = $SQL_CONNECTION," -i ${KEYSTONE_FILE}
|
||
|
sed -e 's|^[#]*[ \t]*admin_token[ \t]*=.*|admin_token = '${AUTH_TOKEN}'|' -i ${KEYSTONE_FILE}
|
||
|
|
||
|
service keystone restart
|
||
|
keystone-manage db_sync
|