move keystone initialization into stack.sh

This commit is contained in:
Jesse Andrews 2011-09-12 17:55:00 -07:00
parent e49b8bd68d
commit 73e27b83e5
2 changed files with 43 additions and 3 deletions

42
files/keystone_data.sh Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
BIN_DIR=${BIN_DIR:-.}
# Tenants
$BIN_DIR/keystone-manage $* tenant add admin
$BIN_DIR/keystone-manage $* tenant add demo
# Users
$BIN_DIR/keystone-manage $* user add demo secrete demo
$BIN_DIR/keystone-manage $* user add admin secrete admin
# Roles
$BIN_DIR/keystone-manage $* role add Admin
$BIN_DIR/keystone-manage $* role add Member
$BIN_DIR/keystone-manage $* role grant Admin admin
#endpointTemplates
$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
$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
$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
$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
$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
$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
# Tokens
$BIN_DIR/keystone-manage $* token add 999888777666 admin admin 2015-02-05T00:00
#Tenant endpoints
$BIN_DIR/keystone-manage $* endpoint add admin 1
$BIN_DIR/keystone-manage $* endpoint add admin 2
$BIN_DIR/keystone-manage $* endpoint add admin 3
$BIN_DIR/keystone-manage $* endpoint add admin 4
$BIN_DIR/keystone-manage $* endpoint add admin 5
$BIN_DIR/keystone-manage $* endpoint add admin 6
$BIN_DIR/keystone-manage $* endpoint add demo 1
$BIN_DIR/keystone-manage $* endpoint add demo 2
$BIN_DIR/keystone-manage $* endpoint add demo 3
$BIN_DIR/keystone-manage $* endpoint add demo 4
$BIN_DIR/keystone-manage $* endpoint add demo 5
$BIN_DIR/keystone-manage $* endpoint add demo 6
$BIN_DIR/keystone-manage $* credentials add admin EC2 'admin:admin' admin admin || echo "no support for adding credentials"

View File

@ -174,10 +174,8 @@ rm -f $NOVA_DIR/nova.sqlite
$NOVA_DIR/bin/nova-manage db sync
# initialize keystone with default users/endpoints
# FIXME(ja): move initial_data.sh into this script
rm -f /opt/keystone/keystone.db
curl -OL https://raw.github.com/cloudbuilders/deploy.sh/master/initial_data.sh
BIN_DIR=$KEYSTONE_DIR/bin bash initial_data.sh
BIN_DIR=$KEYSTONE_DIR/bin bash $DIR/files/keystone_data.sh
# create a small network
$NOVA_DIR/bin/nova-manage network create private $FIXED_RANGE 1 32