Keystone

# Using the openstack cli and as myuser, request an authentication token
openstack --os-auth-url http://$MY_IP:5000/v3 --os-project-domain-name default --os-user-domain-name default --os-project-name MyProject --os-username myuser --os-password mypassword token issue

# Using the openstack cli and as myadmin, request an authentication token
openstack --os-auth-url http://$MY_IP:5000/v3 --os-project-domain-name default --os-user-domain-name default --os-project-name MyProject --os-username myadmin --os-password mypassword token issue

# Create 'myuser' and 'myadmin' credentials
mkdir ~/credentials

cat >> ~/credentials/myadmin <<EOF
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=MyProject
export OS_USERNAME=myadmin
export OS_PASSWORD=mypassword
export OS_AUTH_URL=http://$MY_IP:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
EOF

cat >> ~/credentials/myuser <<EOF
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=MyProject
export OS_USERNAME=myuser
export OS_PASSWORD=mypassword
export OS_AUTH_URL=http://$MY_IP:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
EOF

# Source the myadmin credentials
source ~/credentials/myadmin

# Authenticate and get a token
openstack token issue

# View the service catalog
openstack catalog list

# List all domains
openstack domain list

# List all projects
openstack project list

# List all users
openstack user list

# List all roles
openstack role list

# List role assignments
openstack role assignment --names
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s