Skip to content

Commit a8e416c

Browse files
committed
Merge branch 'stage'
2 parents 8e275ad + 3a35ad3 commit a8e416c

File tree

4 files changed

+47
-193
lines changed

4 files changed

+47
-193
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@
1515
/libpeerconnection.log
1616
npm-debug.log
1717
testem.log
18+
.DS_Store

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,11 @@ script:
2323
- if [ "$TRAVIS_BRANCH" == "dev" ]; then ember deploy development --verbose; elif
2424
[ "$TRAVIS_BRANCH" == "stage" ]; then ember deploy staging --verbose; elif [ "$TRAVIS_BRANCH"
2525
== "master" ]; then ember deploy production --verbose; fi
26+
27+
# notifications:
28+
# slack:
29+
# rooms:
30+
# secure: HRNtdw5i2RaK6dD6wp0Y76U2Mc+SMoK9LnIHXoKnnDpkNnHyNpcKyFUq9neVx1lR5QwonjH1Icg2MGU8v/lmhIdwa7d62tVWQBhV7C6Cg+KcnMRTMQesT549EH+Lmk0Gjv9aAG6mcQFubuWbDRrOb1oDMviGlB0dGSK0ryn4hYp8XBeyG+RG8ruI6t94sdKTVePbfmhOPoiUWLXqEcqgBlWP/Gq3WbVxTlGiXdDGtcoDGklGMD7o4Dx3BwQR7r+18Km3bFncX3jmaqmycqbY4vcdpe+wNggHWwIUyV84isR00oGemLluN/BdswP17KiucVCg1VLt+saoyY1AGV39TEQww1XOjy7ThjHWJbee1vSMMODGcG/7eD87g+CJovYHXbSlIe7FCqJgD+tXI8OAvP36rcvEv6Ao5RhpR+/OahiJoLrl/fz/gQxsQSVVRoZKoit7fcpGjOQrG17p2pEPzeVbIP/PtC9HHx5OCSiKWMpfA9+GoEDt4TB5h8JQDoNecTx671RL2SOb5RSVjjS0gg6zyRmXuYBPdVw7e2L8LJWW9FlfAENRmCNp8g9CKqOVLoivvZzL6H74u0L5Ej3xbuoaBTczzhNsA/hA+d8WIrut1Ug0yfbGKAF01nioBRU/TlirUSGY121LjWOxSicGaPFzkmkXGefdHu8xmbK0X3A=
31+
# addons:
32+
# code_climate:
33+
# repo_token: a03140c91dbbbf084ff05caefb45c0a520f595dd417ec46934aa45e43f06585c

slides/img/profile.jpg

-776 KB
Loading

slides/slides.md

+38-193
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ autoscale: true
1616
Alexey (*Alex*) Kulakov
1717

1818

19-
- SemiosBIO
19+
- Semios
2020
- @akulakov
2121
- aklkv.com
2222

@@ -33,223 +33,55 @@ Alexey (*Alex*) Kulakov
3333

3434
![right 80%](./img/ember-cli-deploy.png)
3535

36-
- Pipeline Hooks
37-
- Configuration
38-
- Usage & Deployment Strategies
39-
- Plugins and plugin packs
40-
41-
^
42-
Ember CLI Deploy is an addon that provides a single interface for deploying Ember applications.
43-
Just as any Ember app is served with ember serve and built with ember build, any app using Ember CLI Deploy is deployed with the same command: ember deploy.
44-
To achieve this, Ember CLI Deploy structures your app’s deployment using a deploy pipeline, which consists of several pipeline hooks. These standard hooks are the foundation for a rich ecosystem of plugins which you can compose to create a deployment process suitable for your application.
45-
Whether you need to compress or encode assets, upload your files to a private server or to AWS, or notify a Slack channel after a successful deploy, Ember CLI Deploy is up to the task. Keep reading to learn more.
46-
47-
48-
---
49-
### Pipeline Hooks
50-
51-
`ember deploy`
52-
53-
- configure
54-
- setup
55-
- willDeploy
56-
- willBuild, build, didBuild,
57-
- willPrepare, prepare, didPrepare,
58-
- fetchInitialRevisions,
59-
- willUpload, upload, didUpload,
60-
- willActivate, activate, fetchRevisions, didActivate
61-
- fetchRevisions
62-
- teardown
63-
64-
---
65-
66-
`ember deploy:activate`
67-
68-
- configure
69-
- setup
70-
- fetchInitialRevisions
71-
- willActivate
72-
- activate
73-
- fetchRevisions
74-
- didActivate
75-
- teardown
76-
77-
---
78-
79-
`ember deploy:list`
80-
81-
- configure
82-
- setup
83-
- fetchRevisions
84-
- displayRevisions
85-
- teardown
86-
87-
`didFail`
88-
89-
---
90-
### Context Example
91-
92-
![100%](./img/context-example.gif)
93-
94-
---
95-
96-
### Configuration
97-
98-
```javascript
99-
// deploy.js (sync)
100-
module.exports = function(environment){
101-
var ENV = {
102-
};
103-
104-
if (environment === 'production') {
105-
ENV.redis = {
106-
url: process.env.REDIS_URL
107-
}
108-
};
109-
return ENV;
110-
};
111-
```
36+
- [Introduction to ember-cli-deploy by Mattia Gheda](https://vimeo.com/158447249)
37+
- [EmberCamp London 2015: Ember CLI Deploy by Aaron Chambers and Luke Melia](https://www.youtube.com/watch?v=fcSL5poJ1gQ)
11238

11339
---
11440

115-
### Additional Environments
116-
117-
```javascript
118-
// config/environment.js
119-
module.exports = function(environment){
120-
var ENV = {
121-
};
122-
123-
if (environment === 'qa') {
124-
ENV.build.environment = 'development';
125-
};
126-
if (environment === 'staging') {
127-
ENV.build.environment = 'production';
128-
};
129-
return ENV;
130-
};
131-
```
132-
133-
^
134-
If you need to have the original environment that was passed into the ember build command, this can be obtained under the environment variable of `DEPLOY_TARGET` and referenced in any node.js context with `process.env.DEPLOY_TARGET`.
41+
#### Ember-cli + AWS S3 (CloudFront) via travis-ci
42+
![inline](./img/diagram.png)
13543

13644
---
13745

138-
### dotEnv Support
46+
### Ember-cli-deploy AWS pack
13947

140-
^
141-
It is often common to store sensitive data in environment variables and access them via `process.env` in the likes of `config/deploy.js`.
48+
- [ember-cli-deploy-aws-pack](https://github.com/kpfefferle/ember-cli-deploy-aws-pack)
49+
- [Deploying Ember to AWS CloudFront](http://blog.testdouble.com/posts/2015-11-03-deploying-ember-to-aws-cloudfront-using-ember-cli-deploy.html)
14250

14351
```bash
144-
# /.env
145-
146-
AWS_KEY=123456
147-
AWS_SECRET=abcdef
148-
```
149-
150-
---
151-
152-
```javascript
153-
// config/deploy.js
154-
module.exports = function(deployTarget) {
155-
var ENV = {
156-
s3: {
157-
accessKeyId: process.env.AWS_KEY,
158-
secretAccessKey: process.env.AWS_SECRET
159-
}
160-
};
161-
162-
return ENV;
163-
};
164-
```
165-
166-
---
167-
168-
###Deploy-Target Specific Variables
169-
170-
`ember deploy staging`
171-
172-
``` bash
173-
# /.env.deploy.staging
174-
175-
AWS_KEY=78910
176-
AWS_SECRET=ghijkl
177-
```
178-
179-
---
180-
181-
```javascript
182-
183-
// config/deploy.js
184-
module.exports = function(deployTarget) {
185-
var ENV = { };
186-
187-
if (deployTarget === 'staging') {
188-
ENV.s3 = {
189-
accessKeyId: process.env.AWS_KEY,
190-
secretAccessKey: process.env.AWS_SECRET
191-
};
192-
}
193-
194-
return ENV;
195-
};
52+
ember install ember-cli-deploy
53+
ember install ember-cli-deploy-aws-pack
19654
```
197-
^
198-
.gitignore
199-
Remember to add all `.env` and `.env.deploy.<deploy-target>` files to your `.gitignore` file so you don’t accidentally expose sensitive information.
200-
201-
202-
---
203-
204-
### Usage & Deployment Strategies
205-
206-
- `ember deploy`
207-
208-
^
209-
runs main pipeline
210-
211-
- `ember deploy production`
21255

21356
^
214-
production pipeline
215-
216-
- `ember deploy:activate production --revision=43cc587`
217-
218-
^
219-
`--revision` key is mandatory
220-
221-
- `ember deploy:list`
222-
- `ember deploy:list production`
57+
- deploy.js
58+
- environment.js
59+
- templates/application.js
60+
- controllers/application.js
22361

22462
---
22563

226-
### Example time
64+
![inline 90%](./img/travis-ci.png)
22765

228-
![inline](https://m.popkey.co/3bcbd8/AoYjv.gif)
66+
- travis-ci.com
67+
- private
68+
- travis-ci.org
69+
- public
70+
- free
22971

23072
^
231-
- `ember new <app-name>`
232-
- `ember install ember-cli-deploy`
233-
- `ember install ember-cli-deploy-aws-pack`
73+
- travis.yml
23474

23575
---
23676

237-
### Let's make it even more awesome
238-
239-
#### Ember-cli + AWS S3 (CloudFront) via travis-ci
240-
![inline](./img/diagram.png)
77+
##
24178

242-
---
79+
```bash
80+
ember deploy <development target>
81+
```
24382

244-
![inline 90%](./img/travis-ci.png)
24583

246-
- travis-ci.com
247-
- private
248-
- travis-ci.org
249-
- public
250-
- free
25184

252-
---
25385

25486
```bash
25587
# .travis.yml
@@ -259,6 +91,11 @@ production pipeline
25991
== "master" ]; then ember deploy production --verbose; fi
26092
```
26193

94+
---
95+
96+
![inline](https://m.popkey.co/3bcbd8/AoYjv.gif)
97+
98+
26299
---
263100

264101
![left 90%](./img/semios.png)
@@ -267,3 +104,11 @@ production pipeline
267104

268105
269106
- semios.com
107+
108+
---
109+
110+
### Thank you
111+
112+
- [source code and slides](https://github.com/aklkv/emberjs-talk-example)
113+
114+
---

0 commit comments

Comments
 (0)