After Deprec

openstack_cloud_computing_cookbook

Issue link: https://read.uberflip.com/i/1334488

Contents of this Issue

Navigation

Page 69 of 317

Chapter 3 59 Creating tenants A tenant in OpenStack is a project. Users can't be created without having a tenant assigned to them so these must be created first. For this section, we will create a tenant for our users, called cookbook. Getting ready To begin with, ensure you're logged into our OpenStack Compute host—where OpenStack Identity Service has been installed—or an appropriate Ubuntu client that has access to where OpenStack Identity Service is installed. If the keystone client tool isn't available, this can be installed on an Ubuntu client—to manage our OpenStack Identity Service—by issuing the following command: sudo apt-get update sudo apt-get -y install python-keystoneclient Ensure that we have our environment set correctly to access our OpenStack environment: export ENDPOINT=172.16.0.1 export SERVICE_TOKEN=ADMIN export SERVICE_ENDPOINT=http://${ENDPOINT}:35357/v2.0 How to do it... To create a tenant in our OpenStack environment, perform the following step: 1. Creation of a tenant called cookbook is done as follows: keystone tenant-create --name cookbook --description "Default Cookbook Tenant" --enabled true How it works... Creation of the roles is simply achieved by using the keystone client, specifying the tenant-create option with the following syntax: keystone tenant-create --name tenant_name --description "Default Cookbook Tenant" --enabled true The tenant_name is an arbitrary string and must not contain spaces. On creation of the tenant, this returns an ID associated with it that we use when adding users to this tenant. To see a list of tenants and the associated IDs in our environment, we can issue the following command: keystone tenant-list www.it-ebooks.info

Articles in this issue

Links on this page

Archives of this issue

view archives of After Deprec - openstack_cloud_computing_cookbook