blob: b0ce684b8d07836caedcc819a9aa53d5f58e6997 [file] [log] [blame]
Jesse Andrews73e27b82011-09-12 17:55:00 -07001#!/bin/bash
2BIN_DIR=${BIN_DIR:-.}
3# Tenants
4$BIN_DIR/keystone-manage $* tenant add admin
5$BIN_DIR/keystone-manage $* tenant add demo
6
7# Users
Anthony Youngea884c32011-09-23 03:24:27 +00008$BIN_DIR/keystone-manage $* user add admin secrete
9$BIN_DIR/keystone-manage $* user add demo secrete
Jesse Andrews73e27b82011-09-12 17:55:00 -070010
11# Roles
12$BIN_DIR/keystone-manage $* role add Admin
13$BIN_DIR/keystone-manage $* role add Member
Anthony Youngea884c32011-09-23 03:24:27 +000014$BIN_DIR/keystone-manage $* role add KeystoneAdmin
15$BIN_DIR/keystone-manage $* role add KeystoneServiceAdmin
16$BIN_DIR/keystone-manage $* role grant Admin admin 1
17$BIN_DIR/keystone-manage $* role grant Member demo 2
Jesse Andrews73e27b82011-09-12 17:55:00 -070018$BIN_DIR/keystone-manage $* role grant Admin admin
Anthony Youngea884c32011-09-23 03:24:27 +000019$BIN_DIR/keystone-manage $* role grant KeystoneAdmin admin
20$BIN_DIR/keystone-manage $* role grant KeystoneServiceAdmin admin
Jesse Andrews73e27b82011-09-12 17:55:00 -070021
Anthony Young8bdc2632011-09-22 08:00:44 +000022# Services
23$BIN_DIR/keystone-manage $* service add nova_compat nova_compat nova_compat
24$BIN_DIR/keystone-manage $* service add nova nova nova
25$BIN_DIR/keystone-manage $* service add glance glance glance
26$BIN_DIR/keystone-manage $* service add identity identity identity
27
Jesse Andrews73e27b82011-09-12 17:55:00 -070028#endpointTemplates
Anthony Young8bdc2632011-09-22 08:00:44 +000029$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne 1 http://%HOST_IP%:8774/v1.0/ http://%HOST_IP%:8774/v1.0 http://%HOST_IP%:8774/v1.0 1 1
30$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne 2 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
31$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne 3 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
32$BIN_DIR/keystone-manage $* endpointTemplates add RegionOne 4 http://%HOST_IP%:5000/v2.0 http://%HOST_IP%:5001/v2.0 http://%HOST_IP%:5000/v2.0 1 1
Anthony Youngec21d932011-09-16 16:05:55 -070033# $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
Anthony Young8bdc2632011-09-22 08:00:44 +000034
Jesse Andrews73e27b82011-09-12 17:55:00 -070035# Tokens
Anthony Youngfbd40d22011-09-19 16:18:34 -070036$BIN_DIR/keystone-manage $* token add 999888777666 1 1 2015-02-05T00:00
Jesse Andrews73e27b82011-09-12 17:55:00 -070037
38#Tenant endpoints
Anthony Youngfbd40d22011-09-19 16:18:34 -070039$BIN_DIR/keystone-manage $* endpoint add 1 1
40$BIN_DIR/keystone-manage $* endpoint add 1 2
41$BIN_DIR/keystone-manage $* endpoint add 1 3
42$BIN_DIR/keystone-manage $* endpoint add 1 4
43$BIN_DIR/keystone-manage $* endpoint add 1 5
44$BIN_DIR/keystone-manage $* endpoint add 1 6
Jesse Andrews73e27b82011-09-12 17:55:00 -070045
Anthony Youngfbd40d22011-09-19 16:18:34 -070046$BIN_DIR/keystone-manage $* endpoint add 2 1
47$BIN_DIR/keystone-manage $* endpoint add 2 2
48$BIN_DIR/keystone-manage $* endpoint add 2 3
49$BIN_DIR/keystone-manage $* endpoint add 2 4
50$BIN_DIR/keystone-manage $* endpoint add 2 5
51$BIN_DIR/keystone-manage $* endpoint add 2 6
Jesse Andrews73e27b82011-09-12 17:55:00 -070052
53$BIN_DIR/keystone-manage $* credentials add admin EC2 'admin:admin' admin admin || echo "no support for adding credentials"
Anthony Youngea884c32011-09-23 03:24:27 +000054$BIN_DIR/keystone-manage $* credentials add demo EC2 'demo:demo' demo demo || echo "no support for adding credentials"