Understanding Glance-5 minutes a day to play with OpenStack (20)

Source: Internet
Author: User

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.

    1. If the system you want to install is much less efficient

    2. long time, heavy workload

    3. installation is also done manually with settings, such as installing other software, setting the IP

    4. 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:

    1. 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:

    1. Provides the REST API to enable users to query and retrieve image metadata and image itself

    2. Supports multiple ways to store image, including normal file system, Swift, Amazon S3, etc.

    3. 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

  1. A directory on a local file system (this is the default configuration)

  2. Gridfs

  3. Ceph RBD

  4. Amazon S3

  5. Sheepdog

  6. OpenStack Block Storage (Cinder)

  7. OpenStack Object Storage (Swift)

  8. 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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.