安装calamari-server
在192.168.54.100任意目录,获取calamari代码
获取源码
git clone https://github.com/ceph/calamari.git
构建rpm安装包
yum install gcc gcc-c++ postgresql-libs python-virtualenv
yum install postgresql-devel httpd checkpolicy
yum install selinux-policy-devel selinux-policy-doc selinux-policy-mls redhat-lsb-core
安装
cd calamari
./build-rpm.sh
构建完成的rpm安装包位于上一级目录
cd ../rpmbuild/RPMS/x86_64/
yum install calamari-server-1.5.2-15_g5b8fa14.el7.x86_64.rpm
安装calamari-client
1、在192.168.54.100任意目录,获取calamari-client代码,最新的calamari-client被重命名为romana了
# git clone https://github.com/ceph/romana.git
2、配置gem源使用淘宝源
# gem sources -r https://rubygems.org/
# gem sources -a https://ruby.taobao.org/
# gem sources -l
3、安装ruby npm等一些依赖项
# yum install npm ruby rubygems
# npm install -g grunt grunt-cli bower grunt-contrib-compass
# gem update --system && gem install compass
# cd romana
# make dist
4、romana目录下有admin,dashboard,login,manage 4个子目录,分别进入每个目录并执行grunt build
# cd admin
# grunt build
# cd ../dashboard
# grunt build
# cd ../login
# grunt build
# cd ../manage
# grunt build
执行成功后会在每个对应目录下生成dist目录,目录结构如下:
romana/admin/dist
romana/dashboard/dist
romana/login/dist
romana/manage/dist
5、拷贝dist到opt目录
# mkdir -p /opt/calamari/webapp/content/admin
# mkdir -p /opt/calamari/webapp/content/dashboard
# mkdir -p /opt/calamari/webapp/content/login
# mkdir -p /opt/calamari/webapp/content/manage
# cd romana
# cp -rf admin/dist/* /opt/calamari/webapp/content/admin
# cp -rf dashboard/dist/* /opt/calamari/webapp/content/dashboard
# cp -rf login/dist/* /opt/calamari/webapp/content/login
# cp -rf manage/dist/* /opt/calamari/webapp/content/manage
6、calamari是通过httpd运行的,所以重启httpd
# service httpd restart
安装diamond
1、在192.168.54.100任意目录,获取diamond代码
# git clone https://github.com/ceph/Diamond
2、生成diamond安装包
# cd Diamond
# make rpm
3、将生成的diamond-<version>.noarch.rpm复制到所有的ceph服务器142/143/144,并执行
# yum localinstall diamond-<version>.noarch.rpm
# cp /etc/diamond/diamond.conf.example /etc/diamond/diamond.conf
vim /etc/diamond/diamond.conf
将host的值改成calamari-server的主机名
# Graphite server host
host = host
# service diamond restart
4、在所有的ceph服务器上安装salt-minion:
# yum install salt-minion -y
# yum install salt-master -y
# mkdir -p /etc/salt/minion.d/
# touch /etc/salt/minion.d/calamari.conf
# 地址修改的时候注意格式
# echo "master: 192.168.54.100" > /etc/salt/minion.d/calamari.conf
# service salt-minion restart
问题
Updating rubygems-update
Fetching: rubygems-update-3.0.3.gem (100%)
ERROR: Error installing rubygems-update:
rubygems-update requires Ruby version >= 2.3.0.
ERROR: While executing gem ... (NoMethodError)
undefined method `version' for nil:NilClass
解决方案:
1.安装curl
sudo yum install curl
2. 安装RVM
curl -L get.rvm.io | bash -s stable
3.
source /usr/local/rvm/scripts/rvm
4. 查看rvm库中已知的ruby版本
rvm list known
5. 安装一个ruby版本
rvm install 2.3.3
6. 使用一个ruby版本
rvm use 2.3.3
Error fetching https://ruby.taobao.org/
问题1
The key glob '*' does not match any unaccepted keys
由于minion的IP配置错了