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

Infrastructure as Code のこれまでとこれから/Infrastructure as Code

Infrastructure as Code のこれまでとこれから/Infrastructure as Code

Gosuke Miyashita

July 07, 2016
Tweet

More Decks by Gosuke Miyashita

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ • ٶԼ ߶ี (mizzy@github, gosukenator@twitter) • ߹ಉձࣾServerspec Operations୅ද •

    גࣜձࣾϦΫϧʔτςΫϊϩδʔζATLٕज़ސ໰ • ઍגࣜձٕࣾज़ސ໰ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 2
  2. ࠓ೔͓࿩͢͠Δ͜ͱ • Infrastructure as Code ͱͦͷྺ࢙ • Infrastructure as Code

    ͷݱঢ় • Infrastructure as Code ͷ͜Ε͔Β Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 3
  3. Infrastructure as Codeͷࡾຊப • ࣗಈԽ • όʔδϣϯ؅ཧ • ςετ Recruit

    Technologies Open Lab #03: Infrastructure as Code 2016/07/07 7
  4. Infrastructure as Codeͷ஀ੜ • େݩ͸1993೥ͷCFEngine • 2005೥ͷPuppetొ৔͕௚઀తͳ͖͔͚ͬ • Infrastructure as

    Codeͱ͍͏ݴ༿͕ग़͖ͯͨͷ͸2008ࠒ • ChefͷϦϦʔε͸2009೥ • ౰࣌͸ࣗಈԽ͕ओ؟ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 8
  5. Infrastructure as Codeͷมભ • ʮίʔυԽͯࣗ͠ಈԽʯ͔Βʮιϑτ΢ΣΞ։ൃͷϓϥΫς ΟεΛద༻ʯʹͳΔஹީ͸2008೥͙Β͍͔Β͋ͬͨ • Agile Infrastructure/Agile Operations

    • DevOpsͷొ৔͸2009೥ࠒ • 2011೥ग़൛ͷTest-Driven Infrastructure with Chef • 2013೥ϦϦʔεͷServerspec Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 9
  6. Infrastructure as Code ʹؔ͢Δ πʔϧ΍αʔϏεͷ෼ྨ • Dynamic Infrastructure Platforms •

    Infrastructure Definition Tools • Server Configuration Tools • Infrastructure Services Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 12
  7. Dynamic Infrastructure Platforms • αʔόɺετϨʔδɺωοτϫʔΫͱ͍ͬͨίϯϐϡʔλϦ ιʔεΛϓϩάϥϚϒϧʹఏڙ͢Δ΋ͷ • EC2ͷΑ͏ͳIaaS΍OpenStackͷΑ͏ͳIaaSΛߏ੒͢ΔͨΊ ͷπʔϧ •

    Cobbler ΍ Foreman ͷΑ͏ͳ෺ཧϚγϯΛϓϩϏδϣχϯ ά͢Δπʔϧ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 13
  8. Infrastructure Definition Tools • Infrastructure as Codeతͳख๏ͰDynamic Infrastructure Platforms্ͷϦιʔεΛ੍ޚ •

    Terraform, CloudFormation, OpenStack Heat • Configuration Registries • Consul, etcd, ZooKeeper Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 14
  9. Server Configuration Tools • ͍ΘΏΔ Configuration Management Tools • Puppet,

    Chef, Ansible, Itamae Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 15
  10. Infrastructure Services • ͍ΘΏΔ Orchestration ෦෼ • ϞχλϦϯάʢΞϥʔτɺϝτϦΫεɺϩΪϯάʣ • αʔϏεσΟεΧόϦ

    • ෼ࢄϓϩηε؅ཧ • ιϑτ΢ΣΞσϓϩΠ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 16
  11. ྖҬͷมભ • ݩʑ͸ Server Configuration ͕ର৅ྖҬͩͬͨ • Infrastructure Definition ʹ΋޿͕ͬͨ

    • ʮΠϯϑϥΛίʔυԽʯ͚ͩͰͳ͘ʮΠϯϑϥΛίʔυͰૢ࡞ʯ • CloudFormation, Terraform ͳΜ͔͕ग़͖ͯͨӨڹ • पลπʔϧ΁ͷ֦େ • Test Kitchen, Serverspec, Jenkins, CircleCI Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 19
  12. Infrastructure as Code ʹӨڹΛ༩͑Δཁૉ • Dynamic Infrastructure Platforms • Container

    • Microservices Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 21
  13. Dynamic Infrastructure ʹΑΔӨڹ • AmazonҎ֎ʹ΋ Google ΍ Microsoft ͳͲͷϏοάϓϨΠϠ ʔ͕ग़ݱ

    • ϚϧνΫϥ΢υରԠ/ϕϯμʔϩοΫΠϯճආ • ෳ਺ͷ Dynamic Infrastructure Platforms ΛଋͶΔଘࡏͱͯ͠ ͷ Infrastructure Definition Tools ΍ Infrastructure Services ͕ ॏཁʹ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 22
  14. Container ʹΑΔӨڹ • ϙʔλϏϦςΟͷߴ͞ʹΑΓϓϥοτϗʔϜબ୒ͷ෯͕޿͕Δ • Ұ୆ͷ෺ཧ͋Δ͍͸Ծ૝ϚγϯͰ΍͍ͬͯͨ͜ͱ͕ϗετϚγϯͱίϯ ςφʹ෼཭ • Separation of

    Concern ʹΑΔϓϩϏδϣχϯάͷ୯७Խ • Server Configuration Tools ͷॏཁੑ௿Լ • Serverspec Έ͍ͨͳπʔϧͰςετ͢Ε͹ྑ͍ • αʔό؅ཧͱ͍͏ΑΓϓϩηε؅ཧ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 23
  15. 3ཁૉͷΑΔӨڹͷ·ͱΊ • ϚϧνΫϥ΢υΛଋͶΔɺ͋Δ͍͸ҠߦΛ༰қʹ͢ΔͨΊͷ Infrastructure Definition Tools ͱ Infrastructure Services ͷॏ

    ཁੑ૿େ • ૬ରతʹ Server Configuration Tools ͷॏཁੑ௿Լ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 25
  16. Infrastructure Services ͱ Infrastructure as Code • Infrastructure Services ͸·ͩ

    Infrastructure as Code ͷԸܙ͕ෆे෼ • Server Configuration Tools ͸੩తͳঢ়ଶΛίʔυͰهड़ • Infrastructure Services Ͱ͸ಈతͳৼ෣͍Λهड़ • ֎ଆ͔Βίϯτϩʔϧ͢Δ͚ͩͰ͸ͳࣗ͘཯੍ޚ΋ॏཁʹ • ྫ: ngx_lua ΍ ngx_mruby ʹΑΔʮઃఆͷίʔυԽʯ • ಈతฏߧ/ϗϝΦελγε Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 26
  17. Infrastructure Services ͱ Infrastructure as Code • ιϑτ΢ΣΞ։ൃʹߋʹ͖ۙͮΑΓෳࡶԽ͢Δ • ࠓ·ͰΠϯϑϥͱ͸͋·Γԑ͕ͳ͔ͬͨख๏ͷԠ༻

    • ྫ: ܗࣜख๏ʹΑΔઃܭ • ྫ: Consumer-Driven Contract Testing • ιϑτ΢ΣΞ։ൃͱͷڥք͕ΑΓᐆດʹ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 27
  18. Infrastructure as Code ͷ͜Ε͔Β • ର৅ྖҬ͕޿͕ΓɺΑΓෳࡶԽ͢Δ • ͱ͸͍͑ɺجຊݪଇ͸ಉ͡ • ࣗಈԽ

    • όʔδϣϯ؅ཧ • ςετ • ͜ΕΛͰ͖ΔݶΓγϯϓϧʹ࣮ݱ͢Δ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 28
  19. Infrastructure as Code ͷ͜Ε͔Β • ֶज़తΞϓϩʔν΋ॏཁ • ྫ: ܗࣜख๏ɺάϥϑཧ࿦ɺσΟʔϓϥʔχϯά •

    ςετ෼໺͸·ͩະ੒ख़ • ະ੒ख़͔ͩΒͦ͜վળͷ༨஍͕େ͍ʹ͋Δ • ϞχλϦϯάͱͷ༥߹ • ςετʹຊ൪σϓϩΠલɺϞχλϦϯάʹຊ൪σϓϩΠޙ • ࣗ཯੍ޚ/ಈతฏߧ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 29