SlideShare a Scribd company logo
1 of 18
OpenStack
Image Service
Codename: Glance
Deepti Ramakrishna
Software Engineer, Intel
What is Glance?
● Stores and retrieves VM images and metadata information
● A VM image is a single file which contains a virtual disk that has a bootable
operating system installed on it
● OpenStack Compute (Nova) makes use of this during instance
provisioning
Image metadata
● Nova uses image metadata to select the right host for
your VM
● If the property option is set on an image, and Nova is configured
so that the ImagePropertiesFilter scheduler filter is enabled
(default), then the scheduler only considers compute hosts that
satisfy that property
● openstack image set --property architecture=arm 
--property hypervisor_type=qemu image_name_or_id
Glance architecture
● glance-api: Accepts image API calls
● glance-registry: Stores, processes
and retrieves metadata about images
● Database: Stores image metadata
● Image Store: Variety of locations
where an image can be stored
https://www.safaribooksonline.com/library/view/deploying-openstack/9781449311223/ch03.html
Image formats
● ISO: An archive format for the data contents of an optical disc, such as
CD-ROM
● QCOW2 (QEMU Copy-On-Write Version 2): Commonly used with KVM
hypervisor. Uses sparse representation and hence the image size is
smaller
● Raw: An unstructured disk image format; natively supported by both
KVM and XEN hypervisors. If you have a file without an extension it is
possibly a raw format
● VDI: VirtualBox uses VDI image format
● VHD: Microsoft Hyper-V uses the VHD (Virtual Hard Disk) format for
images
● VMDK: VMware ESXi hypervisor uses the VMDK (Virtual Machine Disk)
format for images
Image formats - continued
● AKI (Amazon Kernel Image): A kernel file that the hypervisor will load
initially to boot the image
● AMI (Amazon Machine Image): This is a virtual machine image in raw
format
● ARI (Amazon Ramdisk Image): An optional ramdisk file mounted at boot
time
● OVF (Open Virtualization Format)
● Defined by Distributed Management Task Force (DMTF) standards group
● OVF package consists of :
● A .ovf XML metadata file that contains metadata information
● One or more disk image files
● Optional manifest file with extension .mf
● Optional certificate file with extension .cert
● Entire directory can be distributed as an OVA package, which is a tar archive
file with the OVF directory inside.
Operations on images
● Create image
● Creating a new image is a step done outside of your OpenStack
installation. You create the new image manually on your own system
and then upload the image to your cloud.
● http://docs.openstack.org/image-guide/create-images-manually.html
● Modify image
● guestfish program is a tool from the libguestfs project that allows you
to modify the files inside of a virtual machine image.
● http://docs.openstack.org/image-guide/modify-images.html
● Convert images from one format to another
● qemu-img convert command can do conversion between multiple
formats
● qemu-img convert -f raw -O qcow2 image.img image.qcow2
Creating Nova instance from an image
http://docs.openstack.org/admin-guide/compute-images-instances.html
Image download: How it works?
● Image service streams the image from the back end to the compute node
● Object storage node on a separate network
● Allow image traffic to flow between compute and object storage nodes
● Configure the my_block_storage_ip option in the storage node configuration file to
allow block storage traffic to reach the compute node
● Direct method
● On request the Image service will return a URL that links directly to the back-end store
● You can download the image directly from that URL
● Configure image_file_url section of the nova.conf file on compute nodes
Image status
queued Image service reserved an image ID for the image in the registry but did
not yet upload any image data.
saving Image service is currently uploading the raw data for the image.
active Image is active and fully available in the Image service.
killed An image data upload error occurred.
deleted The Image service retains information about the image but the image is
no longer available for use.
pending_delete Similar to the deleted status. An image in this state is not recoverable.
Image members and sharing concept
● public-images
● Set by the cloud provider
● my-owned-images
● You inherently own these images
● images-of-which-i-am-a-member
● Tenant ID can be added as an image member to a particular image
Glare (Glance Artifact Repository)
● Going beyond storing just VM images
● Based on Glance v2 API and supports different artifact types, like
containers, various templates, application packages, and not just VM
images only
● Support for community App catalog
● Collection of ready-to-use applications
● Murano packages
● Heat templates
● Still in experimental phase
Useful links
● Current (v2) API
● http://developer.openstack.org/api-ref-image-v2.html
● Source code
● https://github.com/openstack/glance
● Blueprints
● https://blueprints.launchpad.net/glance
● Bugs
● https://bugs.launchpad.net/glance/+bugs
● Code Review
● https://review.openstack.org/#/q/project:+openstack/glance
Lab session
CLI commands
● Verify all services are up and running
● $ pstree
● Verify Glance service is running
● $ pgrep -l glance
● Source as an admin (user) of admin (project) and show the default images that
come with devstack
● List images which you can access
● $ glance image-list
● Get details of a specific image
● $ glance image-show <IMAGE ID>
● Review checksum, disk/container formats, protected, public
● Source as a demo (user) of demo (project) and show the default images
● List images
● Get details of a specific image
● Download some image
● $ mkdir ~/images
● $ wget http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-
disk.img -O ~/images/cirros-0.3.3-x86_64-disk.img
CLI commands - continued
● Upload the image to Glance
● $ glance image-create --name "test_img1" --disk-format qcow2 --
container-format bare --file ~/images/cirros-0.3.3-x86_64-disk.img
● Place where you can find your newly uploaded image
● cd /opt/stack/data/glance/images
● In /etc/glance/glance-api.conf show [glance_store] section
● Show how the above image is private by sourcing as demo (user) of
invisible_to_admin (project)
● $ source openrc demo invisible_to_admin
● $ glance image-list
● Your new “test_img1” is not visible to this user but is visible to the admin
● Source back as demo (user) of demo (project)
● Update the name of this new image
● $ glance image-update <IMAGE ID> --name test
● Delete this newly added image
● $ glance image-delete <IMAGE ID>
CLI - Advanced (How to share images)
● How to share the newly created image between demo (user) of projects - demo and
invisible_to_admin
● Source as an admin (user) of admin (project) and get the MEMBER-ID for
invisible_to_admin project
● $ openstack project list
● Source as demo (user) of demo (project)
● Share the newly created image with invisible_to_admin project
● $ glance member-create <IMAGE-ID> <MEMBER-ID>
● Now the status for it gets to pending
● Source as demo (user) of invisible_to_admin (project)
● Accept the shared image
● $ glance member-update <IMAGE-ID> <MEMBER-ID> accepted
● Now list the images and you can see the shared image
Thank You!

More Related Content

What's hot

Container security
Container securityContainer security
Container securityAnthony Chow
 
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트Amazon Web Services Korea
 
Introduction to Nginx
Introduction to NginxIntroduction to Nginx
Introduction to NginxKnoldus Inc.
 
[오픈소스컨설팅]인프라 자동화 도구 Chef
[오픈소스컨설팅]인프라 자동화 도구  Chef[오픈소스컨설팅]인프라 자동화 도구  Chef
[오픈소스컨설팅]인프라 자동화 도구 ChefOpen Source Consulting
 
Learn nginx in 90mins
Learn nginx in 90minsLearn nginx in 90mins
Learn nginx in 90minsLarry Cai
 
Introduction to AWS Organizations
Introduction to AWS OrganizationsIntroduction to AWS Organizations
Introduction to AWS OrganizationsAmazon Web Services
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetesrajdeep
 
쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...
쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...
쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...Amazon Web Services Korea
 
S06 Azure バックアップを利用した Microsoft Azure 仮想マシンのバックアップ
S06 Azure バックアップを利用した Microsoft Azure 仮想マシンのバックアップS06 Azure バックアップを利用した Microsoft Azure 仮想マシンのバックアップ
S06 Azure バックアップを利用した Microsoft Azure 仮想マシンのバックアップMicrosoft Azure Japan
 
Deep Dive on Amazon Elastic File System (Amazon EFS)
Deep Dive on Amazon Elastic File System (Amazon EFS)Deep Dive on Amazon Elastic File System (Amazon EFS)
Deep Dive on Amazon Elastic File System (Amazon EFS)Amazon Web Services
 
Securing sensitive data with Azure Key Vault
Securing sensitive data with Azure Key VaultSecuring sensitive data with Azure Key Vault
Securing sensitive data with Azure Key VaultTom Kerkhove
 
Autoscaling Kubernetes
Autoscaling KubernetesAutoscaling Kubernetes
Autoscaling Kubernetescraigbox
 
Secure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessionsSecure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessionsSecure Code Warrior
 
What is Docker Architecture | Edureka
What is Docker Architecture | EdurekaWhat is Docker Architecture | Edureka
What is Docker Architecture | EdurekaEdureka!
 

What's hot (20)

Amazon EC2 Masterclass
Amazon EC2 MasterclassAmazon EC2 Masterclass
Amazon EC2 Masterclass
 
Container security
Container securityContainer security
Container security
 
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
Amazon VPC와 ELB/Direct Connect/VPN 알아보기 - 김세준, AWS 솔루션즈 아키텍트
 
Spring Security 5
Spring Security 5Spring Security 5
Spring Security 5
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
Introduction to Nginx
Introduction to NginxIntroduction to Nginx
Introduction to Nginx
 
Clustering and High Availability
Clustering and High Availability Clustering and High Availability
Clustering and High Availability
 
[오픈소스컨설팅]인프라 자동화 도구 Chef
[오픈소스컨설팅]인프라 자동화 도구  Chef[오픈소스컨설팅]인프라 자동화 도구  Chef
[오픈소스컨설팅]인프라 자동화 도구 Chef
 
Learn nginx in 90mins
Learn nginx in 90minsLearn nginx in 90mins
Learn nginx in 90mins
 
Introduction to AWS Organizations
Introduction to AWS OrganizationsIntroduction to AWS Organizations
Introduction to AWS Organizations
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...
쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...
쿠키런: 킹덤 대규모 인프라 및 서버 운영 사례 공유 [데브시스터즈 - 레벨 200] - 발표자: 용찬호, R&D 엔지니어, 데브시스터즈 ...
 
S06 Azure バックアップを利用した Microsoft Azure 仮想マシンのバックアップ
S06 Azure バックアップを利用した Microsoft Azure 仮想マシンのバックアップS06 Azure バックアップを利用した Microsoft Azure 仮想マシンのバックアップ
S06 Azure バックアップを利用した Microsoft Azure 仮想マシンのバックアップ
 
Deep Dive on Amazon Elastic File System (Amazon EFS)
Deep Dive on Amazon Elastic File System (Amazon EFS)Deep Dive on Amazon Elastic File System (Amazon EFS)
Deep Dive on Amazon Elastic File System (Amazon EFS)
 
Securing sensitive data with Azure Key Vault
Securing sensitive data with Azure Key VaultSecuring sensitive data with Azure Key Vault
Securing sensitive data with Azure Key Vault
 
AWS Simple Storage Service (s3)
AWS Simple Storage Service (s3) AWS Simple Storage Service (s3)
AWS Simple Storage Service (s3)
 
Autoscaling Kubernetes
Autoscaling KubernetesAutoscaling Kubernetes
Autoscaling Kubernetes
 
Secure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessionsSecure Code Warrior - Cookies and sessions
Secure Code Warrior - Cookies and sessions
 
Amazon S3 Masterclass
Amazon S3 MasterclassAmazon S3 Masterclass
Amazon S3 Masterclass
 
What is Docker Architecture | Edureka
What is Docker Architecture | EdurekaWhat is Docker Architecture | Edureka
What is Docker Architecture | Edureka
 

Similar to OpenStack Glance

How to use TripleO tools for your own project
How to use TripleO tools for your own projectHow to use TripleO tools for your own project
How to use TripleO tools for your own projectGonéri Le Bouder
 
OSDC 2016 - Inspecting Security of Docker formatted Container Images to find ...
OSDC 2016 - Inspecting Security of Docker formatted Container Images to find ...OSDC 2016 - Inspecting Security of Docker formatted Container Images to find ...
OSDC 2016 - Inspecting Security of Docker formatted Container Images to find ...NETWAYS
 
Abstract image management and universal image registration
Abstract image management and universal image registrationAbstract image management and universal image registration
Abstract image management and universal image registrationSaxbee Consultants
 
OpenNebulaConf 2016 - Storage Hands-on Workshop by Javier Fontán, OpenNebula
OpenNebulaConf 2016 - Storage Hands-on Workshop by Javier Fontán, OpenNebulaOpenNebulaConf 2016 - Storage Hands-on Workshop by Javier Fontán, OpenNebula
OpenNebulaConf 2016 - Storage Hands-on Workshop by Javier Fontán, OpenNebulaOpenNebula Project
 
Getting Started with Docker
Getting Started with Docker Getting Started with Docker
Getting Started with Docker Anup Segu
 
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...Mihai Criveti
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOpenStack Foundation
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to dockerHiroki Endo
 
Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016Alvaro Soto
 
OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...
OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...
OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...NETWAYS
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containersRed Hat Developers
 
Master Docker - first meetup
Master Docker - first meetupMaster Docker - first meetup
Master Docker - first meetupAyoub Benaissa
 
Creating a gallery image for Azure marketplace
Creating a gallery image for Azure marketplaceCreating a gallery image for Azure marketplace
Creating a gallery image for Azure marketplaceAlexey Bokov
 
SCCM 2007 Introduction - PICC 2012
SCCM 2007 Introduction - PICC 2012SCCM 2007 Introduction - PICC 2012
SCCM 2007 Introduction - PICC 2012capriguy84
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tipsSamuel Chow
 
Docker EE Deep Dive
Docker EE Deep DiveDocker EE Deep Dive
Docker EE Deep DiveDocker, Inc.
 
Docker on Power Systems
Docker on Power SystemsDocker on Power Systems
Docker on Power SystemsCesar Maciel
 
Locally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another HypervisorsLocally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another HypervisorsJosé Ignacio Carretero Guarde
 

Similar to OpenStack Glance (20)

How to use TripleO tools for your own project
How to use TripleO tools for your own projectHow to use TripleO tools for your own project
How to use TripleO tools for your own project
 
OSDC 2016 - Inspecting Security of Docker formatted Container Images to find ...
OSDC 2016 - Inspecting Security of Docker formatted Container Images to find ...OSDC 2016 - Inspecting Security of Docker formatted Container Images to find ...
OSDC 2016 - Inspecting Security of Docker formatted Container Images to find ...
 
Abstract image management and universal image registration
Abstract image management and universal image registrationAbstract image management and universal image registration
Abstract image management and universal image registration
 
OpenNebulaConf 2016 - Storage Hands-on Workshop by Javier Fontán, OpenNebula
OpenNebulaConf 2016 - Storage Hands-on Workshop by Javier Fontán, OpenNebulaOpenNebulaConf 2016 - Storage Hands-on Workshop by Javier Fontán, OpenNebula
OpenNebulaConf 2016 - Storage Hands-on Workshop by Javier Fontán, OpenNebula
 
Getting Started with Docker
Getting Started with Docker Getting Started with Docker
Getting Started with Docker
 
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
AnsibleFest 2021 - DevSecOps with Ansible, OpenShift Virtualization, Packer a...
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMU
 
Sw update elce2017
Sw update elce2017Sw update elce2017
Sw update elce2017
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016Glance vBrownBagLatAm 2016
Glance vBrownBagLatAm 2016
 
OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...
OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...
OSCamp #4 on Foreman | Provisioning on Azure Cloud through Foreman by Aditi P...
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containers
 
Master Docker - first meetup
Master Docker - first meetupMaster Docker - first meetup
Master Docker - first meetup
 
Creating a gallery image for Azure marketplace
Creating a gallery image for Azure marketplaceCreating a gallery image for Azure marketplace
Creating a gallery image for Azure marketplace
 
SCCM 2007 Introduction - PICC 2012
SCCM 2007 Introduction - PICC 2012SCCM 2007 Introduction - PICC 2012
SCCM 2007 Introduction - PICC 2012
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tips
 
Docker EE Deep Dive
Docker EE Deep DiveDocker EE Deep Dive
Docker EE Deep Dive
 
Testing Docker Images Security
Testing Docker Images SecurityTesting Docker Images Security
Testing Docker Images Security
 
Docker on Power Systems
Docker on Power SystemsDocker on Power Systems
Docker on Power Systems
 
Locally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another HypervisorsLocally run a FIWARE Lab Instance In another Hypervisors
Locally run a FIWARE Lab Instance In another Hypervisors
 

OpenStack Glance

  • 1. OpenStack Image Service Codename: Glance Deepti Ramakrishna Software Engineer, Intel
  • 2. What is Glance? ● Stores and retrieves VM images and metadata information ● A VM image is a single file which contains a virtual disk that has a bootable operating system installed on it ● OpenStack Compute (Nova) makes use of this during instance provisioning
  • 3. Image metadata ● Nova uses image metadata to select the right host for your VM ● If the property option is set on an image, and Nova is configured so that the ImagePropertiesFilter scheduler filter is enabled (default), then the scheduler only considers compute hosts that satisfy that property ● openstack image set --property architecture=arm --property hypervisor_type=qemu image_name_or_id
  • 4. Glance architecture ● glance-api: Accepts image API calls ● glance-registry: Stores, processes and retrieves metadata about images ● Database: Stores image metadata ● Image Store: Variety of locations where an image can be stored https://www.safaribooksonline.com/library/view/deploying-openstack/9781449311223/ch03.html
  • 5. Image formats ● ISO: An archive format for the data contents of an optical disc, such as CD-ROM ● QCOW2 (QEMU Copy-On-Write Version 2): Commonly used with KVM hypervisor. Uses sparse representation and hence the image size is smaller ● Raw: An unstructured disk image format; natively supported by both KVM and XEN hypervisors. If you have a file without an extension it is possibly a raw format ● VDI: VirtualBox uses VDI image format ● VHD: Microsoft Hyper-V uses the VHD (Virtual Hard Disk) format for images ● VMDK: VMware ESXi hypervisor uses the VMDK (Virtual Machine Disk) format for images
  • 6. Image formats - continued ● AKI (Amazon Kernel Image): A kernel file that the hypervisor will load initially to boot the image ● AMI (Amazon Machine Image): This is a virtual machine image in raw format ● ARI (Amazon Ramdisk Image): An optional ramdisk file mounted at boot time ● OVF (Open Virtualization Format) ● Defined by Distributed Management Task Force (DMTF) standards group ● OVF package consists of : ● A .ovf XML metadata file that contains metadata information ● One or more disk image files ● Optional manifest file with extension .mf ● Optional certificate file with extension .cert ● Entire directory can be distributed as an OVA package, which is a tar archive file with the OVF directory inside.
  • 7. Operations on images ● Create image ● Creating a new image is a step done outside of your OpenStack installation. You create the new image manually on your own system and then upload the image to your cloud. ● http://docs.openstack.org/image-guide/create-images-manually.html ● Modify image ● guestfish program is a tool from the libguestfs project that allows you to modify the files inside of a virtual machine image. ● http://docs.openstack.org/image-guide/modify-images.html ● Convert images from one format to another ● qemu-img convert command can do conversion between multiple formats ● qemu-img convert -f raw -O qcow2 image.img image.qcow2
  • 8. Creating Nova instance from an image http://docs.openstack.org/admin-guide/compute-images-instances.html
  • 9. Image download: How it works? ● Image service streams the image from the back end to the compute node ● Object storage node on a separate network ● Allow image traffic to flow between compute and object storage nodes ● Configure the my_block_storage_ip option in the storage node configuration file to allow block storage traffic to reach the compute node ● Direct method ● On request the Image service will return a URL that links directly to the back-end store ● You can download the image directly from that URL ● Configure image_file_url section of the nova.conf file on compute nodes
  • 10. Image status queued Image service reserved an image ID for the image in the registry but did not yet upload any image data. saving Image service is currently uploading the raw data for the image. active Image is active and fully available in the Image service. killed An image data upload error occurred. deleted The Image service retains information about the image but the image is no longer available for use. pending_delete Similar to the deleted status. An image in this state is not recoverable.
  • 11. Image members and sharing concept ● public-images ● Set by the cloud provider ● my-owned-images ● You inherently own these images ● images-of-which-i-am-a-member ● Tenant ID can be added as an image member to a particular image
  • 12. Glare (Glance Artifact Repository) ● Going beyond storing just VM images ● Based on Glance v2 API and supports different artifact types, like containers, various templates, application packages, and not just VM images only ● Support for community App catalog ● Collection of ready-to-use applications ● Murano packages ● Heat templates ● Still in experimental phase
  • 13. Useful links ● Current (v2) API ● http://developer.openstack.org/api-ref-image-v2.html ● Source code ● https://github.com/openstack/glance ● Blueprints ● https://blueprints.launchpad.net/glance ● Bugs ● https://bugs.launchpad.net/glance/+bugs ● Code Review ● https://review.openstack.org/#/q/project:+openstack/glance
  • 15. CLI commands ● Verify all services are up and running ● $ pstree ● Verify Glance service is running ● $ pgrep -l glance ● Source as an admin (user) of admin (project) and show the default images that come with devstack ● List images which you can access ● $ glance image-list ● Get details of a specific image ● $ glance image-show <IMAGE ID> ● Review checksum, disk/container formats, protected, public ● Source as a demo (user) of demo (project) and show the default images ● List images ● Get details of a specific image ● Download some image ● $ mkdir ~/images ● $ wget http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64- disk.img -O ~/images/cirros-0.3.3-x86_64-disk.img
  • 16. CLI commands - continued ● Upload the image to Glance ● $ glance image-create --name "test_img1" --disk-format qcow2 -- container-format bare --file ~/images/cirros-0.3.3-x86_64-disk.img ● Place where you can find your newly uploaded image ● cd /opt/stack/data/glance/images ● In /etc/glance/glance-api.conf show [glance_store] section ● Show how the above image is private by sourcing as demo (user) of invisible_to_admin (project) ● $ source openrc demo invisible_to_admin ● $ glance image-list ● Your new “test_img1” is not visible to this user but is visible to the admin ● Source back as demo (user) of demo (project) ● Update the name of this new image ● $ glance image-update <IMAGE ID> --name test ● Delete this newly added image ● $ glance image-delete <IMAGE ID>
  • 17. CLI - Advanced (How to share images) ● How to share the newly created image between demo (user) of projects - demo and invisible_to_admin ● Source as an admin (user) of admin (project) and get the MEMBER-ID for invisible_to_admin project ● $ openstack project list ● Source as demo (user) of demo (project) ● Share the newly created image with invisible_to_admin project ● $ glance member-create <IMAGE-ID> <MEMBER-ID> ● Now the status for it gets to pending ● Source as demo (user) of invisible_to_admin (project) ● Accept the shared image ● $ glance member-update <IMAGE-ID> <MEMBER-ID> accepted ● Now list the images and you can see the shared image

Editor's Notes

  1. RESEARCH https://marc.ttias.be/openstack-dev/2016-05/msg02108.php https://docs.google.com/presentation/d/1WQoBenlp-0vD1t7mpPgQuepDmlPUXq2LOfRYnurZx74/edit#slide=id.p