分布式存储Ceph(十) ceph dashboard

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

dashboard登录验证

登录成功界面

posted @ 2021-11-22 14:25  小吉猫  阅读(1645)  评论(0编辑  收藏  举报