==5.4 dashboard==

> 查看集群状态并确认mgr节点
# ceph -s
  cluster:
    id:     db0577b1-6932-4eb8-a257-8b2f810f6793
    health: HEALTH_OK

  services:
    mon: 1 daemons, quorum node1 (age 3h)
    mgr: node2(active, since 41h)
    osd: 9 osds: 9 up (since 35s), 9 in (since 41h)
    rgw: 1 daemon active (1 hosts, 1 zones)

  data:
    pools:   7 pools, 145 pgs
    objects: 241 objects, 652 KiB
    usage:   285 MiB used, 900 GiB / 900 GiB avail
pgs:     145 active+clean

==5.4.1 apt安装dashboard==

ceph可用的第三方dashboard有好多,如calamari、VSM、Lnkscope,本次使用Ceph-Dash。
Ceph-Dash是python开发的用于监控Ceph状态的控制面板,同时提供REST API来访问。
有点:轻量级、灵活、部署简单
缺点:功能简单
官方文档链接:https://docs.ceph.com/en/mimic/mgr/dashboard/#host-name-and-port

==5.4.1.1 查看dashboard版本==

# apt-cache madison ceph-mgr-dashboard
ceph-mgr-dashboard | 16.2.5-1bionic | https://download.ceph.com/debian-pacific bionic/main amd64 Packages
ceph-mgr-dashboard | 16.2.5-1bionic | https://download.ceph.com/debian-pacific bionic/main i386 Packages
ceph-mgr-dashboard | 16.2.5-1bionic | https://mirrors.tuna.tsinghua.edu.cn/ceph/debian-pacific bionic/main amd64 Packages
ceph-mgr-dashboard | 16.2.5-1bionic | https://mirrors.tuna.tsinghua.edu.cn/ceph/debian-pacific bionic/main i386 Packages

==5.4.1.2 安装ceph-mgr-dashboard==

# apt-get -y install ceph-mgr-dashboard

==5.4.1.3 启动dashboard==

#  关闭ssl
#  ceph config set mgr mgr/dashboard/ssl false
# 启动dashboard模块
# ceph mgr module enable dashboard
# 指定dashboard地址
# ceph config set mgr mgr/dashboard/server_addr 172.25.250.152
# 指定dashboard端口
# ceph config set mgr mgr/dashboard/server_port 20000
# 使用 ceph mgr services 命令查看ceph-dash的IP和端口。

12.png

==5.4.1.4 设置用户和密码==

# echo "1Qaz@wsx" > password.txt
# ceph dashboard ac-user-create admin administrator -i password.txt

11.png