650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160412-1460472066514008161.jpg "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;background-color: RGB (246,246,246); "/>
OpenStack provides Image services by Glance.
Understanding Image
To understand the image Service, you need to figure out what the image is and why you want to use image.
-
If the system you want to install is much less efficient
-
long time, heavy workload
-
installation is also done manually with settings, such as installing other software, setting the IP
-
Backup and recovery system is not flexible
A more efficient solution is needed in a cloud environment, which is Image. Image is a template that contains the basic operating system and other software.
For example, there is a company that needs to configure an Office system for each employee, typically requiring a Win7 system plus MS office software. OpenStack is the way to play:
-
First install such a virtual machine manually
-
-
In this process, the 1th step is similar to the traditional approach, requiring manual operation and a certain amount of time.
But the 2nd, 3 steps very fast, fully automated, generally is the second level.
and 2, 3 steps can be recycled. For example, the company has a new set of OA system, each employee's PC must have client software. Then you can manually install the OA client in an employee's virtual machine, then execute snapshot, get the new image, and then create the virtual machine directly with the new image.
In addition, snapshot also has the role of backup, can be very convenient to restore the system.
Understanding Image Service
The function of image Service is to manage the image, allowing the user to discover, retrieve, and save the image.
In OpenStack, the Image Service is provided with the Glance, with the following specific functions:
Provides the REST API to enable users to query and retrieve image metadata and image itself
Supports multiple ways to store image, including normal file system, Swift, Amazon S3, etc.
Create a new image for Instance execution Snapshot
Glance Architecture
650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160412-1460472066871043421.jpg "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;white-space: Normal;background-color:rgb (246,246,246); "/>
The above is the Glance architecture diagram.
Glance-api
GLANCE-API is a service process running in the background of the system. Provides external REST APIs to respond to calls to image queries, fetches, and stores.
GLANCE-API does not actually process the request. If it is an operation related to image metadata (metadata), GLANCE-API will forward the request to glance-registry, and if it is an operation related to the image's own access, GLANCE-API forwards the request to the image's store B Ackend.
The GLANCE-API process can be viewed on the control node
650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160412-1460472067070015504.jpg "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;white-space: Normal;background-color:rgb (246,246,246); "/>
Glance-registry
Glance-registry is a service process running in the background of the system. The metadata that handles and accesses the image, such as the size and type of image.
The glance-registry process can be viewed on the control node
650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160412-1460472067178041433.jpg "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;white-space: Normal;background-color:rgb (246,246,246); "/>
Glance supports multiple formats of image, including
650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160412-1460472067439015084.jpg "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;white-space: Normal;background-color:rgb (246,246,246); "/>
Database
The metadata of the Image is persisted to the database and is MySQL by default. The database information for glance can be viewed on the control node
650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160412-1460472068654035334.jpg "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;white-space: Normal;background-color:rgb (246,246,246); "/>
Store Backend
Glance does not store the image itself. The real image is stored in the backend. Glance supports a variety of backend, including
A directory on a local file system (this is the default configuration)
Gridfs
Ceph RBD
Amazon S3
Sheepdog
OpenStack Block Storage (Cinder)
OpenStack Object Storage (Swift)
VMware ESX
650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160412-1460472068790044365.jpg "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;white-space: Normal;background-color:rgb (246,246,246); "/>
Other backend configurations are available for reference http://docs.openstack.org/liberty/config-reference/content/configuring-image-service-backends.html
View an image that is already present
650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160412-1460472068916025632.jpg "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;white-space: Normal;background-color:rgb (246,246,246); "/>
View Save Directory
650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160412-1460472069059001153.png "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;white-space: Normal;background-color:rgb (246,246,246); "/>
Each image should have a file in the directory, named after the image ID.
In the next section we will actually operate the Glance.
650) this.width=650; "title=" "src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20160412-1460472069315043178.jpg "style=" Border:0px;vertical-align:middle;color:rgb ( 63,63,63); font-family: ' Microsoft Yahei '; Font-size:15px;line-height:21.75px;text-align:justify;background-color: RGB (246,246,246); "/>
Understanding Glance-5 minutes a day to play with OpenStack (20)