自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

開源Ceph管理平臺(tái)Inkscope部署手冊(cè)

云計(jì)算
inkscope使用的是ceph自帶的restapi,因此是比較輕量級(jí)的,ceph集群相關(guān)的信息直接從API調(diào),系統(tǒng)層面的信息抓取是通過(guò)本地一個(gè)代理程序抓取,然后寫入inkscope所在節(jié)點(diǎn)的mongodb里。

 

[[142363]]

一.前情提要

關(guān)于inkscope就不做過(guò)多介紹了,就是ceph的一個(gè)開源管理控制平臺(tái),跟ceph官方的calamary以及intel的VSM差不多一類,只是各自側(cè)重點(diǎn)不一樣。

相對(duì)而言,因?yàn)閕nkscope使用的是ceph自帶的restapi,因此是比較輕量級(jí)的,ceph集群相關(guān)的信息直接從API調(diào),系統(tǒng)層面的信息抓取是通過(guò)本地一個(gè)代理程序抓取,然后寫入inkscope所在節(jié)點(diǎn)的mongodb里。

1.1 官方地址

github-inkscope

inkscope角色介紹

inkscope主要的角色有三種: 1. web管理控制臺(tái):這個(gè)角色需要安裝flask和mongodb以提供接口,方便前端界面angular-js調(diào)用 2. cephprobe:這個(gè)一般是安裝在mon節(jié)點(diǎn),整個(gè)集群安裝一個(gè)即可,主要是獲取ceph的一些信息將其寫入mongodb中;使用5000端口提供服務(wù) 3. sysprobe:這個(gè)主要是獲取集群所有節(jié)點(diǎn)的硬件監(jiān)控信息,如CPU、內(nèi)存、硬盤燈,集群內(nèi)所有節(jié)點(diǎn)都需要安裝。 4. radosgw: 是ceph對(duì)外提供對(duì)象存儲(chǔ)服務(wù)的服務(wù),本例中用于對(duì)象存儲(chǔ)相關(guān)的管理,會(huì)使用80端口提供http服務(wù);

1.2 inkscope-packaging

***的版本中,已經(jīng)提供了ubuntu下的deb安裝包,項(xiàng)目地址,deb包及作用介紹如下:

  1. inkscope-common : 包含inkscope的默認(rèn)配置文件以及其他進(jìn)程(cephprobe,sysprobe)啟動(dòng)所需的依賴文件,所有相關(guān)節(jié)點(diǎn)都需要安裝
  2. inkscope-admviz : 包含inkscope的web控制臺(tái)文件,含接口和界面,僅需要安裝一個(gè),該節(jié)點(diǎn)上同時(shí)需要按章flask和mongodb
  3. inkscope-cephrestapi: 用于安裝啟動(dòng) ceph rest api 的腳本,僅需要安裝在提供api接口的節(jié)點(diǎn)上
  4. inkscope-cephprobe: 用于安裝啟動(dòng) cephprobe 的腳本(整個(gè)集群只需要一個(gè))
  5. inkscope-sysprobe : 安裝用于所有mon和osd的sysprobe 所需要腳本

二.測(cè)試環(huán)境

本次測(cè)試ceph集群共有三個(gè)節(jié)點(diǎn):ceph1(10.1.35.85),ceph2(10.1.35.86),ceph3(10.1.35.87);

三個(gè)節(jié)點(diǎn)都是mon節(jié)點(diǎn),也都是osd節(jié)點(diǎn),每個(gè)節(jié)點(diǎn)3個(gè)osd。

根據(jù)前面的角色以及安裝包的介紹,三個(gè)節(jié)點(diǎn)的分配及所需安裝包如下(inkscope-common包所有節(jié)點(diǎn)都需要因此省略):

 

開源ceph管理平臺(tái)inkscope部署手冊(cè)

 

#p#

三.安裝

3.1 安裝web管理控制臺(tái)

3.1.1 按章軟件包和依賴

該節(jié)點(diǎn)使用php以及wsgi實(shí)現(xiàn)界面,本地接收其他節(jié)點(diǎn)傳過(guò)來(lái)的數(shù)據(jù)存入本地mongodb,同時(shí)會(huì)調(diào)用rados命令,

又使用flask框架構(gòu)建接口,因此需要使用下面的命令安裝依賴

 

  1. apt-get install python-pip apache2 libapache2-mod-wsgi mongodb python-ceph 
  2. pip install flask requests simplejson -i http://pypi.mirrors.ustc.edu.cn/simple   #使用國(guó)內(nèi)pip源安裝 
  3. dpkg -i inkscope-admviz_1.2.0-0.deb  inkscope-common_1.2.0-0.deb inkscope-sysprobe_1.2.0-0.deb 

 

3.1.2 配置apache2服務(wù)

安裝完nkscope-admviz后默認(rèn)虛擬主機(jī)配置文件位于/etc/httpd/conf.d/inkScope.conf,將其拷貝到/etc/apache2/sites-available 中。修改32行為下面這句, 注釋掉 33行

 

  1. ProxyPass /ceph-rest-api/ http://10.1.35.86:5000/api/v0.1/ 
  2. #ProxyPass /shell http://$IP:4200/ 

 

這里將 rest-api_srv 修改為ceph2的IP,規(guī)劃中,ceph2的角色是cephprobe。

同時(shí)將25和35行的ErrorLog和CustomLog的值里面的httpd修改為apache2,因?yàn)閍pache2的工作路徑已經(jīng)換了

修改 /etc/apache2/ports.conf 文件,增加下面

 

  1. Listen 8080 
  2. NameVirtualHost *:8080 

 

完整inkScope.conf文件如下:

 

  1. root@ceph3:/etc/apache2/sites-available# cat inkScope.conf  
  2. <VirtualHost *:8080> 
  3.     ServerName  localhost 
  4.     ServerAdmin webmaster@localhost 
  5.  
  6.     DocumentRoot /var/www/inkscope 
  7.     <Directory "/var/www/inkscope"
  8.         Options All 
  9.         AllowOverride All 
  10.     </Directory> 
  11.  
  12.     ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ 
  13.     <Directory "/usr/lib/cgi-bin"
  14.         AllowOverride None 
  15.         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch 
  16.         Order allow,deny 
  17.         Allow from all 
  18.     </Directory> 
  19.  
  20.     WSGIScriptAlias /inkscopeCtrl /var/www/inkscope/inkscopeCtrl/inkscopeCtrl.wsgi 
  21.     <Directory "/var/www/inkscope/inkScopeCtrl"
  22.         Order allow,deny 
  23.         Allow from all 
  24.     </Directory> 
  25.  
  26.     ErrorLog /var/log/apache2/error_inkscope.log 
  27.  
  28.     # Possible values include: debug, info, notice, warn, error, crit, 
  29.     # alert, emerg. 
  30.     LogLevel warn 
  31.  
  32.     ProxyRequests Off  # we don't want a "forward proxy", but only a "Reverse proxy" 
  33.     ProxyPass /ceph-rest-api/ http://10.1.35.86:5000/api/v0.1/  
  34.     #ProxyPass /shell http://$IP:4200/ 
  35.  
  36.     CustomLog /var/log/apache2/access.log combined 
  37. </VirtualHost> 

 

運(yùn)行下面的命令,啟用apache2的proxy模塊和inkScope.conf虛擬主機(jī)

 

  1. sudo a2enmod proxy_http 
  2. sudo a2ensite inkScope.conf 
  3. sudo service apache2 restart 

 

現(xiàn)在打開瀏覽器訪問(wèn) 10.1.35.87:8080/ 應(yīng)該就可以看到首頁(yè),只是暫時(shí)沒有ceph集群的相關(guān)數(shù)據(jù)而已。

#p#

3.1.3 開啟mongodb遠(yuǎn)程連接

修改 /etc/mongodb.conf ,將bind_ip 修改為 0.0.0.0,取消 port = 27017 依據(jù)前面的注釋,如下:

 

  1. bind_ip = 0.0.0.0 
  2. port = 27017 

 

3.2 安裝cephprobe

在cephprobe節(jié)點(diǎn)主要是提供ceph-rest-api并抓取ceph的信息存入mongodb中。所需軟件包及依賴安裝如下:

  1. apt-get install python-dev 
  2. pip install pymongo psutil -i http://pypi.mirrors.ustc.edu.cn/simple  
  3. dpkg -i inkscope-common_1.2.0-0.deb inkscope-sysprobe_1.2.0-0.deb inkscope-cephrestapi_1.2.0-0.deb inkscope-cephprobe_1.2.0-0.deb 

 

啟動(dòng)ceph-rest-api服務(wù): /etc/init.d/ceph-rest-api start

3.3 radosgw服務(wù)配置

在ceph1提供radosgw服務(wù),具體radosgw的安裝在這里不做詳述,請(qǐng)參見ceph官方文檔或者內(nèi)部手冊(cè)。這里需要新建一個(gè)管理用戶,并賦予相關(guān)權(quán)限,以便在界面上直接操作radosgw。

  1. radosgw-admin user create --uid=inkscope --display-name="Inkscope admin" \ 
  2.                       --access-key=accesskey --secret=secretkey \ 
  3.                       --caps="users=*;metadata=*;buckets=*" 

 

這里sccess和secret的具體的值可以根據(jù)喜好自行修改。

3.4安裝sysprobe

在其他沒有承擔(dān)特殊任務(wù)的節(jié)點(diǎn)上安裝sysprobe

 

  1. apt-get install python-dev 
  2. pip install pymongo psutil -i http://pypi.mirrors.ustc.edu.cn/simple  
  3. dpkg -i inkscope-common_1.2.0-0.deb inkscope-sysprobe_1.2.0-0.deb 

 

3.5修改inkscope配置文件并啟動(dòng)服務(wù)

inkscope的配置文件就一個(gè),位于 /opt/inkscope/etc/inkscope.conf ,

這里面需要修改的主要有: 1. ceph_rest_api:在本例中即為ceph2的ip 2. mongodb_host:即為ceph3所在節(jié)點(diǎn),管理節(jié)點(diǎn) 3. radosgw_url:即為ceph1所在節(jié)點(diǎn) 4. radosgw_key和radosgw_secret:在ceph1上新建管理用戶時(shí)指定的兩個(gè)key

最終版如下:

 

  1.     "ceph_conf""/etc/ceph/ceph.conf"
  2.     "ceph_rest_api""10.1.35.86:5000"
  3.     "mongodb_host" : "10.1.35.87"
  4.     "ceph_rest_api_subfolder"""
  5.     "mongodb_set" : "mongodb0:27017,mongodb1:27017,mongodb2:27017"
  6.     "mongodb_replicaSet" : "replmongo0"
  7.     "mongodb_read_preference" : "ReadPreference.SECONDARY_PREFERRED"
  8.     "mongodb_port" : 27017, 
  9.     "mongodb_user":"ceph"
  10.     "mongodb_passwd":"monpassword"
  11.     "is_mongo_authenticate" : 0, 
  12.     "is_mongo_replicat" : 0, 
  13.     "cluster""ceph"
  14.     "status_refresh": 3, 
  15.     "osd_dump_refresh": 3, 
  16.     "pg_dump_refresh": 60, 
  17.     "crushmap_refresh": 60, 
  18.     "df_refresh": 60, 
  19.     "cluster_window": 1200, 
  20.     "osd_window": 1200, 
  21.     "pool_window": 1200, 
  22.     "mem_refresh": 60, 
  23.     "swap_refresh": 600, 
  24.     "disk_refresh": 60, 
  25.     "partition_refresh": 60, 
  26.     "cpu_refresh": 30, 
  27.     "net_refresh": 30, 
  28.     "mem_window": 1200, 
  29.     "swap_window": 3600, 
  30.     "disk_window": 1200, 
  31.     "partition_window": 1200, 
  32.     "cpu_window": 1200, 
  33.     "net_window": 1200, 
  34.     "radosgw_url""http://10.1.35.85:80"
  35.     "radosgw_admin""admin"
  36.     "radosgw_key""ainkscope"
  37.     "radosgw_secret""sinkscope" 

 

將該文件拷貝到所有節(jié)點(diǎn)的/opt/inkscope/etc/ 目錄中,然后重啟對(duì)應(yīng)服務(wù):

 

  1. /etc/init.d/sysprobe start 
  2. /etc/init.d/cephprobe start 
  3. /etc/init.d/ceph-rest-api start 

 

對(duì)應(yīng)節(jié)點(diǎn)上啟動(dòng)對(duì)用服務(wù)。

#p#

四.安裝web console

如果你是ubuntu14.04,直接安裝:

 

  1. sudo apt-get install shellinabox 

如果不是,點(diǎn)擊這里下載deb包安裝。

或者點(diǎn)擊這里下載其他對(duì)應(yīng)發(fā)行版的包。

修改配置文件, /etc/default/shellinabox :

 

  1. SHELLINABOX_ARGS="--no-beep -t"  

不適用SSL協(xié)議,然后重啟服務(wù)

 

  1. service shellinabox restart 

修改apache2虛擬主機(jī)配置文件,添加代理 /etc/apache2/site-available/inkScope.conf

在 ProxyPass /ceph-rest-api/ ... 這一行后添加下面的:

 

  1. ProxyPass /shell http://<hostname>:4200/ 

這里的 hostname 就是安裝shellinabox的主機(jī)地址

重啟apache2

 

  1. service apache2 restart 

注意:貌似需要谷歌瀏覽器,否則輸入沒反應(yīng)。

博文出處:www.ceph.org.cn/topic/137
 

責(zé)任編輯:Ophira 來(lái)源: Ceph中國(guó)社區(qū)
相關(guān)推薦

2015-01-12 15:26:42

Cephweb管理云平臺(tái)

2022-07-29 07:17:38

Rainbond云原生

2021-01-15 08:07:30

Ceph octopu集群運(yùn)維

2021-11-02 06:58:53

項(xiàng)目Ceph 內(nèi)網(wǎng)

2021-07-07 07:33:49

開源Keycloak平臺(tái)

2025-04-03 08:37:05

2012-10-17 09:37:52

網(wǎng)絡(luò)虛擬化開源云平臺(tái)OpenStack

2019-11-21 14:39:42

開源云管理私有云

2011-08-15 16:02:15

OpenNMS網(wǎng)管軟件

2011-03-22 10:17:22

LAMP

2017-03-22 10:06:40

ubuntuceph集群

2021-01-18 09:08:44

樹莓派Ceph開源

2015-06-30 09:49:19

管理平臺(tái)開源KVM

2024-08-01 09:16:54

2018-11-20 09:35:42

開源技術(shù) 數(shù)據(jù)

2015-05-28 20:46:05

CephGluster分布式存儲(chǔ)

2017-01-17 09:58:01

2011-03-23 15:55:41

LAMP

2013-03-12 09:39:37

CloudStack開源云平臺(tái)虛擬機(jī)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)