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

ウェブサービスのCentOS5撤退 / Centos5 Retiring For Web Servicies

ウェブサービスのCentOS5撤退 / Centos5 Retiring For Web Servicies

Hosting Casual Talks #3

Yuuki Tsubouchi (yuuk1)

June 28, 2016
Tweet

More Decks by Yuuki Tsubouchi (yuuk1)

Other Decks in Technology

Transcript

  1. ΢ΣϒαʔϏεͷ
    $FOU04ఫୀ
    Z@VVLJ
    )PTUJOH$BTVBM

    View full-size slide

  2. @y_uuk1
    id:y_uuki
    ΢ΣϒΦϖϨʔγϣϯΤϯδχΞ
    @͸ͯͳ

    View full-size slide

  3. EOL੾ΕϦεΫ
    • ੬ऑੑରԠ͕೉͘͠ͳΔ
    • OpenSSLͳͲͷηΩϡϦςΟύονͷ͋ͨͬͨ
    ύοέʔδͷߋ৽͕ͳ͘ͳΔ
    • ֎෦αΠτͷTLSࣄ৘ʹ௥͍͚ͭͳ͘ͳΓɺ઀ଓ
    Ͱ͖ͳ͘ͳΔ
    • CentOS 5ͷOpenSSL͸0.9.8ܥͰݹ͍
    • TLS 1.2ʹඇରԠ + SNI͕࢖͑ͳ͍ͳͲ

    View full-size slide

  4. 1000+ CentOS5
    100+ roles

    View full-size slide

  5. ରࡦ͢Δαʔόͷબ୒
    • ϦόʔεϓϩΩγ
    • ֎෦͔Β઀ଓΛड͚෇͚ΔɻTLS઀ଓ͢Δ΋ͷ༏ઌ
    • ΞϓϦέʔγϣϯαʔόɺόοναʔόɺϫʔΧ
    • ͳΜΒ͔ͷϏδωεॲཧΛ࣮ߦ͢Δαʔό
    • Ϋϩʔϥ΍֎෦APIΛୟ͘ͱ͜ΖΛ༏ઌ
    • ϦεΫͷ௿͍σʔλϕʔε͸ޙճ͠
    • ͦͷଞ֎෦ͱͷ઀఺ͷͳ͍؅ཧܥαʔό΋ޙճ͠

    View full-size slide

  6. ରࡦํ਑
    • ☓ ࣗ෼ͰηΩϡϦςΟύονΛ͋ͯΔ
    • ࠷ऴखஈͱ͍ͨ͠
    • ☓ CentOS 7ʹΞοϓάϨʔυ
    • ○ ଞͷσΟετϦ΁Ҡߦ
    • 5೥લ͔Β৽αʔϏε͸Debian

    View full-size slide

  7. DebianԽʢϓϩΩγʣ
    • ݱࡏͷ؀ڥ͸ Apache2 or Nginx
    • httpd.conf͕؆୯ͳ΋ͷ͸Nginx΁
    • ؆୯Ͱͳ͍΋ͷ͸Apache 2ͷ࠷৽൛΁
    • 300ߦͷRewriteRule
    • ςετίʔυΛॻ͍ͯಈ࡞֬ೝ͢Δ

    View full-size slide

  8. https://github.com/yuuki/
    yuuki/blob/master/misc/
    proxy-config-test.md

    View full-size slide

  9. DebianԽʢΞϓϦέʔγϣϯʣ
    • mod_perl1, mod_perl2ΛDebianͰϏϧυ
    • rpmԽ͞ΕͨCPANϞδϡʔϧ؅ཧΛ
    cpanfileԽ
    • XSͳͲCͷϥΠϒϥϦʹґଘ͢Δ΋ͷ΋͋
    ΔͨΊɺDebianͰϏϧυͰ͖Δ͔Ͳ͏͔

    View full-size slide

  10. mod_perl1, mod_perl2ΛϏϧυ
    • ϏϧυͰ͖ͳ͍ͷͳΒϞμϯͳ؀ڥʢPlackʣ
    ʹҠߦ͢Δඞཁ͕͋Δʢ΋ͷ͘͢͝େมʣ
    • DockerfileͰϏϧυ͠ϑΝΠϧαʔόʹઃஔ
    • ChefͰ /opt/httpdʹઃஔ͢Δ͚ͩ
    • Perlґଘ͕͋ΔͨΊdebύοέʔδԽ͕໘౗

    View full-size slide

  11. IUUQTHJUIVCDPNZVVLJEPDLFSpMFT
    USFFNBTUFSNPE@QFSM

    View full-size slide

  12. cpanfileԽ
    • rpm -qa perl ͔Βੜ੒
    • ҰൃͰ carton install ͕௨ΔΑ͏ʹͳ
    Δ·Ͱͱʹ͔͕͘Μ͹Δ
    • ಈ࡞֬ೝͯ͠ಈ͔ͳ͔ͬͨΒɺCPAN
    Ϟδϡʔϧͷόʔδϣϯͷࠩ෼Λٙ͏

    View full-size slide

  13. initεΫϦϓτ vs daemontools
    • Systemd …
    • daemontoolsͰࠔ͍ͬͯͳ͍ͷͰ
    daemontoolsԽ
    • daemontools͸มԽ͕ͳ҆͘ఆͯ͠
    ͍ͯࠓޙ΋҆৺

    View full-size slide

  14. ม͑ͳ͍΋ͷ
    • Perlͷόʔδϣϯ
    • mod_perlϝδϟʔόʔδϣϯ
    • Apacheϝδϟʔόʔδϣϯ
    • CPANϞδϡʔϧͷόʔδϣϯ
    • ݹ͍΋ͷ͕खʹೖΒͳ͍Մೳੑ͸͋Δ

    View full-size slide

  15. Ұ൪େมͳͷ͸
    ಈ࡞֬ೝ

    View full-size slide

  16. ಈ࡞֬ೝ
    • ݹ͍ΞϓϦέʔγϣϯ͸ςετ͕ͳ͍
    • खಈͰ͕Μ͹Δ
    • ϓϩΩγઃఆͷςετͲ͏͢Δͷ͔
    • PerlͰૉ๿ʹHTTPΛୟ͘ςετΛॻ
    ͍ͯΔ

    View full-size slide

  17. ೖΕସ͑࡞ۀ
    • ϩʔυόϥϯα഑Լʹ1୆͚ͩ౤ೖ༷͠
    ࢠݟ
    • ΤϥʔϩάͳͲΛSlackʹྲྀ͢
    • ໰୊͕ى͖ͨΒ௚͢
    • શ୆ೖΕସ͑

    View full-size slide

  18. Debian8ͷEOL
    2020-06ʢLTSʣ

    View full-size slide

  19. ΞοϓσʔταΠΫϧ
    Λճ͠ଓ͚ΔͨΊʹ͸

    View full-size slide

  20. ࡞ۀ಺༰͓͞Β͍
    • ৽OS্Ͱmod_perlϏϧυ
    • cpanfile࡞੒
    • αʔόͷ࡞Γ௚͠ͱஔ͖׵͑
    • ΞϓϦέʔγϣϯͷಈ࡞֬ೝ
    • ϓϩΩγͷಈ࡞֬ೝ

    View full-size slide

  21. ϛυϧ΢ΣΞґଘ͠ͳ͍ςετ
    • Apache => nginxͷΑ͏ʹಉ͡໾ׂͷϛ
    υϧ΢ΣΞΛϦϓϨΠε͢Δ͜ͱ͕͋Δ
    • ઃఆϑΝΠϧΛςετ͢ΔͷͰ͸ͳ͘ɺ
    ֎͔ΒΈͨৼΔ෣͍Λςετ͢Δ
    • ϓϩΩγͷ৔߹͸ɺ࣮ࡍʹϦΫΤετ͢
    ΔςετΛॻ͘

    View full-size slide

  22. ΞϓϦέʔγϣϯ؀ڥͷ෼཭
    • ͍·ͩͱαʔό͝ͱ৽͘͠༻ҙͯ͠ೖΕସ
    ͕͑ඞཁ
    • ݹͯ͘ࠔΔͷ͸ΞϓϦέʔγϣϯ
    • ΞϓϦέʔγϣϯ࣮ߦ؀ڥΛಠཱͯ͠Ξο
    ϓσʔτ͍ͨ͠
    • ίϯςφԽ (chrootɺDocker)

    View full-size slide