安装calamari-server
    在192.168.54.100任意目录,获取calamari代码

    1. 获取源码
    2. git clone https://github.com/ceph/calamari.git
    3. 构建rpm安装包
    4. yum install gcc gcc-c++ postgresql-libs python-virtualenv
    5. yum install postgresql-devel httpd checkpolicy
    6. yum install selinux-policy-devel selinux-policy-doc selinux-policy-mls redhat-lsb-core
    7. 安装
    8. cd calamari
    9. ./build-rpm.sh
    10. 构建完成的rpm安装包位于上一级目录
    11. cd ../rpmbuild/RPMS/x86_64/
    12. yum install calamari-server-1.5.2-15_g5b8fa14.el7.x86_64.rpm

    安装calamari-client

    1. 1、在192.168.54.100任意目录,获取calamari-client代码,最新的calamari-client被重命名为romana
    2. # git clone https://github.com/ceph/romana.git
    3. 2、配置gem源使用淘宝源
    4. # gem sources -r https://rubygems.org/
    5. # gem sources -a https://ruby.taobao.org/
    6. # gem sources -l
    7. 3、安装ruby npm等一些依赖项
    8. # yum install npm ruby rubygems
    9. # npm install -g grunt grunt-cli bower grunt-contrib-compass
    10. # gem update --system && gem install compass
    11. # cd romana
    12. # make dist
    13. 4romana目录下有admindashboardloginmanage 4个子目录,分别进入每个目录并执行grunt build
    14. # cd admin
    15. # grunt build
    16. # cd ../dashboard
    17. # grunt build
    18. # cd ../login
    19. # grunt build
    20. # cd ../manage
    21. # grunt build
    22. 执行成功后会在每个对应目录下生成dist目录,目录结构如下:
    23. romana/admin/dist
    24. romana/dashboard/dist
    25. romana/login/dist
    26. romana/manage/dist
    27. 5、拷贝distopt目录
    28. # mkdir -p /opt/calamari/webapp/content/admin
    29. # mkdir -p /opt/calamari/webapp/content/dashboard
    30. # mkdir -p /opt/calamari/webapp/content/login
    31. # mkdir -p /opt/calamari/webapp/content/manage
    32. # cd romana
    33. # cp -rf admin/dist/* /opt/calamari/webapp/content/admin
    34. # cp -rf dashboard/dist/* /opt/calamari/webapp/content/dashboard
    35. # cp -rf login/dist/* /opt/calamari/webapp/content/login
    36. # cp -rf manage/dist/* /opt/calamari/webapp/content/manage
    37. 6calamari是通过httpd运行的,所以重启httpd
    38. # service httpd restart

    安装diamond

    1. 1、在192.168.54.100任意目录,获取diamond代码
    2. # git clone https://github.com/ceph/Diamond
    3. 2、生成diamond安装包
    4. # cd Diamond
    5. # make rpm
    6. 3、将生成的diamond-<version>.noarch.rpm复制到所有的ceph服务器142/143/144,并执行
    7. # yum localinstall diamond-<version>.noarch.rpm
    8. # cp /etc/diamond/diamond.conf.example /etc/diamond/diamond.conf
    9. vim /etc/diamond/diamond.conf
    10. host的值改成calamari-server的主机名
    11. # Graphite server host
    12. host = host
    13. # service diamond restart

    4、在所有的ceph服务器上安装salt-minion:

    1. # yum install salt-minion -y
    2. # yum install salt-master -y
    3. # mkdir -p /etc/salt/minion.d/
    4. # touch /etc/salt/minion.d/calamari.conf
    5. # 地址修改的时候注意格式
    6. # echo "master: 192.168.54.100" > /etc/salt/minion.d/calamari.conf
    7. # service salt-minion restart

    问题

    1. Updating rubygems-update
    2. Fetching: rubygems-update-3.0.3.gem (100%)
    3. ERROR: Error installing rubygems-update:
    4. rubygems-update requires Ruby version >= 2.3.0.
    5. ERROR: While executing gem ... (NoMethodError)
    6. undefined method `version' for nil:NilClass

    解决方案:

    1. 1.安装curl
    2. sudo yum install curl
    3. 2. 安装RVM
    4. curl -L get.rvm.io | bash -s stable
    5. 3.
    6. source /usr/local/rvm/scripts/rvm
    7. 4. 查看rvm库中已知的ruby版本
    8. rvm list known
    9. 5. 安装一个ruby版本
    10. rvm install 2.3.3
    11. 6. 使用一个ruby版本
    12. rvm use 2.3.3
    1. Error fetching https://ruby.taobao.org/

    问题1

    1. The key glob '*' does not match any unaccepted keys
    2. 由于minionIP配置错了