After Deprec

openstack_cloud_computing_cookbook

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

Contents of this Issue

Navigation

Page 70 of 317

Keystone OpenStack Identity Service 60 Adding users Adding users to OpenStack Identity Service requires that the user have a tenant they can exist in, and have a role defined that can be assigned to them. For this section, we will create two users. The first user will be named admin and will have the admin role assigned to them in the cookbook tenant. The second user will be named demo and will have the Member role assigned to them in the same cookbook tenant. 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 commands: 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 the required users in our OpenStack environment, perform the following steps: 1. To create a user in the cookbook tenant, we first need to get the cookbook tenant ID. To do this, issue the following command, which we conveniently store in a variable named TENANT_ID with the tenant-list option: TENANT_ID=$(keystone tenant-list | awk '/\ cookbook\ / {print $2}') 2. Now that we have the tenant ID, creation of the admin user in the cookbook tenant is done as follows, using the user-create option, choosing a password for the user: PASSWORD=openstack keystone user-create --name admin --tenant_id $TENANT_ID -- pass $PASSWORD --email root@localhost --enabled true 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