blob: a5e75a6b83a02003d7c6cd0e4a3c16fbd42b4586 [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
Anthony Youngc4a99fb2011-09-29 22:31:46 +00006$BIN_DIR/keystone-manage $* tenant add invisible_to_admin
Jesse Andrews73e27b82011-09-12 17:55:00 -07007
8# Users
Jesse Andrews89358af2011-10-02 14:11:17 -04009$BIN_DIR/keystone-manage $* user add admin %ADMIN_PASSWORD%
10$BIN_DIR/keystone-manage $* user add demo %ADMIN_PASSWORD%
Jesse Andrews73e27b82011-09-12 17:55:00 -070011
12# Roles
13$BIN_DIR/keystone-manage $* role add Admin
14$BIN_DIR/keystone-manage $* role add Member
Anthony Youngea884c32011-09-23 03:24:27 +000015$BIN_DIR/keystone-manage $* role add KeystoneAdmin
16$BIN_DIR/keystone-manage $* role add KeystoneServiceAdmin
Vishvananda Ishaya3a22d812011-10-28 12:11:18 -070017$BIN_DIR/keystone-manage $* role add sysadmin
18$BIN_DIR/keystone-manage $* role add netadmin
Anthony Youngc4a99fb2011-09-29 22:31:46 +000019$BIN_DIR/keystone-manage $* role grant Admin admin admin
20$BIN_DIR/keystone-manage $* role grant Member demo demo
Vishvananda Ishaya3a22d812011-10-28 12:11:18 -070021$BIN_DIR/keystone-manage $* role grant sysadmin demo demo
22$BIN_DIR/keystone-manage $* role grant netadmin demo demo
Anthony Youngc4a99fb2011-09-29 22:31:46 +000023$BIN_DIR/keystone-manage $* role grant Member demo invisible_to_admin
24$BIN_DIR/keystone-manage $* role grant Admin admin demo
Jesse Andrews73e27b82011-09-12 17:55:00 -070025$BIN_DIR/keystone-manage $* role grant Admin admin
Anthony Youngea884c32011-09-23 03:24:27 +000026$BIN_DIR/keystone-manage $* role grant KeystoneAdmin admin
27$BIN_DIR/keystone-manage $* role grant KeystoneServiceAdmin admin
Jesse Andrews73e27b82011-09-12 17:55:00 -070028
Anthony Young8bdc2632011-09-22 08:00:44 +000029# Services
Anthony Youngf0f27ff2011-09-29 16:22:05 -070030$BIN_DIR/keystone-manage $* service add nova compute "Nova Compute Service"
31$BIN_DIR/keystone-manage $* service add glance image "Glance Image Service"
32$BIN_DIR/keystone-manage $* service add keystone identity "Keystone Identity Service"
Anthony Young8bdc2632011-09-22 08:00:44 +000033
Jesse Andrews73e27b82011-09-12 17:55:00 -070034#endpointTemplates
Anthony Youngf0f27ff2011-09-29 16:22:05 -070035$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
Anthony Youngc4a99fb2011-09-29 22:31:46 +000036$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
Anthony Younga449dd82011-09-30 15:52:18 -070037$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
Anthony Youngec21d932011-09-16 16:05:55 -070038# $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 +000039
Jesse Andrews73e27b82011-09-12 17:55:00 -070040# Tokens
Jesse Andrewsb96871e2011-10-02 09:02:46 -070041$BIN_DIR/keystone-manage $* token add %SERVICE_TOKEN% admin admin 2015-02-05T00:00
Jesse Andrews73e27b82011-09-12 17:55:00 -070042
Vishvananda Ishayaf56e3952011-10-24 16:05:57 -070043# EC2 related creds - note we are setting the secret key to ADMIN_PASSWORD
Vishvananda Ishaya9b353672011-10-20 10:07:10 -070044# but keystone doesn't parse them - it is just a blob from keystone's
Jesse Andrews89358af2011-10-02 14:11:17 -040045# point of view
Vishvananda Ishayaf56e3952011-10-24 16:05:57 -070046$BIN_DIR/keystone-manage $* credentials add admin EC2 'admin' '%ADMIN_PASSWORD%' admin || echo "no support for adding credentials"
47$BIN_DIR/keystone-manage $* credentials add demo EC2 'demo' '%ADMIN_PASSWORD%' demo || echo "no support for adding credentials"