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

gcloud move 10 times in 4 hours

Hisashi SOGA
September 26, 2017

gcloud move 10 times in 4 hours

Google Cloud Platform の機能を利用して、4時間のメンテナンスで 10 台のインスタンスのリージョン移行を成功裏に complete した話

Hisashi SOGA

September 26, 2017
Tweet

More Decks by Hisashi SOGA

Other Decks in Technology

Transcript

  1. gcloud move 10 times
    in 4 hours
    2017/09/27
    @sogaoh
    1
    Presentation Slide at
    https://gcpug-tokyo.connpass.com/event/66224/

    View full-size slide

  2. AGENDA
    • ࣗݾ঺հ
    • ϛογϣϯ
    • ର৅γεςϜ֓ཁ
    • ͜͏΍ͬͨ
    • ϐϯν
    • ͓ΘΓʹ
    2

    View full-size slide

  3. ࣗݾ঺հ
    • ીզɹԝ / Hisashi SOGA
    – Twitter : @sogaohɹ, GitHub : sogaoh
    • Marketing Applications, Inc. / MApps
    – WebΞϯέʔτ࡞੒ɾ഑৴αʔϏε forSurvey
    – ए೥૚ճऩ਺ࠃ಺No.1ͷ MApps Panel
    • DevOpsਪਐࣨ
    – ࣄۀϦεΫ͔ΒձࣾΛकΔݱࡏ 5 ਓͷ Team
    – Data Center ͔Β Public Cloud ΁ͷҠసͳͲʹऔΓ૊Έத
    3

    View full-size slide

  4. ϛογϣϯ
    • γεςϜͷશαʔόʔͷϦʔδϣϯΛมߋ͢Δ
    – ๭Ҋ݅ड஫࣌ͷʮ͓໿ଋʯ
    • ϝϯςφϯεʹͯ͠γεςϜΛࢭΊͯΑ͍ͷ͸̐࣌ؒ
    – ͱ͋Δฏ೔ͷະ໌ʹ࣮ࢪ
    4

    View full-size slide

  5. ର৅γεςϜ֓ཁ
    5

    View full-size slide

  6. ͜͏΍ͬͨ
    • λʔϛφϧͱ؅ཧίϯιʔϧΛݟͳ͕Β
    • Global IPͷ༧໿
    • Ҡߦͷ࣮ࢪ
    • Global IP ઃఆ
    • ҎԼͷॱͰ
    • db×2ɾnas
    • cache
    • web × 4
    • httpproxyɾreverse-proxy
    6
    $ gcloud compute addresses create [static-ip-xxx] \
    --region [Ҡߦઌregion]
    $ gcloud compute instances move [instance] \
    --zone [Ҡߦݩ] --destination-zone [Ҡߦઌ]
    $ gcloud compute instances describe [instance] --zone [Ҡߦઌ]
    ɹɹɹɹɹ
    $ gcloud compute instances delete-access-config [instance] \
    -zone [Ҡߦઌ] --access-config-name [֬ೝͨ͠name]
    $ gcloud compute instances add-access-config [instance] \
    --zone [Ҡߦઌ] \
    --access-config-name [༧໿ͨ͠GlobalIP໊] \
    --address [IPΞυϨε]

    View full-size slide

  7. ϐϯν
    • ҠߦઌϦʔδϣϯͷϦιʔεׂΓ౰͕ͯ଍Γͳ͍ʢGlobalIP:8ʣ
    • ࣄલਃ੥͕ඞཁͩͬͨ
    • Googleαϙʔτͷ௒଎Ϩεϙϯεʹ͸ײಈ
    • ࿈ܞγεςϜଆͷઃఆௐ੔
    • Ұ୴ɺมߋޙͷGlobalIPΛ௥Ճ
    • ࢓্͛ʹϦϑϨογϡ͕ඞཁͩͬͨ
    • ṖͷϨεϙϯελΠϜٸಅ
    7

    View full-size slide

  8. ͓ΘΓʹ
    • ͜Ε͚ͩ؆୯ʹ೉୊ΛΫϦΞͰ͖ΔGCPੌ͍
    • ॲཧ࣌ؒ΋௒଎ɻٳΜͰΔՋ͕ͳ͍ɻ
    • ੍࣌ؒݶͷ͋Δϛογϣϯͷফ໣౓͸ੌ͍
    • Ϧϋʔαϧ͠ͳ͍ͱ੒ޭ͠ͳ͍ɻ४උॏཁɻ
    • ͜ΜͳνʔϜʹjoin͍ͨ͠ͱࢥͬͨํ͸↓΁ͥͻɹ
    8
    https://jp.stanby.com/ats/marketing-applications/jobs

    View full-size slide