首頁 > Figaro 牢騷區, Linux 進階操作技巧, OpenSUSE Linux, SuSE Linux 相關應用, 教學雜記 > OpenNebula 3.7.80 XEN Cluster 配置紀錄 — Part II

OpenNebula 3.7.80 XEN Cluster 配置紀錄 — Part II

分享

在 OpenNebula 3.7.80 XEN Cluster 配置紀錄 — Part I 中,我們已順利將 ONE 環境給建構起來,但全部透過指令來進行操作對於大部分的新手而言可能會略顯痛苦,好在 OpenNebula有另外提供一個套件Sunstone來做為圖形化的管理介面,功能與指令操作管理完全相同,接著筆者將針對如何組態Sunstone的方式來進行介紹:

步驟一:於ONE-Master環境中安裝Sunstone套件

預設安裝 ONE 相關 RPM 套件時,套件內已經包含了 Sunstone 套件環境,只是預設並未啟用與安裝而已,安裝方式如下所示:

ONE-Master:~ # /usr/share/one/install_gems sunstone
Distribution “suse” detected.
About to install these dependencies:
* make
* gcc
* rubygem-rake
* gcc-c++
* sqlite3-devel

Press enter to continue…  [ 按下 ENTER 按鍵讓系統補齊運作 sunstone 所缺少的套件 ]

zypper install make gcc rubygem-rake gcc-c++ sqlite3-devel
Loading repository data…
Reading installed packages…
‘make’ is already installed.
No update candidate for ‘make-3.82-147.1.2.x86_64’. The highest available version is already installed.
Resolving package dependencies…

The following NEW packages are going to be installed:
gcc gcc-c++ gcc46 gcc46-c++ glibc-devel libstdc++46-devel linux-glibc-devel
rubygem-rake sqlite3-devel

9 new packages to install.
Overall download size: 13.6 MiB. After the operation, additional 59.1 MiB will
be used.
Continue? [y/n/?] (y): y [ 輸入 y 讓系統自動將缺少的套件補齊 ]
Retrieving package linux-glibc-devel-3.1_rc5-7.1.1.noarch (1/9), 778.0 KiB (3.1 MiB unpacked)
Retrieving: linux-glibc-devel-3.1_rc5-7.1.1.noarch.rpm [done (0 B/s)]
Retrieving package rubygem-rake-0.8.7-11.1.2.x86_64 (2/9), 359.0 KiB (1.5 MiB unpacked)
Retrieving: rubygem-rake-0.8.7-11.1.2.x86_64.rpm [done]
Retrieving package glibc-devel-2.14.1-14.27.1.x86_64 (3/9), 612.0 KiB (2.9 MiB unpacked)
Retrieving: glibc-devel-2.14.1-14.27.1.x86_64.rpm [done (7.5 KiB/s)]
Retrieving package sqlite3-devel-3.7.8-1.1.2.x86_64 (4/9), 92.0 KiB (339.0 KiB unpacked)
Retrieving: sqlite3-devel-3.7.8-1.1.2.x86_64.rpm [done (79.0 KiB/s)]
Retrieving package libstdc++46-devel-4.6.2_20111026-1.1.4.x86_64 (5/9), 2.4 MiB (21.3 MiB unpacked)
Retrieving: libstdc++46-devel-4.6.2_20111026-1.1.4.x86_64.rpm [done (1.3 MiB/s)]
Retrieving package gcc46-4.6.2_20111026-1.1.4.x86_64 (6/9), 5.5 MiB (18.5 MiB unpacked)
Retrieving: gcc46-4.6.2_20111026-1.1.4.x86_64.rpm [done (1.3 MiB/s)]
Retrieving package gcc46-c++-4.6.2_20111026-1.1.4.x86_64 (7/9), 3.9 MiB (11.5 MiB unpacked)
Retrieving: gcc46-c++-4.6.2_20111026-1.1.4.x86_64.rpm [done (1.3 MiB/s)]
Retrieving package gcc-4.6-15.1.3.x86_64 (8/9), 4.0 KiB (0 B unpacked)
Retrieving: gcc-4.6-15.1.3.x86_64.rpm [done]
Retrieving package gcc-c++-4.6-15.1.3.x86_64 (9/9), 4.0 KiB (0 B unpacked)
Retrieving: gcc-c++-4.6-15.1.3.x86_64.rpm [done]
Installing: linux-glibc-devel-3.1_rc5-7.1.1 [done]
Installing: rubygem-rake-0.8.7-11.1.2 [done]
Installing: glibc-devel-2.14.1-14.27.1 [done]
Installing: sqlite3-devel-3.7.8-1.1.2 [done]
Installing: libstdc++46-devel-4.6.2_20111026-1.1.4 [done]
Installing: gcc46-4.6.2_20111026-1.1.4 [done]
Installing: gcc46-c++-4.6.2_20111026-1.1.4 [done]
Installing: gcc-4.6-15.1.3 [done]
Installing: gcc-c++-4.6-15.1.3 [done]
About to install the gems for these components:
* sunstone
Press enter to continue…  [ 按下 ENTER 按鍵讓系統開始進行套件的配置與安裝 ]

gem install –no-ri –no-rdoc json sinatra thin sequel sqlite3
Fetching: json-1.7.5.gem (100%)
Building native extensions. This could take a while…
Successfully installed json-1.7.5
Fetching: rack-1.4.1.gem (100%)
Fetching: rack-protection-1.2.0.gem (100%)
Fetching: tilt-1.3.3.gem (100%)
Fetching: sinatra-1.3.3.gem (100%)
Successfully installed rack-1.4.1
Successfully installed rack-protection-1.2.0
Successfully installed tilt-1.3.3
Successfully installed sinatra-1.3.3
Fetching: eventmachine-1.0.0.gem (100%)
Building native extensions. This could take a while…
Fetching: daemons-1.1.9.gem (100%)
Fetching: thin-1.5.0.gem (100%)
Building native extensions. This could take a while…
Successfully installed eventmachine-1.0.0
Successfully installed daemons-1.1.9
Successfully installed thin-1.5.0
Fetching: sequel-3.40.0.gem (100%)
Successfully installed sequel-3.40.0
Fetching: sqlite3-1.3.6.gem (100%)
Building native extensions. This could take a while…
Successfully installed sqlite3-1.3.6
10 gems installed
ONE-Master:~ #

步驟二:接著安裝 noVNC 功能於Sunstone環境

noVNC是一個webSocket為基礎的VNC用戶端軟體,用來作為連結運作中的VM使用,預設安裝 Sunstone 環境時並不會自動安裝,因此我們需要額外進行配置,操作方式如下所示:

ONE-Master:~ # cd /usr/share/one/
ONE-Master:/usr/share/one # ./install_novnc.sh
Downloading noVNC latest version…
######################################################################## 100.0%
Extracting files to temporary folder…
Installing Sunstone client libraries in /usr/lib/one/sunstone/public…
Installing SelfService client libraries in /usr/lib/one/ruby/cloud/occi/ui/public…
Downloading Websockify VNC proxy files
######################################################################## 100.0%
######################################################################## 100.0%
Backing up and updating /etc/one/sunstone-server.conf with new VNC proxy path…
Backing up and updating /etc/one/occi-server.conf with new VNC proxy path…
Installation successful

步驟三:組態 Sunstone 監聽網路 IP 位置

Sunstone 安裝後並不需要太多的設定便可以直接進行運作,其伺服器的組態檔案位在 /etc/one/sunstone-server.conf,在啟用伺服器服務之前我們必須要調整監聽的 IP 位址與服務埠號,操作方式如下所示 ( 組態檔案中的 29 ~ 32 行 ):

29 # Server Configuration
30 #
31 :host: 127.0.0.1    [ 修改為 ONE-Master 所使用的 IP 位址 ]
32 :port: 9869

啟動與關閉 Sunstone 伺服器也是透過 oneadmin來進行操作,因此當我們修正好相關監聽IP位址資訊之後,便可以切換到 oneadmin 使用者帳號身分內,執行  sunstone-server start

oneadmin@ONE-Master:~> sunstone-server start
sunstone-server started

步驟四:透過網頁來存取 Sunstone 伺服器

由於剛才我們已經將 Sunstone 伺服器的監聽位址改為 192.168.1.27:9869  ,如下圖所示,當我們透過瀏覽器連線到這個位址時,便可以順利看到Sunstone伺服器的網頁畫面:

登入 Sunstone 伺服器可以直接使用 oneadmin 的帳號與密碼便可以順利進入介面來進行操作,預設 Sunstone 伺服器介面為英文,因此我們可以點選Dashboard –> Configuration 中進行語系的調整,將介面改為繁體中文版:

而 Sunstone 伺服器的詳細操作方式,讀者若有興趣可以參考 http://opennebula.org/documentation:rel3.8:sunstone 官方文件來進行使用,在Sunstone伺服器介面中美執行一個動作時,讀者可以仔細觀察右下方會出現操作狀態提示文字,我們可以從隨時彈出的文字框架中確認這個指令操作是否有異常。因此,若要快速進行 ONE 的使用,Sunstone 伺服器是一個不錯的選擇。

 

(若看不到驗證碼,請重新整理網頁。)

*