After Deprec

openstack_cloud_computing_cookbook

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

Contents of this Issue

Navigation

Page 78 of 317

Keystone OpenStack Identity Service 68 How to do it... To configure an appropriate service tenant, carry out the following steps: 1. Create the service tenant as follows: keystone tenant-create --name service --description "Service Tenant" --enabled true 2. Record the ID of the service tenant, so that we can assign service users to this ID, as follows: SERVICE_TENANT_ID=$(keystone tenant-list | awk '/\ service\ / {print $2}') 3. For each of the services in this section, we will create the user accounts to be named the same as the services and set the password to be the same as the service name too. For example, we will add a user called nova, with a password nova in the service tenant, using the user-create option, as follows: keystone user-create --name nova --pass nova --tenant_id $SERVICE_TENANT_ID --email nova@localhost --enabled true 4. We then repeat this for each of our other services that will use OpenStack Identity Service: keystone user-create --name glance --pass glance --tenant_id $SERVICE_TENANT_ID --email glance@localhost --enabled true keystone user-create --name keystone --pass keystone --tenant_id $SERVICE_TENANT_ID --email keystone@localhost --enabled true 5. We can now assign these users the admin role in the service tenant. To do this, we use the user-role-add option after retrieving the user ID of the nova user. For example, to add the admin role to the nova user in the service tenant, we do the following: # Get the nova user id USER_ID=$(keystone user-list | awk '/\ nova\ / {print $2}') # Get the admin role id ROLE_ID=$(keystone role-list | awk '/\ admin\ / {print $2}') # Assign the nova user the admin role in service tenant keystone user-role-add --user $USER_ID --role $ROLE_ID --tenant_id $SERVICE_TENANT_ID 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