simple node deployment
Yet another capistrano-less deployment flow for node.js applications with grunt.
But attention: i would not consider it to be stable ;-) There are no tests and it's lacking a proper documentation for now, sorry!
Simple example configuration with two servers:
beam:stage:servers:host: 'server1.domain.tld'enterCredentials: truehost: 'server1.domain.tld'host: 'xxx.xxx.xxx.xxx'enterCredentials: falseusername: 'xxxx'privateKey: './id_rsa'passphrase: 'xxxxxx'nodeUser: 'root'nodeEnv: 'production'targetPath: '/root/apps'releaseArchive: 'out/<%= packageInfo.name %>-<%= packageInfo.version %>.tar.gz'
...and its current default options:
var beamDefaultServerOptions =enterCredentials: falseagent: processenvSSH_AUTH_SOCKpingInterval: 3000port: 22username: 'root';var beamDefaultOptions =appName: packageInfonamepackageInfo: packageInforeleaseArchive: './release.tar.gz'releaseArchiveTarget: 'RELEASE.tar.gz'releaseFolderName: 'releases'currentLinkName: 'current'logFolderName: 'logs'targetPath: '/var/apps'releaseName: packageInfoname+'-'+packageInfoversionnodeUser: ''nodeEnv: ''nodeEnvExtras: ''nodeBinary: 'node'npmBinary: 'npm'npmInstallOptions: '--production'appCommand: packageInfomain || 'index.js';
Usage: grunt beam:<group>Possible parameters:--redeploy Normal deployment but cleans target directory before--undeploy Will undeploy your node application. That means: stopping the application and remove all files which belong to the release. (Attention includes default log-path)--remove Undeploys and removes all application data--rollback Lets you choose a release from the server which has been deployed before--clean Lets you choose which old releases should be removed from the server--restart Restarts the application on the configured servers--uptime Prints the uptime on the configured servers--log Prints the last 20 lines of std and err log