Openstack Glance源码架构解析

这段时间捣鼓了一下Glance源代码,还是有收获的,修改了部分代码实现了支持多个ceph存储后端的功能。这个功能是不是个伪需求都还待定,反正也就当磨练了。

关于支持多个ceph存储后端的功能,稍微说一下
需要实现的功能就是在命令中行上传镜像,通过指定集群将镜像上传到不同ceph集群中。在通过nova创建虚拟机的时候肯定也需要能够使用这些创建虚拟机,当然这在计算节点的nova配置中就能实现。

整体结构图

Glance架构是一个典型的CS架构,提供的也是标准的Rest接口,各个layer分层也是很清楚的。
这里写图片描述
Following components are present in the Glance architecture:

  • A client - any application that makes use of a Glance server.
  • REST API - Glance functionalities are exposed via REST.
  • Database Abstraction Layer (DAL) - an application programming interface
    (API) that unifies the communication between Glance and databases.
  • Glance Domain Controller - middleware that implements the main
    Glance functionalities such as authorization, notifications, policies, database connections.
  • Glance Store - used to organize interactions between Glance and various
    data stores.
  • Registry Layer - optional layer that is used to organise secure
    communication between the domain and the DAL by using a separate service.

这都是直接从官网弄下来的。稍微解释一下

名字 解释
glance-api 服务端,负责处理各个请求
glance-store 与底层存储打交道,做适应性驱动等
glance-client 客户端,处理用户命令并发送请求到服务端
glance-registry 处理元数据相关,跟数据库有关

Gateway and basic layers

The domain model contains the following layers:

  1. Authorization
  2. Property protection
  3. Notifier
  4. Policy
  5. Quota
  6. Location
  7. Database

这次主要关注的还是Location这一层,database主要是由glance-registry来进行数据库的交互&

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值