ceph dashboard介紹
Ceph dashboard 是通過一個web界面,對已經運行的ceph集群進行狀態查看以及功能配置等功能,早起ceph使用的是第三方的dashboard組件。
Calamari
- calamari對外提供了十分漂亮的web管理和監控界面,以及一套改進的REST API接口,在一定程度上簡化了ceph管理,最初calamari是作為lnktank公司的ceph企業級商業產品來銷售,紅帽2015年收購后為了更好地推動ceph的發展,對外宣布calamari開源
- https://github.com/ceph/calamari
- 優點
- 管理功能好
- 界面友好
- 可以利用它來部署ceph和監控ceph
- 缺點
- 非官方
- 依賴openstack某些包
VSM
- Virtual Storage Manager(VSM)是Inter公司研發並且開源的一款ceph集群管理和監控軟件,簡化了一些ceph集群部署的一些步驟,可以簡單的通過web頁面來操作
- https://github.com/intel/virtual-storage-manager
- 優點
- 已部署
- 輕量級
- 靈活
- 缺點
-
- 監控選項少
- 缺乏ceph管理功能
Inkscope
- Inksope是一個ceph的管理和監控系統,依賴於ceph提供的API,使用MongoDB來存儲實時的監控數據和歷史信息
- https://github.com/inkscope/inkscope
- 優點
- 已部署
- 輕量級
- 靈活
- 缺點
- 監控選項少
- 缺乏ceph管理功能
ceph-dash
- ceph-dash是用python開發的一個ceph的監控面板,用來監控ceph的運行狀態。同時提供REST API來訪問狀態數據
- http://cephdash.crapworks.de/
- https://docs.ceph.com/en/mimic/mgr/
- https://docs.ceph.com/en/latest/mgr/dashboard/
- https://packages.debian.org/unstable/ceph-mgr-dashboard
- dashboard插件必須安裝在mgr節點上
- 優點
- 易部署
- 輕量級
- 靈活
- 缺點
- 功能相對簡單
查看mgr模塊列表
點擊查看代碼
ceph@ceph-deploy:~/ceph-cluster$ ceph mgr module ls
啟用dashboard插件
查看ceph dashboard 安裝包版本
root@ceph-mgr-01:~# apt-cache madison ceph-mgr-dashboard
ceph-mgr-dashboard | 16.2.6-1bionic | https://mirrors.tuna.tsinghua.edu.cn/ceph/debian-pacific bionic/main amd64 Packages
ceph-mgr-dashboard | 16.2.6-1bionic | https://mirrors.tuna.tsinghua.edu.cn/ceph/debian-pacific bionic/main i386 Packages
安裝ceph dashboard
點擊查看代碼
root@ceph-mgr-01:~# apt -y install ceph-mgr-dashboard
啟用dashboard模塊
模塊啟用后還不能直接訪問,需要配置關閉ssl或啟動ssl以及指定監聽地址。
ceph@ceph-deploy:~/ceph-cluster$ ceph mgr module enable dashboard
關閉dashboard ssl
ceph@ceph-deploy:~/ceph-cluster$ ceph config set mgr mgr/dashboard/ssl false
指定dashboard監聽地址
ceph@ceph-deploy:~/ceph-cluster$ ceph config set mgr mgr/dashboard/ceph-mgr-01/server_addr 172.16.10.225
指定dashboard監聽端口
ceph@ceph-deploy:~/ceph-cluster$ ceph config set mgr mgr/dashboard/ceph-mgr-01/server_port 9009
重啟mgr服務
root@ceph-mgr-01:~# systemctl restart ceph-mgr@ceph-mgr-01
在mgr節點驗證端口與進程
root@ceph-mgr-01:~# lsof -i:9009
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ceph-mgr 5844 ceph 34u IPv4 699761 0t0 TCP ceph-mgr-01:9009 (LISTEN)
查看dashboard地址
ceph@ceph-deploy:~/ceph-cluster$ ceph mgr services
{
"dashboard": "http://172.16.10.225:9009/"
}
訪問dashboard
登錄界面
設置dashboard賬戶以及密碼
ceph@ceph-deploy:~/ceph-cluster$ echo "12345678" >> dashboard_passwd.txt
ceph@ceph-deploy:~/ceph-cluster$ ceph dashboard set-login-credentials wgs -i dashboard_passwd.txt
******************************************************************
*** WARNING: this command is deprecated. ***
*** Please use the ac-user-* related commands to manage users. ***
******************************************************************
Username and password updated