diskimage-builder/flavours/nova-vm/first-boot.d/30-keystone
2012-11-10 00:04:13 +13:00

20 lines
476 B
Bash
Executable File

#!/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