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

Dynamic VM Scheduling
 in OpenStack

Dynamic VM Scheduling
 in OpenStack

CNDT2022で話した内容です。

Kazuhiko Yamashita

November 25, 2022
Tweet

More Decks by Kazuhiko Yamashita

Other Decks in Programming

Transcript

  1. ϖύϘͷΠϯϑϥߏ੒ 0QFO4UBDL #BSFNFUBM "84 IFSPLV  ($1 ෺ཧαʔό୆7.ن໛ ϗεςΟϯάܥͷαʔϏε΍ɺ֤छج൫αʔϏεͰར༻ &,4

    3%4 &MBTUJDYYYܥͷϚωʔδυαʔϏεΛத৺ʹར༻ (,& #JH2VFSZΛத৺ʹ"84ͷ%3ɺσʔλΤϯδχΞϦϯάͷج൫ͱͯ͠ར༻
  2. ϥΠϒϚΠάϨʔγϣϯ Hypervisor VM1 VM2 10ඵ CPU 2ඵ CPU Hypervisor VM1

    10ඵ CPU VMΛఀࢭ͢Δ͜ͱͳ͘HypervisorؒΛҠಈ
  3. ϥΠϒϚΠάϨʔγϣϯ Hypervisor Hypervisor VM1 Disk Memory VM1 Disk STEP 1

    σΟεΫΛಉظ ※ڞ༗ετϨʔδΛར༻͍ͯ͠ͳ͍৔߹
  4. ϥΠϒϚΠάϨʔγϣϯ Hypervisor Hypervisor VM1 Disk Memory VM1 Disk STEP 2

    ϝϞϦΛಉظͯ͠੩ࢭ఺Λ଴ͭ ※ڞ༗ετϨʔδΛར༻͍ͯ͠ͳ͍৔߹ Memory
  5. ϥΠϒϚΠάϨʔγϣϯ Hypervisor Hypervisor VM1 Disk Memory VM1 Disk Memory STEP

    3 ੩ࢭ఺͕औΕͨΒ৽͍͠ΠϯελϯεΛ
 ༗ޮʹͯ͠ɺωοτϫʔΫܦ࿏Λ੾Γସ͑Δ ͓લ͕ࠓ೔͔ΒVM1ͩ
  6. Availability Zone LB AZ-1 VM1 AZ-2 VM2 LB AZ-1 VM1

    VM2 AZ-2 AZΛ·͍ͨͰεέδϡʔϦϯά͢Δͱ ଱ো֐ੑ͕ഁ໓!!1
  7. μ΢ϯλΠϜΛൃੜͤ͞ͳ͍ ΦʔέετϨʔλʔͰ޻෉͢Δ $ kubectl drain example.local --force --ignore-daemonsets —delete-emptydir-data #

    after migrated $ kubectl uncordon example.local $ consul maint -enable # after migrated $ consul maint -disable Kubernetes Consul
  8. consul node-1 
 (10.0.0.1) nginx node-2 
 (10.0.0.2) nginx node-3

    (10.0.0.3) nginx $ dig web.service.consul a 10.0.0.1 10.0.0.2 10.0.0.3 ϔϧενΣοΫͳͲΛར༻ͯ͠ɺαʔϏεσΟεΧόϦ͕Ͱ͖Δ DNSͷଞʹ΋ɺConsul TemplateΛར༻ͨ͠ ߏ੒ϑΝΠϧͷϨϯμϦϯάͳͲͰ׆༻͍ͯ͠Δ
  9. consul maint -enable node-1 
 (10.0.0.1) nginx node-2 
 (10.0.0.2)

    nginx node-3 (10.0.0.3) nginx $ dig web.service.consul a 10.0.0.1 10.0.0.2 Ϋϥελ͔Β੾Γ཭͠ consul maint -enable
  10. ϥΠϒϚΠάϨʔγϣϯ(࠶ܝ) Hypervisor Hypervisor VM1 Disk Memory VM1 Disk STEP 1

    σΟεΫΛಉظ ※ڞ༗ετϨʔδΛར༻͍ͯ͠ͳ͍৔߹ ʊਓਓਓਓʊ ʼɹ500Gɹʻ ʉY^Y^Y^Y^ʉ