ceph 性能監控calamair在ubuntu14.04上的安裝部署

系統版本選擇:

root@calamari-ubuntu:~# lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 14.04.3 LTS

Release: 14.04

Codename: trusty

root@calamari-ubuntu:~# 


注:千萬不要用14.04.4 LTS


#ubuntu-server 14.04-tls 手動安裝 ceph calamari 

#構建 Calamari Server 安裝包

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

#一. 編譯 Calamari Server 的安裝包

#安裝依賴包:

apt-get update

apt-get install -y git-core curl build-essential openssl libssl-dev ruby-compass rubygems-integration devscripts debhelper


#編譯和安裝 Node:

cd /root/ 

git clone https://github.com/nodejs/node.git

cd node

./configure

make -j4

make install



#編譯和安裝 NPM:

mkdir /root/npm

cd /root/npm

wget --no-check-certificate https://npmjs.org/install.sh

sh install.sh


#安裝 bower

npm install -g bower

#安裝 coffee-script

npm install -g coffee-script

#安裝 grunt-cli

npm install -g grunt-cli

#由於 Calamari 不兼容 bootstrap,需要升級 ruby compass ,此步耗時較長

gem install compass

#由於 Calamari 不兼容 bootstrap,需要升級 ruby sass

gem install sass


#準備編譯 Calamari Server 的依賴包:

apt-get -y install libcairo2-dev python-pip libpq-dev python-dev python-virtualenv ruby-dev

apt-get install python-msgpack -y


cd /root

git clone https://github.com/ceph/calamari.git

cd calamari


cd debian

mv source source.old

cd ..


################以下部分檢查一下如果已經更改就不用更改了#########################

#vim ./repobuild/conf/trusty/upstream.packages

#vim ./repobuild/conf/wheezy/upstream.packages

#vim ./repobuild/conf/precise/upstream.packages

#均把 msgpack-python 修改爲 python-msgpack

##################################################################################

#有時可能會卡住,因爲會從國外網站下載一些東西,重複執行一下就可以了

dpkg-buildpackage

#編譯完成後,在~/目錄下會看到 calamari-server 的 deb 包(編譯過程會下載不少的包,耐心等待)


####以下用

vim calamari/debian/debian/calamari-server.substvars

修改 python-msgpack-python 爲 python-msgpack







#二. 編譯 Calamari Client 的安裝包

#開始構建 calamari clients 的安裝包:

cd /root

git clone https://github.com/ceph/calamari-clients.git

cd calamari-clients

tar zcvf calamari-clients-build-output.tar.gz *

dpkg-buildpackage

#編譯完成後在~/目錄會看到 calamari-clients 的安裝包。




#三. 編譯 Diamond 的安裝包

#構建 Diamond 安裝包

cd /root

git clone https://github.com/ceph/Diamond.git --branch=calamari

cd Diamond

apt-get install python-mock python-configobj cdbs python-support -y

dpkg-buildpackage


四. 安裝 Calamari Server 和 Clients

#安裝 salt-master,因爲calamari對salt的版本是有要求的,版本太高圖形顯示會有問題,所以需要安裝以下版本的salt

sudo apt-get install software-properties-common -y

sudo add-apt-repository ppa:saltstack/salt2014-7

sudo apt-get update  -y

sudo apt-get -y install salt-master

sudo apt-get -y install salt-minion


echo "master: 192.168.10.5" >/etc/salt/minion.d/calamari.conf

/etc/init.d/salt-minion restart


#安裝 Apache 和 PostgreSQL:

apt-get install -y apache2 libapache2-mod-wsgi libcairo2 supervisor python-cairo libpq5 postgresql


#安裝 Calamari Server:

cd /root

dpkg -i calamari-server_1.0.0-1_amd64.deb

#出現以下提示:

root@calamari-ubuntu:~# dpkg -i calamari-server_1.0.0-1_amd64.deb

Selecting previously unselected package calamari-server.

(Reading database ... 70510 files and directories currently installed.)

Preparing to unpack calamari-server_1.0.0-1_amd64.deb ...

Unpacking calamari-server (1.0.0-1) ...

dpkg: dependency problems prevent configuration of calamari-server:

 calamari-server depends on salt-minion; however:

  Package salt-minion is not installed.

 calamari-server depends on python-twisted; however:

  Package python-twisted is not installed.

 calamari-server depends on python-txamqp; however:

  Package python-txamqp is not installed.

 calamari-server depends on python-sqlalchemy; however:

  Package python-sqlalchemy is not installed.

 calamari-server depends on python-gevent; however:

  Package python-gevent is not installed.

 calamari-server depends on python-msgpack-python; however:

  Package python-msgpack-python is not installed.

 calamari-server depends on python-greenlet; however:

  Package python-greenlet is not installed.


dpkg: error processing package calamari-server (--install):

 dependency problems - leaving unconfigured

Errors were encountered while processing:

 calamari-server

root@calamari-ubuntu:~# 


#安裝對應的依賴包:

apt-get -f install -y

apt-get install python-msgpack -y


重新編譯:

#有時可能會卡住,因爲會從國外網站下載一些東西,重複執行一下就可以了

cd calamari

dpkg-buildpackage

#編譯完成後,在~/目錄下會看到 calamari-server 的 deb 包(編譯過程會下載不少的包,耐心等待)



#再次執行:

dpkg -i calamari-server_1.0.0-1_amd64.deb

#安裝 Calamari Clients:

dpkg -i calamari-clients_1.0.0-616-gf17527d_all.deb


初始化 Calamari Server:

/usr/bin/calamari-ctl initialize


此時,雖然已經初始化了,但是還未完成得(這個明顯是官方有 bug):

cd   ~/calamari-clients/debian/calamari-clients/login

make

cp -r dist /opt/calamari/webapp/content/login

cd   ~/calamari-clients/debian/calamari-clients/manage

make

cp -r dist /opt/calamari/webapp/content/manage

cd   ~/calamari-clients/debian/calamari-clients/dashboard

make

cp -r dist /opt/calamari/webapp/content/dashboard

cd   ~/calamari-clients/debian/calamari-clients/admin

make

cp -r dist /opt/calamari/webapp/content/admin

此時可以打開 http://ip/,瀏覽頁面:




五. 在 Ceph 的 mon 和 osd 安裝 Diamond 包

安裝 IPVSADM:

如果需要發送 IOPS 和其他監控信息去 Calamari Server,需要安裝 ipvsadm:

apt-get -y install ipvsadm

ln -s /sbin/ipvsadm /usr/bin/ipvsadm

安裝 diamond:

apt-get install python-support

dpkg -i diamond_3.1.0_all.deb





二. 安裝 salt-master,因爲calamari對salt的版本是有要求的,版本太高圖形顯示會有問題,所以需要安裝以下版本的salt

sudo apt-get install software-properties-common

sudo add-apt-repository ppa:saltstack/salt2014-7

sudo apt-get update  -y

sudo apt-get -y install salt-master

sudo apt-get -y install salt-minion


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章