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
PRO

July 07, 2016
Tweet

More Decks by Gosuke Miyashita

Other Decks in Technology

Transcript

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

    View Slide

  2. ࣗݾ঺հ
    • ٶԼ ߶ี ([email protected], [email protected])
    • ߹ಉձࣾServerspec Operations୅ද
    • גࣜձࣾϦΫϧʔτςΫϊϩδʔζATLٕज़ސ໰
    • ઍגࣜձٕࣾज़ސ໰
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 2

    View Slide

  3. ࠓ೔͓࿩͢͠Δ͜ͱ
    • Infrastructure as Code ͱͦͷྺ࢙
    • Infrastructure as Code ͷݱঢ়
    • Infrastructure as Code ͷ͜Ε͔Β
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 3

    View Slide

  4. Infrastructure as Code
    ͱͦͷྺ࢙
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 4

    View Slide

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

    View Slide

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

    View Slide

  7. Infrastructure as Codeͷࡾຊப
    • ࣗಈԽ
    • όʔδϣϯ؅ཧ
    • ςετ
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 7

    View Slide

  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

    View Slide

  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

    View Slide

  10. ࠷ۙͷ Infrastructure
    as Code ࣄ৘
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 10

    View Slide

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

    View Slide

  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

    View Slide

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

    View Slide

  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

    View Slide

  15. Server Configuration Tools
    • ͍ΘΏΔ Configuration Management Tools
    • Puppet, Chef, Ansible, Itamae
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 15

    View Slide

  16. Infrastructure Services
    • ͍ΘΏΔ Orchestration ෦෼
    • ϞχλϦϯάʢΞϥʔτɺϝτϦΫεɺϩΪϯάʣ
    • αʔϏεσΟεΧόϦ
    • ෼ࢄϓϩηε؅ཧ
    • ιϑτ΢ΣΞσϓϩΠ
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 16

    View Slide

  17. ෼ྨΠϝʔδ
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 17

    View Slide

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

    View Slide

  19. ྖҬͷมભ
    • ݩʑ͸ Server Configuration ͕ର৅ྖҬͩͬͨ
    • Infrastructure Definition ʹ΋޿͕ͬͨ
    • ʮΠϯϑϥΛίʔυԽʯ͚ͩͰͳ͘ʮΠϯϑϥΛίʔυͰૢ࡞ʯ
    • CloudFormation, Terraform ͳΜ͔͕ग़͖ͯͨӨڹ
    • पลπʔϧ΁ͷ֦େ
    • Test Kitchen, Serverspec, Jenkins, CircleCI
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 19

    View Slide

  20. Infrastructure as Code
    ͷ͜Ε͔Β
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 20

    View Slide

  21. Infrastructure as Code ʹӨڹΛ༩͑Δཁૉ
    • Dynamic Infrastructure Platforms
    • Container
    • Microservices
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 21

    View Slide

  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

    View Slide

  23. Container ʹΑΔӨڹ
    • ϙʔλϏϦςΟͷߴ͞ʹΑΓϓϥοτϗʔϜબ୒ͷ෯͕޿͕Δ
    • Ұ୆ͷ෺ཧ͋Δ͍͸Ծ૝ϚγϯͰ΍͍ͬͯͨ͜ͱ͕ϗετϚγϯͱίϯ
    ςφʹ෼཭
    • Separation of Concern ʹΑΔϓϩϏδϣχϯάͷ୯७Խ
    • Server Configuration Tools ͷॏཁੑ௿Լ
    • Serverspec Έ͍ͨͳπʔϧͰςετ͢Ε͹ྑ͍
    • αʔό؅ཧͱ͍͏ΑΓϓϩηε؅ཧ
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 23

    View Slide

  24. Microservices ʹΑΔӨڹ
    • ίϯϙʔωϯτ͸୯ػೳԽ/γεςϜ͸ෳࡶԽ
    • ςετ΍ϞχλϦϯά͕ॏཁʹ
    • Infrastructure Services ͷॏཁੑ૿େ
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 24

    View Slide

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

    View Slide

  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

    View Slide

  27. Infrastructure Services ͱ Infrastructure as Code
    • ιϑτ΢ΣΞ։ൃʹߋʹ͖ۙͮΑΓෳࡶԽ͢Δ
    • ࠓ·ͰΠϯϑϥͱ͸͋·Γԑ͕ͳ͔ͬͨख๏ͷԠ༻
    • ྫ: ܗࣜख๏ʹΑΔઃܭ
    • ྫ: Consumer-Driven Contract Testing
    • ιϑτ΢ΣΞ։ൃͱͷڥք͕ΑΓᐆດʹ
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 27

    View Slide

  28. Infrastructure as Code ͷ͜Ε͔Β
    • ର৅ྖҬ͕޿͕ΓɺΑΓෳࡶԽ͢Δ
    • ͱ͸͍͑ɺجຊݪଇ͸ಉ͡
    • ࣗಈԽ
    • όʔδϣϯ؅ཧ
    • ςετ
    • ͜ΕΛͰ͖ΔݶΓγϯϓϧʹ࣮ݱ͢Δ
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 28

    View Slide

  29. Infrastructure as Code ͷ͜Ε͔Β
    • ֶज़తΞϓϩʔν΋ॏཁ
    • ྫ: ܗࣜख๏ɺάϥϑཧ࿦ɺσΟʔϓϥʔχϯά
    • ςετ෼໺͸·ͩະ੒ख़
    • ະ੒ख़͔ͩΒͦ͜վળͷ༨஍͕େ͍ʹ͋Δ
    • ϞχλϦϯάͱͷ༥߹
    • ςετʹຊ൪σϓϩΠલɺϞχλϦϯάʹຊ൪σϓϩΠޙ
    • ࣗ཯੍ޚ/ಈతฏߧ
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 29

    View Slide

  30. ͓·͚
    • ʮͷ΅Γʔ͞ΜͷΫϥ΢υΠϯϑϥPodcastʯͰ͜ͷΠϕϯ
    τͷޙ೔ஊతͳ࿩Λ͠·͢
    • https://cloudinfra.audio/
    • #nobolycloud
    Recruit Technologies Open Lab #03: Infrastructure as Code 2016/07/07 30

    View Slide