github-enterprise-user-kai-desuyone

26c17d2f70a57a8fd9a70885682fcd74?s=47 Yohei Kawahara
March 02, 2018
79

 github-enterprise-user-kai-desuyone

Github Enterprise ユーザー会でお話した資料です

26c17d2f70a57a8fd9a70885682fcd74?s=128

Yohei Kawahara

March 02, 2018
Tweet

Transcript

  1. 1 (JU)VC&OUFSQSJTF Ξοϓσʔτ࡞ۀޮ཰ԽͷࢼΈ 2018.03.01 (JU)VC&OUFSQSJTFϢʔβձ "ENJOηογϣϯ ͔ͬͺ !JOPLBSB

  2. ઒ݪ༸ฏʢ͔ͬͺʣ 2 JSFUגࣜձࣾDMPVEQBDLࣄۀ෦ JOPLBSB JOPLBQQB JOPLBQQB ෱Ԭ͔ΒϦϞʔτͰ ͓٬༷͔Β͓༬ ͔Γ͍ͯ͠Δ"84؀ڥͷߏங͔Β ӡ༻ʹܞΘ͍ͬͯ·͢

  3. ͸͡Ίʹ ‘ ຊࢿྉதͰ͸ (JUIVC&OUFSQSJTFΛ()&ͱ ͍͏ུশͰදه͠·͢ ‘ ຊࢿྉ͸ެ։͠·͕͢ ࣸਅࡱӨ͸पΓͷํʹ഑ ্ྀͨ͠Ͱࣗ͝༝ ࢿྉ͚ͩͰͳ͘

    ࢲ΋ͨ·ʹ͸ ࡱͬͯԼ͍͞  ‘ ͝ෆ໌ͳ఺͕͋Γ·ͨ͠Β ࠙਌ձͰ͓ؾܰʹ͓ ੠͕͚Լ͍͞ 3
  4. γεςϜ։ൃࣄۀ DMPVEQBDLࣄۀ *P5։ൃࣄۀ ઃཱ ࢿຊۚ ୅දऔక໾ࣾ௕ ैۀһ਺ ೥݄೔  ສԁ

    ᜊ౻কฏ ໊ ೥݄࣌఺ ڌ఺ ౦ژɾେࡕɾ໊ݹ԰
  5. "84Λ׆༻͠ͳ͕Β ͓٬͞·͸ϏδωεʹूதͰ͖Δ ίϯγΣϧδϡαʔϏε

  6. ࣌ؒ೔ ఆֹ՝ۚ ੥ٻॻ෷͍ 1ϚʔΫɺ*4.4ɺ1$*%44ɺ40$ϨϙʔτऔಘࡁΈͷӡ༻ମ੍ ؂ࢹӡ༻อक اۀ "84

  7. None
  8. ϓϨϛΞίϯαϧςΟϯά ύʔτφʔ શੈքͰࣾ
 ೔ຊͰࣾ ࠷্Ґύʔτφʔ DMPVEQBDL͸೥࿈ଓೝఆ 1SFNJFS"EWBODFE4UBOEBSE3FHJTUFSFE

  9. ࣾ ࣾ௒ ϓϩδΣΫ τ௒   ೥ؒ ೥ؒ"84ͷΈͰӡ༻อक

  10.  Ϋϥ΢υ ಋೖࣄྫ ˞೥݄࣌఺

  11. ΞδΣϯμ  DMPVEQBDL✕()&  ()&Ξοϓσʔτ࡞ۀ  Ξοϓσʔτ࡞ۀͷ՝୊  ޮ཰Խ΁ͷऔ૊Έ 

    ޮ཰ԽͰಘΒΕͨޮՌ  ࠓޙͷऔ૊Έ  ࠷ޙʹ 11
  12. DMPVEQBDL✕()& ‘ ͓٬༷ͷ()&؀ڥΛ͓༬͔Γͯ͠ӡ༻͍ͯ͠Δ ‘ ॳظߏங͸ࢲୡͷνʔϜ͕୲౰ ‘ ೔ʑͷӡ༻͸.41νʔϜ͕୲౰ ‘ ͪͳΈʹ ࣗࣾͰ΋ར༻͍ͯ͠Δ

    12
  13. ()&Ξοϓσʔτ ‘ Ξοϓσʔτͷස౓͕ͱͯ΋ߴ͍ ‘ Ҏલʹ͸ िʹճͱ͔ʜ ‘ 344ˠ4MBDLͰ؂ࢹ͍ͯ͠Δ ‘ Ξοϓσʔτͷ࡞ۀࣗମ͸ͱͯ΋؆୯

    13
  14. ()&ͷΞοϓσʔτ࡞ۀ 14 # Ξοϓσʔτ࣮ߦ !! $ GHE_VERSION=2.x.x $ curl -L

    -O https://${URL}/ami/updates/github-enterprise-ami-$ {GHE_VERSION}.pkg $ ghe-upgrade github-enterprise-ami-${GHE_VERSION}.pkg # ࣮ߦ͢Δͱ… …(snip)… *** Rebooting! Broadcast message from admin@xxx-xxx-xxx-xxx (/dev/pts/4) at 1:18 ... The system is going down for reboot NOW!
  15. Ξοϓσʔτ࡞ۀͷ՝୊ ‘ ӡ༻ۀ຿ͷຆͲ͕ ()&ͷΞοϓσʔτ࡞ۀ ‘ ࣮͸ Ξοϓσʔτ࡞ۀΑΓ΋ࣄલ ࣄޙͷ࡞ۀ ͷํ͕޻਺ֻ͕͔Δ ೔ఔௐ੔΍ใࠂ౳

     ‘ ͦͯ͠ Ξοϓσʔτස౓͕ߴ͍ͷͰʜ ུ 15
  16. ࡞ۀޮ཰Խ΁ͷऔ૊Έ  ΞοϓσʔτΛݕ஌ͯࣗ͠ಈͰ#BDLMPHىථ  Ξοϓσʔτ࡞ۀࣗମΛεΫϦϓτԽ 16

  17. #BDLMPH΁ͷࣗಈىථ   Ξοϓσʔτ௨஌ͷ344Λऔಘ  Քಇதͷ()&όʔδϣϯͱൺֱ  Ξοϓσʔτର৅ىථࡁΈͰͳ͚Ε͹ʜ  #BDLMPHʹىථͯ͠

    ͓٬༷ͱ೔ఔௐ੔Λ։࢝ 17
  18. #BDLMPH΁ͷࣗಈىථ  18

  19. #BDLMPH΁ͷࣗಈىථ  19

  20. ΞοϓσʔτॲཧͷεΫϦϓτԽ   ࡞ۀ։࢝ͷ࿈བྷ  ϝϯςϞʔυ  ؂ࢹఀࢭ  ".*όοΫΞοϓ

     ύοέʔδऔಘ  Ξοϓσʔτ 20 Ξοϓσʔτͷ֬ೝ ϝϯςϞʔυղআ ؂ࢹ࠶։ ࡞ۀ׬ྃͷใࠂ
  21. ΞοϓσʔτॲཧͷεΫϦϓτԽ  21

  22. ΞοϓσʔτॲཧͷεΫϦϓτԽ  22 … ུ # # ϝϯςφϯεϞʔυ΁Ҡߦ # post_comment_to_backlog

    "͜ΕΑΓϝϯςφϯεϞʔυ΁ͷ੾Γସ͑Λߦ͍·͢." curl -k -s -L -X POST "https://${_DOMAIN}:${_PORT}/setup/api/maintenance?api_key=${_API_KEY}" -d 'maintenance={"enabled":true, "when":"now"}' > /dev/null # # ϝϯςφϯεϞʔυ΁Ҡߦͨ͜͠ͱΛ֬ೝ # _MAINTENANCE_STATUS=$(curl -k -s -L -X GET "https://${_DOMAIN}:${_PORT}/setup/api/maintenance?api_key=$ {_API_KEY}" | jq -r .status) if [ "${_MAINTENANCE_STATUS}" == "on" ];then notify ${_SLACK_CHANNEL} "ϝϯςφϯεϞʔυʹҠߦ͠·ͨ͠.\nҾଓ͖ॲཧΛଓߦ͠·͢." post_comment_to_backlog "ϝϯςφϯεϞʔυʹ੾ΓସΘΓ·ͨ͠.\nҾଓ͖ߋ৽࡞ۀΛߦ͍·͢." else notify ${_SLACK_CHANNEL} "ϝϯςφϯεϞʔυ΁ͷҠߦʹࣦഊ͠·ͨ͠.\nॲཧΛதஅ͠·͢." exit 1 fi … ུ
  23. ΞοϓσʔτॲཧͷεΫϦϓτԽ  23 $ cd ${HOME}/update $ GHE_VERSION=2.8.3 $ ./update.sh

    ${GHE_VERSION} | tee -a log/update_${GHE_VERSION}.log … GitHub Enterprise 2.8.3 ΁ͷߋ৽࡞ۀΛ։࢝͠·͢. ॲཧΛଓߦ͠·͔͢? [Y/n] ॲཧΛଓߦ͠·͢... 2017-01-09 12:00:55 PM ୲౰ͷ ઒ݪ Ͱ͢. GitHub Enterprise 2.8.3 ΁ͷߋ৽࡞ۀΛ։࢝͠·͢. 2017-01-09 12:00:55 PM ϝϯςφϯεϞʔυʹҠߦ͠·ͨ͠. Ҿଓ͖ॲཧΛଓߦ͠·͢. 2017-01-09 12:00:58 PM εφοϓγϣοτͷ࡞੒Λ։࢝͠·ͨ͠. snap-01655e2d103bdbb41 snap-00179948b79535ac7 2017-01-09 12:00:59 PM εφοϓγϣοτͷ࡞੒தͰ͢. pending pending …
  24. ΞοϓσʔτॲཧͷεΫϦϓτԽ  24

  25. 25

  26. ޮ཰ԽʹΑΓಘΒΕͨ͜ͱ  ‘ Ξοϓσʔτ࡞ۀ͸.41νʔϜͷΈͰճͤΔΑ ͏ʹͳͬͨ ‘ खॱ͕؆ૉԽ͞ΕͨͳͷͰ Ξοϓσʔτ࡞ۀͷ ϋʔυϧ͕Լ͕ͬͨ 26

  27. ޮ཰ԽʹΑΓಘΒΕͨ͜ͱ  ‘ ࡞ۀͷਐ௙Λ୭Ͱ΋ݟकΕΔΑ͏ʹͳͬͨͷͰ  ສ͕Ұͷࣄଶʹ΋௚͙ʹରԠग़དྷΔΑ͏ʹͳͬͨ ‘ ස౓ͷߴ͍ΞοϓσʔτʹλΠϜϥάແ͘௥ैग़ དྷΔΑ͏ʹͳͬͨ 27

  28. ࠓޙͷऔ૊Έ ‘ ΑΓਓͷखΛհ͞ͳ͍Α͏ͳ࢓૊Έͮ͘Γ ‘ Ͱ΋ʜແཧͯࣗ͠ಈԽ͸ಥ͖٧Ίͳ͍ͭ΋Γ ‘ ΞοϓσʔτεΫϦϓτͷվળ ‘ 344ˠ#BDLMPHىථͷ෦෼ΛαʔόϨεԽ ‘

    ()&Ͱఏڙ͞Ε͍ͯΔ"1*ͷ׆༻ 28
  29. ࠷ޙʹ 29 ΑΓଟ͘ͷ͓٬༷ʹ (JU)VC&OUFSQSJTFΛ͝ར༻௖͖  ฐࣾʹӡ༻Λ͓೚͍ͤͩ͘͞

  30. ͓ΘΓ 30