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

github-enterprise-user-kai-desuyone

Yohei Kawahara
March 02, 2018
100

 github-enterprise-user-kai-desuyone

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

Yohei Kawahara

March 02, 2018
Tweet

Transcript

  1. ()&ͷΞοϓσʔτ࡞ۀ 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!
  2. ΞοϓσʔτॲཧͷεΫϦϓτԽ   ࡞ۀ։࢝ͷ࿈བྷ  ϝϯςϞʔυ  ؂ࢹఀࢭ  ".*όοΫΞοϓ

     ύοέʔδऔಘ  Ξοϓσʔτ 20 Ξοϓσʔτͷ֬ೝ ϝϯςϞʔυղআ ؂ࢹ࠶։ ࡞ۀ׬ྃͷใࠂ
  3. ΞοϓσʔτॲཧͷεΫϦϓτԽ  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 … ུ
  4. ΞοϓσʔτॲཧͷεΫϦϓτԽ  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 …
  5. 25