diff --git a/files/keystone.conf b/files/keystone.conf index 0ee08279d5..3167c0f455 100644 --- a/files/keystone.conf +++ b/files/keystone.conf @@ -37,7 +37,7 @@ driver = keystone.token.backends.kvs.Token driver = keystone.policy.backends.simple.SimpleMatch [ec2] -driver = keystone.contrib.ec2.backends.kvs.Ec2 +driver = keystone.contrib.ec2.backends.sql.Ec2 [filter:debug] paste.filter_factory = keystone.common.wsgi:Debug.factory diff --git a/files/keystone_data.sh b/files/keystone_data.sh index 35eaa5dd12..39952b16c6 100755 --- a/files/keystone_data.sh +++ b/files/keystone_data.sh @@ -98,6 +98,25 @@ if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then "description=Swift Service" fi +# create ec2 creds and parse the secret and access key returned +RESULT=`$BIN_DIR/keystone-manage ec2 create user_id=$ADMIN_USER tenant_id=$ADMIN_TENANT` +ADMIN_ACCESS=`echo $RESULT | python -c "import sys; import json; result = json.loads(sys.stdin.read()); print result['access'];"` +ADMIN_SECRET=`echo $RESULT | python -c "import sys; import json; result = json.loads(sys.stdin.read()); print result['secret'];"` + + +RESULT=`$BIN_DIR/keystone-manage ec2 create user_id=$DEMO_USER tenant_id=$DEMO_TENANT` +DEMO_ACCESS=`echo $RESULT | python -c "import sys; import json; result = json.loads(sys.stdin.read()); print result['access'];"` +DEMO_SECRET=`echo $RESULT | python -c "import sys; import json; result = json.loads(sys.stdin.read()); print result['secret'];"` + +# write the secret and access to ec2rc +cat > $DEVSTACK_DIR/ec2rc <