Last active
          August 29, 2015 14:08 
        
      - 
      
- 
        Save jmvrbanac/abe30c0cf6872b76dee4 to your computer and use it in GitHub Desktop. 
    Add the Barbican service user and endpoint to a dev keystone
  
        
  
    
      This file contains hidden or 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 protected]) | |
| 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