stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lasindu Charith <>
Subject Re: Convention for including Puppet forge's modules in Stratos
Date Sun, 03 Aug 2014 01:49:48 GMT
Hi devs,

I was able to create the nodejs cartridge using the puppet labs module [1
<>] and write an extension to
manage the nodejs applications. It has following features

   - Supports installing Node and NPM (Package Manager) in many Debian and
   RedHat distributions. Currently Stratos mainly supports Debian/Ubuntu and
   if we are to move into other OS's, this will be a useful feature in the
   - Downloads and installs all the required dependencies specified in the
   package.json file in any nodejs application via npm.
   - Downloads and installs Forever [2
   <>] which will manage keeping the
   application alive and make sure applications run continuously with updates
   take in place. There are several other process managers available like pm2 [
   3 <>] with more features which can be used
   as well.
   - Reads the main js file from the package.json and starts the
   application using forever. This way, there's no need of modifying the
   nodejs application, if it has followed the standard nodejs application

Yet I have following concerns when it comes to Nodejs specific applications.

   1. The nodejs application itself defines the ports in use. This may
   create problems in specifying the cartridge definition prior to the
   deployment. The port to be listened has to be specified correctly in the
   cartridge definition in order for a particular instance to be activated
   2. Since we only can specify a single cartridge definition per service
   type, all the ports which will be used by the nodejs application has to be
   pre-defined/pre-known and at the time of defining the cartridge definition.
   Also instance might hang up waiting, listing to the ports which are
   currently not used.
   3. Monitoring the health would also be difficult.
   4. Deploying multiple applications using the same git repository could
   be done. But will have to use a separate configuration file to specify
   which/how to start those applications specifically. Also the necessary
   ports have to be specified in the definition prior to the deployment.

Please let me know any specifics/suggestions which I can use to overcome
the above issues.



On Sun, Jul 27, 2014 at 5:54 PM, Lakmal Warusawithana <>

> On Sun, Jul 27, 2014 at 5:49 PM, Lasindu Charith <> wrote:
>> Hi,
>> I'm trying to re-create(modify) Nodejs cartridge for Stratos. When going
>> through the PuppetLabs's forge, I found there are several nodejs puppet
>> modules in forge, even a module from puppet enterprise itself with Apache
>> 2.0 licence as well. There are many puppetlabs/puppet enterprise supported
>> modules [1
>> <>]
>> which are compatible with several OS's and are quite popular among puppet
>> community.
>> So I was wondering what if we can include at-least most common puppet
>> enterprise supported modules inside stratos without re-inventing the wheel
>> out of the box.
> +1 Lasindu. If you have time, please see what we can bring other generic
> software as cartridges.
>> Is there a convention to be used ? or anyone tried using them?
>> I tried replacing the existing nodejs module inside Stratos and it worked
>> fine as expected.
>> [1]
>> Thanks,
>> --
>> *Lasindu Charith*
>> Software Engineer, WSO2 Inc.
>> Mobile: +94714427192
>> Web:
> --
> Lakmal Warusawithana
> Vice President, Apache Stratos
> Director - Cloud Architecture; WSO2 Inc.
> Mobile : +94714289692
> Blog :

*Lasindu Charith*
Software Engineer, WSO2 Inc.
Mobile: +94714427192

View raw message