MODOP – Installation dashboard sur le Cluster CEPH – Partie 3

1°) Installation Apache

root@floki03:~# ssh -l root node02-ceph-mon1
[root@node02-ceph-mon1 ~]# yum -y install httpd mod_wsgi mod_ssl git python-pip
[root@node02-ceph-mon1 ~]# easy_install Jinja2

[root@node02-ceph-mon1 ~]# systemctl start httpd && systemctl enable httpd

2°) Installation Dashboard CEPH

[root@node02-ceph-mon1 ~]# mkdir -p /var/www/cephdash
[root@node02-ceph-mon1 ~]# cd /var/www/cephdash
[root@node02-ceph-mon1 cephdash]# git clone https://github.com/Crapworks/ceph-dash.git

[root@node02-ceph-mon1 cephdash]# chown -R apache.apache /var/www/cephdash
[root@node02-ceph-mon1 cephdash]# chmod -R 755 /var/www/cephdash
[root@node02-ceph-mon1 cephdash]# chmod +r /etc/ceph/ceph.client.admin.keyring

3°) Configurer Apache et dashboard

[root@node02-ceph-mon1 cephdash]# cd /var/www/cephdash/ceph-dash/
[root@node02-ceph-mon1 ceph-dash]# cp contrib/apache/cephdash /etc/httpd/conf.d/cephdash.conf
[root@node02-ceph-mon1 ceph-dash]# cd /etc/httpd/conf.d/
[root@node02-ceph-mon1 conf.d]# vi cephdash.conf

<VirtualHost *:80>
          ServerName node02-ceph-mon1.house.cpb
          RewriteEngine On
          RewriteCond %{REQUEST_URI} !^/server-status
          RewriteRule ^/?(.*) https://%{HTTP_HOST}/\ [R,L]
</VirtualHost>

<VirtualHost *:443>
          ServerName node02-ceph-mon1.house.cpb
          WSGIDaemonProcess cephdash user=apache group=apache processes=1 threads=5
          WSGIScriptAlias / /var/www/cephdash/ceph-dash/contrib/wsgi/cephdash.wsgi
          WSGIPassAuthorization On

           SSLEngine on
           SSLCertificateFile /etc/ssl/certs/ssl.crt
           SSLCertificateKeyFile /etc/ssl/certs/ssl.key

<Directory /var/www/cephdash/ceph-dash>
           WSGIProcessGroup cephdash
           WSGIApplicationGroup %{GLOBAL}
           Order deny,allow
           Allow from all
           AuthType Basic
           AuthName "Restricted Content"
           AuthUserFile /etc/httpd/.htpasswd
          Require valid-user
 </Directory>
</VirtualHost>
[root@node02-ceph-mon1 conf.d]# mv welcome.conf{,-old}
[root@node02-ceph-mon1 conf.d]# mv autoindex.conf{,-old}
[root@node02-ceph-mon1 conf.d]# mv userdir.conf{,-old}

4°) Générer une Clef SSL Privé et Public

[root@node02-ceph-mon1 conf.d]# cd /etc/ssl/certs/
[root@node02-ceph-mon1 certs]# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ssl.key -out ssl.crt

Country Name (2 letter code) [XX]:FR
State or Province Name (full name) []:Fontenay
Locality Name (eg, city) [Default City]:Fontenay
Organization Name (eg, company) [Default Company Ltd]:house.cpb
Organizational Unit Name (eg, section) []:house.cpb
Common Name (eg, your name or your server's hostname) []:node02-ceph-mon1.house.cpb
Email Address []:chris@house.cpb

5°) Générer un user/password pour accès dashboard

[root@node02-ceph-mon1 certs]# htpasswd -c /etc/httpd/.htpasswd chris
New password: « PASSWORD »
Re-type new password: « PASSWORD »
Adding password for user chris 

6°) Rules Firewall

[root@node02-ceph-mon1 certs]# firewall-cmd --zone=public --add-service=http --permanent
[root@node02-ceph-mon1 certs]# firewall-cmd --zone=public --add-service=https --permanent
[root@node02-ceph-mon1 certs]# firewall-cmd --reload

7°) Démarrer les services

[root@node02-ceph-mon1 certs]# systemctl enable firewalld && systemctl start firewalld
[root@node02-ceph-mon1 certs]# systemctl enable httpd && systemctl start httpd

8°) Connexion au Dashboard


Sur le Dashboard on retrouve bien notre Cluster

  • 1 Moniteur : node02-ceph-mon1
  • 4 Nœuds OSD avec une agrégation disque de 60Go (4x15Go)

Views: 9

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *