Conceptual Diagram

Logical diagram

Nova is the most complicated and distributed component of OpenStack. A large number of processes cooperate to turn end user API requests into running virtual machines. Below is a list of these processes and their functions:

  • nova-api accepts and responds to end user compute API calls. It supports OpenStack Compute API, Amazon's EC2 API and a special Admin API (for privileged users to perform administrative actions). It also initiates most of the orchestration activities (such as running an instance) as well as enforces some policy (mostly quota checks).

  • The nova-compute process is primarily a worker daemon that creates and terminates virtual machine instances via hypervisor's APIs (XenAPI for XenServer/XCP, libvirt for KVM or QEMU, VMwareAPI for VMware, etc.). The process by which it does so is fairly complex but the basics are simple: accept actions from the queue and then perform a series of system commands (like launching a KVM instance) to carry them out while updating state in the database.

  • nova-volume manages the creation, attaching and detaching of z volumes to compute instances (similar functionality to Amazon’s Elastic Block Storage). Cinder has eventually replace nova-volume functionality, nova-volume is already retired.

  • The nova-network worker daemon is very similar to nova-compute and nova-volume. It accepts networking tasks from the queue and then performs tasks to manipulate the network (such as setting up bridging interfaces or changing iptables rules). This functionality has been migrated to Neutron, a separate OpenStack project.

  • The nova-schedule process is conceptually the simplest piece of code in OpenStack Nova: it takes a virtual machine instance request from the queue and determines where it should run (specifically, which compute server host it should run on).

  • The queue provides a central hub for passing messages between daemons. This is usually implemented with RabbitMQ today, but could be any AMQP message queue (such as Apache Qpid). New to the Folsom release is support for Zero MQ.

  • The SQL database stores most of the build-time and runtime state for a cloud infrastructure. This includes the instance types that are available for use, instances in use, networks available and projects. Theoretically, OpenStack Nova can support any database supported by SQL-Alchemy but the only databases currently being widely used are SQLite3 (only appropriate for test and development work), MySQL and PostgreSQL.

  • Nova also provides console services to allow end users to access their virtual instance's console through a proxy. This involves several daemons (nova-console, nova-novncproxy and nova-consoleauth).

Nova interacts with many other OpenStack services: Keystone for authentication, Glance for images and Horizon for web interface. The Glance interactions are central. The API process can upload and query Glance while nova-compute will download images for use in launching images.

setup.cfg

Python setuptools的Entry Points机制主要用途有两个:Automatic Script Creation和Dynamic Discovery of Services and Plugins。

Automatic Script Creation主要功能是封装了平台的差异,在不同平台上生成Python Package的入口脚本。如nova-api、nova-scheduler等入口脚本均是通过此机制生成的。

Dynamic Discovery of Services and Plugins主要是指本Package通过Entry Point声明自身的“扩展点”,然后第三方Package或者本Package的各个Module可以声明对此“扩展点”的实现。在Package中,可以通过某种方式获取相应“扩展点”当前所有的实现,并进行相应的处理。

Entry Point的声明和注册均是在各个Package的setup.cfg配置文件或者setup.py:setup method中完成的。

从Nova源码的setup.cfg可以看到nova在部署的时候都安装了哪些服务和配置,其中console_scripts部分为nova相关的服务:

console_scripts =
nova-all = nova.cmd.all:main
nova-api = nova.cmd.api:main
nova-api-ec2 = nova.cmd.api_ec2:main
nova-api-metadata = nova.cmd.api_metadata:main
nova-api-os-compute = nova.cmd.api_os_compute:main
nova-baremetal-deploy-helper = nova.cmd.baremetal_deploy_helper:main
nova-baremetal-manage = nova.cmd.baremetal_manage:main
nova-cells = nova.cmd.cells:main
nova-cert = nova.cmd.cert:main
nova-compute = nova.cmd.compute:main
nova-conductor = nova.cmd.conductor:main
nova-console = nova.cmd.console:main
nova-consoleauth = nova.cmd.consoleauth:main
nova-dhcpbridge = nova.cmd.dhcpbridge:main
nova-manage = nova.cmd.manage:main
nova-network = nova.cmd.network:main
nova-novncproxy = nova.cmd.novncproxy:main
nova-objectstore = nova.cmd.objectstore:main
nova-rootwrap = oslo.rootwrap.cmd:main
nova-scheduler = nova.cmd.scheduler:main
nova-spicehtml5proxy = nova.cmd.spicehtml5proxy:main
nova-xvpvncproxy = nova.cmd.xvpvncproxy:main

这些服务会根据nova的配置启动,其中nova-network/nova-dhcpbridge推荐用Neutron来代替。

Nova分析(1)——整体架构的更多相关文章

  1. 【Hadoop离线基础总结】流量日志分析网站整体架构模块开发

    目录 数据仓库设计 维度建模概述 维度建模的三种模式 本项目中数据仓库的设计 ETL开发 创建ODS层数据表 导入ODS层数据 生成ODS层明细宽表 统计分析开发 流量分析 受访分析 访客visit分 ...

  2. jQuery 2.0.3 源码分析core - 整体架构

    拜读一个开源框架,最想学到的就是设计的思想和实现的技巧. 废话不多说,jquery这么多年了分析都写烂了,老早以前就拜读过, 不过这几年都是做移动端,一直御用zepto, 最近抽出点时间把jquery ...

  3. jQuery源码分析系列 : 整体架构

    query这么多年了分析都写烂了,老早以前就拜读过, 不过这几年都是做移动端,一直御用zepto, 最近抽出点时间把jquery又给扫一遍 我也不会照本宣科的翻译源码,结合自己的实际经验一起拜读吧! ...

  4. 【Canal源码分析】整体架构

    本文详解canal的整体架构. 一.整体架构 说明: server代表一个canal运行实例,对应于一个jvm instance对应于一个数据队列 (1个server对应1..n个instance) ...

  5. Tomcat源码分析 -- Tomcat整体架构

    引用链接:https://blog.csdn.net/w1992wishes/article/details/79242797

  6. MINIX3 内核整体架构回顾及内核定 性分析

    MINIX3  内核整体架构回顾及内核定 性分析 12.1 注意事项 由于本文档不对 I/O 文件系统做出分析,所以在此不对 MINIX3 整体做出一个分 析,本章主要是针对内核进程分析.并且这里的模 ...

  7. OpenRisc-37-OpenRISC的CPU&core的整体架构分析

    引言 前面我们分析了ORPSoC的整体架构,并对其子系统进行了深入的分析和了解.但对于ORPSoC的核心模块or1200_top及其内部的core--or1200_cpu模块却鲜有涉及,算是ORPSo ...

  8. Bootstrap源码分析系列之整体架构

    作为一名合格的前端工程师,你肯定听说过Bootstarp框架.确实可以说Bootstrap框架是最流行的前端框架之一.可是也有人说Bootstrap是给后端和前端小白用的,我认为只要学习它能给我们前端 ...

  9. Tomcat源码分析二:先看看Tomcat的整体架构

    Tomcat源码分析二:先看看Tomcat的整体架构 Tomcat架构图 我们先来看一张比较经典的Tomcat架构图: 从这张图中,我们可以看出Tomcat中含有Server.Service.Conn ...

  10. 精尽 MyBatis 源码分析 - 整体架构

    该系列文档是本人在学习 Mybatis 的源码过程中总结下来的,可能对读者不太友好,请结合我的源码注释(Mybatis源码分析 GitHub 地址.Mybatis-Spring 源码分析 GitHub ...

随机推荐

  1. Java BigInteger(大数,ACM比赛专用)

    用c或者C++处理大数比较麻烦,于是决心学习一下JAVA中大数运算. 先下载一个eclipse,具体的用法去问度娘吧 JAVA中有两个类BigInteger和BigDecimal分别表示大整数类和大浮 ...

  2. 总结 output 用法

    第一种用法 返回受 INSERT.UPDATE 或 DELETE 语句影响的每行的信息,或者返回基于上述每行的表达式.这些结果可以返回到处理应用程序, 以供在确认消息.存档以及其他类似的应用程序要求中 ...

  3. POJ 1860 Currency Exchange (最短路)

    Currency Exchange Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 60000/30000K (Java/Other) T ...

  4. Chorme dev tools小技巧

    1.快速稳健转换:打开DevTools,按下Ctrl+P来快速寻找和打开你工程中的任意文件. 2.在源代码中搜索:打开DevTools,按下Ctrl+Shift+F,即可在所有已加载文件中查找一个特定 ...

  5. C++ Primer : 第十一章 : 关联容器示例: 一个单词转换的map

    单词转换就是:将一些缩写的单词转换为实际的文本.第一个文件保存的是转换的规则,而第二个文件保存的是要转换的文本. 假设单词转换的规则的文件如下: brb be right back k okay? y ...

  6. 传统解析xml的方式

    1. 介绍 1)DOM(JAXP Crimson解析器)          DOM是用与平台和语言无关的方式表示XML文档的官方W3C标准.DOM是以层次结构组织的节点或信息片断的集合.这个层次结构允 ...

  7. php连接MongoDB

    一.安装php的mongo扩展 # wget https://github.com/mongodb/mongo-php-driver-legacy/archive/master.zip -O /usr ...

  8. ExtJS 的一些技巧与问题

    1.修改列表(grid)里store的加载url grid.getStore().proxy.conn.url = "xxx.jsp"; grid.getStore().reloa ...

  9. Linux驱动设计——阻塞和同步

    阻塞和非阻塞是设备访问的两种基本方式,阻塞和非阻塞驱动程序使用时,经常会用到等待队列. 阻塞和非阻塞 阻塞操作是指在执行设备操作时,若不能获得资源,则挂起进程直到满足可操作的条件后再进行操作.被挂起的 ...

  10. google-perftools 分析JAVA 堆外内存

    google-perftools 分析JAVA 堆外内存 分类: j2se2011-08-25 21:48 3358人阅读 评论(4) 收藏 举报 javahbasehtml工具os 原文转自:htt ...