var util = require('util'),
    log = require('czagenda-log').from(__filename),
    Container = require('../container').Container;
    

var Node = function Node() {
  Container.apply(this,Array.prototype.slice.call(arguments));
  
};
util.inherits(Node, Container);

Node.prototype.getSetupTasks = function () {
	return [this.installNode.bind(this)];
}

Node.type = 'node';

Node.prototype.installNode = function(callback) {
     log.info('Install node');
     this.exec( [
        'apt-get update',
        'apt-get -y install build-essential',
        'apt-get -y install git libssl-dev curl',
        'cd /root/',
        'wget http://nodejs.org/dist/node-v0.4.12.tar.gz',
        'tar -zxf node-v0.4.12.tar.gz',
        'cd node-v0.4.12',
        './configure',
        'make',
        'make install',
        'cd /root/',
        'rm -Rf node-*',
        'curl http://npmjs.org/install.sh | clean=no sh'
        ].join(' && '), null,function(err,res) {
          if(err) {
            log.warning('Node install failed',err);
            callback(err);
            return;
          }
          log.info('Node install done');
          
          callback();
          
      }.bind(this));    
}
exports.Container = Node
@@ -224,17 +224,72 @@
 ts));%0A  
+this.ostemplate = 'debian-6.0-standard_6.0-4_i386-node'
 %0A
-
 %7D;%0Autil.
@@ -315,17 +315,19 @@
 ainer);%0A
+/*
 %0A
-
 Node.pro
@@ -404,16 +404,18 @@
 is)%5D;%0A%7D%0A
+*/
 %0ANode.ty
@@ -428,16 +428,17 @@
 node';%0A%0A
+%0A
 Node.pro

install node container from dedicated openvz template