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

Development of cakes

Ffdf2b0baba2980a90923978cf32a6ca?s=47 fukayatsu
December 07, 2012

Development of cakes

第1回 T2-Study #t2study - connpass
http://connpass.com/event/1422/

cakes.muの開発についての概要です。

Ffdf2b0baba2980a90923978cf32a6ca?s=128

fukayatsu

December 07, 2012
Tweet

Transcript

  1. #t2study 2012/12/07 @fukayatsu Development of cakes 12೥12݄8೔౔༵೔

  2. @fukayatsu • Piece of cake, Inc. ΤϯδχΞ(2012/08-) • ޷͖: Ruby

    / Android / Sublime Text 2 • ौ୩.rbʹ࠷ۙࢀՃ࢝͠Ίͨ 12೥12݄8೔౔༵೔
  3. https://cakes.mu 12೥12݄8೔౔༵೔

  4. • CakePHP 2.2.xͰ։ൃ • Πϯϑϥ͸AWS • ΤϯδχΞʴσβΠφͰ4~5ਓ 12೥12݄8೔౔༵೔

  5. agenda •Tools •Flow •Next cakes 12೥12݄8೔౔༵೔

  6. Tools 12೥12݄8೔౔༵೔

  7. github • Bronze ($25/month) • CEO΋ฤूऀ΋શһΞΧ΢ϯτ͋Γ • githubΛ࢖͍ͬͯͳ͍ձࣾʹब৬͢Δؾ ͸ແ͍Ϩϕϧ 12೥12݄8೔౔༵೔

  8. pivotal tracker • Startup L ($18/month) • λεΫͱ༏ઌॱҐΛ؅ཧ • Agile

    • http://agile.esm.co.jp/pivotaltracker/help/ gettingstarted_ja 12೥12݄8೔౔༵೔
  9. Jenkins • OSS • σϓϩΠͷࣗಈԽ • όοΫΞοϓࣗಈԽ • staging؀ڥͷࣗಈԽ 12೥12݄8೔౔༵೔

  10. hipchat • ($2/month per user) • νʔϜͷίϛϡχέʔγϣϯͷத৺ • githubɺpivotal trackerɺjenkins͔Β΋௨

    ஌͕ྲྀΕͯ͘Δ • ຊ൪σϓϩΠ΋hipchat্ͷbotʹ͓ئ͍ 12೥12݄8೔౔༵೔
  11. hubot • github͕ެ։͍ͯ͠ΔbotϑϨʔϜϫʔΫ • hipchat͚ͩͰ͸ͳ͘ɺirc΍twitterͳͲʹ ΋ରԠ͍ͯ͠Δ • coffee-scriptͰίϚϯυΛ௥ՃͰ͖Δ 12೥12݄8೔౔༵೔

  12. hubot commands • > hubot production deploy • => ຊ൪؀ڥʹσϓϩΠͯ͘͠ΕΔ

    • > hubot misawa • => ஍ࠈͷϛαϫը૾Λදࣔͯ͘͠ΕΔ • ͦͷଞ: http://fukayatsu.github.com/2012/12/03/ jotei-advent-calendar/ 12೥12݄8೔౔༵೔
  13. ඇΤϯδχΞ ࢀরɾૢ࡞ ௨஌ ࣗಈԽ ίʔυ؅ཧ λεΫ؅ཧ ίϛϡχ έʔγϣϯ ΤϯδχΞ bot

    ΞΫηεղੳ Πϯϑϥ 12೥12݄8೔౔༵೔
  14. Flow 12೥12݄8೔౔༵೔

  15. github-flow • NOT git-flow • Ұ೔ʹԿ౓΋σϓϩΠ͢Δ • ৗʹmaster͔ΒϒϥϯνΛ࡞੒ => pull-requestͰϨϏϡʔˍϚʔδ

    • https://gist.github.com/3705015 12೥12݄8೔౔༵೔
  16. case study ʙϩάΠϯϖʔδΛ࡞Δʙ 12೥12݄8೔౔༵೔

  17. 1. story start • pivotal trackerͰstoryΛ[start] 12೥12݄8೔౔༵೔

  18. 2. create branch • ݱࡏͷmaster ϒϥϯν͔Βઆ໌తͳ ໊લͷϒϥϯνΛ࡞Δ • git checkout

    -b login-page master 12೥12݄8೔౔༵೔
  19. 3. write code 12೥12݄8೔౔༵೔

  20. 4. push to remote • git push origin login-page 12೥12݄8೔౔༵೔

  21. 5. pull-request • master΁pull-request • Ϛʔδͯ͠ཉ͍࣌͠΍ڞಉ࡞ۀ͢Δͱ͖ɺ ΞυόΠε͕ཉ͍࣌͠ʹ΋pull-request͢Δ 12೥12݄8೔౔༵೔

  22. 6. code review, check at staging • ίʔυʹίϝϯτͨ͠Γɺ ৽͍͠ίʔυΛpushͨ͠Γ •

    branchΛpush͢Δͱjenkins͕ϒϥϯν͝ ͱʹ؀ڥΛ࡞ͬͯ͘ΕΔΑ͏ʹͨ͠ ྫ) https://login-page.example.com 12೥12݄8೔౔༵೔
  23. 7. merge into master • ֬ೝͰ͖ͨΒϚʔδ͢Δ • େ͖͍ػೳ௥Ճ͸CEO΍CTO͕֬ೝ 12೥12݄8೔౔༵೔

  24. 8. deploy to production • > hubot production deploy •

    ཪͰhubot͕jenkinsͷjobΛ࣮ߦ͢Δ • ऴΘͬͨΒhipchatʹ௨஌ • σϓϩΠͱνʔϜ΁ͷڞ༗͕ 1ͭͷίϚϯυͰ׬݁ͯ͠૘շ 12೥12݄8೔౔༵೔
  25. 9. finish story • pivotal trackerͰstoryΛ[finish]&[deliver] • ຊ൪؀ڥͰ໰୊ͳ͚Ε͹[accept] 12೥12݄8೔౔༵೔

  26. ࣮૷׬ྃ 12೥12݄8೔౔༵೔

  27. Delivered! 12೥12݄8೔౔༵೔

  28. ΊͰͨ͠ ΊͰͨ͠ 12೥12݄8೔౔༵೔

  29. Next cakes 12೥12݄8೔౔༵೔

  30. Ϣʔβʔʹ ΋ͬͱૣ͘Ձ஋Λ ಧ͚͍ͨ 12೥12݄8೔౔༵೔

  31. ͕͜͜଍Γͳ͍ • ࣗಈςετ / TDD • ίʔυϨϏϡʔ • DRY •

    ϑϨʔϜϫʔΫΛ׆͔͢ • ंྠͷ࠶։ൃΛ͠ͳ͍ 12೥12݄8೔౔༵೔
  32. ϑϨʔϜϫʔΫΛ Rails΁Ҡߦ • ઃܭ͔Β੔ཧ͢Δ • Ruby/Railsք۾ͷจԽΛ νʔϜʹऔΓࠐΉ 12೥12݄8೔౔༵೔

  33. ·ͱΊ 12೥12݄8೔౔༵೔

  34. • github-flow => ྑ͍ • hubot deploy => ָ͍͠ •

    CakePHP ͔Β Rails ΁ 12೥12݄8೔౔༵೔
  35. ͋Γ͕ͱ͏ ͍͟͝·ͨ͠ʂ 12೥12݄8೔౔༵೔

  36. • ը૾: http://www.sxc.hu/ ࢀߟ 12೥12݄8೔౔༵೔