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

CircleCI_Meetup3_LT

D504d1f14dd00f8028c440e9d1923d37?s=47 Yasuhiroki
September 15, 2017

 CircleCI_Meetup3_LT

D504d1f14dd00f8028c440e9d1923d37?s=128

Yasuhiroki

September 15, 2017
Tweet

Transcript

  1. CircleCI 2.0 ฃಆه @yasuhiroki

  2. Rails (ॳΊͯ)
 + CircleCI (ॳΊͯ) ΤϯδχΞͷฃಆه

  3. ୈҰষ CircleCI 1.0 ͷ͜ͱ͸๨ΕΔ

  4. CircleCI ͕ࣦഊ͍ͯ͠Δ

  5. bundle install Ͱࣦഊ͍ͯ͠Δ

  6. ͲΜͳॲཧΛ࣮ߦ͍ͯ͠ΔͷͩΖ͏ʁ

  7. Կ΋ઃఆ͍ͯ͠ͳ͍

  8. CircleCI 1.0 ͷ೰Έ • CircleCIͱͷ࿈ܞΛࢼͦ͏ͱ͍ͯͨ͠Β͍͠ • ઌߦͯ͠ Android Λࢼ͍ͯͨ͠ •

    CircleCI 1.0 ࣌୅͸ OOM ͰΑ͘ࢮ͵ • ຊ֨తͳ࿈ܞ͸৲ࠐΈ͍ͯͨ͠
  9. CircleCI 1.0 ͷ͜ͱ͸๨ΕΔ • OOM ͰΑ͘ࢮ͵ͷ͸ 1.0 ·Ͱ • CircleCI

    1.0 ͷࠒʹ࠾༻Λ೰ΜͰ͍ͨͳΒɺ
 CircleCI 2.0 ͸ผ෺ͱͯ͠ݕ౼͢΂͠
  10. ୈೋষ .circleci/config.yml

  11. CircleCI ͱ஥ྑ͘ͳΓ͍ͨ

  12. CircleCI ͱ஥ྑ͘ͳΓ͍ͨ

  13. ॆ࣮ͷυΩϡϝϯτ

  14. ࢥ͍͍ͭͨ͜ͱ͸͙͢ࢼ͢

  15. શͯࢼ͢ʢͭ΋ΓͰ༡Ϳʣ

  16. ͻͨ͢Βࢼ͢

  17. ϏϧυࣦഊͷΑ͋͘ΔݪҼ • ઃఆϑΝΠϧͷߏจΤϥʔ • bundle install • XXXXX: command not

    found git push ͢Δલʹؾ෇͘΂͖
  18. खݩͰݕূͰ͖Δ CircleCI CLI

  19. ެࣜͷྫ͕ͨ͘͞Μ͋Δ

  20. CircleCI 2.0 ͱ࿈ܞ׬ྃ

  21. ୈࡾষ ΑΓ଎͘

  22. ΋ͬͱྑ͘Ͱ͖Δ

  23. docker-compose • ։ൃ͸ Mac ͕ͩຊ൪αʔό͸ Linux 
 Mac Ͱ Linux

    ͷಈ࡞֬ೝ͕͔ͨͬͨ͠ • ͔ͤͬ͘ docker-compose Λ࡞ͬͨͷͰɺ
 CircleCI Ͱ΋࢖͏Α͏ʹ͍ͯͨ͠
  24. CircleCI 2.0 Ͱ
 docker-compose Λ࢖͏ʹ͸ • ͬ͘͞ͱಈ͔͢ͳΒ `machine: true` Ϟʔυ

    • docker ίϚϯυ͸ॳΊ͔Βೖ͍ͬͯΔ • docker-compose ΋ wget ͢Δ͚ͩ • खݩͰ࢖͏ͷͱಉ͡ײ֮Ͱ࢖͑Δ
  25. CircleCI 2.0 ͷ docker image Ͱ docker-compose Λ࢖͏ͱʁ • ϋϚϦϙΠϯτ͕ଟ͍

    • Alpine Πϝʔδͩͱ wget ͚ͨͩ͠Ͱ͸ಈ͔ͳ͍ • docker daemon ͕Ͳ͜Ͱಈ͍͍ͯΔͷ͔ҙ͓ࣝͯ͘͠ ඞཁ͕͋Δ • ίϯςφͷ docker όʔδϣϯ͕৽ͯ͘͠΋ɺ
 docker daemon ͸ผͰಈ͍͍ͯͯόʔδϣϯ͕ݹ͍
  26. machine: true Ͱ͸μϝʁ • ॳظىಈ͕஗͍ • ඞཁͳπʔϧΛࣗ෼ͰΠϯετʔϧ͠ͳ͚Ε ͹ͳΒͳ͍ • yaml

    ϑΝΠϧ͕ଠΔ
  27. machine: true Ͱ͸μϝʁ • Note: There is an overhead for

    provisioning a machine executor and use of the machine key may require additional fees in a future pricing update.
 - https://circleci.com/docs/2.0/docker- compose/ • কདྷɺ՝ۚର৅ʹͳΔ͔΋͠Εͳ͍
  28. docker-compose Λ΍ΊΔ

  29. Docker ΠϝʔδΛ༻ҙ • CircleCIͰϏϧυ͢Δઐ༻ͷDockerΠϝʔδ Λ༻ҙ͢Δ • docker-compose Ͱ࢖༻͢Δ
 DockerΠϝʔδͰྑ͍ͷͰ࢖͍ճ͢

  30. ܶతվળ

  31. ࣍ষ ͦͯ͠ DevOps ΁…

  32. ࣗݾ঺հ

  33. @yasuhiroki • Yasuhiro Kiyota @yasuhiroki • Certified Jenkins Engineer •

    AWS ͷ DevOps ͬΆ͍ۀ຿ͯ͠·͢
  34. A10 Lab inc. • ΤϯδχΞืूதͰ͢ʂ • Android, iOS, RoR, AWS

    • ҰॹʹࣗಈԽΛ͢͢ΊΔ஥͕ؒཉ͍͠Ͱ͢ • https://a10lab.com/recruit/ • https://www.wantedly.com/companies/a10lab/projects
  35. ͓͠·͍