Forge Home


Nodejs web app deployments


9,652 latest version

1.3 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.3 (latest)
  • 0.0.1 (deleted)
released Aug 24th 2014
This version is compatible with:
  • Puppet 3.x

Start using this module

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

Add this module to your Puppetfile:

mod 'brettswift-nodesite', '0.0.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add brettswift-nodesite
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install brettswift-nodesite --version 0.0.3

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.



brettswift/nodesite — version 0.0.3 Aug 24th 2014


State: experimental

A Puppet module to allow fast deployment to test nodejs applications.

Pass in your .git URI and the file used to run your app (if it's something other than app.js). Pass your database configuration in via node_params (that will be passed to the command line) or optionally put configuration into a git branch of your source project, and tell nodesite which git_branch to run.

If the DB configuration is successful, you will have a running nodejs app.

Typically you will configure a database on the same host. To see an example of this module in action, see my vagrant-nodeJsServer project

###Git deploys Enabled by default. Nodesite will check for upstream changes on each puppet run. If there are any it will run a git pull, npm prune, npm install and restart the service.


###Basic with all defaults

  class {'nodesite':
    git_uri       => "",


 class {'nodesite':
    node_version  => "v0.10.26",
    git_uri       => "",
    git_branch    => $featureBranch,
    file_to_run   => "app.js",
    user          => "${project}",
    node_params   => "NODE_CONFIG={\"mongodb\":{\"database\":\"${db_name}\", \"user\":\"${db_user}\", \"password\":\"${db_password}\"}}"


  • node_version - optional.
    • default: 'stable'
  • git_uri - required
    • use link as shown above.
  • git_branch - optional.
    • default: 'master'
    • note: should work with a git hash or tag as well. (currently not tested)
  • file_to_run - optional. This is the entry point for the app. Ie: node app.js
    • default: 'app.js'
  • user - optional. The user which the process should run under. (Will be created)
    • default: 'nodejs'
  • node_params - optional.
    • command line parameters to pass to the process. In the example above, node config options are passed in.
  • npm_proxy - optional
  • repo_dir - optional
    • default: /usr/local/share/nodesite_repos

TODO (6)

  1. git.pp:9 this code is duplicated.. fix it.
  2. init.pp:1 unit tests!
  3. project.pp:12 validate node version to: vX.X.X or latest or stable
  4. project.pp:61 pull start scripts into separate files
  5. init.conf.erb:19 set node_env variable, and other node variables
  6. init.conf.erb:35 use npm start

##Known Bugs upstart is configured for puppet 3.5 only, and is currently broken. pre puppet 3.5 works with system V startup scripts.

##Contributing Pull Requests

Feature Branches