Series: ember-cli-deploy

ember-cli-deploy-Intro and Installation

Published on Jun 01, 2016

ember-cli-deploy is magic- once it's set up, it's just takes a few keystrokes and a couple seconds to update your production app. Today, we start our journey to understanding and harnessing that magic.



$ ember install ember-cli-deploy
$ ember install ember-cli-deploy-build


Ember-cli-deploy is magic. It can help you easily build and deploy your apps, and you can experiment with them in different ways that would be difficult with any other deployment system. However when it first started out, it was the kind of magic where you’re reading three pages of Latin, and if you mispronounce a word the earth starts to shake. That was still better than what came before, but thankfully things have gotten even better since then. So if you were at first intimidated by ember-cli-deploy, rest assured that it’s easier now.

In addition to the entire ecosystem becoming both more flexible and easier to understand, there’s also a good way to enter it slowly so you don’t have to understand everything at once. You can understand it piece by piece. We’re going to be going through the S3 walkthrough that is on the ember-cli-deploy site. And in addition to just going through the steps they list, we’ll also explain what’s happening as best as I can, and we’ll do some of the backend stuff and S3 stuff that they didn’t get into.

This app chose to focus just on the ember-cli-deploy part, and that makes sense, it’s on the ember-cli-deploy documentation site. But to get it set up on your own, you’ll need a little bit extra, so we’re going to do that. Then after that, we’ll go ahead and walk you through setting up the lightning strategy that first made ember-cli-deploy famous.

The app that we’re going to be deploying today is the monsters app, which we’ve worked with before. And to remind you, there is the ember-cli frontend, and then there’s the backend api. It happens to be done in Rails, but it doesn’t really matter. We’re just going to be deploying it to Heroku. So this is where we’ll be getting our information from.

So to start, let’s first install ember-cli-deploy. So we can notice two things from this deployment message. The first is that it’s created the file config/deploy.js. This file is where you’ll eventually put your build options, but we don’t have any of those right now. Also notice that it’s matching up deploy targets with different builds in your environment. So staging and production are both using your production environment, while development is using your development environment. You can do differential configuration here as well as change how these match up.

The second is that it says it needs plugins to actually do the deployment work. And so a lot of this episode and the next few episodes we'll be installing the correct plugins and configuring them. ember-cli-deploy is basically just a wrapper that helps you coordinate all these plugins since they don’t know exactly how you’re wanting to deploy things.

Eventually we’re going to want to be able to deploy to production, and that’s going to look like this. But there are a couple of things that we have to do before we can do that. We need to put in the correct plugins for what we’re going to do. The first plugin that we’ll install is ember-cli-deploy-build. And so what this is going to do is it’s going to patch everything up for deployment, and then you can run it with ember deploy build. What this plugin does is it creates a temporary deployed distribution folder, and this contains everything that we’ll be pushing up to S3.

So we’re just about ready to get going on the S3 plugin. And that’s what we’re going to do next time, including setting up stuff in the Amazon AWS console. The AWS console is fairly complex, but we’ll zero in on what you need to do in order to get everything working. Alright, I’ll see you then.


Subscribe to our mailing list