今天休假一天试用一下ceph dashboard,记录一下过程。
部署
版本
参考ceph官网的部署步骤ceph dashboard 安装步骤
rpm 包就直接试用阿里yum源上mimic最新版本
阿里yum源地址
[Ceph-SRPMS]
name=Ceph SRPMS packages
baseurl=https://mirrors.aliyun.com/ceph/rpm-mimic/el7/SRPMS/
enabled=1
gpgcheck=0
type=rpm-md
[Ceph-aarch64]
name=Ceph aarch64 packages
baseurl=https://mirrors.aliyun.com/ceph/rpm-mimic/el7/aarch64/
enabled=1
gpgcheck=0
type=rpm-md
[Ceph-noarch]
name=Ceph noarch packages
baseurl=https://mirrors.aliyun.com/ceph/rpm-mimic/el7/noarch/
enabled=1
gpgcheck=0
type=rpm-md
[Ceph-x86_64]
name=Ceph x86_64 packages
baseurl=https://mirrors.aliyun.com/ceph/rpm-mimic/el7/x86_64/
enabled=1
gpgcheck=0
type=rpm-md
[[email protected] mgr-dashboard]# ceph -v
ceph version 13.2.4 (b10be4d44915a4d78a8e06aa31919e74927b142e) mimic (stable)
配置步骤
enable dashboard模块
[[email protected] ceph]# ceph mgr module enable dashboard
生成并安装自签名的证书。
[[email protected] ceph]# ceph dashboard create-self-signed-cert
Self-signed certificate created
生成key pair,并配置给ceph mgr。生成了两个key相关的文件。
[[email protected] ~]# mkdir mgr-dashboard
[[email protected] ~]# cd mgr-dashboard/
[[email protected] mgr-dashboard]# openssl req -new -nodes -x509 -subj "/O=IT/CN=ceph-mgr-dashboard" -days 3650 -keyout dashboard.key -out dashboard.crt -extensions v3_ca
Generating a 2048 bit RSA private key
...............................................................................+++
...............+++
writing new private key to 'dashboard.key'
-----
[[email protected] mgr-dashboard]# ls -l
total 8
-rw-r--r-- 1 root root 1155 3月 8 16:39 dashboard.crt
-rw-r--r-- 1 root root 1704 3月 8 16:39 dashboard.key
重启一下mgr dashboard
[[email protected] mgr-dashboard]# ceph mgr module disable dashboard
[[email protected] mgr-dashboard]# ceph mgr module enable dashboard
我试用使用默认的ip 和 port,如果需要设置可以按照以下命令。
[[email protected] mgr-dashboard]# ceph config set mgr mgr/dashboard/rbd-mirror-2/server_addr $ip
[[email protected] mgr-dashboard]# ceph config set mgr mgr/dashboard/rbd-mirror-2/server_port $port
设置登陆认证的用户名和密码
[[email protected] mgr-dashboard]# ceph dashboard set-login-credentials admin [email protected]
Username and password updated
登入
参考
ceph dashboard 配置手册官网
之前其他人mimic版本dashboard配置文档
其实ceph dashboard的还有其他很多配置,可以参考官网。暂时还没有计划用ceph dashboard,所以也没有仔细研究使用。这里只是简单的部署试用,以后使用中在继续补充。