| 1 | 1 |
new file mode 100755 |
| ... | ... |
@@ -0,0 +1,42 @@ |
| 0 |
+#!/bin/bash |
|
| 1 |
+BIN_DIR=${BIN_DIR:-.}
|
|
| 2 |
+# Tenants |
|
| 3 |
+$BIN_DIR/keystone-manage $* tenant add admin |
|
| 4 |
+$BIN_DIR/keystone-manage $* tenant add demo |
|
| 5 |
+ |
|
| 6 |
+# Users |
|
| 7 |
+$BIN_DIR/keystone-manage $* user add demo secrete demo |
|
| 8 |
+$BIN_DIR/keystone-manage $* user add admin secrete admin |
|
| 9 |
+ |
|
| 10 |
+# Roles |
|
| 11 |
+$BIN_DIR/keystone-manage $* role add Admin |
|
| 12 |
+$BIN_DIR/keystone-manage $* role add Member |
|
| 13 |
+$BIN_DIR/keystone-manage $* role grant Admin admin |
|
| 14 |
+ |
|
| 15 |
+#endpointTemplates |
|
| 16 |
+$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne swift http://localhost:8080/v1/AUTH_%tenant_id% http://localhost:8080/ http://localhost:8080/v1/AUTH_%tenant_id% 1 1 |
|
| 17 |
+$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne nova_compat http://localhost:8774/v1.0/ http://localhost:8774/v1.0 http://localhost:8774/v1.0 1 1 |
|
| 18 |
+$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne nova http://localhost:8774/v1.1/%tenant_id% http://localhost:8774/v1.1/%tenant_id% http://localhost:8774/v1.1/%tenant_id% 1 1 |
|
| 19 |
+$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne glance http://localhost:9292/v1.1/%tenant_id% http://localhost:9292/v1.1/%tenant_id% http://localhost:9292/v1.1/%tenant_id% 1 1 |
|
| 20 |
+$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne keystone http://localhost:8080/v2.0 http://localhost:8081/v2.0 http://localhost:8080/v2.0 1 1 |
|
| 21 |
+$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne identity http://localhost:5000/v2.0 http://localhost:5001/v2.0 http://localhost:5000/v2.0 1 1 |
|
| 22 |
+ |
|
| 23 |
+# Tokens |
|
| 24 |
+$BIN_DIR/keystone-manage $* token add 999888777666 admin admin 2015-02-05T00:00 |
|
| 25 |
+ |
|
| 26 |
+#Tenant endpoints |
|
| 27 |
+$BIN_DIR/keystone-manage $* endpoint add admin 1 |
|
| 28 |
+$BIN_DIR/keystone-manage $* endpoint add admin 2 |
|
| 29 |
+$BIN_DIR/keystone-manage $* endpoint add admin 3 |
|
| 30 |
+$BIN_DIR/keystone-manage $* endpoint add admin 4 |
|
| 31 |
+$BIN_DIR/keystone-manage $* endpoint add admin 5 |
|
| 32 |
+$BIN_DIR/keystone-manage $* endpoint add admin 6 |
|
| 33 |
+ |
|
| 34 |
+$BIN_DIR/keystone-manage $* endpoint add demo 1 |
|
| 35 |
+$BIN_DIR/keystone-manage $* endpoint add demo 2 |
|
| 36 |
+$BIN_DIR/keystone-manage $* endpoint add demo 3 |
|
| 37 |
+$BIN_DIR/keystone-manage $* endpoint add demo 4 |
|
| 38 |
+$BIN_DIR/keystone-manage $* endpoint add demo 5 |
|
| 39 |
+$BIN_DIR/keystone-manage $* endpoint add demo 6 |
|
| 40 |
+ |
|
| 41 |
+$BIN_DIR/keystone-manage $* credentials add admin EC2 'admin:admin' admin admin || echo "no support for adding credentials" |
| ... | ... |
@@ -174,10 +174,8 @@ rm -f $NOVA_DIR/nova.sqlite |
| 174 | 174 |
$NOVA_DIR/bin/nova-manage db sync |
| 175 | 175 |
|
| 176 | 176 |
# initialize keystone with default users/endpoints |
| 177 |
-# FIXME(ja): move initial_data.sh into this script |
|
| 178 | 177 |
rm -f /opt/keystone/keystone.db |
| 179 |
-curl -OL https://raw.github.com/cloudbuilders/deploy.sh/master/initial_data.sh |
|
| 180 |
-BIN_DIR=$KEYSTONE_DIR/bin bash initial_data.sh |
|
| 178 |
+BIN_DIR=$KEYSTONE_DIR/bin bash $DIR/files/keystone_data.sh |
|
| 181 | 179 |
|
| 182 | 180 |
# create a small network |
| 183 | 181 |
$NOVA_DIR/bin/nova-manage network create private $FIXED_RANGE 1 32 |