Ceph enable built-in dashboard¶
Since Luminous release, Ceph introduced a nice and complete built-in dashboard, see the announcement.
The dashboard is provided by the new (in Luminous) MGR service, which usually coexists with the MON.
The following instructions are based on the excellent <blog post by Wido den Hollander and install an HAproxy in front of the set of MON hosts.
Enable the module¶
Enable the module, and configure it to bind on default port (7000
)
on any available port:
ceph mgr module enable dashboard
ceph config-key put mgr/dashboard/server_addr
Restart the service on each node:
systemctl restart ceph-mgr@<mon_name>
Configure the HAproxy¶
On the elected node, install HAproxy:
yum install haproxy
Configure file /etc/haproxy/haproxy.cfg
as follows (we
will be using port 8888
on the HAproxy):
global
log 127.0.0.1 local1
log 127.0.0.1 local2 notice
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats
defaults
log global
mode http
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
option httplog
no option httpclose
no option http-server-close
no option forceclose
stats enable
stats hide-version
stats refresh 30s
stats show-node
stats uri /haproxy?stats
stats auth admin:haproxy
frontend https
bind *:8888
default_backend ceph-dashboard
backend ceph-dashboard
balance roundrobin
option httpchk GET /
http-check expect status 200
server mon01 10.3.3.21:7000 check
server mon02 10.3.3.22:7000 check
server mon03 10.3.3.23:7000 check
Restart the service and enable running at boot time:
systemctl restart haproxy
systemctl enable haproxy