2011-09-13 00:55:00 +00:00
|
|
|
#!/bin/bash
|
|
|
|
BIN_DIR=${BIN_DIR:-.}
|
|
|
|
# Tenants
|
|
|
|
$BIN_DIR/keystone-manage $* tenant add admin
|
|
|
|
$BIN_DIR/keystone-manage $* tenant add demo
|
2011-09-29 22:31:46 +00:00
|
|
|
$BIN_DIR/keystone-manage $* tenant add invisible_to_admin
|
2011-09-13 00:55:00 +00:00
|
|
|
|
|
|
|
# Users
|
2011-10-02 18:11:17 +00:00
|
|
|
$BIN_DIR/keystone-manage $* user add admin %ADMIN_PASSWORD%
|
|
|
|
$BIN_DIR/keystone-manage $* user add demo %ADMIN_PASSWORD%
|
2011-09-13 00:55:00 +00:00
|
|
|
|
|
|
|
# Roles
|
|
|
|
$BIN_DIR/keystone-manage $* role add Admin
|
|
|
|
$BIN_DIR/keystone-manage $* role add Member
|
2011-09-23 03:24:27 +00:00
|
|
|
$BIN_DIR/keystone-manage $* role add KeystoneAdmin
|
|
|
|
$BIN_DIR/keystone-manage $* role add KeystoneServiceAdmin
|
2011-10-28 19:11:18 +00:00
|
|
|
$BIN_DIR/keystone-manage $* role add sysadmin
|
|
|
|
$BIN_DIR/keystone-manage $* role add netadmin
|
2011-09-29 22:31:46 +00:00
|
|
|
$BIN_DIR/keystone-manage $* role grant Admin admin admin
|
|
|
|
$BIN_DIR/keystone-manage $* role grant Member demo demo
|
2011-10-28 19:11:18 +00:00
|
|
|
$BIN_DIR/keystone-manage $* role grant sysadmin demo demo
|
|
|
|
$BIN_DIR/keystone-manage $* role grant netadmin demo demo
|
2011-09-29 22:31:46 +00:00
|
|
|
$BIN_DIR/keystone-manage $* role grant Member demo invisible_to_admin
|
|
|
|
$BIN_DIR/keystone-manage $* role grant Admin admin demo
|
2011-09-13 00:55:00 +00:00
|
|
|
$BIN_DIR/keystone-manage $* role grant Admin admin
|
2011-09-23 03:24:27 +00:00
|
|
|
$BIN_DIR/keystone-manage $* role grant KeystoneAdmin admin
|
|
|
|
$BIN_DIR/keystone-manage $* role grant KeystoneServiceAdmin admin
|
2011-09-13 00:55:00 +00:00
|
|
|
|
2011-09-22 08:00:44 +00:00
|
|
|
# Services
|
2011-09-29 23:22:05 +00:00
|
|
|
$BIN_DIR/keystone-manage $* service add nova compute "Nova Compute Service"
|
|
|
|
$BIN_DIR/keystone-manage $* service add glance image "Glance Image Service"
|
|
|
|
$BIN_DIR/keystone-manage $* service add keystone identity "Keystone Identity Service"
|
2011-11-23 18:10:53 +00:00
|
|
|
if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
|
|
|
|
$BIN_DIR/keystone-manage $* service add swift object-store "Swift Service"
|
|
|
|
fi
|
2011-09-22 08:00:44 +00:00
|
|
|
|
2011-09-13 00:55:00 +00:00
|
|
|
#endpointTemplates
|
2011-09-29 23:22:05 +00:00
|
|
|
$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne nova http://%HOST_IP%:8774/v1.1/%tenant_id% http://%HOST_IP%:8774/v1.1/%tenant_id% http://%HOST_IP%:8774/v1.1/%tenant_id% 1 1
|
2011-09-29 22:31:46 +00:00
|
|
|
$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne glance http://%HOST_IP%:9292/v1.1/%tenant_id% http://%HOST_IP%:9292/v1.1/%tenant_id% http://%HOST_IP%:9292/v1.1/%tenant_id% 1 1
|
2011-09-30 22:52:18 +00:00
|
|
|
$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne keystone http://%HOST_IP%:5000/v2.0 http://%HOST_IP%:35357/v2.0 http://%HOST_IP%:5000/v2.0 1 1
|
2011-11-23 18:10:53 +00:00
|
|
|
if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
|
|
|
|
$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne swift http://%HOST_IP%:8080/v1/AUTH_%tenant_id% http://%HOST_IP%:8080/ http://%HOST_IP%:8080/v1/AUTH_%tenant_id% 1 1
|
|
|
|
fi
|
2011-09-22 08:00:44 +00:00
|
|
|
|
2011-09-13 00:55:00 +00:00
|
|
|
# Tokens
|
2011-10-02 16:02:46 +00:00
|
|
|
$BIN_DIR/keystone-manage $* token add %SERVICE_TOKEN% admin admin 2015-02-05T00:00
|
2011-09-13 00:55:00 +00:00
|
|
|
|
2011-10-24 23:05:57 +00:00
|
|
|
# EC2 related creds - note we are setting the secret key to ADMIN_PASSWORD
|
2011-10-20 17:07:10 +00:00
|
|
|
# but keystone doesn't parse them - it is just a blob from keystone's
|
2011-10-02 18:11:17 +00:00
|
|
|
# point of view
|
2011-10-24 23:05:57 +00:00
|
|
|
$BIN_DIR/keystone-manage $* credentials add admin EC2 'admin' '%ADMIN_PASSWORD%' admin || echo "no support for adding credentials"
|
|
|
|
$BIN_DIR/keystone-manage $* credentials add demo EC2 'demo' '%ADMIN_PASSWORD%' demo || echo "no support for adding credentials"
|