funkyeah
funkyeah

Reputation: 3174

Meteor Application - How might one implement orchestration/provisioning for multi-instance deployments?

I have a meteor.js application that works well as a single instance deployment but now I want to setup the infrastructure to enable and automate the creation of more instances (1 for each client).

I intend to have a subdomain for each deployment that is reserved for a given client.

I image I have to have to:

  1. Retrieve the desired subdomain for each client (through some sign-up site)
  2. Bundle the application
  3. Deploy an instance on a separate port with a separate DB for each
  4. Setup a reverse proxy to forward the subdomain to the appropriate internal port
  5. Setup something to monitor the processes and restart them if they crash or a reboot occurs
  6. Automate re-bundling and deploying to all instances when the application code is updated and released

To the best of my understanding I think the appropriate tools for this job are in the orchestration family (Capistrano, Fabric, Func, Rundeck) but I don't understand what pieces they take care of and what pieces are/should be left to other tools.

A lot of my problems come from not knowing how to connect the steps and/or if they should be connected. Others come from not knowing what best practices are or where the design patterns around doing this sort of stuff can be learned.

For example:

Basically it seems like there are a number of tools out there and quite a few ways to do this stuff but very little guidance on what tools work well together or how to do it properly. I would be highly motivated to learn the necessary tools and languages if I didn't feeling like selecting a set of tools that work well together was effectively a dice roll.

Upvotes: 3

Views: 504

Answers (1)

Micha Roon
Micha Roon

Reputation: 4007

you could start with meteor-up to make your servers run all the time (npm forever) and at startup.

haproxy has a soft-reconfiguration feature that allows to add and remove subdomains (or servers for a sub-domain) without restarting the service.

you should have everything you need to get going.

Upvotes: 1

Related Questions