Marc Diethelm
Marc Diethelm

Reputation: 1202

How does deploying a Node.js app using Strongloop on Heroku work?

Can someone with actual experience explain how these layers interact with each other and how a working setup (dev to production) should actually be, well, set up?

I understand there are buildpacks that serve to install Strongloop on Heroku. And that deploying the actual app is done with git push.

Some specific points that you could address...

I hope answers to this question can serve as a guide for people like me who are struggling to understand how all the pieces go together.

Upvotes: 2

Views: 752

Answers (2)

Sam Roberts
Sam Roberts

Reputation: 408

I understand there are buildpacks that serve to install Strongloop on Heroku. And that deploying the actual app is done with git push.

You don't need our buildpack, and yes, you deploy with git push.

How can I have (more or less) the same environment locally and at Heroku.

How much more or less? You can develop on your mac laptop, and push to Heroku, using same version of node, or you can be more like Heroku, and use Linux, or ... what exactly about the Heroku env do you want to reproduce?

After setting up Strongloop Node, does the server environment stay in place? Or is it recreated every time I deploy an update? (if yes, how so?)

Not sure what setup you are referring to.

How does slnode fit into the picture

It doesn't.

Can I connect to a db hosted at Heroku from a dev machine?

Don't know, sorry, try Heroku support pages for this kind of heroku-specific tech question, perhaps?

I followed docs on bottom of page at http://docs.strongloop.com/display/DOC/Heroku, look for "Create Procfile and deploy", and it worked OK for me.

Upvotes: 1

Pooyan Khosravi
Pooyan Khosravi

Reputation: 5039

Fast answers

  1. Use Vagrant, download a Debian 6 box, and install whatever you need in it, remember to check what version of Node.js Heroku uses.
  2. It will be partially rebuilt, your npm dependencies will be redownloaded, your application gets rebuilt and so on.
  3. You can use slnode on your dev machine. However if it is necessary to use slnode on a dyno, fork a build pack and install slnode as part of it.
  4. You can connect to a database hosted on Heroku from any network connected server or pc, you will be provided with an ip and credentials.

Build packs

I'm not sure about actual constraints of a build pack, but it can do almost anything that you can do in an Debian 6 virtualized environment with shared kernel. ( An Debian 6 instance in a OpenVZ VPS )

  • Think of build packs as low level dependency managers which solve dependencies like node.js, Redis, Apache2 and so on.
  • They also build an environment like file system structure, ENV variables and so on.

Heroku infrastructure

Heroku is using AWS as it's raw hardware provider, AWS provides a fresh installation of an OS in a virtualized hardware ( VPS )

Heroku builds dynos on top of raw OS, by guess, it shares one OS between at least 128 dynos.

Each dyno is isolated from others, it has common software built in like ls, but it's build pack's duty to install any other software like Node.js for your application.

Heroku's node build pack, installs Node.js, and runs npm.

Upvotes: 0

Related Questions