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

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

0d5d8fb9cc4c06f581825f5a61d3f5f1?s=128

Gosuke Miyashita

July 07, 2016
Tweet

Transcript

  1. Infrastructure as Code ͷ͜Ε·Ͱͱ͜Ε͔Β Recruit Technologies Open Lab #03: Infrastructure

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

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

    ͷݱঢ় • Infrastructure as Code ͷ͜Ε͔Β Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 3
  4. Infrastructure as Code ͱͦͷྺ࢙ Recruit Technologies Open Lab #03: Infrastructure

    as Code 2016/07/07 4
  5. Infrastructure as Codeͱ͸ʁ • ΠϯϑϥΛίʔυͰهड़͢Δ͜ͱ • ͦΕʹΑΓιϑτ΢ΣΞ։ൃͰطʹ༗ޮͰ͋Δͱཱূ͞Εͯ ͍ΔϓϥΫςΟεΛΠϯϑϥʹ΋ಉ͡Α͏ʹద༻Ͱ͖ɺͦͷ Ըܙ͕ड͚ΒΕΔ Recruit

    Technologies Open Lab #03: Infrastructure as Code 2016/07/07 5
  6. Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 6

  7. Infrastructure as Codeͷࡾຊப • ࣗಈԽ • όʔδϣϯ؅ཧ • ςετ Recruit

    Technologies Open Lab #03: Infrastructure as Code 2016/07/07 7
  8. 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
  9. 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
  10. ࠷ۙͷ Infrastructure as Code ࣄ৘ Recruit Technologies Open Lab #03:

    Infrastructure as Code 2016/07/07 10
  11. Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 11

  12. 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
  13. Dynamic Infrastructure Platforms • αʔόɺετϨʔδɺωοτϫʔΫͱ͍ͬͨίϯϐϡʔλϦ ιʔεΛϓϩάϥϚϒϧʹఏڙ͢Δ΋ͷ • EC2ͷΑ͏ͳIaaS΍OpenStackͷΑ͏ͳIaaSΛߏ੒͢ΔͨΊ ͷπʔϧ •

    Cobbler ΍ Foreman ͷΑ͏ͳ෺ཧϚγϯΛϓϩϏδϣχϯ ά͢Δπʔϧ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 13
  14. 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
  15. Server Configuration Tools • ͍ΘΏΔ Configuration Management Tools • Puppet,

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

    • ෼ࢄϓϩηε؅ཧ • ιϑτ΢ΣΞσϓϩΠ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 16
  17. ෼ྨΠϝʔδ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07

    17
  18. Infrastrtucture as Code͕ର৅ͱ͢ΔྖҬ Recruit Technologies Open Lab #03: Infrastructure as

    Code 2016/07/07 18
  19. ྖҬͷมભ • ݩʑ͸ Server Configuration ͕ର৅ྖҬͩͬͨ • Infrastructure Definition ʹ΋޿͕ͬͨ

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

    as Code 2016/07/07 20
  21. Infrastructure as Code ʹӨڹΛ༩͑Δཁૉ • Dynamic Infrastructure Platforms • Container

    • Microservices Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 21
  22. 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
  23. Container ʹΑΔӨڹ • ϙʔλϏϦςΟͷߴ͞ʹΑΓϓϥοτϗʔϜબ୒ͷ෯͕޿͕Δ • Ұ୆ͷ෺ཧ͋Δ͍͸Ծ૝ϚγϯͰ΍͍ͬͯͨ͜ͱ͕ϗετϚγϯͱίϯ ςφʹ෼཭ • Separation of

    Concern ʹΑΔϓϩϏδϣχϯάͷ୯७Խ • Server Configuration Tools ͷॏཁੑ௿Լ • Serverspec Έ͍ͨͳπʔϧͰςετ͢Ε͹ྑ͍ • αʔό؅ཧͱ͍͏ΑΓϓϩηε؅ཧ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 23
  24. Microservices ʹΑΔӨڹ • ίϯϙʔωϯτ͸୯ػೳԽ/γεςϜ͸ෳࡶԽ • ςετ΍ϞχλϦϯά͕ॏཁʹ • Infrastructure Services ͷॏཁੑ૿େ

    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 24
  25. 3ཁૉͷΑΔӨڹͷ·ͱΊ • ϚϧνΫϥ΢υΛଋͶΔɺ͋Δ͍͸ҠߦΛ༰қʹ͢ΔͨΊͷ Infrastructure Definition Tools ͱ Infrastructure Services ͷॏ

    ཁੑ૿େ • ૬ରతʹ Server Configuration Tools ͷॏཁੑ௿Լ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 25
  26. 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
  27. Infrastructure Services ͱ Infrastructure as Code • ιϑτ΢ΣΞ։ൃʹߋʹ͖ۙͮΑΓෳࡶԽ͢Δ • ࠓ·ͰΠϯϑϥͱ͸͋·Γԑ͕ͳ͔ͬͨख๏ͷԠ༻

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

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

    ςετ෼໺͸·ͩະ੒ख़ • ະ੒ख़͔ͩΒͦ͜վળͷ༨஍͕େ͍ʹ͋Δ • ϞχλϦϯάͱͷ༥߹ • ςετʹຊ൪σϓϩΠલɺϞχλϦϯάʹຊ൪σϓϩΠޙ • ࣗ཯੍ޚ/ಈతฏߧ Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 29
  30. ͓·͚ • ʮͷ΅Γʔ͞ΜͷΫϥ΢υΠϯϑϥPodcastʯͰ͜ͷΠϕϯ τͷޙ೔ஊతͳ࿩Λ͠·͢ • https://cloudinfra.audio/ • #nobolycloud Recruit Technologies

    Open Lab #03: Infrastructure as Code 2016/07/07 30