バッチ処理でhakoを使う話

 バッチ処理でhakoを使う話

B122e77de860c4307034f0a041dabc8e?s=128

hoshino tsuyoshi

October 13, 2016
Tweet

Transcript

  1. όονॲཧͰhakoΛ࢖͏࿩ @hoshinotsuyoshi / feedforce Inc. 2016/10/12

  2. Me • @hoshinotsuyoshi • h,p:/ /hoppie.hatenablog.com/ • • • 2014ʙ

    feedforce Inc.
  3. όονॲཧ ! • cronͩͱ • ߴ͍Մ༻ੑΛಘΔͷ͕೉͍͠ • ϦιʔεʹԠͨ͡εέδϡʔϦϯά͕೉͍͠

  4. ECS

  5. EC2 Container Service Product Details ❝ You can run anything:

    applica1ons, batch jobs, or microservices. ❞
  6. ECSͰόονॲཧ͢Δʹ͸ 1. TaskDefini,onͷొ࿥ͯ͠ • $ aws ecs register-task-definition 2. TaskΛ࣮ߦ͢Δʂ

    • $ aws ecs run-task 3. Ҏ্ʂ(جຊతʹ͸)
  7. ͦͷଞͷ໰୊ • ΦʔτεέʔϦϯάͤ͞ͳ͖Ό… ! • TaskDefini-on͕ࡍݶͳ͘૿Ճͯ͘͠… ! • σϓϩΠͷͨͼʹTaskDefini-onొ࿥ͯͨ͠ •

    ొ࿥ࡁΈ͔Ͳ͏͔ͷνΣοΫ͕ͩΔ͍ • …
  8. (TaskDefini+on͕ແݶʹ૿͑ͯ͘Πϝʔδ)

  9. 2016೥9݄

  10. ?ʮhakoͷoneshot ! ྑͦ͞͏ʯ

  11. None
  12. $ hako oneshot ! ❝ hako oneshot ͸YAML ͷఆٛʹैͬͯ ECS

    ͷ RunTask API Λ ݺͼग़͢ίϚϯυ ❞ - ECS Λར༻ͨ͠ΦϑϥΠϯδϣϒͷ࣮ߦ؀ڥ - ΫοΫύου։ൃऀϒϩά
  13. ͜Μͳ͔Μ͡ʹͳͬͨ

  14. None
  15. ! ͷத਎

  16. None
  17. None
  18. None
  19. None
  20. None
  21. ! TaskDefini+on͕૿͑ͮΒ͍ " • TaskDefini+onΛॏෳొ࿥͠ͳ͍࢓૊Έ͕͋Δ • (ͨ·ʹొ࿥͞ΕͪΌ͏ύλʔϯ͕͋ΔşŪƄ) • (ιʔεಡΜͰ௚ͨ͠Γɺyamlͷॻ͖ํͰճආ͢Δ)

  22. ! ࣗಈscale out " • Ϧιʔε͕଍Γͳ͍ͱ͖ͷࣗಈscale out • autoscaling_group_for_oneshot Λࢦఆ͢Ε͹͓̺

    • ઃఆྫ) • Ϧιʔε͕଍Γͳ͍৔߹͸desired͕ 1 ૿͑Δ • ͜ͷ 1 ͸ϋʔυίʔυ
  23. ·ͱΊ • hako oneshot ! Λ࢖͏͜ͱʹΑΓ • ༨෼ͳTaskDefini/onొ࿥͕ݮͬͨ • ࣗಈscale

    out΋໘౗ݟͯ͘ΕΔ • ECS APIୟࣗ͘લίʔυ͕ݮͬͨ
  24. ࢀߟจݙ • AWS _ Amazon EC2 Container Service _ Product

    Details • h<ps:/ /aws.amazon.com/ecs/details/?nc1=h_ls • eagletmt/hako • h<ps:/ /github.com/eagletmt/hako
  25. ࢀߟจݙ • ECS Λར༻ͨ͠ΦϑϥΠϯδϣϒͷ࣮ߦ؀ڥ - ΫοΫύου։ ൃऀϒϩά • h(p:/ /techlife.cookpad.com/entry/2016/09/09/235007