A simple tool to facilitate deploying meteor projects to the cloud for production.
Last updated 19 days ago by gsuess .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @empirica/meteor-deploy 
SYNC missed versions from official npm registry.


(Work in Progress!)

A simple tool to facilitate deploying meteor projects to the cloud for production.

What is @empirica/meteor-deploy?

@empirica/meteor-deploy is yet another production deployment tool for meteor projects.

It has been specifically tailored to deploy empirica.ly experiments, however it can also be used for other projects.

@empirica/meteor-deploy uses docker containers and pulumi templates facilitate deployments to your own cloud account (currently only AWS is supported).

Why do we need @empirica/meteor-deploy?

There are plenty of alternative ways to deploy meteor projects for production:

  • Meteor Galaxy - Meteor's commercial hosting offering
  • Meteor Up - A powerful open-source tool that deploys a meteor projects into docker containers.

For Meteor projects such as Empirica, Meteor's Galaxy hosting does not offer compute instances with sufficient CPU and Memory to allow for optimal performance. For most meteor projects that is not problem as Galaxy is excellent at facilitating horizontal scalability, however Empirica projects do not support that.

@empirica/meteor-deploy, just like Meteor Up allows you to deploy your own MongoDB instance, so that you don't have to run use a professional MongoDB hosting service.

@empirica/meteor-deploy creates all the infrastructure resources that you need on the cloud, so you don't have to spend time configuring infrastructure and deploying updates to it. When using Meteor Up you would still need to go through some cumbersome steps to deploy your docker-containers to the cloud.

However if you do need production grade database-hosting (with full back-up solutions and scalability) and if you need your application deployment to scale horizontally, @empirica/meteor-deploy may not be the right tool for you.

How to use @empirica/meteor-deploy?


Before we begin you will install some essential tools that @empirica/meteor-deploy uses:

  1. pulumi - To install, follow these instructions.
  2. aws-cli - To install, follow the instructions on their website, or run sudo apt-get install awscli if you are using an ubuntu linux system.
  3. node-js - A separate node-js installation is needed, because meteor's inbuilt nodejs version is out of date.

You will also need an up-to-date version of meteor installed.


Finally, install @empirica/meteor-deploy through npm, by running the following command in your meteor projects' directory.

meteor npm install --save-dev @empirica/meteor-deploy -y

Create a deployment project

Now enable your meteor projects for deployments using @empirica/meteor-deploy:

npx meteor-deploy init --description "This is meteor deployment project"

This will install some configuration files to allow you to push infrastructure through pulumi.

Make sure to install newly require NPM packages.

meteor npm install

Configure a deployment stack

With the newly created deployment, create new pulumi deployment stack:

pulumi stack init

This command will prompt you for name for your deployment stack.

Choose a suitable name for your stack. Ideally this name should be unique within the cloud-account that you are using.

When created make sure that the stack that you have created is also selected:

pulumi stack select

Now we can add some configuration to the selected stack:

npx meteor-deploy stack configure aws-ecs-ec2 --instanceType t2.medium

For more configuration options check:

npx meteor-deploy stack configure aws-ecs-ec2 --help

Authorize access for your AWS Cloud account

Before we can start running deployments, we need to prepare the aws-cli to run the cloud.

For this you will need to set up an IAM user with full permissions to various AWS services. For security reasons it is recommended that you use separate AWS cloud account for each project.

Once you have obtained an API_KEY and API_SECRET for that aws user run the following command to allow the aws-cli tool to access your cloud account:

aws-cli configure


We are now ready deploy your project to the cloud

pulumi up

Update deployment with new versions of your meteor project

After making changes to your meteor project, you can update your deployment simply through pulumi:

pulumi up

Update with new versions of @empirica/meteor-deploy

Occasionally @empirica/meteor-deploy will issue new releases of the tool that might improve upon your infrastructure.

When a new release is available, run the following commands to update your deployment accordingly:

meteor npm update @empirica/meteor-deploy
npx meteor-deploy init
meteor npm install
pulumi up

Setup for Development

If you are developing @empirica/meteor-deploy, run npm link and use the --developmentMode flag when initializing your deployment project:

npx meteor-deploy init --developmentMode

This will create symbolic links instead of one-of file-dumps, which is ideal for when you are making frequent changes to the @empirica/meteor-deploy package.

Current Tags

  • 1.0.1                                ...           latest (19 days ago)

2 Versions

  • 1.0.1                                ...           19 days ago
  • 1.0.0 [deprecated]           ...           19 days ago
Today 0
This Week 0
This Month 22
Last Day 0
Last Week 2
Last Month 0
Dependencies (15)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |