Upgrade to Pro — share decks privately, control downloads, hide ads and more …

one command to deploy them all

one command to deploy them all

In this talk I describe the intention behind ember-cli-deploy, the problems 0.4.x was trying to fix and the awesome new features that are coming in 0.5.0.

Avatar for Aaron Chambers

Aaron Chambers

September 10, 2015
Tweet

More Decks by Aaron Chambers

Other Decks in Technology

Transcript

  1. ember- cli- deploy open source implementations ember- deploy front- end-

    builds ember- cli-azure- deploy ember- s3-sync embarista ember- cli-s3 heroku- buildpack- ember-cli ember- rails
  2. ember- cli- deploy these are ember-cli-based ember- deploy front- end-

    builds ember- cli-azure- deploy ember- cli-s3 heroku- buildpack- ember-cli ember- s3-sync embarista ember- rails
  3. ember- cli- deploy these embrace “lightning” strategy ember- deploy front-

    end- builds ember- cli-azure- deploy ember- cli-s3 heroku- buildpack- ember-cli ember- s3-sync embarista ember- rails
  4. compare and contrast same core-plus-plugins architecture ember- cli- deploy ember-

    deploy front- end- builds ember- cli-azure- deploy ember- cli-s3 heroku- buildpack- ember-cli ember- s3-sync embarista ember- rails
  5. compare and contrast front-end-builds started as a fork of ember-deploy

    same core-plus-plugins architecture ember- cli- deploy ember- deploy front- end- builds ember- cli-azure- deploy ember- cli-s3 heroku- buildpack- ember-cli ember- s3-sync embarista ember- rails
  6. compare and contrast best name same core-plus-plugins architecture ember- cli-

    deploy ember- deploy front- end- builds ember- cli-azure- deploy ember- cli-s3 heroku- buildpack- ember-cli ember- s3-sync embarista ember- rails front-end-builds started as a fork of ember-deploy
  7. compare and contrast ember- deploy- redis ember- deploy- s3 ember-

    deploy- azure ember- deploy- s3-index ember- cli-azure- deploy ember- cli-s3 heroku- buildpack- ember-cli ember- s3-sync embarista ember- rails best name same core-plus-plugins architecture ember- cli- deploy ember- deploy front- end- builds front-end-builds started as a fork of ember-deploy biggest ecosystem
  8. ember- cli- deploy ember- deploy front- end- builds so we

    had an international video call @lukemelia Luke Melia @grandazz Me @LevelbossMike Michael Klein @samselikoff Sam Selikoff Ryan Toronto
  9. and decided to merge front- end- builds ember- cli- deploy

    @lukemelia Luke Melia @grandazz Me @LevelbossMike Michael Klein @samselikoff Sam Selikoff Ryan Toronto
  10. one team front- end- builds ember- cli- deploy @lukemelia Luke

    Melia @grandazz Me @LevelbossMike Michael Klein @samselikoff Sam Selikoff Ryan Toronto
  11. one project front- end- builds ember- cli- deploy @lukemelia Luke

    Melia @grandazz Me @LevelbossMike Michael Klein @samselikoff Sam Selikoff Ryan Toronto
  12. one command to deploy them all front- end- builds ember-

    cli- deploy @lukemelia Luke Melia @grandazz Me @LevelbossMike Michael Klein @samselikoff Sam Selikoff Ryan Toronto
  13. github.com/ember-cli/ember-cli-deploy front- end- builds ember- cli- deploy @lukemelia Luke Melia

    @grandazz Me @LevelbossMike Michael Klein @samselikoff Sam Selikoff Ryan Toronto
  14. deploy pipeline // package.json { "name": "my-app", "version": "0.1.0", "devDependencies":

    { "ember-cli": "1.13.8", "ember-cli-deploy": "0.5.0", "ember-cli-deploy-build": "0.1.0", "ember-cli-deploy-redis": "0.1.0", "ember-cli-deploy-s3": "0.1.0", } } install plugins
  15. deploy pipeline add configuration // config/deploy.js modules.exports = function(options) {

    return { build: { distDir: ’tmp/some-dir’ }, redis: { host: ’redis://some-server’, port: 1234 }, s3: { accessKeyId: ’abcdefgh’, secretAccessKey: ’1233445’, bucket: ’my-bucket’ } }; };
  16. deploy pipeline build prepare activate configure ember-cli- deploy- build upload

    ember-cli- deploy- redis ember-cli- deploy- s3 ember-cli- deploy- build ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- s3
  17. deploy pipeline build prepare activate configure ember-cli- deploy- build ember-cli-

    deploy- build upload ember-cli- deploy- redis ember-cli- deploy- s3 ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- s3
  18. deploy pipeline build prepare upload activate configure ember-cli- deploy- build

    ember-cli- deploy- build ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- s3 ember-cli- deploy- s3
  19. deploy pipeline build prepare upload activate configure ember-cli- deploy- build

    ember-cli- deploy- build ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- s3 ember-cli- deploy- s3
  20. deploy pipeline build prepare upload activate configure ember-cli- deploy- build

    ember-cli- deploy- build ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- s3 ember-cli- deploy- s3 = deployment context
  21. deploy pipeline build prepare upload activate configure ember-cli- deploy- build

    ember-cli- deploy- build ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- s3 ember-cli- deploy- s3 = deployment context
  22. deploy pipeline build prepare upload activate configure ember-cli- deploy- build

    ember-cli- deploy- build ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- s3 ember-cli- deploy- s3 = deployment context ember-cli- deploy- redis
  23. deploy pipeline build prepare upload activate configure ember-cli- deploy- build

    ember-cli- deploy- build ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- s3 ember-cli- deploy- s3 = deployment context ember-cli- deploy- redis
  24. deploy pipeline build prepare upload activate configure ember-cli- deploy- build

    ember-cli- deploy- build ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- s3 = deployment context ember-cli- deploy- s3 ember-cli- deploy- redis
  25. deploy pipeline build prepare upload activate configure ember-cli- deploy- build

    ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- s3 = deployment context ember-cli- deploy- build ember-cli- deploy- s3 ember-cli- deploy- redis
  26. deploy pipeline build prepare upload activate configure ember-cli- deploy- build

    ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- s3 = deployment context ember-cli- deploy- build ember-cli- deploy- s3 ember-cli- deploy- redis
  27. deploy pipeline build prepare upload activate configure ember-cli- deploy- build

    ember-cli- deploy- build ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- redis ember-cli- deploy- s3 ember-cli- deploy- s3
  28. configure full list of pipeline hooks setup willDeploy didDeploy teardown

    build prepare upload activate willBuild didBuild willPrepare willUpload willActivate didPrepare didUpload didActivate
  29. build prepare upload configure full list of pipeline hooks setup

    willDeploy willBuild didBuild willPrepare willUpload didPrepare didUpload
  30. build prepare upload activate configure full list of pipeline hooks

    setup willDeploy willBuild didBuild willPrepare willUpload willActivate didPrepare didUpload didActivate
  31. build prepare upload activate configure full list of pipeline hooks

    setup willDeploy didDeploy willBuild didBuild willPrepare willUpload willActivate didPrepare didUpload didActivate
  32. build prepare upload activate configure full list of pipeline hooks

    setup willDeploy didDeploy teardown willBuild didBuild willPrepare willUpload willActivate didPrepare didUpload didActivate
  33. build prepare upload activate configure full list of pipeline hooks

    setup willDeploy didDeploy teardown willBuild didBuild willPrepare willUpload willActivate didPrepare didUpload didActivate
  34. plugin architecture // package.json { "name": “ember-cli-deploy-s3”, "version": “0.1.0”, "devDependencies":

    { “ember-cli": “1.13.8”, “ember-cli-deploy“: “0.5.0”, }, "keywords": [ “ember-addon", “ember-cli-deploy-plugin“ ] } that has the ember-cli-deploy-plugin keyword
  35. plugin architecture // index.js modules.exports = { name: ’ember-cli-deploy-s3’, createDeployPlugin:

    function(options) { return { name: options.name, configure: function(context) { // do something }, upload: function(context) { // do something } }; } }; and implements the createDeployPlugin() function
  36. plugin architecture $ ember deploy production find plugins "keywords": [“ember-cli-deploy-plugin“]

    execute createDeployPlugin() createDeployPlugin: function(options) { return { // implemented hooks here }; } for each plugin register implemented hook functions
  37. plugin architecture $ ember deploy production find plugins "keywords": [“ember-cli-deploy-plugin“]

    execute createDeployPlugin() createDeployPlugin: function(options) { return { // implemented hooks here }; } for each plugin execute hooks in order register implemented hook functions
  38. plugin architecture // index.js modules.exports = { name: ’ember-cli-deploy-build’, createDeployPlugin:

    function(options) { return { name: options.name, build: function(context) { // build project files return { distDir: ‘tmp/tmp-dist’ }; } }; } }; deployment context // context == {} // context == { // distDir: `tmp/tmp-dist` // }
  39. plugin architecture // config/deploy.js modules.exports = function(options) { // config

    for plugin called // ember-cli-deploy-s3 return { s3: { accessKeyId: ’my-key’, secretAccessKey: ’my-secret’ } }; }; configuration
  40. plugin architecture // config/deploy.js modules.exports = function(options) { return {

    plugins: [’s3’, ’redis’], s3: { accessKeyId: ’my-id’, secretAccesKey: ’my-secret’ }, redis: { host: ’redis://some-host’, password: ’my-password’ } }; }; configuration: specifying plugin order
  41. plugin architecture // config/deploy.js modules.exports = function(options) { return {

    plugins: [’s3:foo-assets’, ’s3:bar-assets’], ’foo-assets’: { bucket: ’foo-bucket’ }, ’bar-assets’: { bucket: ’bar-bucket’ } }; }; configuration: aliasing plugins
  42. plugin architecture // config/deploy.js modules.exports = function(options) { return {

    ’slack-notifier’: { buildNumber: function(context) { return context.buildNumber; } } } }; configuration: accessing context data at runtime
  43. current plugins for 0.5.0 ember-cli-deploy-build ember-cli-deploy-json-config ember-cli-deploy-revision-data ember-cli-deploy-redis ember-cli-deploy-s3 ember-cli-deploy-manifest

    ember-cli-deploy-gzip ember-cli-deploy-slack ember-cli-deploy-s3-index github.com/zapnito/ github.com/zapnito/ github.com/zapnito/ github.com/zapnito/ github.com/zapnito/ github.com/lukemelia/ github.com/lukemelia/ github.com/LevelbossMike/ github.com/LevelbossMike/