Deploying Ember CLI Apps with the Lighting Pack

This is the first in a series on maintaining and deploying Ember.js SPA (single page apps).

We have been using Ember.Js quite a bit over here at Curious Minds. In fact, it’s one of our very favorite front-end frameworks. One of the most important questions we struggled with during our deployment planning was how to create a deployment pipeline that minimized downtime for the client, and allowed us to rollback deployed apps to a previous version. Enter the lightning deployment method.

Watch Luke Melia’s RailsConf presentation for an great overview of the methodology.

If you don’t have a chance to watch the entire video, here is the basic run-down:

The lighting method consists of a few moving parts. One is your compiled Ember app stored on the CDN of your choice, and the second is a web server that will serve up a version of your app’s index page. In our deployment example, the web server also is handling the API requests as well, eliminating those CORS issues. The CDN stores multiple versions of the app, and your app’s index page can be configured to keep track of any number of revisions.

Using this deploy method, pushing a new version of your application consists of compiling the app, and waiting until it’s uploaded to your CDN. Once it’s there, you simply instruct the index page to serve one version of the application over the last. If anything goes wrong, simply roll the app back to the last version (it’s still on the CDN). You’re safe, and deploys take almost no time at all.

Of course all of these functions are completely automated by the amazing ember-deploy package.
Next up: Configuring ember-deploy for the lightning method.

About Curious Minds
We are a web development firm in New York and Chicago, providing development resources and consulting for websites and mobile apps since 2004.