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. ubuntu默认root密码

    安装完Kubuntu后一直都是用我的用户名bbking登录, 一直没想到root的问题, 以为每次sudo输入的密码就是我的root密码. 刚才为了修改文件夹的所有者,想使用su root切换到roo ...

  2. 【字体区别】Serif和Sans Serif

    [字体区别]Serif和Sans Serif 在西方国家罗马字母阵营中,字体分为两大种类:Sans Serif和Serif,打字机体虽然也属于Sans Serif,但由于是等宽字体,所以另外独立出Mo ...

  3. 148. Sort List

    Sort a linked list in O(n log n) time using constant space complexity. 代码如下: /** * Definition for si ...

  4. tomcat实现文件打开下载功能

    omcat作为http的下载服务器,网上有很多办法 但我认为最简单的是: 1.直接把文件放在 tomcat6/webapps/ROOT 目录下, 2.然后在网址中访问: http://192.168. ...

  5. Ubuntu12.04安装中文字体(转)

    1.在/usr/share/fonts/下,新建文件夹winFonts,如果没有fonts目录,就安装fontconfig软件(系统字体管理),再将win7字体msyh.ttf和msyhbd.ttf复 ...

  6. oracle锁机制

    1 前言 数据库大并发操作要考虑死锁和锁的性能问题.看到网上大多语焉不详(尤其更新锁),所以这里做个简明解释,为下面描述方便,这里用T1代表一个数据 库执行请求,T2代表另一个请求,也可以理解为T1为 ...

  7. 安卓虚拟机启动后报错: 类似 SDK Manager] Error: Error parsing .....devices.xml 解决方案

    昨天用android sdk manager 更新了android sdk, 我是在eclipse上面安装adt来开发android的, 而且我每次打开虚拟机的时候也报错.报错的信息都是一样的.    ...

  8. 新浪代码部署手册 git管理工具

    目前新浪云上的应用支持通过Git和SVN来部署代码. Git仓库地址 https://git.sinacloud.com/YOUR_APP_NAME SVN仓库地址 https://svn.sinac ...

  9. IE 下加载jQuery

    转:http://www.iitshare.com/ie8-not-use-native-json.html 解决在IE8中无法使用原生JSON的问题   起因 在项目中要将页面上的js对象传给后台, ...

  10. [转]ssh常用用法小结

    ssh常用用法小结 1.连接到远程主机: 命令格式 : ssh name@remoteserver 或者 ssh remoteserver -l name 说明:以上两种方式都可以远程登录到远程主机, ...