wiki:GTD_Cloud_One_arch

Version 5 (modified by rock, 15 years ago) (diff)

--

OpenNEbula 的運作架構

0.安裝面

  • 只需安裝 ONE 於 Server 即可
  • Client 和 Server 間的溝通是透過 ssh (必須設定 ONE 管理者的 ssh 自動登入)
  • Host 和 VM 的資訊是透過 SQLite 來存取 ($ONE_LOCATION/var/one.db)


1.程式面

  • one 啟動時,會根據 oned.conf 的設定來啟動 2 個 Daemon 和 3 個 driver:
    • oned (主程式)
    • mm_sched (排程用)
    • one_im_ssh.rb (資訊管理者)
    • one_vmm_xen.rb (虛擬管理者,此處的 Vitualizer 為 Xen,若是用 KVM 則為 one_vmm_kvm.rb)
    • one_tm.rb (傳輸管理者)

2.指令運作面

  • onehost

0. OpenNEbula 的 Daemon

  • 當 $ONE_LOCATION/bin/one start 時,會啟動 (1)OpenNebula daemon、(2)相關的 Drivers (Information driver, Virtualization driver & Transfer driver) 和 (3)Scheduler。
  • Drivers 彼此都是獨立的 process,透過 internal ASCII protocol 與 OpenNEbla core 溝通,在 load driver 前會啟動兩個 Run Command (RC) 來獲得境變數,這兩個 RC file為:
    1. $ONE_LOCATION/etc/mad/defaultrc
    2. Driver 各自的特定的檔案


3. OpenNebula daemon

  • 功能:OpenNebula daemon (oned) 管理 host, vnet & vm
    • 設定檔為 $ONE_LOCATION/etc/oned.conf
      • 相關參數:
        1. HOST_MONITORING_INTERVAL: Time in seconds between host monitorization
        2. VM_POLLING_INTERVAL: Time in seconds between virtual machine monitorization
        3. VM_DIR: Remote path to store the VM images, it should be shared between all the cluster nodes to perform live migrations. This path will be used for all the cluster nodes.
        4. MAC_PREFIX: Default MAC prefix to generate virtual network MAC addresses
        5. NETWORK_SIZE: Default size for virtual networks
        6. PORT: Port where oned will listen for xml-rpc calls
        7. DEBUG_LEVEL: Sets the level of verbosity of $ONE_LOCATION/var/oned.log log file.
          (0 -> ERROR, 1 -> WARNING, 2 ->INFO, 3 -> DEBUG)
    • 範例:
      HOST_MONITORING_INTERVAL = 10
      VM_POLLING_INTERVAL      = 10
      
      VM_DIR       = /local/images
      
      MAC_PREFIX   = "00:01"
      NETWORK_SIZE = 254
      
      PORT         =  2633
      DEBUG_LEVEL  = 3
      


4. Information Driver

  • 功能:從 Clustre node 去收集資訊,相依選擇的 Virtualizer
  • Information Driver 配置
  • IM 的 File:
    1. $ONE_LOCATION/lib/mads/one_im_ssh : shell script wrapper to the driver itself. Sets the environment and other bootstrap tasks.
    2. $ONE_LOCATION/lib/mads/one_im_ssh.rb : The actual Information driver.
    3. $ONE_LOCATION/lib/im_probes/* : sensors home. Little scripts or binaries that extract information from the remote hosts. Let's see a simple one to understand how they work:
  • 適用於 Xen 的 IM File:
    1. $ONE_LOCATION/etc/im_xen/im_xenrc : environment setup and bootstrap instructions
    2. $ONE_LOCATION/etc/im_xen/im_xen.conf : This file defines the REMOTE_DIR and which sensors will be used
    3. $ONE_LOCATION/lib/im_probes/xen.rb : xen specific sensor.
  • 範例 (適用於 Xen)
    IM_MAD = [
        name       = "im_xen",
        executable = "bin/one_im_ssh",
        arguments  = "im_xen/im_xen.conf",
        default    = "im_xen/im_xen.conf" ]
    


5. Transfer Driver

  • 功能:傳輸、複製、回復和開啟 VM 印象檔
  • 範例檔:
    TM_MAD = [
        name       = "tm_ssh",
        executable = "one_tm",
        arguments  = "tm_ssh/tm_ssh.conf",
        default    = "tm_ssh/tm_ssh.conf" ]
    


6. Virtualization Driver

  • 功能:開啟、控制和監控 VMs 在 Cluster nodes
  • Xen Driver 的配置
  • 範例檔:
    VM_MAD = [
        name       = "vmm_xen",
        executable = "one_vmm_xen",
        default    = "vmm_xen/vmm_xen.conf",
        type       = "xen" ]   
    

7. Scheduler

  • 功能:分配 pending VM 到 Host,他是獨立的 process
  • match making scheduler (mm_sched) 實作 Rank Scheduling Policy.

Attachments (2)

Download all attachments as: .zip