In OpenStack, images are often characterized as ‘virtual machine templates’. When the image you shared is private, then it can be seen only by the tenant who has uploaded it and not by the other tenants . However, if you want to share it with other tenants, then you must follow a simple mechanism that allows greater control over the images at the same time not making it public.
To gain in-depth knowledge and be on par with practical experience, then explore the OpenStack Training course.
|
>> To start with, assure that you are logged into our Ubuntu client, where we can run the glance tool. This can be achieved using the following command:
sudo apt-get update
sudo apt-get –y install glance-client
>> Assure that your environment variable is set up correctly using admin user and password which was created using the knowledge of our previous chapter. It would be as shown:
export OS_TENANT_NAME=cookbook
export OS_USERNAME=admin
export OS_PASSWORD=openstack
export OS_AUTH_URL=https://172.16.0.1:5000/v2.0/
export OS_NO_CACHE=1
Follow these simple steps to share a private image present in our ‘cookbook’ tenant with other tenants
1. Initially we must note the tenant ID with whom you want to share the image with
Keystone tenant-list
2. We then list all the images you want to share as follows:
glance image-list
3. For example , if you have a tenant with ID 04a1f957fcb49229ccbc5af55ac9f7c and an image with ID 2e696cf4-5167-4908-a769-356a51dc572 , then the image would be shared as shown:
glance member-create
2e696cf4-5167-4908-a769-356a51dc572
04a1f957fcb49229ccbc5af55ac9f7c
To begin with, assure that you are logged into our Ubuntu client where we can run the glance tool. This can be installed using the below command :
sudo apt-get update
sudo apt-get –y install glance-client
Assure that your environment variable is set up correctly using admin user and password which was created using the knowledge of our previous chapter. It would be as shown:
export OS_TENANT_NAME=cookbook
export OS_USERNAME=admin
export OS_PASSWORD=openstack
export OS_AUTH_URL=https://172.16.0.1:5000/v2.0/
export OS_NO_CACHE=1
Execute these following steps to view the images that have been shared with the particular tenant
1. We first need to get the tenant ID of the tenant we want to view as follows:
keystone tenant_list
2. We can now list the images that have been shared with a tenant as follows:
glance member-list-tenant-id
04a1f957fcb49229ccbc5af55ac9f7c
Explore OpenStack Sample Resumes! Download & Edit, Get Noticed by Top Employers! |
The member-list option in the glance command allows us to view images that have been shared with other tenants. The syntax is as shown:
Glance member-list-image-id IMAGE_ID
Glance member-list-tenant-id TENANT_ID
Related Pages:
Openstack Tutorial
Interview Questions:
Openstack Interview Questions
Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!
Name | Dates | |
---|---|---|
OpenStack Training | Mar 25 to Apr 09 | |
OpenStack Training | Mar 28 to Apr 12 | |
OpenStack Training | Apr 01 to Apr 16 | |
OpenStack Training | Apr 04 to Apr 19 |
Ravindra Savaram is a Content Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.
1 /15
Copyright © 2013 - 2023 MindMajix Technologies