命令记不住

登陆

ceph 部署 dashboard

05.ceph部署dashboard

1.dashboard简介

从L版本开始,ceph提供了原生的dashboard功能,通过dashboard对ceph集群状态查看和基本管理

使用dashboard需要在MGR节点安装软件包

yum install ceph-mgr-dashboard -y

如果是O版本会提示缺少依赖,建议使用Centos8或者使用cephadm容器化部署ceph

部署其它版本ceph集群,只需要修改yum源中的版本

[ceph]
name=Ceph packages for $basearch
baseurl=https://mirrors.aliyun.com/ceph/rpm-nautilus/el7/$basearch

2.ceph提供清理集群环境

1.清理ceph集群环境

# 从远程主机卸载ceph包并清理所有数据
ceph-deploy purge ceph-node01  ceph-node02  ceph-node03
# 清理ceph所有数据(/var/lib/ceph)
ceph-deploy purgedata ceph-node01 ceph-node02  ceph-node03
# 从本地目录移出认证密钥(my-cluster目录),可选
ceph-deploy forgetkeys
# 彻底清理ceph相关软件包
yum remove
# 取消OSD盘创建的LVM逻辑映射关系
dmsetup info -C | awk '/ceph/{print $1}'|xargs -i dmsetup remove{}
# 清除OSD盘GPT数据结构
sgdisk --zap-all /dev/sdb

.

3.部署dashboard

1.在每个MGR节点安装

yum install ceph-mgr-dashboard -y

2.在node01上启用MGR功能

ceph mgr module enable dashboard

3.查看配置

ceph mgr module ls

修改默认配置

ceph config set mgr mgr/dashboard/server_addr 0.0.0.0
ceph config set mgr mgr/dashboard/server_port 7000
ceph config set mgr mgr/dashboard/ssl false

4.创建一个dashboard登录用户名密码

echo "123456" >  password.txt
ceph dashboard ac-user-create admin administrator -i password.txt
# 格式
dashboard ac-user-create <username> {<rolename>}{<name>}

5.查看服务访问方式

ceph mgr services

6.重启服务生效

ceph mgr module disable dashboard
ceph mgr module enable dashboard

访问;http://xx.xx.xx.xx:7000/

推荐阅读