"N Edition" openstack--Mirroring Service Glance (Thu)

Source: Internet
Author: User

"N Version" openstack--Mirroring service GlanceA. OpenStackThe Glance Mirror service1.1glanceIntroduction

Glance mainly consists of three parts

  • Glance-api : Receive cloud system image creation, deletion, read request, similar to NOVA-API, through other modules (Glance-registry and image store) to complete such as image lookup, acquisition, upload, delete operations, API listening Port 9292.

  • Glance-registry : The image registration service of the cloud system, which is used to interact with the MySQL database, store or retrieve the mirrored metadata (metadata), provide the rest interface related to the mirrored metadata, and through the glance-registry, can write to the database or get the image of various data, Glance-registry Listening Port 9191,glance There are two tables in the database, one is the image table and the other is the Image property table. The image table holds information such as the image format, size, etc., and the Image property table mainly preserves the customized information of the image.

  • Image Store : is a storage interface layer through which glance can obtain mirroring, Imagestore supports storage with Amazon S3, OpenStack's own swift, and distributed storage such as injection Ceph,sheepdog,gfs. Image store is an interface for image preservation and acquisition, it is just an interface layer, and the implementation requires external storage support.

  • Glance Configuration
  • Project and Endpoint Configuration

[[email protected] ~]# OpenStack service Create--nameglance--description "OpenStack image" image <- Create glance service entity ,

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/8C/34/wKiom1hk5BCCGberAAAcg2HQIh0119.png-wh_500x0-wm_3 -wmp_4-s_4140765975.png "title=" project. png "alt=" wkiom1hk5bccgberaaacg2hqih0119.png-wh_50 "/>

[[email protected] ~]# OpenStack endpoint create--regionregionone \

Image Public http://192.168.56.11:9292

[[email protected] ~]# OpenStack endpoint create--regionregionone \

Image Internal http://192.168.56.11:9292

[[email protected] ~]# OpenStack endpoint create--regionregionone \

Image Admin http://192.168.56.11:9292

<- Creating a Mirroring service API endpoint

[email protected] ~]# OpenStack endpoint list <- View List ,

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/8C/31/wKioL1hk5DPjZ9ZcAAB6WIknhiE423.png-wh_500x0-wm_3 -wmp_4-s_1680738723.png "title=" change. png "alt=" wkiol1hk5dpjz9zcaab6wiknhie423.png-wh_50 "/>

1.2 Connecting the database configuration

[email protected] ~]# vim/etc/glance/glance-api.conf <-glance-api configuration ,

1748 connection = Mysql+pymysql://glance:[email Protected]/glance

[email protected] ~]# vim/etc/glance/glance-registry.conf <-Registry configuration ,

1038 Connection =mysql+pymysql://glance:[email Protected]/glance

[email protected] ~]# su-s/bin/sh-c "Glance-manage db_sync" glance <- Synchronization -

[email protected] ~]# mysql-uglance-pglance-h192.168.56.11-e "Use glance;show tables" <- Inspection ,

1.3 Connecting the Keystone configuration

[email protected] ~]# vim/etc/glance/glance-api.conf <-glance-api configuration ,

3178 [Keystone_authtoken] add <- connection below Keystone configuration

3179 Auth_uri = http://192.168.56.11:5000

3180 Auth_url = http://192.168.56.11:35357

3181 memcached_servers = 192.168.56.11:11211

3182 auth_type = password

3183 Project_domain_name = Default

3184 User_domain_name = Default

3185 project_name = Service

3186 Username = glance

3187 Password = glance

Open 3990 flavor = Keystone Comment <- Configure authentication Service access

Open 1864 stores = file,http comment <- Configure local file system and mirror storage location >

Open 1896 Default_store = File Comment

Open 2196 Filesystem_store_datadir =/var/lib/glance/images Comment

[email protected] ~]# vim/etc/glance/glance-registry.conf <-Registry configuration ,

1127 [Keystone_authtoken] Add the following

1128 Auth_uri = http://192.168.56.11:5000

1129 Auth_url = http://192.168.56.11:35357

1130 Memcached_servers = 192.168.56.11:11211

1131 Auth_type = password

1132 Project_domain_name = Default

1133 User_domain_name = Default

1134 PROJECT_NAME = Service

1135 Username = glance

1136 Password = glance

Open 1910 flavor = Keystone Comment <- Configure authentication Service access

1.4 Checking the configuration file

[[email protected] ~]# grep ' ^[a-z] '/etc/glance/glance-api.conf

Connection =mysql+pymysql://glance:[email Protected]/glance

Stores = File,http

Default_store = File

Filesystem_store_datadir =/var/lib/glance/images

Auth_uri = http://192.168.56.11:5000

Auth_url = http://192.168.56.11:35357

Memcached_servers = 192.168.56.11:11211

Auth_type = password

Project_domain_name = Default

User_domain_name = Default

PROJECT_NAME = Service

Username = glance

Password = glance

Flavor = Keystone

[[email protected] ~]# grep ' ^[a-z] '/etc/glance/glance-registry.conf

Connection =mysql+pymysql://glance:[email Protected]/glance

Auth_uri = http://192.168.56.11:5000

Auth_url = http://192.168.56.11:35357

Memcached_servers = 192.168.56.11:11211

Auth_type = password

Project_domain_name = Default

User_domain_name = Default

PROJECT_NAME = Service

Username = glance

Password = glance

Flavor = Keystone

1.5 Starting the service

[Email protected] ~]# Systemctl enableopenstack-glance-api.service \

Openstack-glance-registry.service

[Email protected] ~]# Systemctl startopenstack-glance-api.service \

Openstack-glance-registry.service

1.6 Uploading images

Note: Put the image in any directory, execute the following command, enter the directory, or add absolute path

[[email protected] ~]# OpenStack image create "Cirros" \

--file cirros-0.3.4-x86_64-disk.img \

--disk-format qcow2--container-format bare \

--public

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/8C/34/wKiom1hk5FXBpQllAABg1kceVbE674.png-wh_500x0-wm_3 -wmp_4-s_673919478.png "title=" Pub.png "alt=" Wkiom1hk5fxbpqllaabg1kcevbe674.png-wh_50 "/>

1.7 Viewing the mirror list

[[email protected] ~]# OpenStack image list

[email protected] ~]# glance image-list <- old version Command

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/8C/34/wKiom1hk5HGRzK5-AAAROLhAX0A737.png-wh_500x0-wm_3 -wmp_4-s_1746776596.png "title=" view. png "alt=" wkiom1hk5hgrzk5-aaarolhax0a737.png-wh_50 "/>


This article from "Good Cook" blog, reprint please contact the author!

"N Edition" openstack--Mirroring Service Glance (Thu)

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.