Ceph是一款开源的SDS软件,对于开源安装好可以只是完成了第一步,后面的监控运维才是重点;要想直观的了解集群的运行状态,监控软件也就必不可少了,而对于Ceph的监控用得比较多的有Zabbix,inkScope,Calamari等。下文将详细说明Calamari在CentOS 7上的安装过程。
获取Calamari源码包
#> git clone https://github.com/ceph/calamari.git
#> git clone https://github.com/ceph/calamari-clients.git
#> git clone https://github.com/ceph/Diamond
构建calamari server的rpm包
#> cd calamari
#> yum remove prelink //避免安装时出现cpio Dismatch 错误
#> ./build-rpm.sh
构建完成后会在父目录下的rpmbuild目录路径下生成rpm安装包
安装calamari server
#> cd .. //从calamari目录退出到父目录
#> yum localinstall rpmbuild/RPMS/x86_64/calamari-server-1.3.1.1-101_g945d16a.el6.x86_64.rpm
构建及安装calamari client
安装依赖
#> yum install npm ruby rubygems ruby-devel
#> npm install -g grunt grunt-cli bower grunt-contrib-compass
#> gem update --system && gem install compass
如果由于网络原因,gem源更新失败,请按如下方式处理:
#> gem sources
#> gem sources -r https://rubygems.org/
#> gem sources -a https://ruby.taobao.org/
#> gem sources -u
编译并安装calamari client
#> cd calamari-clients
#> make build-real
#> make dist //会在上级目录生成 calamari-clients_1.2.2.tar.gz tar包
#> cd .. //返回calamari-client父目录
#> tar -zxvf calamari-clients_1.2.2.tar.gz //解压
#> mkdir -p /opt/calamari/webapp/content //创建目录
#> cd calamari-clients-1.2.2
//拷贝内容到下述目录
#>for dir in manage admin login dashboard
do
mkdir -p /opt/calamari/webapp/content/"$dir"
cp -pr "$dir"/dist/* /opt/calamari/webapp/content/"$dir"/
done
如果make build-real
过程中出现如下因为网络原因下载依赖包失败的问题,请将对应文件中的依赖包下载地址替换为一个可用url,举例如下:
phantomjs@1.9.18 install /datapool/calamari-clients/manage/node_modules/karma-phantomjs-launcher/node_modules/phantomjs //install.js目录
> node install.js
Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
Saving to /datapool/calamari-clients/manage/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Receiving...
Error making request.
Error: connect ETIMEDOUT //GFW导致的下载超时
at errnoException (net.js:905:11)
at Object.afterConnect [as oncomplete] (net.js:896:19)
上述错误提示下载依赖包phantomjs-1