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

yoで全てを解決する漢

46e8de7d6e95be6327e8c49bf3b0c028?s=47 chao2suke
August 01, 2014

 yoで全てを解決する漢

46e8de7d6e95be6327e8c49bf3b0c028?s=128

chao2suke

August 01, 2014
Tweet

Transcript

  1. YoͰશͯΛղܾ͢Δஉ Ϋϥεϝιουגࣜձࣾɹਗ਼໺߶࢙

  2. λΠτϧΛมߋ͠·͢

  3. YoͰશͯΛղܾ͢Δஉ Ϋϥεϝιουגࣜձࣾɹਗ਼໺߶࢙

  4. ࢯ໊ : ਗ਼໺ɹ߶࢙ʢͤʔͷɹͭΑ͠ʣ ॴଐɿΫϥεϝιουגࣜձࣾ AWSίϯαϧςΟϯά෦ Twitter ID : @chao2suke ۈ຿஍ɿࡳຈΦϑΟε

    ϓϥΠϕʔτͰҰ൪ϦιʔεΛ৯͍ͬͯΔ΋ͷɿࢠڙɺೣɺݘ ࣗݾ঺հ
  5. Έͳ͞Μ

  6. YO ͯ͠·͔͢ʁ

  7. Yo ೥݄ϩʔϯν ೔ؒͰສϢʔβʔಥഁ ϲ݄ؒͰ౤ࢿֹສυϧಥഁ ੈքͰ࠷΋ચ࿅͞Εͨίϛϡχέʔγϣϯπʔϧ J04"OESPJE"NB[PO8JOEPXT1IPOFʹͯ࢖༻Մೳ

  8. ػೳ

  9. Yo

  10. Ҏ্ɻ

  11. େϒϨΠΫதɻ

  12. Կ͕ૉ੖Β͍͠ͷ͔ʁ

  13. ϋΠίϯςΩετจԽʹରԠ

  14. ϋΠίϯςΩετจԽ ΞϝϦΧͷจԽਓྨֶऀɺΤυϫʔυ5ϗʔϧ͕এ͑ͨࣝผ๏ ʮίϯςΩετʯͱ͸ίϛϡχέʔγϣϯͷج൫Ͱ͋Δʮݴޠɾڞ௨ͷ஌ࣝɾମݧɾՁ஋ ؍ɾϩδοΫɾᅂ޷ੑʯͳͲΛࢦ͢ ϩʔίϯςΩετʹશ͖ͯͪΜͱ఻͑ͳ͚Ε͹఻ΘΒͳ͍ʢϓϩάϥϛϯάݴޠ౳ ϋΠίϯςΩετʹਪଌʹΑͬͯ఻͑Δ͜ͱ͕Ͱ͖ΔʢҰൠݴޠʣ ϋΠίϯςΫετจԽͱ͸ίϯςΫετͷڞ༗ੑ͕ߴ͍จԽͷ͜ͱͰɺ఻͑Δ౒ྗ΍εΩ ϧ͕ͳͯ͘΋ɺ͓ޓ͍ʹ૬खͷҙਤΛ࡯͋͠͏͜ͱͰɺͳΜͱͳ͘௨ͯ͡͠·͏؀ڥͷ͜ ͱ ԤถݍɿϩʔίϯςΩετจԽɺ೔ຊɿ௒ϋΠίϯςΩετจԽ

  15. ͭ·Γ

  16. શͯΛYOͰද͢࢓༷ʹ೔ຊจԽʹϐολϦ

  17. ౰ͨΓલͰ͕͢ɺͦΕ͚ͩͰ͸͋Γ·ͤΜ

  18. YOʹ͸API͕͋Γ·͢

  19. API΋௒γϯϓϧͰ͢

  20. શһʹYO͢Δɿ

  21. ݸผʹYO͢Δɿ

  22. Ҏ্ɻ

  23. ࢖͍ํ͸ɺӉ஦ɻ

  24. APIͷొ࿥ํ๏

  25. APIͷొ࿥ํ๏ http://yoapi.justyo.co/

  26. Ҏ্ɻ

  27. APIͷυΩϡϝϯτΛ ͪΐͬͱಡΜͰΈΔ

  28. ਗ਼໺ ߶࢙ Ϋϥεϝιουגࣜձࣾ A WSίϯαϧςΟϯά෦

  29. ࠓ·ͰҰݴ΋ʮA WSʯͱ͍͏ݴ༿͕ग़ ͍ͯͳ͍ɻ

  30. YoͷA WSͰͷ࢖͍ํ

  31. ϙΠϯτɿ A WSͰͷߏஙΛͨ͘͞Μ΍͍ͬͯΔͱ ҙ֎ʹʮ଴ͪ࣌ؒʯ͕ଟ͍

  32. ɾEC2ͷߏஙɿOS্ཱͪ͛࣌ؒ ɾRDSͷ্ཱͪ͛ɿ໿5෼ʢΠϯελϯεαΠζʹΑͬͯҧ͏ʣ ɾElastiCacheɿ໿3෼ ɾCloudFormationɿ্ཱͪ͛ΔαʔϏεͷ଍͠ࢉɻRollback ͨ͠৔߹͸ߋ஍ʹ໭͢෼༨ܭʹ͔͔Δɻ

  33. EC2ͷ্ཱͪ͛ ! User DataΛ࢖͏

  34. User Data ! EC2ͷ্ཱͪ͛࣌ʹεΫϦϓτΛྲྀͤ Δɻ ! ! ฐࣾେ୍ͷϒϩάΛޚཡ͍ͩ͘͞ɻ http://dev.classmethod.jp/cloud/ five-confs-of-ec2-linux-sysops/

  35. None
  36. RDS ! A WS CLIΛ࢖͏

  37. A WS CLI ! Python੡ͷίϚϯυϥΠϯπʔϧɻ௒ ܰྔɻ ! ! ฐࣾԣాͷϒϩάΛޚཡ͍ͩ͘͞ɻ http://dev.classmethod.jp/cloud/

    aws-command-line-tool-python/
  38. None
  39. CloudFormation ! Cloud-initΛ࢖͏

  40. A WS CLI ! Python੡ͷίϚϯυϥΠϯπʔϧɻ௒ ܰྔɻ ! ! ฐࣾ౎ݩͷϒϩάΛޚཡ͍ͩ͘͞ɻ http://dev.classmethod.jp/cloud/

    aws/cfn-init/
  41. None
  42. Yoͷ།Ұͷܽ఺

  43. 1෼ʹ1ճҎ্ͷAPI͕ୟ͚ͳ͍ Rate limit exceeded. Only one Yo per recipient per

    minute.
  44. Producer & Consumer ! ฐࣾ౎ݩͷεϥΠυΛޚཡ͍ͩ͘͞ɻ http://www.slideshare.net/ daisuke_m/20140628- cmsapporojobworkers

  45. None
  46. Producer & ConsumerύλʔϯΛ ༻͍ͯYo APIΛୟ͘

  47. 1.ΞΧ΢ϯτΛ120ݸ༻ҙ͢Δɻ 2.EC2Λཱ̎ͭͯΔ 3.API_TokenΛ഑ྻԽ֤ͯ͠EC2ʹ഑උ 4.Worker Tierͱͯ͠ͻͨ͢ΒYo͍ͯ͘͠ 0.5ඵ·ͰͷϦΫΤετʹରͯ͠YoΛฦͤΔ

  48. Έͳ͞Μૉ੖Β͍͠YoϥΠϑΛʂ