Skip to content

OpenStack Cheat Sheet

Add User Access

Add User - Click to expand

1. Fetch User Id

$ openstack user list --domain <DomainName> | grep -i <UserName>

Info

This will pwint UserId. Copy it for future reference.

2. Check Existing Role Assignment for User:

$ openstack role assignment list --user  <UserId>

3. Fetch id of the tenant to which user has to be added

$ openstack project show <TenantName>

4. Add users to tenant

Here we are adding the user to member role, for this tenant

$ openstack role add --user <UserId>  _member_ --project <TenantId>

5. Validate assignment

openstack role assignment list --user  <UserId>

Add Image to a Project/Tenant

Add Image - Click to expand

1. Get Tenant Info

openstack project show <TenantName>

2. Validate image to be added

glance image-show <ImageId>

3. Fetch Image Members

glance member-list --image-id <ImageId>

4. Add Project/Tenant as a member for the image

glance member-create <ImageId> <TenantId>

5. Check Membership Status

glance member-list --image-id <ImageId> | grep <TenantId>

Info

We will notice that membership status is pending. In order to use the image within the tenant, we must accpt it.

6. Accept Membership

glance member-update <ImageId> <TenantId> accepted

7. Check Membership Status

glance member-list --image-id <ImageId> | grep <TenantId>

Info

We will notice that membership status has been updated to accepted. In order to use the image within the tenant, we must approve it.

Updating User Quota

User Quota - Click to expand

1. Update Quota

openstack quota set --instances 20 --cores 90 --floating-ips 20 <TenantId>

Info

These are just a new parameters which I have updated. We can update any quota, which is listed in output of quota show sub-command.

2. Validate Quota

openstack quota show <TenantId>

Adding a Flavor to a Tenant

Flavor - Click to expand

1. Get Flavor Info

openstack flavor show <FlavorName>

Info

From the output copy Id, and keep it in place for future reference.

2. Get Tenant Id

openstack project show <TenantName>

3. Associate Flavor with Tenant

openstack flavor set --project <TenantId> <FlavorId>

4. Validate that tenant has been associated with flavor

openstack flavor show <FlavorName>

Info

In the output, make sure that ProjectId is present for access_project_ids*

Back to top