[OpenStack] OpenStack Glance of notes (reprint)

 

Glance project found that virtual machine images, registration, access to services.

Glance provides a restful API can query the metadata of virtual machine images, and image can be obtained.

By the Glance, the virtual machine image may be stored on a variety of storage, such as a simple file or object store is stored (such as in swiftx OpenStack item).

 

Glance, like all OpenStack projects, the following ideas:

1. The component-based architecture facilitates rapid increase in new features

2. High-availability support large loads

3. The fault-tolerant Serial separate process to avoid errors

4. open standards to provide community-driven API Reference Implementation

 

Glance several important concepts:

1.Image identifiers Image use URI as a unique identifier, URL in the following format:

 

<Glance Server Location>/images/<ID>

 

Glance Server Location is the location of the mirror, ID is the mirror image of the unique identifier Glance.

2.Image Statuses total of four states.

queued identify the image ID has been retained, but the image has not been uploaded.

saving logo image being uploaded.

identifying active Glance fully available in the mirror.

killed identification during image upload error image completely unusable.

3.Disk and Container format

Disk  Format:raw vhd vmdk vdi iso qcow2 aki ari ami

Container Format: ovf bare aki ari ami

When the disk format is aki ari ami, disk format and container format consistent.

4.Image Registries

Use Glance, mirroring metadata can be registered to the image registries.

As long as the rest like API for the image metadata, any web application can be used as image registries and Glance docking.

Of course, Glance also provides a reference implementation.

More information can be ON Controlling the Servers , from Glance registry server Glance provided.

Glance provides the Rest-like API:

 

GET     /images         Return brief information about public images
GET     /images/detail  Return detailed information about public images
GET     /images/<ID>    Return metadata about an image in HTTP headers
POST    /images         Register metadata about a new image
PUT     /images/<ID>    Update metadata about an existing image
DELETE  /images/<ID>    Remove an image's metadata from the registry

By  GET  / ImagesRF Royalty Free  and  GET  filter queries for image / images / detail

 
It supports the following parameters:
  • name=NAME

    Filters images having a name attribute matching NAME.

  • container_format=FORMAT

    Filters images having a container_format attribute matching FORMAT

    For more information, see About Disk and Container Formats

  • disk_format=FORMAT

    Filters images having a disk_format attribute matching FORMAT

    For more information, see About Disk and Container Formats

  • status=STATUS

    Filters images having a status attribute matching STATUS

    For more information, see About Image Statuses

  • size_min=BYTES

    Filters images having a size attribute greater than or equal to BYTES

  • size_max=BYTES

    Filters images having a size attribute less than or equal to BYTES

These two resources also accept sort parameters:

  • sort_key=KEY

    Results will be ordered by the specified image attribute KEY. Accepted values include idnamestatusdisk_format,container_formatsizecreated_at (default) and updated_at.

  • sort_dir = DIR

    Results will be sorted in the direction DIR. Accepted values are asc for ascending or desc (default) for descending.

     
 

POST /images

request using json body portion encoding, for example the following format:
{'image':
  {'id': <ID>|None,
   'name': <NAME>,
   'status': <STATUS>,
   'disk_format': <DISK_FORMAT>,
   'container_format': <CONTAINER_FORMAT>,
   'properties': [ ... ]
  }
}
If the input does not meet the following conditions will return a 400 error:
  • status must be non-empty, and must be one of activesavingqueued, or killed
  • disk_format must be non-empty, and must be one of ariakiamirawisovhdvdiqcow2, or vmdk
  • container_format must be non-empty, and must be on of ariakiamibare, or ovf
  • If disk_format or container_format is ariakiami, then both disk_format and container_format must be the same.

 

Glance Architecture:

Glance is designed to use a variety of back-end storage.

Front-end to provide services to multiple Client through the API Server.

Reference Glance currently available implementations only use Sql Registry Server database to store metadata

 

Glance currently supports S3, Swift, simple file storage and read-only memory HTTPS.

Follow-up may also support other back-end, such as the distributed storage system (SheepDog or Ceph).

 

The Use Cases Popular 

Service Providers IAAS provide virtual machine image registration
Enterprises has created a low-cost backup platform (DR / BCP) to back up their image

ISVS offer their software preset optimized image

 

Key Features

Configuring and using the standard command-line options and configuration process, use the Paste deployment configuration
registry database supports version control, so you can upgrade or downgrade
by disk format and format combination container, EC2 supports a variety of image formats
new command line, allowing the user to interact with mirror service, such as additions and changes mirrored attribute, remove the mirror to see
confirmation mirrored by checksum integrity
individually configurable logging function
provides the ability to test components, you can start and stop the service glance executive function tests. You can use the command line or CURL

Reproduced in: https: //www.cnblogs.com/licheng/archive/2012/06/04/2534760.html

Glance Architecture:

Glance is designed to use a variety of back-end storage.

Front-end to provide services to multiple Client through the API Server.

Reference Glance currently available implementations only use Sql Registry Server database to store metadata

 

Glance currently supports S3, Swift, simple file storage and read-only memory HTTPS.

Follow-up may also support other back-end, such as the distributed storage system (SheepDog or Ceph).

 

The Use Cases Popular 

Service Providers IAAS provide virtual machine image registration
Enterprises has created a low-cost backup platform (DR / BCP) to back up their image

ISVS offer their software preset optimized image

 

Key Features

Configuring and using the standard command-line options and configuration process, use the Paste deployment configuration
registry database supports version control, so you can upgrade or downgrade
by disk format and format combination container, EC2 supports a variety of image formats
new command line, allowing the user to interact with mirror service, such as additions and changes mirrored attribute, remove the mirror to see
confirmation mirrored by checksum integrity
individually configurable logging function
provides the ability to test components, you can start and stop the service glance executive function tests. You can use the command line or CURL

Guess you like

Origin blog.csdn.net/weixin_34315189/article/details/92627838