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

Serverspec and OSS at IEICE Society Conference ...

Serverspec and OSS at IEICE Society Conference 2018

Gosuke Miyashita

September 11, 2018
Tweet

More Decks by Gosuke Miyashita

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ • ٶԼ ߶ี • ߹ಉձࣾServerspec Operations୅ද • ϑϦʔϥϯε5೥໨ •

    ओʹαʔόʔ/Πϯϑϥํ໘Λಘҙͱ͢Διϑτ΢ΣΞΤϯδχΞ • OSSϏδωε͸ͯ͠ͳ͍͚ͲOSSͰ൧Λ৯ͬͯ࠺ͱ5ਓͷࢠͲ΋ Λཆͬͯ·͢ 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 3
  2. Serverspecͷίʔυྫ describe package('nginx') do it { should be_installed } end

    describe service('nginx') do it { should be_enabled } it { should be_running } end 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 7
  3. Serverspecͷ࣮ߦྫ $ rake spec Package "nginx" should be installed Finished

    in 3.11 seconds 1 example, 0 failures 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 9
  4. Serverspecͷ࣮ߦྫ $ rake spec Package "nginx" should be installed (FAILED

    - 1) Failures: 1) Package "nginx" should be installed Failure/Error: it { should be_installed } sudo rpm -q nginx package nginx is not installed expected Package "nginx" to be installed # ./spec/app/nginx_spec.rb:4:in `block (2 levels) in <top (required)>' Finished in 3.16 seconds 1 example, 1 failure 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 10
  5. OSSΛެ։͢Δͱ͍͏͜ͱ • ʮOSS׆ಈʯʹର͢ΔΠϝʔδ͸ʁ • ಛผͳߦҝʁ • ϋʔυϧ͕ߴ͍ʁ • ੈͷதʹର͢Δߩݙʁ •

    ٕज़ྗ͕ͳ͍ͱͰ͖ͳ͍ʁ • ͔ͭͯࣗ෼͸ͦ͏ࢥͬͯ·ͨ͠ 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 15
  6. OSS׆ಈΛ͢ΔΑ͏ʹͳͬͨܦҢ • ؆୯ͳίʔυΛެ։͢Δ(BlosxomϓϥάΠϯ) • ར༻͍ͯ͠ΔOSSʹύονΛૹΔ • ໘നͦ͏ͳOSSϓϩδΣΫτʹࢀՃ͢Δ(Plagger) • ָ͍͠ͷͰ͞ΒʹOSS׆ಈ͢Δ •

    OSSʹର͢Δಛผͳҙࣝ͸ബΕ͍ͯͬͨ 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 16
  7. Ϗδωεʹ͓͚ΔOSS؀ڥͷมԽ • 97೥ SIerʹೖࣾ • 98೥ Open Source Initiativeઃཱ/Netscape NavigatorͷOSSԽ

    • Netscape੡඼୲౰ΤϯδχΞͩͬͨͷͰ࢓ࣄʹ΋Өڹ͕͋ͬͨ • ͦͷޙϓϩϓϥΠΤλϦͳ੡඼ʹApache͕ಉࠝ͞ΕΔɺLinux୲౰ͷ ෦ॺ͕Ͱ͖ΔͳͲɺOSSͷӨڹ͕ࣗ෼͕ॴଐ͢ΔձࣾʹٴΜͰ͖ͨ • झຯͷOSS͕࢓ࣄʹ΋໾ཱͭΑ͏ʹ 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 17
  8. OSSΛެ։͢Δͱ͍͏͜ͱ • ެ։͢Δ͜ͱͰ৭ʑͳ΋ͷ͕ಘΒΕΔ • ٕज़తͳϑΟʔυόοΫɺশࢍɺਓ຺ɺָ͠͞ • ഓٕͬͨज़͕࢓ࣄʹ΋໾ཱͭ • ͜Ε͸OSS׆ಈ͚ͩͰ͸ͳ͘ɺ৘ใΛΦʔϓϯʹ͢Δ͜ͱશൠʹݴ͑Δ •

    OSSΛެ։͢Δͱ͍͏ߦҝ͸ɺ৘ใΛΦʔϓϯʹ͠ɺͦΕʹΑͬͯԿΒ͔ͷϝϦο τΛಘΔɺͱ͍͏ߦҝͷҰ؀ • OSS׆ಈ͸ɺϒϩάΛॻ͍ͨΓSNSʹ౤ߘͨ͠Γɺͱ͍͏ߦҝͱԿΒࠩ͸ͳ͍ • Serverspecͷެ։΋͜͏ͨ͠ߦҝͷҰ؀ 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 18
  9. Ϗδωε΁ͷӨڹʢॴଐձࣾʣ • ձࣾһͩͬͨ͜Ζʹɺ࢓ࣄʹ໾ཱͯΔͨΊʹͭͬͨ͘ • Serverspecͦͷ΋ͷͰ௚઀తͳϏδωε͸͍ͯ͠ͳ͍ • ϏδωεΛࢧ͑Δπʔϧͱͯ͠׆༻ • มߋʹڧ͔ͭ҆͘ఆͨ͠γεςϜΛ࣮ݱ͢ΔͨΊͷҰखஈ •

    ձࣾͷٕज़ϓϨθϯε޲্ • ΤϯδχΞ࠾༻ʹ໾ཱͯΔ 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 20
  10. Ϗδωε΁ͷӨڹʢଞࣾʣ • ϏδωεΛࢧ͑Δπʔͱͯ͠׆༻ • DevOps/Infrastructur as Codeͷ࣮ݱ • ServerspecΛ׆༻ͨ͠Ϗδωε •

    TISגࣜձࣾ͞ΜͷʮSHIFT wareʯ • CTCͷʮOpen Cloud Packageʯ 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 21
  11. OSSίϛϡχςΟ΁ͷӨڹ • ೿ੜOSSͷ஀ੜ • ServerspecͷίΞϥΠϒϥϦͰ͋ΔSpecinfraΛར༻ͨ͠ OSS • Itamae/ServeKit/(MItamae) • Serverspecͱಛఆͷπʔϧͷ਌࿨ੑΛߴΊΔOSS

    • Dockerspec, Ansiblespec 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 22
  12. OSSίϛϡχςΟ΁ͷӨڹʢ͖ͭͮʣ • ྨࣅOSS • Goss, Testinfra, InSpecͳͲ • Serverspecʹண૝ΛಘͨOSS •

    awspec 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 23
  13. ࣗ਎΁ͷϙδςΟϒͳӨڹ • ༷ʑͳձࣾ΍ਓͱͷܨ͕Γ͕Ͱ͖ͨ • ࠓ·Ͱͱ͸ҧ͏ྖҬͷਓୡͱͷܨ͕Γ • ΦϥΠϦʔ͔ΒຊΛग़ͤͨ • ಠཱޙɺࠓͷͱ͜Ζॱௐʹ࢓ࣄ͕ಘΒΕ͍ͯΔ •

    ServerspecʹؔΘΔ࢓ࣄ͸͘͝Ұ෦Ͱ͋Δ͕ 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 24
  14. ͓ΘΓʹ • ݸਓͱͯ͠ͳͥOSS׆ಈΛ͢Δͷ͔Λड़΂ͨ • ࣗ෼ʹϝϦοτ͕͋ΔͷͰ΍͍ͬͯΔ • ϑΟʔυόοΫɺশࢍɺਓ຺ɺָ͠͞ • Ϗδωεͱ͍͏΄ͲͰ͸ͳ͍͕൧͕৯͍͑ͯΔ •

    ૊৫ͱͯ͠ͷOSS׆ಈ͸Ϗδωε΍ίϛϡχςΟͱͷؔΘΓ ํ͕·ͨશવҧͬͯ͘Δ 2018೥ిࢠ৘ใ௨৴ֶձιαΠΤςΟେձ اըߨԋηογϣϯBI-7 ʮγεςϜӡ༻؅ཧOSS ͷ։ൃͱެ։ʯ 26