Last active
August 29, 2015 14:08
Add the Barbican service user and endpoint to a dev keystone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
get_id () { | |
echo `$@ | awk '/ id / { print $4 }'` | |
} | |
export OS_SERVICE_TOKEN="ADMIN_TOKEN" | |
export OS_SERVICE_ENDPOINT="http://localhost:35357/v2.0" | |
SERVICE_ID=$(get_id keystone service-create --name=barbican --type="key-manager" --description="Key_Management_Service") | |
keystone endpoint-create \ | |
--region RegionOne \ | |
--service-id=$SERVICE_ID \ | |
--publicurl=http://localhost:9311/v1 \ | |
--internalurl=http://localhost:9311/v1 \ | |
--adminurl=http://localhost:9311/v1 | |
ADMIN_ROLE=$(get_id keystone role-get admin) | |
tenant_id=$(get_id keystone tenant-create --name="service") | |
user_id=$(get_id keystone user-create --name="barbican" --pass="barbican" --email=admin@domain.com) | |
keystone user-role-add --user $user_id --role $ADMIN_ROLE --tenant-id $tenant_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment