Build package and Install Calamari on Debian Weezy

Calamari is a management and monitoring service for Ceph, exposing a high level REST API.

The purpose of this is to document how to compile, install and configure Calamari, recently released under GPL license.

Screen Shot 2014-07-06 at 10.16.24 PM

 

calamari_workbench_with_pg_state_filtering

This document is divided in parts.

Part 1: Build package Calamari Server
Part 2: Build package Calamari Clients
Part 3: Build package Diamond
Part 4: Install Calamari Server and Clients
Part 5: Install Diamond on CEPH Monitors and Nodes

Part 1: Build package Calamari Server

Install calamari server dependencies

apt-get install -y git-core curl build-essential openssl libssl-dev ruby-compass

Build and install Node, Calamari need version 0.10.10

cd /root/
git clone https://github.com/joyent/node.git
cd node
git checkout v0.10.10
./configure
make -j4
make install

Build and install NPM

mkdir /root/npm
cd /root/npm
wget –no-check-certificate https://npmjs.org/install.sh
sh install.sh

Install bower
npm install -g bower

Install coffee-script
npm install -g coffee-script

Install grunt-cli
npm install -g grunt-cli

Upgrade ruby compass, because isn’t compatible with bootstrap used by Calamari
gem install compass

Upgrade ruby sass, because isn’t compatible with bootstrap used by Calamari
gem install sass

Prepare to build Calamari Server packages

Install dev packages

apt-get -y install libcairo2-dev python-pip libpq-dev python-dev python-virtualenv
cd /root
git clone https://github.com/ceph/calamari.git
cd calamari

Before continue, we need remove file format, follow this steps and we continue
cd debian
mv source source.old
cd ..
dpkg-buildpackage

Run this command and can get a cup coffee 🙂

After compiling, we’ll have the calamari-server package

ls -lhart ../calamari-server_1.0.0-1_all.deb

Part 2: Build package Calamari Clients

Now we compile the calamari-clients, which is the GUI Server Calamari

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

Install package dependency
apt-get install rubygems

Hack Makefile to build this package, i don’t know why developer hardcoded this, but in my environment works fine

Edit Makefile and change this variable

From:
UBUNTU = $(shell if [ `lsb_release -is` = “Ubuntu” ] ; then echo ‘y’ ; else echo ‘n’; fi)

To:
UBUNTU = “y”

Build package
dpkg-buildpackage

During execution you will be asked, I answered “no”

[?] May bower anonymously report usage statistics to improve the tool over time? No

Run this command and can get another coffee 🙂

After compiling, we’ll have the calamari-clients package

ls -lhart ../calamari-clients_1.0.0-616-gf17527d_all.deb

Part 3: Build package Diamond

cd /root
git clone https://github.com/ceph/Diamond.git –branch=calamari
cd Diamond
Instal package dependencies

apt-get install python-mock python-configobj cdbs
dpkg-buildpackage

After compiling, we’ll have the calamari-clients package

ls -lhart ../diamond_3.1.0_all.deb

Part 4: Install Calamari Server and Clients

Configure Saltstack debian repository

echo “deb http://debian.saltstack.com/debian wheezy-saltstack main”  >/etc/apt/sources.list.d/saltstak.list
wget -q -O- “http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key” | apt-key add –
apt-get update

Install salt
apt-get install -y salt-common salt-master salt-minion

Install Apache and PostgreSQL
apt-get install -y apache2 libapache2-mod-wsgi libcairo2 supervisor python-cairo libpq5 postgresql

Install Calamari Server
cd /root
dpkg -i calamari-server_1.0.0-1_all.deb

Install Calamari Clients
dpkg -i calamari-clients_1.0.0-616-gf17527d_all.deb

Hacking calamari-ctl, i don’t know why calamari-ctl try  use ‘/usr/bin/python‘ instead of ‘/opt/calamari/venv/bin/python’,
because this, we need edit file /usr/bin/calamari-ctl and make this change

From:
#! /usr/bin/python

To:
#!/opt/calamari/venv/bin/python

Initialize Calamari Server

/usr/bin/calamari-ctl initialize

Create First Username
[INFO] Loading configuration..
[INFO] Initializing database…
[INFO] Initializing web interface…
[INFO] You will now be prompted for login details for the administrative user account.  This is the account you will use to log into the web interface once setup is complete.
Username (leave blank to use ‘root’):
Email address: marcosmamorim@gmail.com
Password:
Password (again):
Superuser created successfully.
[INFO] Restarting services…
[INFO] Complete.

Now you can access your Calamari Server, but you need install and configure Diamond on CEPH Monitors and/or Nodes

http://YOUR_IP_ADDRESS/

Part 5: Install Diamond on CEPH Monitors and Nodes

Deploy Diamond on your node, if you using ceph-deploy version before 0.82 (this is my case), you must install diamond in your Monitors and Nodes

Copy diamond Debian package to all nodes and monitors

Access you node/monitor, install dependencies

Configure Saltstack repository

echo “deb http://debian.saltstack.com/debian wheezy-saltstack main”  >/etc/apt/sources.list.d/saltstak.list
wget -q -O- “http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key” | apt-key add –
apt-get update

Install salt-minion
apt-get -y install salt-minion

Install IPVSADM

To send IOPS and others information to Calamari Server, we need install ipvsadm and create link

apt-get -y install ipvsadm

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

Install diamond
dpkg -i diamond_3.1.0_all.deb

Configure Salt
echo “master: YOUR_CALAMARI_SERVER_IP” >/etc/salt/minion.d/calamari.conf

Restart salt-minion services
/etc/init.d/salt-minion restart

Return to Calamari Web Interface and approve this server.

Repeat install diamond step to all monitor and nodes, and have funny.

Anúncios

12 Comments

  1. Hi Mr.Marcos thanks for your great tutorial,
    but how graph cluster, storage usage and iops in dashboard does not appear

    in log calamari
    metric_access – django.request No graphite data for ceph.cluster
    total_space,total_avail,total_used

    Responder

    1. Hi Mr. Abdi, Thanks for read. I don’t know what’s happening, what’s is your distribuition?

      Responder

    1. Abdi, thanks and sorry for my delay, to fix the problem do this on your nodes

      apt-get -y install ipvsadm
      ln -s /sbin/ipvsadm /usr/bin/ipvsadm

      Responder

  2. and calamari = server and client update ver 1.2 in github,
    can you update tutorial, i can’t install/rebuilt package calamari client
    thnks

    Responder

  3. root@ceph-mon:~# ceph-deploy calamari connect virt-master virt-node-02 virt-node-03
    [ceph_deploy.conf][DEBUG ] found configuration file at: /root/.cephdeploy.conf
    [ceph_deploy.cli][INFO ] Invoked (1.5.11): /usr/bin/ceph-deploy calamari connect virt-master virt-node-02 virt-node-03
    [ceph_deploy][ERROR ] RuntimeError: no calamari-minion repo found

    Responder

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s