您的位置:首页 > 其它

Glance详解

2018-02-21 11:27 134 查看
一 什么是GlanceGlance是Openstack项目中负责镜像管理的模块,其功能包括虚拟机镜像的查找,注册和检索等操作。Glance提供restful API可以查询虚拟机镜像的metadata,并且可以获得镜像。通过Glance,虚拟机镜像进行可以被存储到多种存储上,比如简单的文件存储或者对象存储。
二 Glance in Openstack


三 基本概念1 image identifiers就是Image URI,格式:<Glance Server Location>/images/<ID>全局唯一2 Image statusQueued:镜像ID已经被保留,镜像还没有上传Saving:镜像正在被上传Active:镜像可以使用了Killed:镜像损坏或者不可用Deleted:镜像被删除3 Disk Formatraw:This is an unstructured disk image formatvhd:VMWare,Xen,Microsoft,VirtualBoxvmdk:common formatvdi:VirtualBox,QEMU emulatoriso:optical discqcow2:QEMU emulatoraki:Amazon kernel imageari:Amazon ramdisk iamgeami:Amazon machine image4 Container FormatBareovfakiamiari
四 基本架构


五模块Glance API:处理API请求Glance Registry:处理镜像的metadata存储Store Adapter:镜像本身的存储
六 Store-AdapterS3SwiftFileSystem:默认后端存储RBD:Ceph的Rados block device(RBD)HTTP:通过HTTP在Internet上读取可用的虚拟机镜像其他分布是存储,比如sheepdog等。
七 Glance搭建1 安装Glance包2 初始化数据库3 配置Glance数据库Keystone认证信息4 启动Glance
八 Glance CLI列出镜像创建镜像删除镜像下载镜像
九 添加镜像glance image-create --name myimage --disk-format=raw --container-format=bare --file /path/to/file.img  --is-publicglance image-create --name myimage --disk-format=raw --container-format=bare --location <IMAGE_URL> --is-public
十 API实验1 获取Token2 使用Token列出镜像3 使用Token上传,下载镜像4 获取镜像5 制作镜像-Linux6 修改镜像7 转换镜像格式
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Glance