On May 25, 2014, at 8:32 AM, Jake <[email protected]> wrote:
> I'd like to know what people have done for node.js application deployments.
> 

I have been searching up and down for something that works and am unsatisfied 
with everything that I have come across. More on my travails further below.


> Coming from a compiled-language background, I'm used to compiling things, 
> packing them up into some artifact, and deploying that to a server.  This 
> seems unnecessary in node though.  
> 
> A few questions on this:
> Have you seen any benefit to packing up (perhaps just a zip file) all the 
> files from a node application and putting that in an artifact repository?

Yes on the first (benefit in packing up) and no on the second (putting them in 
an artefact repo: in fact, it is important to me that using release tags and 
tools, I should be able to recreate any build).

> Is there any reason not to just tag the source repo and copy (rsync, scp, 
> etc) the files to the servers from there?

There are Git based deployment tools like Propagit/Fleet. Or even a 'git pull' 
might work. However, I would like to differentiate between sources (in the 
repository hierarchy that makes sense for sources) and "build"s (even if there 
is no compile step). And I see no reason for each deployment to contain the Git 
history of the entire repo.


> Is there any benefit to publishing the application to an internal npm 
> repository and deploying from there?

I would think so, yes. To me that is a step up from deploying with Git (it 
addresses the two issues I raise above), but what about other non-node 
dependencies your project might have such as a DB?

At a general level, I have looked at three alternative approaches to solving 
the deployment problem (for scenarios involving more than a handful of 
servers): heavyweight systems like Chef/Puppet/etc, self-contained images using 
LXC/Docker, and other simpler approaches like Ansible (SSH) and Propagit/Fleet 
(Git). Of these, I find LXC (with or without Docker) the one most worth 
pursuing. While I figure out how to move forward, here is what I am doing:

* Homegrown "build" script (much simpler and application specific than Grunt, 
Gulp, etc) to create install packages (tar).

* Deployment using SSH/tar.

* Process management using PM2 and monitoring using PM2-web.

All of this is in the context of non-PaaS environments like mine (i.e., no EC2, 
Heroku, etc).

        --ravi


-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/AAB25B00-FEE0-4329-B58C-251089779F8E%40g8o.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to