Compiling Calamari for Ceph on Ubuntu 14.04

In Development, Linux Tutorials, Technology

Compiling Calamari for Ceph on Ubuntu 14.04

Compiling Calamari for Ceph on Ubuntu 14.04 is a bit involved. Calamari is the enterprise GUI for Ceph storage by Inktank. They recently made it open source and you can find the github here. Prior to the release as open source a few weeks ago, Calamari was an enterprise only product. It really adds enterprise ease of management to Ceph storage and makes a valuable asset to any Ceph deployment.

Preparing Dependencies

The first step in the process is to install all the dependencies. I find it easier to do builds on a fresh VM. You can get an Ubuntu 14.04 VM here if you need one. Otherwise lets move on to installing the dependencies. First we need to add the saltstack PPA.

Then:

and:

Now we need to install the saltstack packages:

You are also going to have to add the PostgreSQL repository. Create and edit the PostgreSQL repository by running the command below:

Add this line to the file:

Download & import the repository key:

Update your system:

Now you have all the repositories in place to install the dependencies. Just run this command:

This might take a minute or two, so go grab a cup of tea while you wait. After the process completes its time to start compiling the other dependencies. We now need to build and install Node version 0.10.10 for Calamari.

We will also need to build and install NPM.

Now we will install more dependencies using NPM.

The remaining dependencies we can install using Gem.

Now you have all the dependencies installed and you are ready to start compiling.

Building Calamari-Server

Alright! You made it. It took a while for me to figure out all the dependencies as the documentation out there is very spotty. I hope the section above made it somewhat painless for you. Now it’s time to compile the calamari-server package. For that we need to clone the repository.

Before we continue there is one small change that needs to be made, we need to remove the file format, then it is safe to begin the build using dpkg-buildpackage. You can go a glass of water.

The .deb will output in the parent directory (~/ in this case).

Building Calamari-Clients

Now we can compile calamari-clients. This process is simple since all the dependencies are already installed.

This will output a platform agnostic version of the package into the ~/calamari-clients/dashboard/dist/ ,  ~/calamari-clients/admin/dist/ , ~/calamari-clients/manage/dist/  and  ~/calamari-clients/login/dist/  directories. When you install this, you’ll want to copy the dist/ for each of those to the  /opt/calamari/webapp/content/dashboard  directories respectively. Example:

There is going to be a separate article for installing Calamari on Ubuntu 14.04. However this part wasn’t too clear in the documentation so I figure I’d specify it here.

Building Diamond (Calamari Branch)

Next we are going to clone and compile the Calamari branch of Diamond. Diamond helps provide IOPS and other data to your Calamari Interface, compilation is simple.

Now you’ll have a .deb of diamond in the parent directory (~/).

Conclusion

Now you have all the software you need to deploy Calamari on Ubuntu 14.04 to manage your Ceph cluster in a fancy GUI. In the next section I will give sources if you weren’t able to compile successfully. I will update a link here when the next article is complete. Thanks for reading, leave your thoughts in the comments below.

23 Comments

  1. Hi great details until the calamari-client section, I am getting lots of errors on the build-real.

    Any ideas , this is being buiilt on Ubuntu14.04.1 with
    root@calamari:/root/calamari-clients# ./get-versions.sh
    VERSION=1.2.1 REVISION=27-g9eb09d5

    root@calamari:/root/calamari-clients# make build-real
    building ui
    set -e ;\
    for d in manage admin login dashboard; do \
    echo $d; cd $d; make build; cd .. ; \
    done
    manage
    make[1]: Entering directory /root/calamari-clients/manage'
    npm install --loglevel warn
    npm WARN package.json manage@0.0.0 No repository field.
    npm WARN deprecated grunt-ngmin@0.0.3: use grunt-ng-annotate instead
    npm WARN deprecated ngmin@0.4.1: use ng-annotate instead
    |
    > phantomjs@1.9.7-15 install /root/calamari-clients/manage/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
    > node install.js

    module.js:340
    throw err;
    ^
    Error: Cannot find module '/root/calamari-clients/manage/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/install.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
    npm ERR! phantomjs@1.9.7-15 install:
    node install.js`
    npm ERR! Exit status 8
    npm ERR!
    npm ERR! Failed at the phantomjs@1.9.7-15 install script.
    npm ERR! This is most likely a problem with the phantomjs package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! node install.js
    npm ERR! You can get their info via:
    npm ERR! npm owner ls phantomjs
    npm ERR! There is likely additional logging output above.

    npm ERR! System Linux 3.13.0-35-generic
    npm ERR! command “node” “/usr/local/bin/npm” “install” “–loglevel” “warn”
    npm ERR! cwd /root/calamari-clients/manage
    npm ERR! node -v v0.10.10
    npm ERR! npm -v 1.4.27
    npm ERR! code ELIFECYCLE

  2. I can resolve phantomjs.org okay , just not sure why it is still failing ,

  3. I followed everything exactly as detailed.
    I might restart things again and make sure everything else goes correctly.

    • Hi, did you get any further with this? I have the same issue with:

      Error: Cannot find module ‘/root/calamari-clients/manage/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/install.js’

      Among other ‘cannot find’ issues.

      I have been through process a few times. but am unable to spot what i have missed for building the clients. I have no prior experience with node/npm etc. thanks

  4. Has this worked for anyone else recently? I’m hitting the same issue as Martin. Giving myself a crash course in node modules right now to try and sort it out.

    • HI
      I didn’t get any more chances to resolve this. I kept getting the same error.
      Strangely after I got all the errors after “sudo make build-real” I repeated the command a second time (just to see what happens) and it seemed to go a lot further , only throwing 1 error at the end. I must revisit this again soon.

      Done, without errors.
      Warning: Running “htmlmin:dist” (htmlmin) task
      Warning: Unable to create directory “/root/calamari-clients/login/dist” (Error code: EEXIST). Use –force to continue.

      Aborted due to warnings. Use –force to continue.

      Aborted due to warnings.
      make[1]: *** [build-stamp] Error 6
      make[1]: Leaving directory `/root/calamari-clients/login’
      make: *** [build-ui] Error 2
      administrator@calamari:/root/calamari-clients

  5. I had the same errors:

    Warning: Running “htmlmin:dist” (htmlmin) task
    Warning: Unable to create directory “/root/calamari-clients/login/dist” (Error code: EEXIST). Use –force to continue.

    Aborted due to warnings. Use –force to continue.

    I finally did a

    make clean-real

    then ran

    make build-real

    again and it finished without errors.

  6. it’s a very interesting article…i’m hope you post’it de next part for calamari’s installation on ubuntu…if you can ,sent me information about it, i will be very gratiful…i develop ceph with that and i can’t found information about that…thanks

  7. I also had the phantomjs error – The tutorial suggests to do all as root – but it seems like somewhere in the install npm falls back to the user, so that it cannot access the folder any more.
    For me moving the whole calamari-clients folder to a user dir, chowning and running make build-real again solved all my problems.

  8. hi
    your good posting
    but i have error
    ——————————————————————————————————-
    npm ERR! Linux 3.13.0-32-generic
    npm ERR! argv “node” “/usr/local/bin/npm” “install” “–loglevel” “warn”
    npm ERR! node v0.10.10
    npm ERR! npm v2.3.0
    npm ERR! code ETARGET

    npm ERR! notarget No compatible version found: yo@’>=1.0.0 <1.1.0'
    npm ERR! notarget Valid install targets:
    npm ERR! notarget ["1.1.0","1.1.1","1.1.2","1.2.0","1.2.1","1.3.0","1.3.2","1.3.3","1.4.1","1.4.2","1.4.4","1.4.5"]
    npm ERR! notarget
    npm ERR! notarget This is most likely not a problem with npm itself.
    npm ERR! notarget In most cases you or one of your dependencies are requesting
    npm ERR! notarget a package version that doesn't exist.

    npm ERR! Please include the following file with any support request:
    npm ERR! /root/calamari-clients/admin/npm-debug.log
    make[1]: *** [build-stamp] Error 1
    make[1]: Leaving directory `/root/calamari-clients/admin'
    make: *** [build-ui] Error 2
    —————————————————————————————————

    help me plz

  9. hi
    your good posting
    but i have error
    ——————————————————————————————————-
    npm ERR! Linux 3.13.0-32-generic
    npm ERR! argv “node” “/usr/local/bin/npm” “install” “–loglevel” “warn”
    npm ERR! node v0.10.10
    npm ERR! npm v2.3.0
    npm ERR! code ETARGET

    npm ERR! notarget No compatible version found: yo@’>=1.0.0 <1.1.0'
    npm ERR! notarget Valid install targets:
    npm ERR! notarget ["1.1.0","1.1.1","1.1.2","1.2.0","1.2.1","1.3.0","1.3.2","1.3.3","1.4.1","1.4.2","1.4.4","1.4.5"]
    npm ERR! notarget
    npm ERR! notarget This is most likely not a problem with npm itself.
    npm ERR! notarget In most cases you or one of your dependencies are requesting
    npm ERR! notarget a package version that doesn't exist.

    npm ERR! Please include the following file with any support request:
    npm ERR! /root/calamari-clients/admin/npm-debug.log
    make[1]: *** [build-stamp] Error 1
    make[1]: Leaving directory `/root/calamari-clients/admin'
    make: *** [build-ui] Error 2
    —————————————————————————————————

    help me plz

    ————————————-
    https://github.com/ceph/calamari-clients/commit/0cbcfbaa791baa3ee25c4f1a135f005c1d568512

    edit calamari-clients/admin/package.json & calamari-clients/login/package.json
    and change

    "connect-livereload": "~0.2.0",
    "grunt-google-cdn": "~0.2.0",
    "grunt-ngmin": "~0.0.2",
    – "yo": "~1.0.0", <—————————— from this
    + "yo": "~1.1.0", <—————————— to this
    "generator-angular": "0.4.0",
    "grunt-git-describe": "~2.3.2"
    },

    and run build again.

  10. I’m running VERSION=1.2.2 REVISION=28-gcead506
    and I get the same error. Follow all the article steps
    npm install –loglevel warn
    npm WARN package.json admin@0.0.0 No repository field.
    npm WARN deprecated grunt-ngmin@0.0.3: use grunt-ng-annotate instead
    npm ERR! Linux 3.13.0-24-generic
    npm ERR! argv “node” “/usr/local/bin/npm” “install” “–loglevel” “warn”
    npm ERR! node v0.10.10
    npm ERR! npm v2.5.0
    npm ERR! code ETARGET

    npm ERR! notarget No compatible version found: yo@’>=1.0.0 <1.1.0'
    npm ERR! notarget Valid install targets:
    npm ERR! notarget ["1.1.0","1.1.1","1.1.2","1.2.0","1.2.1","1.3.0","1.3.2","1.3.3","1.4.1","1.4.2","1.4.4","1.4.5"]
    npm ERR! notarget
    npm ERR! notarget This is most likely not a problem with npm itself.
    npm ERR! notarget In most cases you or one of your dependencies are requesting
    npm ERR! notarget a package version that doesn't exist.

    npm ERR! Please include the following file with any support request:
    npm ERR! /root/calamari-clients/admin/npm-debug.log
    make[1]: *** [build-stamp] Error 1
    make[1]: Leaving directory `/root/calamari-clients/admin'
    make: *** [build-ui] Error 2

  11. Hi all,

    thank’s for the detailed howto. Everything went well, but at the point to compile the deb-package I got this message:

    ich@ubu1404:~/calamari$ sudo dpkg-buildpackage
    dpkg-buildpackage: Quellpaket calamari
    dpkg-buildpackage: Quellversion 1.0.0-1
    dpkg-buildpackage: Quelldistribution precise
    dpkg-buildpackage: Quellen geändert durch Gary Lowell
    dpkg-buildpackage: Host-Architektur amd64
    dpkg-source –before-build calamari
    dpkg-checkbuilddeps: Nicht erfüllte Bauabhängigkeiten: libcairo2-dev
    dpkg-buildpackage: Warnung: Bauabhängigkeiten/-konflikte nicht erfüllt; Abbruch
    dpkg-buildpackage: Warnung: (Verwenden Sie -d, um sich darüber hinwegzusetzen.)

    Sorry, for the german text.

    The main failure is a unresolved depency with libcairo2-dev. When I try to install libcairo2-dev the next error start:

    ich@ubu1404:~/calamari$ sudo apt-get install libcairo2-dev
    Paketlisten werden gelesen… Fertig
    Abhängigkeitsbaum wird aufgebaut.
    Statusinformationen werden eingelesen…. Fertig
    Einige Pakete konnten nicht installiert werden. Das kann bedeuten, dass
    Sie eine unmögliche Situation angefordert haben oder, wenn Sie die
    Unstable-Distribution verwenden, dass einige erforderliche Pakete noch
    nicht erstellt wurden oder Incoming noch nicht verlassen haben.
    Die folgenden Informationen helfen Ihnen vielleicht, die Situation zu lösen:

    Die folgenden Pakete haben unerfüllte Abhängigkeiten:
    libcairo2-dev : Hängt ab von: libglib2.0-dev soll aber nicht installiert werden
    E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.

    Here the result when I try to install libglib2.0-dev:

    ich@ubu1404:~/calamari$ sudo apt-get install libglib2.0-dev
    Paketlisten werden gelesen… Fertig
    Abhängigkeitsbaum wird aufgebaut.
    Statusinformationen werden eingelesen…. Fertig
    Einige Pakete konnten nicht installiert werden. Das kann bedeuten, dass
    Sie eine unmögliche Situation angefordert haben oder, wenn Sie die
    Unstable-Distribution verwenden, dass einige erforderliche Pakete noch
    nicht erstellt wurden oder Incoming noch nicht verlassen haben.
    Die folgenden Informationen helfen Ihnen vielleicht, die Situation zu lösen:

    Die folgenden Pakete haben unerfüllte Abhängigkeiten:
    libglib2.0-dev : Hängt ab von: libglib2.0-0 (= 2.40.0-2) aber 2.40.2-0ubuntu1 soll installiert werden
    Hängt ab von: libglib2.0-bin (= 2.40.0-2)
    E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.

    And so on and so on. Has anybody a good solution?
    Thank you in advance for your help.

  12. output file is calamari-server_1.0.0-1_amd64.deb. Not the latest 1.3.0.1? 🙁

  13. Managed to successfully get through compiling a version of Calamari and installing it for Ubuntu 14.04 (bit of a marathon) via your very helpful blog post. Have the following message appearing after successfully logging into Calamari remotely:

    ———————————————
    New Calamari Installation
    This appears to be the first time you have started Calamari and there are no clusters currently configured.

    Calamari server is ready to start monitoring your Ceph servers. Please use the ceph-deploy calamari connect [nodes] command to connect your Ceph servers to Calamari.
    ———————————————

    When attempting to register a Ceph cluster via “ceph-deploy” it doesn’t recognise the “calamari” action argument. Below is the following error message:

    ceph-deploy: error: argument COMMAND: invalid choice: ‘calamari’ (choose from ‘new’, ‘install’, ‘mds’, ‘mon’, ‘gatherkeys’, ‘disk’, ‘osd’, ‘admin’, ‘config’, ‘uninstall’, ‘purgedata’, ‘purge’, ‘forgetkeys’, ‘pkg’)

    Looks as though Calamari doesn’t check to see if the version of “ceph-deploy” installed meets the minimum version that is required. Is there a newer stable version of “ceph-deploy” that can be installed which recognises the “calamari” action argument?

Submit a comment