Forge Home

pm2

Manage Nodejs Apps with PM2

16,093 downloads

11,168 latest version

0.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.0.8 (latest)
  • 0.0.7
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Oct 2nd 2014
This version is compatible with:
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'neillturner-pm2', '0.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add neillturner-pm2
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install neillturner-pm2 --version 0.0.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

neillturner/pm2 — version 0.0.1 Oct 2nd 2014

puppet-pm2

Puppet Module to deploy a nodejs application using PM2

This is a pretty hacky first version. It would be good to make the create_app a provider called pm2_app. It would be better to use the nodejs::npm provider instead of execing npm install etc.

Minimal Usage:

 class { 'pm2': }

 class { 'pm2::create_app':
   name    => 'my-nodejs-app',
   require => Class['pm2']
 } 

Detailed Usage:

 class { 'pm2':
   npm_repository    => "https://registry.npmjs.org",
   npm_auth          => 'Ashtyhy=+as',
   npm_always_auth   => true,
   pm2_version       => "latest",
   install_root      => '/opt',
   install_dir       => 'nodejs',
   deamon_user       => 'nodejs',  
 }

 class { 'pm2::create_app':
   name            => 'my-nodejs-app',
   app             => 'myapp',
   appversion      => 'latest',
   path            => "/opt/nodejs/myapp",
   script          => "lib/app.js",              
   args            => [],
   env             => {},
   install_root    => '/opt',
   install_dir     => 'nodejs',
   deamon_user     => 'nodejs',     
   require => Class['pm2']
 }