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

ちいさな会社でのAnsible活用事例

B51ca7a51ae1fd06bc536fe83e6113e2?s=47 Kaz Watanabe
February 28, 2017

 ちいさな会社でのAnsible活用事例

B51ca7a51ae1fd06bc536fe83e6113e2?s=128

Kaz Watanabe

February 28, 2017
Tweet

Transcript

  1. ͍ͪ͞ͳձࣾͰͷAnsible׆༻ࣄྫ ʰAnsibleపఈೖ໳ʱग़൛ه೦Πϕϯτ(2017/2/27) ߹ಉձࣾdecr ୅දࣾһ ౉ลҰ޺(@kaz_29)

  2. WHO!? ౉ลҰ޺(@kaz_29) ߹ಉձࣾ decr ୅දࣾһ WebΞϓϦέʔγϣϯͷ։ൃ iOSΞϓϦέʔγϣϯͷ։ൃ Ϋϥ΢υΠϯϑϥͷߏஙɾӡ༻

  3. WHAT? • WebܥͷαʔϏε։ൃ • iOSΞϓϦ։ൃ • APIόοΫΤϯυͷ։ൃ • ϑϩϯτΤϯυΞϓϦ։ൃ •

    Πϯϑϥߏஙɾӡ༻
  4. TEAM • Θͨͳ΂ (Backend, iOS, Ops, (Frontend)) • member(Backend, Frontend)

    x 1 • (࣌ʑύʔτφʔ͞Μͷελοϑ)
  5. SIZE ɾɾɾ ɾɾɾ ɾɾɾ ࠷খ 1୆ ଟͯ͘΋ 4ʙ10୆ఔ౓ ʙ

  6. TOOLS / SERVICES

  7. DEVELOPMENT • Vagrant + Ansible • ansible_local provisioner • synced_foler(rsync-auto

    + rsync-back) • nodejs͸ϗετଆͰ࡞ۀ͍ͯ͠Δ(࠷ۙ) • ndenvͰόʔδϣϯ؅ཧ
  8. None
  9. ࣗಈςετ͍ͯ͠·͔͢ʁ

  10. DEVELOPMENT • UnitTest͸͕ͬͭΓॻ͍ͯ·͢ • TDD·Ͱ͸΍ͬͯͳ͍͚ͲProductionͷίʔυͱηοτͰ Commit͍ͯ͠·͢ • JSͷϑϩϯτ/iOSΞϓϦͷςετ͸৭ʑ೰ΜͰ͍·͢ • ཁ݅తʹඞཁͰ͋Ε͹BDDͰडೖΕςετ΋ॻ͘(͜ͱ΋͋Γ·͢)

    • डೖΕςετͷࣗಈԽ͸৭ʑ಄௧͍Ͱ͢
  11. DEVELOPMENT • ܧଓతΠϯςάϨʔγϣϯ • github΁ͷpushͰCiecleCIͰࣗಈςετ • API Documentͷࣗಈੜ੒(swagger) • Github/PivotalTracker/CircleCIͳͲͷΠϕϯτ͸Slackʹ௨஌

    • Ұ෦αʔϏεͰ͸HubotͰdeployͰ͖ΔΑ͏ʹ͍ͯ͠Δ
  12. STAGING / PRODUCTION • ͱͰ͖Δ͚ͩຊ൪ͱಉ͡؀ڥͰ… • εςʔδϯά؀ڥ͸ɺ༧ࢉతʹ৑௕ԽͳͲ͠ͳ͍ͳͲɺશ͘ҰॹͰ ͸ͳ͍͜ͱ͕ଟ͍ • ༻్

    • Provision/Deployͷಈ࡞ݕূ • ΫϥΠΞϯτ͞Μͷಈ࡞ݕূ • ʢεςʔδϯά༻ͷΞϓϦΛ࡞੒ͯ͠഑෍ʣ
  13. STAGING / PRODUCTION • Dynamic inventory͸΄ͱΜͲ࢖ͬͯͳ͍ • ୆਺͕গͳ͍ͷͰ… • Feature

    flag • Քಇঢ়ଶΛSlackʹ௨஌ • Ansible/CapistranoͳͲͷ࣮ߦঢ়گ • ؂ࢹͷΤϥʔ
  14. ·ͱΊ • શͯͷ؀ڥΛAnsibleͰߏங • खಈͰઃఆ͠ͳ͍ • pyenv+virtualenvେࣄ • ࣗಈςετॏཁ •

    ChatͰঢ়گΛࣗಈڞ༗͢ΔͱָͰ͢