Heroku - Git Push Deploy

Heroku - Git Push Deploy

Learn more about Heroku

80c9848f1aca614f619a9d974b852dc0?s=128

Yucheng Wang

May 18, 2015
Tweet

Transcript

  1. git push deploy PaaS TW Meetup #2 /her-OH-koo/

  2. ! PHP / WordPress Developer Rails newbie @uchengwang Ԧ₮ఔ Wang

    Yu-Cheng http://spectator.do
  3. How Heroku Works Twelve-Factor App

  4. Get Start 1.Sign up 2.Install the Heroku Toolbelt 3.Create your

    app
  5. heroku local git push slug compiler slug launch dyno dyno

    scale scale … stack stack Creative Commons – Attribution (CC BY 3.0) Box designed by Nono Martínez Alonso from the Noun Project compiled
  6. None
  7. Stack OS(ubuntu) language runtime libraries Buildpack config

  8. None
  9. You can run anything!

  10. dyno • Isolated • Self-healing • Read-only • Stateless •

    Recycle every 24hrs
  11. Twelve-Factor App http://12factor.net scalability portability productivity

  12. One codebase tracked in revision control, many deploys. I. Codebase

    One codebase, one app
  13. Explicitly declare and isolate dependencies II. Dependencies Gemfile =>dependency declaration

    Bundle exec => dependency isolation
  14. III. Config Store config in the environment An app’s config

    is everything that is likely to vary between deploys (staging, production, developer environments, etc). Don’t check in to the codebase
  15. IV. Backing Services Treat backing services as attached resources

  16. IV. Backing Services con’t

  17. V. Build, release, run Strictly separate build and run stages

  18. VI. Processes stateless processes share-nothing processes

  19. VII. Port binding Export services via port binding Containerless Add

    web server by dependency declaration
  20. VIII. Concurrency Scale out via the process model

  21. IX. Disposability Fast startup Graceful shutdown

  22. XI. Logs Treat logs as event streams Write logs to

    file
  23. X. Dev/prod parity Development = Staging = Production Time gap

    Personal gap Tool gap Design for continuous deployment
  24. XII. Admin processes Run admin/management tasks as one-off processes bundle

    exec rake db:migrate
  25. How about Docker?

  26. Docker Heroku dockerfile buildpack image slug container dyno docker client

    heroku client docker registry add-on http://tuhrig.de/docker-vs-heroku/
  27. https://github.com/progrium/dokku

  28. Spectator.do ಜࢹਓ http://spectator.do

  29. None
  30. Thanks for Listening @uchengwang http://spectator.do PaaS TW Meetup #2