ljzsdut
GitHubToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

13 Ceph Dashboard

https://docs.ceph.com/en/nautilus/mgr/dashboard/

Ceph Manager内置了众多的模块,例如dashboard、Prometheus等。

#安装dashboard包
[root@node-1 ~]# yum install -y ceph-mgr-dashboard 

#启用dashboard
[root@node-1 ~]# ceph mgr module enable dashboard
Error ENOENT: all mgr daemons do not support module 'dashboard', pass --force to force enablement

#强制启用
[root@node-1 ~]# ceph mgr module enable dashboard --force
[root@node-1 ~]# ceph mgr module ls |less
{
    "always_on_modules": [
        "balancer",
        "crash",
        "devicehealth",
        "orchestrator_cli",
        "progress",
        "rbd_support",
        "status",
        "volumes"
    ],
    "enabled_modules": [
        "dashboard",   # 已经启用
        "iostat",
        "restful"
    ],
    
    
# 配置ssl证书    
[root@node-1 ~]# ceph dashboard create-self-signed-cert
Self-signed certificate created 

#配置dashboard监听,默认会在所有节点上部署dashboard实例,监听所有IP的8443(https)和8080(http)端口
$ ceph config set mgr mgr/dashboard/server_addr $IP
$ ceph config set mgr mgr/dashboard/server_port $PORT
$ ceph config set mgr mgr/dashboard/ssl_server_port $PORT

[root@node-1 ~]# ceph mgr services
{
    "dashboard": "https://node-1:8443/"
}


#配置用户和密码(admin/ljzsdut)
[root@node-1 ~]# echo ljzsdut >password
[root@node-1 ~]# ceph dashboard ac-user-create admin -i password administrator
{"username": "admin", "lastUpdate": 1618291010, "name": null, "roles": ["administrator"], "password": "$2b$12$U/XTTc1JZ1Y/LsMIdb/.F.bqyDOqQGkgfAk1b0YwukL4UtfddoBW.", "email": null}