diskimage-builder/elements/nova-vm/first-boot.d/30-keystone

20 lines
476 B
Plaintext
Raw Normal View History

2012-11-09 11:04:13 +00:00
#!/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