Moves configuration for demo user

1) Removes config_demo_user script.
2) Adds content to configure demo user to setup_keystone script.
3) Adds MEMBER_ROLE_NAME (_member_) to config/credentials.

Change-Id: I8472046f591eb9330f4281281e921aaba7c72e3c
This commit is contained in:
sayalilunkad 2014-11-29 02:39:33 +05:30 committed by Roger Luethi
parent 477a5a8b5f
commit 0fe8770b11
4 changed files with 15 additions and 30 deletions

@ -22,6 +22,9 @@
: ${ADMIN_ROLE_NAME:=admin}
: ${ADMIN_TENANT_NAME:=admin}
# Member role for generic use
: ${MEMBER_ROLE_NAME:=_member_}
# User name and password for administrator
: ${ADMIN_USER_NAME:=admin}
: ${ADMIN_PASSWORD:=admin_pass}

@ -19,7 +19,6 @@ cmd snapshot_cycle cinder_installed
cmd queue setup_horizon.sh
cmd snapshot_cycle horizon_installed
cmd queue config_external_network.sh
cmd queue config_demo_user.sh
cmd queue config_tenant_network.sh
cmd snapshot_cycle controller_node_installed
cmd boot

@ -1,29 +0,0 @@
#!/usr/bin/env bash
set -o errexit -o nounset
TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
source "$TOP_DIR/config/paths"
source "$CONFIG_DIR/credentials"
source "$LIB_DIR/functions.guest"
source "$CONFIG_DIR/admin-openstackrc.sh"
exec_logfile
indicate_current_auto
#------------------------------------------------------------------------------
# Create a normal user
#------------------------------------------------------------------------------
echo "Creating the demo user."
keystone user-create \
--name="$DEMO_USER_NAME" \
--pass="$DEMO_PASSWORD" \
--email=demo@example.com
echo "Creating the demo tenant."
keystone tenant-create --name="$DEMO_TENANT_NAME" --description="Demo Tenant"
echo "Linking the demo user, _member_ role, and demo tenant."
keystone user-role-add \
--user "$DEMO_USER_NAME" \
--role _member_ \
--tenant "$DEMO_TENANT_NAME"

@ -86,6 +86,18 @@ keystone endpoint-create \
--adminurl "http://controller-mgmt:35357/v2.0" \
--internalurl "http://controller-mgmt:5000/v2.0"
echo "Creating demo user."
keystone user-create --name "$DEMO_USER_NAME" --pass "$DEMO_PASSWORD" --email "demo@$MAIL_DOMAIN"
echo "Creating demo tenant."
keystone tenant-create --name "$DEMO_TENANT_NAME" --description "Demo Tenant"
echo "Linking the demo user, _member_ role, and demo tenant."
keystone user-role-add \
--tenant "$DEMO_TENANT_NAME" \
--user "$DEMO_USER_NAME" \
--role "$MEMBER_ROLE_NAME"
echo "Adding service tenant."
keystone tenant-create \
--name "$SERVICE_TENANT_NAME" \