Create Tenant Users and Roles in OpenStack

Recommended by 0 users

Creating OpenStack tenant

In OpenStack we have several projects where ‘tenant’ is one of them, which is a must for the users and hence is assigned to them. In the following section, let us learn how to create tenant for our users termes as ‘cookbook’.

Getting Started

First of all, assure that you have logged into our OpenStack Controller host— where OpenStack Identity service has been installed

To log  into an OpenStack Controller host that has been  created using Vagrant, subject the following command:

vagrant ssh controller

If the keystoneclient tool is not accessible, then it can be installed in an Ubuntu client by declaring the following command say,

sudo apt-get update

sudo apt-get -y install python-keystoneclient

Also make sure that our environment has been kept correctly to access our OpenStack environment for organizational objectives:

 export ENDPOINT = 1172.16.172.200



SERVICE_ENDPOINT = http:// ${ ENDPOINT}: 35357/v2.0

How to carry it out…

To create a tenant in our OpenStack environment, perform the following procedure:

1. To Create a tenant called cookbook, do as follows:

    keystone tenant-create \

–name cookbook \

–description “Default Cookbook Tenant” \

–enabled true

This entire intput result in an output as below:

Property Value



Default Cookbook TenantTrue



2. We must also create another important tenant called ‘admin tenant’, so that all our users can have access to the complete environment available. We achieve it in the similar fashion as above:

keystone tenant-create \

–name cookbook \

 –description “Admin Tenant” \

–enabled true

How it works…

 Roles can be created by simply using the keystone client, by specifying the tenant-create option with the help of following syntax:

keystone tenant-create \

–name tenant_name \

–description “A description” \

–enabled true

The tenant_name is an arbitrary string and hence should not have any spaces. After the completion of creation of tenant we get an ID, which can be used to add further users to this tenant. If you wish to see the list of tenants and the assosciated ID’s in our environment, then we can issue a command as below:

keystone tenant-list

Enroll for Live Instructor Led Online OPENSTACK TRAINING 

0 Responses on Create Tenant Users and Roles in OpenStack"

Leave a Message

Your email address will not be published. Required fields are marked *

Copy Rights Reserved © Mindmajix.com All rights reserved. Disclaimer.
Course Adviser

Fill your details, course adviser will reach you.