Skip to content

Instantly share code, notes, and snippets.

@grownseed grownseed/
Last active Dec 10, 2015

What would you like to do?
Installing Haibu for Node.js deployment

Haibu Install (CentOS)

Install Node/NPM

su - 
yum install openssl-devel gcc-c++
cd /usr/local/src
tar zxvf node-v0.8.17.tar.gz
cd node-v0.8.17
./configure && make && make install

Install Haibu

npm install haibu -g

Haibu config

Create /usr/local/lib/node_modules/haibu/config/config.json with the following contents:

  "log": {
    "logAll": true,
    "namespaces": {
      "drone": "user",
      "git": "haibu",
      "npm": "haibu",
      "plugin": "haibu",
      "repo": "haibu",
      "spawn": "haibu",
      "tar": "haibu",
      "user": "user",
      "error": "errors"
    "console": {
      "silent": true
  "directories": {
    "node-installs": "/usr/local/bin/node-installs",
    "carapace-installs": "/usr/local/bin/carapace-installs"

Support for different Node versions

Create install directories:

cd /usr/local/bin/
mkdir node-installs
mkdir carapace-installs

For each Node version required:

cd /usr/local/bin/node-installs
curl<node-version>/node-v<node-version>.tar.gz | tar --strip-components=1 -xzf - -C <node-version>
cd <node-version>
./configure --prefix=/usr/local/bin/node-installs/<node-version> && make && make install

And for Carapace:

cd /usr/local/bin/carapace-installs/haibu-carapace
mkdir <approximate-node-version>
cd <approximate-node-version>
npm install haibu-carapace@<approximate-node-version>

Deploy an application

Make sure it's stopped:

curl -H "Content-Type: application/json" -d '{"stop":{"name":"<application>"}}' -XPOST -sSN localhost:9002/drones/<application>/stop

Deploy contents of current directory:

tar -cz . | curl -XPOST -sSNT- localhost:9002/deploy/<user>/<application>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.