oVirt Architecture

简介:
[原文]

Architecture

oVirt Architecture - 德哥@Digoal - PostgreSQL research
 

Contents

 [hide

oVirt Architecture

标准的oVirt部署包含的组件(引擎, 负责管理VM平台, 还包含用户平台和报告平台; 数据库, 存储管理普通的数据, 报告数据; 计算节点, 跑虚拟机的节点; 存储节点, 存放ISO镜像以及磁盘img镜像).

A standard oVirt deployment consists of three things, primarily:

  • ovirt-engine which is used use to deploy, monitor, move, stop and create VM images, configure storage, network , etc.
  • One or more hosts (nodes), on which we run virtual machines (VMs)
  • One or more storage nodes, which hold the images and ISOs corresponding to those VMs

Also, usually an idendity service is deployed aside the engine, to authenticate users and administrators for ovirt-engine.

The nodes are Linux distributions with VDSM and libvirt installed, along with some extra packages to easily enable virtualization of networking and other system services. The supported Linux distributions to date are Fedora 17 or oVirt-node, which is basically a stripped-down distribution containing just enough components to allow virtualization.

The storage nodes can use block or file storage, and can be local or remote, accessed via NFS. Storage technologies like Gluster are supported through the POSIXFS storage type. Storage nodes are grouped into storage pools, which can ensure high availability and redundancy. The Vdsm Storage Terminology page has more details.


The different diagrams and descriptions below represent the architecture of the oVirt project, and its different components.

Overall architecture

The following diagram shows the different components in the oVirt project:

oVirt Architecture - 德哥@Digoal - PostgreSQL research

HOST Agent, 计算节点的代理软件, 用于与管理节点engine通讯, 开启虚拟机, 挂载存储, 运行钩子程序等.

Guest Agent, 虚拟机里面安装的agent, http://www.ovirt.org/Ovirt_guest_agent

SPICE 客户端, 用于连接虚拟机的控制界面, 例如console. 客户端需要下载响应的管理软件来连接对应的console, 例如windows中spice和vnc需要Remote Viewer. 下载地址 : 

 http://www.ovirt.org/Console_Client_Resources

http://virt-manager.org/download/

These main components are:

  1. Engine (ovirt-engine) - manages the oVirt hosts, and allows system administrators to create and deploy new VMs
  2. Admin Portal - web based UI application on top of the engine, that sysadmins use to perform advanced actions.
  3. User Portal - a simplified web based UI application for simpler management use-cases.
  4. REST API - an API which allows applications to perform virtualization actions, which is used by the command line tools and the python SDK
  5. CLI/SDK - The command line interface and SDK provide a way to communicate with engine via script actions.
  6. Database - Postgres database is used by the engine to provide persistency for the configuration of the ovirt deployment.
  7. Host agent (VDSM) - the oVirt engine communicates with VSDM to request VM related actions on the nodes
  8. Guest Agent - The guest agent runs inside the VM, and provides information on resource usage to the oVirt engine. Communication is done over a virtualised serial connection. 
  9. AD/IPA - directory services. Engine uses them to receive information on users and groups to be used with ovirt's permissions mechanism.
  10. DWH (Data Warehouse) - The data warehouse component performs ETL on data extracted from the db using Talend , and inserts it to history DB.
  11. Reports Engine - generates reports based on data in history DB, on system resource usage, using Jasper Reports
  12. SPICE client - utility which allows users to access the VMs.

The sections below will give a description and architectural aspects for each such component.

Engine

oVirt engine is a JBoss-based Java application (previously C#) which runs as a web service. This service talks directly to VDSM on the hosts to deploy, start, stop, migrate and monitor VMs, and it can also create new images on storage from templates.

It is a large scale, centralized management for server and desktop virtualization, based on leading performance, scalability and security infrastructure technologies.

Some features provided by the engine:

  1. VM lifecycle management
  2. Authentication via LDAP providers (AD/IPA)
  3. Network management - adding logical networks, and attaching them to hosts
  4. Storage management - managing storage domains (NFS/iSCSI/Local), and virtual VM disks
  5. High Availability - restart guest VMs from failed hosts automatically on other hosts
  6. Live Migration - move running VM between hosts with zero downtime
  7. System Scheduler - continuously load balance VMs based on resource usage/policies
  8. Power Saver - concentrate virtual machines on fewer servers during off-peak hours
  9. Maintenance Manager - no downtime for virtual machines during planned maintenance windows.
  10. Image Management - template based provisioning, thin provisioning and snapshots
  11. Monitoring - for all objects in system – VM guests, hosts, networking, storage etc.
  12. Export/Import - import and export VMs and templates using OVF files
  13. V2V - convert VMs from VMware and RHEL/Xen environments to the oVirt environment

The following diagram shows the different layers in the oVirt engine component:


oVirt Architecture - 德哥@Digoal - PostgreSQL research

 


Engine-Core Architecture

The following diagram shows the different components in the engine-core:


oVirt Architecture - 德哥@Digoal - PostgreSQL research

 

The main components in the engine core are:

  • DB Broker - responsible for all the DB related actions
  • VDS Broker - responsible for all actions that require communicating with VDSM
  • LDAP Broker - responsible for authenticating and fetching user/group attributes from the LDAP directory (currently support AD, IPA and RHDS)
  • Backend Bean - a Singleton bean responsible for running actions, queries and monitoring of the different entities

Host Agent (VDSM)

VDSM is a component developed in Python, which covers all functionality required by oVirt Engine for host, VM, networking and storage management.

  1. The VDSM API is XML-RPC based (planned to move to REST API). This is how ovirt-engine communicates with VDSM.
  2. Configures host, networking and shared storage
  3. Uses libvirt for VM life cycle operations
  4. Multithreaded, multi-processes
  5. Speaks with its guest agent via virtio-serial
  6. Adds customized clustering support for LVM that scales to hundreds of nodes
  7. Implements a distributed image repository over the supported storage types (local directory, FCP, FCoE, iSCSI, NFS, SAS)
  8. Multihost system, one concurrent metadata writer
  9. Scales linearly in data writers


oVirt Architecture - 德哥@Digoal - PostgreSQL research

 

Hooks mechanism

  1. Allows administrators to define scripts to modify VM operation eg. Add extra options such as CPU pinning, watchdog device, direct LUN access, etc.
  2. Allows oVirt to be extended for new KVM features before full integration is done
  3. An easy way to test a new kvm/libvirt/linux feature
  4. The hook mechanism is called before VDSM initiates the VM startup using libvirt.
  5. The hook changes the VM definition, and VDSM passes this definition to libvirt to start the VM.

The following diagram illustrates the Hook mechanism in the VM lifetime cycle:

oVirt Architecture - 德哥@Digoal - PostgreSQL research

 


MOM integration

oVirt Architecture - 德哥@Digoal - PostgreSQL research

 

VDSM is integrated with MoM. The behavior of MOM is configured with policies. With these policies users can fine tune the host for high memory overcommit or safe operation. In order to control its mom instance, vdsm does ship a mom configuration file and a mom policy file that sets mom's default behavior. At startup, vdsmd imports mom and initializes it with the configuration and policy files. From that point on, mom interacts with vdsm through the well-defined API in API.py and is controlling the memory balloons of each VM running on the host. The MOM Instance runs as a thread within the vdsm daemon.

Web-based User Interface

Following diagram provides a high level overview of oVirt user interface architecture:


oVirt Architecture - 德哥@Digoal - PostgreSQL research

 



Following diagram shows a typical GWT development workflow:


oVirt Architecture - 德哥@Digoal - PostgreSQL research

 


oVirt UI is designed around following concepts:

  • web browser as application platform, capable of delivering rich user experience through JavaScript-based applications
  • dependency injection and event bus to employ loosely-coupled component architecture
  • Model-View-Presenter for clean separation between presentation (View) and related business logic (Presenter)

REST API

RESTful API for integration with oVirt Engine:

  1. REST interface exposed for all API functions
  2. Stands for Representational State Transfer
  3. Modeling entity actions around HTTP verbs
    • GET
    • PUT
    • POST
    • DELETE
  4. Still uses 'actions' for some state changes
  5. Self describes – entity navigation and actions

REST Concepts:

  1. Client–server
  2. Stateless
  3. Cacheable
  4. Uniform interface


CLI/SDK

CLI and SDK are using on the REST api mentioned above.

SDK:

  1. Python based SDK to allow performing actions on the different entities
  2. Complete protocol abstraction
  3. Full compliance with the oVirt API architecture
  4. Auto-completion
  5. Self descriptive
  6. Intuitive and easy to use
  7. Auto-Generated

CLI:

  1. Python based CLI to allow querying and performing actions on the different entities
  2. Complete protocol abstraction
  3. Full compliance with the oVirt API architecture
  4. Highly descriptive help for each operation
  5. Intuitive and easy to use
  6. Auto-Generated

Reports Engine

  1. Based on Jasper Reports
  2. Jasper allows to import/export reports definitions
  3. Rich reporting engine
    • Report scheduling
    • Filters
    • Export to various formats
    • Report creation studio


DWH

The DWH component contains:

  1. ETL based on talendforge.org
  2. Periodic polling from operational DB
  3. Types of data
    • Config with version tracking
    • Statistics – aggregated hourly/daily
  4. API is view based


Guest Agent

The guest agent provides additional information to oVirt Engine, such as guest memory usage, guest ip address, installed applications and sso.

Architectural details:

  1. Python code, available for both linux and windows guests
  2. Communication is done over virtio-serial
  3. SSO for windows is based on a gina module for XP and a credential provider for windows 7
  4. SSO for RHEL 6 is based on a PAM module with support for both KDE and Gnome
oVirt Architecture - 德哥@Digoal - PostgreSQL research



[参考]
相关文章
|
6月前
|
自然语言处理 供应链 中间件
什么是 Intelligence Enterprise 的 Business network?
什么是 Intelligence Enterprise 的 Business network?
46 0
|
10月前
|
Java API Spring
读书笔记系列 - Operating Systems: Three Easy Pieces - Virtualization - Chapter 4: Processes
读书笔记系列 - Operating Systems: Three Easy Pieces - Virtualization - Chapter 4: Processes
62 0
读书笔记系列 - Operating Systems: Three Easy Pieces - Virtualization - Chapter 4: Processes
|
SQL 数据库
【译】The Clean Architecture
Robert C. Martin (Uncle Bob) 原文:https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html 译:时序 ![image.png](https://ata2-img.cn-hangzhou.oss-pub.aliyun-inc.com/9fdbe47c2b19dc
3287 0
|
Android开发 Java Kotlin
Architecture -- WorkManager
1. WorkManager 1). 简介 其实就是"管理一些要在后台工作的任务, -- 即使你的应用没启动也能保证任务能被执行",WorkManager在底层, 会根据你的设备情况, 选用JobScheduler, Firebase的JobDispatcher, 或是AlarmManager。
884 0
|
中间件 Serverless Go
Backend-as-a-Service (BaaS) for Efficient Software Development
The adoption of the Internet and mobile technologies has revolutionized the business ecosystem, with entrepreneurs able to implement ideas quickly by .
1715 0
Backend-as-a-Service (BaaS) for Efficient Software Development
|
Web App开发 Linux KVM