[[PageOutline]] {{{ #!html

Eucalyptus 管理者手冊

}}} = 【0.序言】 = * 本文件參考 [http://open.eucalyptus.com/wiki/EucalyptusPrerequisites_v1.5 Eucalyptus Administrator Guide v1.5],分為5部份:(1)必要環境的設定,(2)安裝,(3)配置,(4)管理,(5)問題排解 * Euc 分為三個元件: 元件間透過 SOAP with WS-security 溝通,一個 Cluster 只會有一個 head node 來執行Cluster controller 和每個 node 都個有一個 Node controller * Euc 3個元件的架構圖:[[BR]][[Image(euc_3com.png,width=250)]] [[Image(architecture.png, width=350)]] 1. '''Cloud controller (CLC)''' - 是一個 Java 程式,它提供 Web-service 和 Web interface 給外界,管理各種要求,負責更高階的排程和系統 accounting,也提供 S3-compatible bucket-based storage (Walrus) 和 EBS-style block-based storage 2. '''Cluster controller (CC)''' - C 撰寫,cluster-level 的排程和網路控制,在 Apache 內當成 Web services 來佈署 3. '''Node controller (NC)''' - C 撰寫,hypervisior 的 control,在 Apache 內當成 Web services 來佈署 ---- = 【1.必要環境】 = == ''__1.1 編譯 Euc 所需的套件__'' == * (1)C compilers (2)Java Developer Kit - SDK version 1.6 or above (3)Apache ant 1.6.5 or above (4)Curl development package (5)openssl development package (6)zlib development package == ''__1.2 執行 Euc 所需的套件__'' == ||Front-end ||(1) Java6 (2) Apache ant -> cloud controller (3)Java(TM) Cryptography Extension-JCE (4) Run a server on port 25 & [wiki:Eucalyptus/Install/Exim Exim], postfix to send mail (5) Dhcp3-server (6) iptables, vlan(vconfig) (7) 如果從 rpm 安裝的話,必須再安裝 xen-libs RPM || ||Node || (1) xen > 3.0.X: enabule Unix Socket for Euc to contorl Xen -> xend-unix-server yes,Euc 透過 libvirt >0.6.0 與 hypervisior 互動,需確定 libvrt 是正常的來執行 Eucalyptus Node Controller (2) Euc 支援各種網路型式 : vlan (vconfig), bridge-utils, xen-utils || ||Client/User ||需安裝 EC2 command-line tools: [http://open.eucalyptus.com/downloads Euca2ools] || ---- = 【2.安裝】 = == [wiki:Eucalyptus/Install/Source 2.1 從 Source 安裝] == == [wiki:Eucalyptus/Install/package 2.2 從套件檔安裝(deb)] == ---- = 【3.配置】 = == ''__3.1 系統配置__'' == * 3.1.1 Front-end {{{ $ euca_conf -addcluster $ $EUCALYPTUS/usr/sbin/euca_conf -nodes " ... " $ $EUCALYPTUS/usr/sbin/euca_conf -synckeys }}} * 3.1.2 設定 storage 存放 image template {{{ for x in hostname1 hostname2 ... hostnameN ; do \ ssh $x "mkdir -p /usr/local/instances/; /usr/sbin/euca_conf -hypervisor xen -instances /usr/local/instances" done }}} * [wiki:Eucalyptus/Install/Net 3.1.3 四種網路配置] [[BR]] == ''__3.2 啟動 Euc__'' == * 啟動/停止 {{{ $ $EUCALYPTUS/etc/init.d/eucalyptus start $ $EUCALYPTUS/etc/init.d/eucalyptus stop }}} * 設定開機自動啟動 {{{ $ ln -sf $EUCALYPTUS/etc/init.d/eucalyptus /etc/init.d/eucalyptus ### 以下兩者擇一即可 ### $ update-rc.d eucalyptus defaults $ chkconfig eucalyptus on }}} * 第1次執行 Euca 的設定 i. 在 CLC 那台 登入 https://localhost:8443/ (admin/admin) * 修改 admin 密碼,修改 mail,確認網址和 Walrus service(Euca Storage) ii. 最後,你必須產生使用者的認証,選擇 'Credentials' 標籤和按下 'Download certificates' 來下載,你能使用 基於 x509 的 Euca tools 和第3方工具(rightscale.com) {{{ $ mkdir $HOME/.euca ### 當你要使用 Euca 時,source 此檔案 ### $ source $HOME/.euca/eucarc }}} ---- = 【4.管理】 = == ''__[wiki:Eucalyptus/Images 4.1 Euc 印象檔管理]''__ == == ''__4.2 Euca 管理__'' == * 管理者環境 * 目前管理者只能透過命令列來管理,需注意Euc的路徑必須正確被宣告,才能正常執行指令 {{{ ### 宣告 EUCALYPTUS 路徑 ### $ export EUCALYPTUS=/path/to/eucalyptus }}} * [wiki:Eucalyptus/Images 印象檔管理] * Node管理 {{{ ### 增加 node ### $ $EUCALYPTUS/usr/sbin/euca_conf -addnode " ... " $ $EUCALYPTUS/usr/sbin/euca_sync_key ### 刪除 node ### $ $EUCALYPTUS/usr/sbin/euca_conf -delnode " ... " }}} * 使用者管理 * 使用者註冊 -> 可到 https://your.front.end.hostname:8443/ 註冊,點選Apply for account,之候選填相關的資訊,直到管理者審核後會發mail通知註冊成功 * 增加使用者 -> 管理者也可直接透過 wen 介面增加,點選 'Users' 標籤並選 'Add User' * 管理使用者 -> 管理者透過網頁 'disable' 或 'delete' 使用者 ---- = 【5.問題排解】 = * 重新啟動 * 當 front-end 要重啟時,需要關掉所有的 VMs (可使用 client tools ),或是手動使用 'xm destroy' {{{ ### 再 head node 執行 ### /etc/init.d/eucalyptus restart }}} * 問題判斷 * 若是有些無法正常運作,第一步可以參考文件檢查 installation/configuration/networking 部份,來確定元件是否正常運作,資源是否可被 instances 使用,eucarc 使否正確被 source和認証,也可使用以下指令來了解系Cloud 系統狀態 {{{ $ ec2-describe-availability-zones verbose AVAILABILITYZONE cluster AVAILABILITYZONE |- vm types free / max cpu ram disk AVAILABILITYZONE |- m1.small 0128 / 0128 1 128 10 AVAILABILITYZONE |- c1.medium 0128 / 0128 1 256 10 AVAILABILITYZONE |- m1.large 0064 / 0064 2 512 10 AVAILABILITYZONE |- m1.xlarge 0064 / 0064 2 1024 20 AVAILABILITYZONE |- c1.xlarge 0032 / 0032 4 2048 20 ... }}} * log file -> $EUCALYPTUS/var/log/eucalyptus/ * 在 front-end 的 CLC -> 'cloud-output.log' 和 'cloud-debug.log' * 在 front-end/Head Node 的 CC 'cc.log' 和 'httpd-cc_error_log' * 每個 node 的 NC -> 'nc.log' 和 'httpd-nc_error_log ---- = 【Reference】 = * [http://open.eucalyptus.com/wiki/EucalyptusPrerequisites_v1.5 Eucalyptus Administrator Guide v1.5] * [attachment:A_Tech_Report_Euc.pdf Eucalyptus : A Technical Report on an Elastic Utility Computing Archietcture Linking Your Programs to Useful Systems] * [http://support.rightscale.com/09-Clouds/Eucalyptus/01-Overview_of_Eucalyptus Overview of Eucalypt] [[BR]]