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

OpenShift BootCamp 1章 OpenShift概要

Junki Sagawa
November 17, 2021

OpenShift BootCamp 1章 OpenShift概要

- OpenShift BootCamp 1章 OpenShiftg概要で使用した資料です。
- IBM Tech/Developer Dojoはこちら
- https://ibm-developer.connpass.com/

- 内容
1. コンテナとは
2. Kubernetesとは
3. OpenShiftとは

Junki Sagawa

November 17, 2021
Tweet

More Decks by Junki Sagawa

Other Decks in Technology

Transcript

  1. ෺ཧαʔόʔ ɽίϯςφͱ͸ 3 • Ծ૝Խٕज़ͷͻͱͭ • ϗετ04಺ͷۭؒΛ෼͚Δ͜ͱͰɺ$16΍ϝϞϦͳͲͷϦιʔεΛִ཭͠ɺ Ծ૝తͳۭؒ಺ͰΞϓϦέʔγϣϯΛಠཱʹಈ࡞ͤ͞Δ͜ͱ͕Մೳ ϋʔυ΢ΣΞ ϋΠύʔόΠβʔ

    ϋʔυ΢ΣΞ 04 ίϯςφΤϯδϯ ίϯςφԾ૝Խ ϋʔυ΢ΣΞ 04 ϋΠύʔόΠβʔԾ૝Խ Ծ૝Խͳ͠ ΞϓϦ ΞϓϦ ΞϓϦ ΞϓϦ Ծ૝Ϛγϯ 7. ήετ04 ΞϓϦ ΞϓϦ ίϯςφ CJOMJC ΞϓϦ ίϯςφ CJOMJC ΞϓϦ ίϯςφ CJOMJC ΞϓϦ ίϯςφ CJOMJC ΞϓϦ Ծ૝Ϛγϯ 7. ήετ04 ΞϓϦ ΞϓϦ CJOMJC CJOMJC CJOMJC ϗετ04 © 2021 IBM Corporation
  2. ϋΠύʔόΠβʔԾ૝Խ 7. ͱίϯςφͷҧ͍ 4 ϋΠύʔόΠβʔʹΑΔԾ૝Խ 7. ίϯςφʔٕज़ʹΑΔԾ૝Խ ɾ֤Ծ૝Ϛγϯ͸04ϨϕϧͰ෼཭ ɾϋʔυ΢ΣΞΛΤϛϡϨʔτ ɾ֤ίϯςφʔ͸ҟͳΔ໊લۭؒͰ࣮ߦ

    ɾෳ਺ίϯςφʔ͕ϗετΧʔωϧΛڞ༗ ɾ7.͝ͱʹήετ04ؙ͕͝ͱඞཁ ɾΞϓϦέʔγϣϯͱϥΠϒϥϦͷΈΛ ͻͱ·ͱΊʹύοέʔδԽ ɾͦΕͧΕҟͳΔ04Λಠཱʹબ୒Մೳ ɾܰྔͰىಈ͕ૣ͍ ɾू໿౓ΛߴΊ΍͍͢ ɾΞϓϦؒͷϥΠϒϥϦڝ߹͕ൃੜ͠ͳ͍ © 2021 IBM Corporation
  3. γεςϜج൫ Ϋϥ΢υ ίϯςφͷϙʔλϏϦςΟ © 2021 IBM Corporation 5 • ΞϓϦέʔγϣϯͷґଘؔ܎Λશͯίϯςφʔʹύοέʔδ͕Ͱ͖Δ

    • ଞͷΞϓϦέʔγϣϯͱͷϥΠϒϥϦڝ߹͕ൃੜ͠ͳ͍ ˠผͷ؀ڥʹίϯςφΛҠಈͯ͠΋ɺඞͣಈ͘ ʮςετ؀ڥͰ͸ಈ͍͕ͨɺ ຊ൪؀ڥͰ͸ಈ͔ͳ͍ʯ ͱ͍ͬͨ໰୊͕ى͜Βͳ͍ ϗετ04 ίϯςφΤϯδϯ ίϯςφ CJOMJC ΞϓϦ ίϯςφ CJOMJC ΞϓϦ γεςϜج൫ ΦϯϓϨϛε ϗετ04 ίϯςφΤϯδϯ ίϯςφ CJOMJC ΞϓϦ
  4. ίϯςφͷಛ௃ © 2021 IBM Corporation 6 • ୯ҰͷΞϓϦέʔγϣϯ΍ϓϩηεΛ࣮ߦ͢Δ • جຊతʹσʔλ͸شൃੑ

    σʔλڞ༗΍Ҿܧ͗ʹ͸ӬଓϘϦϡʔϜ͕ඞཁ ˠؾܰʹ࡟আͱ࡞੒Λ܁Γฦ͢͜ͱ͕Ͱ͖Δ ίϯςφ CJOMJC ΞϓϦ ίϯςφ CJOMJC ΞϓϦ ىಈ࣌͸ৗʹ ΫϦʔϯͳঢ়ଶʹͳΔ ୯ػೳΛಈ͔͢
  5. ίϯςφΛ࢖༻ͨ͠։ൃͷྲྀΕ © 2021 IBM Corporation 7 %PDLFSGJMFͳͲ %PDLFS ΠϝʔδͳͲ %PDLFS)VC

    ͳͲ ϚχϑΣετͰ ίϯςφࣗମͷ ৄࡉΛهड़ ։ൃऀ ίϯςφʔ Πϝʔδ࡞੒ ϨδετϦʔ ΁ొ࿥ ΞϓϦ࣮ߦ ίϯςφʔ ίϯςφʔ ίϯςφʔ ։ൃ؀ڥ ςετ؀ڥ ຊ൪؀ڥ
  6. %PDLFSΛར༻ͨ͠ӡ༻ྫ © 2021 IBM Corporation 8 • ݩͱͳΔΠϝʔδΛϦϙδτϦ͔Βऔಘ͠ɺίϯςφԽ࣮ͯ͠ߦ • Πϝʔδऔಘ΍ίϯςφ࡞੒ͱ͍ͬͨૢ࡞͸ɺ%PDLFSίϚϯυ

    $-* Λ࢖༻ ར༻ Build Docker Runtime ιʔε΍ ߏ੒৘ใ ಺෦ϦϙδτϦʔ ίϯςφɾΠϝʔδ pull dockerHub ίϯςφ ΦϯϥΠϯ্ʹΠϝʔδΛอ؅͓ͯ͘͠ίϯςφϨδετϦͷ̍छ ༷ʑͳΠϝʔδͷऔಘɺࣗ࡞Πϝʔδͷอ؅͕Մೳ run/ exec
  7. %PDLFSίϚϯυૢ࡞ྫ ΠϝʔδΛίϯςφԽ࣮ͯ͠ߦ  EPDLFSDPOUBJOFSSVOEUQHJIZPEPDLFSFDIPMBUFTU EόοΫάϥ΢ϯυͰ࣮ߦ QϙʔτϑΥϫʔσΟϯά ίϯςφΛఀࢭ  EPDLFSDPOUBJOFSTUPQίϯςφ*% ίϯςφΛ࡟আ

     EPDLFSDPOUBJOFSSNίϯςφ*% ΠϝʔδΛ࡟আ  EPDLFSJNBHFSNΠϝʔδ*% © 2021 IBM Corporation 9 イメージの形式︓ <リポジトリ名>/<イメージ名>(:<tag>)
  8. ֓ཁ ίϚϯυ Φϓγϣϯ Πϝʔδऔಘ JNBHFQVMM\JNBHF^\UBH^ ΠϝʔδϏϧυ JNBHFCVJME\JNBHF^\UBH^ ΠϝʔδҰཡ JNBHFMJTU λάͷ෇༩

    JNBHFUBH\JNBHF^\UBH^\JNBHF^\৽UBH^ Πϝʔδ࡟আ JNBHFSN\JNBHFJE^ ίϯςφىಈ DPOUBJOFSSVO\JNBHF^\UBH^ Q\IPTUQPSU^\DPOUBJOFSQPSU^ ϙʔτެ։ E όοΫάϥ΢ϯυىಈ SN ఀࢭ࣌ʹίϯςφ࡟আ ίϯςφҰཡ QT B ίϯςφͷঢ়ଶΛऔಘ ίϯςφఀࢭ DPOUBJOFSTUPQ\DPOUBJOFSJE^ ίϯςφ࡟আ DPOUBJOFSSN\DPOUBJOFSJE^ ίϯςφ಺Ͱ ίϚϯυΛ࣮ߦ DPOUBJOFSFYFD\DPOUBJOFSJE^\DPNNBOE^ JU ΠϯλϥΫςΟϒʹૢ࡞ εςʔλε֬ೝ TUBUT OPTUSFBN ҰճͷΈදࣔ © 2021 IBM Corporation 10 %PDLFSίϚϯυूʢओͳ΋ͷʣ
  9. ίϯςφ؅ཧͷݶք © 2021 IBM Corporation 13 େن໛γεςϜͷߏஙɾӡ༻ʹ͔͔Δෛՙ • ܧଓతͳίϯςφͷࢮ׆؂ࢹɺ࠶ىಈ •

    شൃੑσʔλͷอ࣋ • *1ΞυϨεɺΞΫηεܦ࿏ͷ؅ཧ • ϏδωεมԽʹԠͨ͡ద੾ͳϦιʔεௐ੔ • ಈతʹੜ੒ഁغ͞ΕΔίϯςφͷωοτϫʔΫΞΫηεͷҡ࣋  ͳͲ ˠΦʔέετϨʔλʔΛར༻ͯ͠ɺޮ཰తܧଓతʹΞϓϦέʔγϣϯΛӡ༻
  10. ,VCFSOFUFTͷΦʔέετϨʔγϣϯػೳ 14 © 2021 IBM Corporation Ϧιʔε؅ཧ (εέδϡʔϦϯά) ϦιʔεཁٻͱՄ༻ੑΛอͪɺ·ͨɺ੍໿ʹج͖ͮɺࣗಈతʹίϯςφͷ഑ஔΛܾఆɻ Ϧιʔεͷ༗ޮར༻Λ࣮ݱɻ

    ࣗݾम෮ (ηϧϑɾ ώʔϦϯά) ো֐ίϯςφͷ࠶ىಈɺϊʔυো֐࣌ʹ͸ɺίϯςφͷ࠶഑ஔͷ࣮ࢪɻ ·ͨɺϢʔβʔఆٛͷϔϧεɾνΣοΫʹԠ౴͠ͳ͍ίϯςφͷ࡟আ΋࣮ࢪՄೳɻ ਫฏεέʔϦϯά ίϚϯυ΍UI͔Β؆୯ʹΞϓϦέʔγϣϯͷεέʔϧɾΞοϓ / μ΢ϯ͕Մೳɻ ·ͨɺCPU࢖༻཰ͳͲʹجͮ͘ɺࣗಈεέʔϦϯά΋Մೳɻ ෛՙ෼ࢄ (αʔϏεɾ σΟεΧόϦʔ) ෳࡶͳαʔϏεɾσΟεΧόϦʔɾϝΧχζϜͷΞϓϦέʔγϣϯ΁ͷ૊ΈࠐΈ͸ෆཁɻ Kubernetes͸ɺίϯςφͷू߹ʹ୯ҰͷDNSωʔϜΛ෇༩͠ɺෛՙ෼ࢄΛ࣮ݱɻ ϩʔϧΞ΢τͱ ϩʔϧόοΫ ΞϓϦέʔγϣϯͷมߋΛॱ൪ʹద༻ɻʢϩʔϦϯάΞοϓσʔτͳͲʣ Կ͔ෆ۩߹͕ൃੜͨ͠৔߹ʹ͸ɺϩʔϧόοΫ΋Մೳɻ ߏ੒؅ཧ ίϯςφΛ࣮ߦɾ؅ཧ͢ΔͨΊʹඞཁͳϝλσʔλؚ͕·ΕΔɻ ύεϫʔυ΍OAuthτʔΫϯɺSSHΩʔͷΑ͏ͳػີ৘ใ΋؅ཧ͕Մೳɻ
  11. 15 © 2021 IBM Corporation ίϯτϩʔϧϓϨʔϯ(Master) ϊʔυίϯϙʔωϯτ(Worker Node) FUDE LVCF

    BQJTFSWFS ߏ੒৘ใ ,FZ7BMVF 4UPSF LVCFDUM LVCFMFU LVCFQSPYZ LVCF DPOUSPMMFSNBOBHFS LVCF TDIFEVMFS ϚχϑΣετ 1PEͷՔಇ͢Δ /PEFબ୒ͳͲ ࢮ׆؂ࢹ΍ 3FQMJDB਺؅ཧͳͲ LVCFMFU LVCFQSPYZ LVCFMFU LVCFQSPYZ 4FSWJDFΦϒδΣ ΫτΛݩʹ઀ଓΛ సૹ TDIFEVMFSʹै͍ 1PEΛىಈɾ؅ཧ "1*ͷఏڙͱ ೝূɾঝೝ ,VCFSOFUFTͷجຊߏ੒
  12. ༻ޠ ղઆ ,VCFSOFUFT Ϋϥελ .BTUFSͱ/PEF͔Βߏ੒͞ΕΔɻ ɾ.BTUFS ΫϥελΛ؅ཧ  /PEFϦιʔε؂ࢹ 

    ىಈ/PEFͷબ୒ɺো֐࣌ͷ࠶഑ஔ ͳͲ ɾ/PEF ΞϓϦέʔγϣϯΛىಈ  "QQMJDBUJPO $POUBJOFSΛՔಇͤ͞Δ৔ॴ FUDE ,VCFSOFUFTͷϓϥΠϚϦʔσʔλετΞɻ ෼ࢄ,FZ7BMVFετΞܗࣜͰอ؅͢Δɻ  Ϋϥελʔʹظ଴͞ΕΔঢ়ଶ  ݱࡏͷঢ়ଶ  3#"$ 3PMF#BTFE"DDFTT$POUSPM   ΞϓϦέʔγϣϯ؀ڥ৘ใ ,VCFSOFUFTͷओཁͳ֓೦  16 © 2021 IBM Corporation
  13. ༻ޠ ղઆ 1PE ࠷গͷ؅ཧ୯Ґɻ ࡞੒։࢝ఀࢭ࡟আͷ୯Ґ  1PEͷதʹ͸ ̍ͭҎ্ ͷ ίϯςφؚ͕·ΕΔ

     1PE୯ҐͰεέʔϧΠϯɾεέʔϧΞ΢τ͢Δ  1PE͝ͱʹ*1ΞυϨεΛ࣋ͭ 1PEੜ੒ͷ౓ʹ৽͠ ͍ΞυϨεΛ෇༩ /PEF 1PE͕Քಇ͢ΔϫʔΧʔϚγϯɻ  Ծ૝෺ཧαʔόͷͲͪΒͰ΋ྑ͍  /PEF಺ʹ͸ෳ਺ͷ1PEΛ࣋ͭ͜ͱ͕Ͱ͖Δ ,VCFSOFUFTͷओཁͳ֓೦  Node Pod   ίϯςφ ϘϦϡʔϜ Pod Pod 17 © 2021 IBM Corporation
  14. ༻ޠ ղઆ 3FQMJDB4FU 1PE͕ৗʹਖ਼͍͠਺͚ͩಈ͘Α͏ʹ͢Δɻ ϊʔυো֐΍ωοτϫʔΫ෼அͳͲͷো֐࣌ɺ ࣗಈతʹଞͷϊʔυʹ࠶ׂ౰ͯ͞ΕΔɻ  1PEͷඞཁՔಇ਺Λఆٛ  ΞαΠϯઌϊʔυ͸4DIFEVMFS͕؅ཧ

    %FQMPZNFOU 1PE΍3FQMJDB4FUΛ؅ཧ͢ΔҝͷΦϒδΣΫτɻ όʔδϣϯͷ഑ஔํ๏Λఆٛ͢Δɻ Ξοϓσʔτ࣌ʹ͸ࣗಈతʹ৽͍͠3FQMJDB4FU ͕࡞੒͞Εɺετϥςδʔ ྫϩʔϦϯάΞο ϓσʔτͳͲ ʹैͬͯ1PE͕ஔ͖׵͑ΒΕΔɻ ௨ৗɺ%FQMPZNFOUϦιʔεΛఆٛ͠ɺؒ઀త ʹ3FQMJDB4FU΍1PEΛ࡞੒͢Δɻ イメージ名 レプリカ数 ラベル CPU メモリー ストレージ ReplicaSet Pod1 Pod2 イメージ名 レプリカ数 ラベル バージョン ストラテジー Deployment v1 v2 Pod1 Pod2 Pod1 Pod2 18 © 2021 IBM Corporation ,VCFSOFUFTͷओཁͳ֓೦ 
  15. ༻ޠ ղઆ 4FSWJDF 1PEো֐΍1PEͷෳ੡ʹରԠ͢ΔͨΊͷந৅֓೦ɻ 1PEͷू߹Ͱ࣮ߦ͞Ε͍ͯΔΞϓϦέʔγϣϯΛ ωοτϫʔΫαʔϏεͱͯ͠ެ։͢Δɻ Ӭଓతͳ಺෦*1ΞυϨεͱϗετ໊Λఏڙ ෳ਺ͷλΠϓ͔Βબ୒ $MVTUFS*1 

    /PEF1PSU -PBE#BMBODFS  &YUFSOBM/BNF *OHSFTT Ϋϥελʔ಺ͷ4FSWJDFʹର͢Δ֎෦͔ΒͷΞΫ ηεΛ؅ཧ͢Δ"1*ΦϒδΣΫτɻ ෛՙ෼ࢄɺ44-ऴ୺ɺ໊લϕʔεͷԾ૝ϗεςΟ ϯάͷػೳΛఏڙ͢Δɻ 10.1.1.1 10.1.1.2 10.1.1.3 Service ロール: Back-End ロール: Back-End ロール: Back-End http://203.0.1.1 Ingress 10.10.10.4 ロール: Front-End 19 © 2021 IBM Corporation ,VCFSOFUFTͷओཁͳ֓೦ 
  16. © 2021 IBM Corporation 23 0QFO4IJGUͱ͸ Red Hat OpenShift Container

    Platform(OCP)) Cluster services monitoring, showback, registry, logging Application services middleware, functions, ISV Service mesh Developer services dev tools, automated builds, CI/CD, IDE Automated operations Enterprise Linux CoreOS Physical Virtual Private Public CaaS↔PaaS | Faas Best IT ops experience Best developer experience certified ඞཁͳ΋ͷ͕͙͢ʹ࢖͑Δ  ౷߹͞ΕͨࣗಈԽΞʔΩςΫνϟ  ,VCFSOFUFTϕʔεͰϫʔΫϩʔυΛγʔϜϨεʹ࣮ߦ  Ϋϥ΢υΠϯϑϥ͔Β04 ΞϓϦέʔγϣϯαʔϏε ·ͰࣗಈΠϯετʔϧ  ΞϓϦέʔγϣϯͷߋ৽͕༰қ  ඞཁͳϦιʔεΛΦʔτεέʔϦϯά  ΤϯλʔϓϥΠζ޲͚Ϋϥ΢υωΠςΟϒͷ࣮૷ Red Hat OpenShift Container Platform Any Infrastructure ,VCFSOFUFTΛΤϯλʔϓϥΠζ޲͚ʹఏڙ͢ΔϓϥοτϑΥʔϜ
  17. MASTER MASTER MASTER WORKER WORKER 0QFO4IJGUͷओཁίϯϙʔωϯτਤ © 2021 IBM Corporation

    24 ੨ɿ,VCFSOFUFT ྘ɿ0QFO4IJGU 0QFO4IJGU 4FSWJDFT ,JCBOB c &MBTUJD4FBSDI 3FHJTUSZ 3PVUFS (SBGBOBc "MFSUNBOBHFSc 1SPNFUIFVT 4%/c%/4c ,VCFMFU ,VCFSOFUFT 4FSWJDFT FUDE *OGSBTUSVDUVSF 4FSWJDFT WORKER WORKER ,JCBOB c &MBTUJD4FBSDI 3FHJTUSZ 3PVUFS (SBGBOBc "MFSUNBOBHFSc 1SPNFUIFVT 4%/c%/4c ,VCFMFU $0.165& 4503"(& /&5803, ։ൃऀ ؅ཧऀ ,VCFSOFUFTΛϕʔεʹɺ։ൃऀ΍؅ཧऀ͕ར༻ՄೳͳػೳΛ௥Ճ
  18. CI/CDͱ͸ ˜*#.$PSQPSBUJPO  n $*$% ܧଓతΠϯςάϨʔγϣϯܧଓతσϦόϦʔɾܧଓతσϓϩΠϝϯτ  ΞϓϦέʔγϣϯ։ൃʹࣗಈԽΛऔΓೖΕͯɺγεςϜར༻ऀ ΤϯυϢʔβ ʹΞϓϦέʔγϣϯΛ

    ఏڙ͢ΔϦʔυλΠϜΛ୹ॖ͠ɺߋվස౓ΛߴΊΔख๏Ͱ͢ɻ $*$%ʹΑͬͯɺػೳؒ݁߹΍ςετͷϑΣʔζ͔ΒσϦόϦʔɺσϓϩΠϝϯτʹࢸΔɺ ΞϓϦέʔγϣϯͷϥΠϑαΠΫϧશମΛ௨ͯ͡ɺܧଓతͳࣗಈԽͱܧଓతͳ؂ࢹ͕ಋೖ͞Ε·͢ɻ ͜ΕΒ͸·ͱΊͯʮ$*$%ύΠϓϥΠϯʯͱݺ͹ΕɺΞδϟΠϧͳํ๏Ͱ։ൃνʔϜͱӡ༻νʔϜ͕ ڞಉͰ࣮ࢪ͠·͢ɻ Ϗϧυ ςετ CI ܧଓతΠϯςάϨʔγϣϯ Ϛʔδ CD ܧଓతσϦόϦʔ CD ܧଓతσϓϩΠϝϯτ ࣮ߦ؀ڥ΁ ࣗಈϦϦʔε ϦϙδτϦ΁ ࣗಈϦϦʔε
  19. OpenShift 4.7まで 0QFO4IJGUͱ$*$% © 2021 IBM Corporation 27 γϯϓϧͳ(JU)VCΛ࢖ͬͨ$% 0QFO4IJGU͕ఏڙ͢Δ$*$%

    0QFO4IJGUͰҰൠެ։ (" ͞Εͨ$*$%πʔϧ ɿ 5&,50/ "SHP$% ソースコード リポジトリ Deployment Pipeline コンテナレジストリ マニフェスト リポジトリ Build Pipeline 2章で実施 (S2I, GitHub Webhook)
  20. 0QFO4IJGUͷϩά؅ཧ © 2021 IBM Corporation 29 n &',ελοΫ l &MBTUJDTFBSDI

    ɿログが格納されるオブジェクトストア l 'MVFOUE ɿϊʔυ͔ΒϩάΛऩू ʢ֎෦ͷϩάू໿πʔϧʹϩάΛసૹ͢Δ͜ͱ΋Մೳʣ l ,JCBOB ɿ&MBTUJDTFBSDIͷ8FC6*ʹΑΔ෼ੳɺՄࢹԽ OpenShift 外部システム
  21. OpenShiftͷૢ࡞ํ๏ 8FCίϯιʔϧ  ϒϥ΢βʔʹΑΔGUIΞΫηε  ؆୯ʹૢ࡞Մೳ  ਤ΍άϥϑͳͲݟқ͍දࣔ CLI ocίϚϯυ

     ίϚϯυʹΑΔ࣮ߦ  શͯͷػೳΛ࣮ߦՄೳ  ༰қʹεΫϦϓτԽ͠ఆܕॲཧՄೳ © 2021 IBM Corporation 33
  22. 0QFO4IJGUͷ؅ཧը໘ (6* © 2021 IBM Corporation 35 n "ENJOJTUSBUPS ։ൃऀ༻ϝχϡʔ

    – εςʔλεɺΞΫςΟϏςΟɺΠϕϯτ – ҰൠతͳϦιʔελΠϓ͸؅ཧՄೳ – ϩΪϯάͱϝτϦοΫ – ͦͷଞ֬ೝͰ͖Δ΋ͷ • Ϋϥελʔͷߋ৽ • ΦϖϨʔλʔ • ϦιʔεΫΥʔλʔ
  23. 0QFO4IJGUͷ؅ཧը໘ (6* © 2021 IBM Corporation 36 n %FWFMPQFS ։ൃऀ༻ϝχϡʔ

    • ϓϩδΣΫτৄࡉ • εςʔλεɺ࢖༻ঢ়گɺΠϕϯτ • ϝτϦοΫͷදࣔ
  24. 0QFO4IJGUίϯιʔϧΛ࢖༻ͨ͠ΞϓϦέʔγϣϯ࡞੒ © 2021 IBM Corporation 37 n ։ൃऀΧλϩά – ϥϯλΠϜɺ.8ɺ%#ͳͲͷɺ3FE)BUίϯςφΧλϩά͔Βμ΢ϯϩʔυͨ͠3FE)BUݕূࡁΠϝʔδʹࣗ਎ͷΞϓϦΛ

    ৐ͤͯϏϧυɾσϓϩΠՄೳͳΧλϩά – ݴޠϥϯλΠϜ Ø +BWB Ø +BWB4DSJQU /PEFKT Ø /&5 Ø 1FSM Ø 3VCZ Ø 1)1 Ø 1ZUIPO Ø (P – %# Ø .POHP%# Ø .Z42- Ø 1PTUHSF42- Ø .BSJB%# ͳͲ
  25. Worker Worker Worker 0QFO4IJGUͰ࢖༻͢Δओཁͳ֓೦ © 2021 IBM Corporation 38 ༻ޠ

    ղઆ ϓϩδΣΫτ 0QFO4IJGUͰϢʔβʔ΍ϦιʔεΛ෼ྨɾ෼཭͢ΔͨΊͷ࡞ۀ৔ॴɻ ϓϩδΣΫτΛ෼͚Δ͜ͱͰɺΫϥελʔ಺ͷϦιʔεΛԾ૝తʹಠཱͤ͞ɺϚϧνςφϯτΛ࣮ݱ Ͱ͖Δɻ ࡞ۀͷ୯Ґ΍ɺϢʔβʔͷάϧʔϓ͝ͱϓϩδΣΫτΛ࡞੒͢Δ͜ͱͰɺͦΕͧΕͷ࡞ۀ৔ॴΛ֬อ ͢Δ͜ͱ͕Ͱ͖Δɻ ,VCFSOFUFTͷOBNFTQBDF ໊લۭؒ Λ֦ுͨ͠΋ͷɻ ҟͳΔ໊લۭؒʹ͸ΞΫηεͰ͖ͳ͍ͨΊɺޓ͍ͷଘࡏΛҙࣝ͢Δඞཁ͸ͳ͍ɻ Master Master Master OpenShift Cluster ϓϩδΣΫτ̍ Ϧιʔεఆٛ ϓϩδΣΫτ Ϧιʔεఆٛ Pod
  26. 0QFO4IJGUͰ࢖༻͢Δओཁͳ֓೦ © 2021 IBM Corporation 39 ༻ޠ ղઆ τϙϩδʔ ϓϩδΣΫτ಺ͷ͢΂ͯͷΞϓϦέʔγϣϯɺͦΕΒͷϏϧυεςʔλε͓ΑͼΞϓϦέʔγϣϯʹ

    ؔ࿈͢ΔίϯϙʔωϯτͱαʔϏεΛࢹ֮తʹදࣔ͢Δɻ ΞϓϦέʔγϣϯΛ࡞੒͠ɺΠϝʔδ͕σϓϩΠ͞ΕΔͱɺεςʔλε͸ 1FOEJOHʹͳΔɻ ΞϓϦέʔγϣϯΛϏϧυ͢Δͱɺ3VOOJOHͱදࣔ͞ΕΔɻ ӬଓετϨʔδ ίϯςφͷ࠶ىಈ࣌ʹشൃੑͷσʔλ͕ࣦΘΕͳ͍Α͏ɺετϨʔδΛϙουʹࣗಈతʹ઀ଓ͢Δͨ Ίͷ͘͠Έɻ ,VCFSOFUFTͷ1FSTJTUFOU7PMVNF 17 ɺ1FSTJTUFOU7PMVNF$MBJN 17$ ͱ͍͏ϑϨʔϜϫʔΫΛ༻͍ɺ 1PEͱετϨʔδͷؔ࿈෇͚Λந৅Խ͢Δ͜ͱ͕Ͱ͖Δɻ • 17ɿ֎෦ͷϘϦϡʔϜΛந৅Խ͢ΔϦιʔεɻݸผʹ࣮ࡍͷετϨʔδΛ֬อ͢Δɻ • 17$ɿ1PE͔Βίϯςφ͕ར༻͢ΔϘϦϡʔϜΛࢦఆ͢ΔͨΊͷந৅Ϧιʔεɻ
  27. 0QFO4IJGUͰ࢖༻͢Δओཁͳ֓೦ © 2021 IBM Corporation 40 ༻ޠ ղઆ )FMN ,VCFSOFUFT޲͚ͷύοέʔδϚωδϟʔɻϦϙδτϦ͔ΒͷΠϯετʔϧ΍ɺσϓϩ

    Π͞ΕͨΞϓϦέʔγϣϯͷ؅ཧΛ؆қԽ͢ΔͨΊʹ࢖༻͢Δɻ νϟʔτͱݺ͹ΕΔઃఆϑΝΠϧ܈Λ༻͍ͯ,VCFSOFUFTͷϚχϑΣετΛ؅ཧ͢Δɻ ΦϖϨʔλʔ ӡ༻ऀ͕ߦ͏࡞ۀΛίʔυԽ͠ɺਓͷ୅ΘΓʹΦϖϨʔγϣϯΛ࣮ࢪ͢Δ੍ޚϓϩηεɻ γΣϧεΫϦϓτɺࣗಈԽιϑτ΢ΣΞ "OTJCMFͳͲ Λ༻͍ɺΠϯετʔϧ΍Φʔτε έʔϧɺো֐෮چɺΞοϓάϨʔυͳͲͱ͍ͬͨૢ࡞Λࣗಈతʹ࣮ߦ͢Δɻ ΦϖϨʔλʔ΋1PEͱͯ͠Քಇ͢Δɻ ϥϕϧ ΦϒδΣΫτͷ੔ཧ΍άϧʔϐϯάʹ࢖༻͢Δɻ ೚ҙͷΦϒδΣΫτͷϝλσʔλͱͯ͠ϥϕϧΛ෇༩͢Δ͜ͱ͕Ͱ͖Δɻ ྫɿ • QPEʹϥϕϧΛ෇༩͠ɺͦͷϥϕϧΛࢦఆͯ͠ಛఆͷαʔϏεʹඥ͚ͮΔ • ҟͳΔίϯςφΛ࣋ͭQPE܈ʹͻͱͭͷϥϕϧΛ෇͚ɺؔ࿈ΤϯςΟςΟͱͯ͠ѻ͏ γʔΫϨοτ ύεϫʔυͳͲͷػີ৘ใΛอ࣋͢ΔϝΧχζϜΛ࣋ͭΦϒδΣΫτɻ $POGJH.BQ ઃఆϑΝΠϧ΍ύϥϝʔλʔͱ͍ͬͨ؀ڥґଘ৘ใΛ1PEʹ௥Ճ͢ΔͨΊͷ࢓૊Έɻ 1PEͰ࢖༻͍ͨ͠ม਺΍ઃఆϑΝΠϧΛ0QFO4IJGUͷΦϒδΣΫτͱͯ͠ར༻͢Δɻ
  28. (ࢀߟ) IBM Cloud͔ΒͷOpenShift΁ͷログイン⽅法 © 2021 IBM Corporation 42 IBM Cloudにログイン後、

    トップ画⾯左上のナビゲーション・ メニューボタンを押下 リストから「OpenShift」を選択 「クラスター」を選択 対象クラスターを選択 「OpenShift Webコンソール」を 押下 IUUQTDMPVEJCNDPN
  29. ࢀߟ PDίϚϯυΛར༻ͨ͠0QFO4IJGU΁ͷϩάΠϯํ๏ © 2021 IBM Corporation 43 PDίϚϯυ 0QFO4IJGUͷ؅ཧ༻ίϚϯυ ͰϩάΠϯ͢ΔͨΊͷτʔΫϯ৘ใ͸ɺ0QFO4IJGUίϯιʔϧӈ্

    ͷʮ*".Ϣʔβʔ໊ʯΛΫϦοΫ͠ɺʮ$PQZ-PHJO$PNNBOEʯʹͯτʔΫϯ΍ίϚϯυΛදࣔ PDͰϩάΠϯ͢Δ৔߹ͷίϚϯυ͕දࣔ
  30. –ແఀࢭϦϦʔε΍ஈ֊తϦϦʔεΛબ୒ –ҎલͷόʔδϣϯʹίϚϯυͰϑΥʔϧόοΫ͢Δ͜ͱ΋Մೳ ࢀߟ ΞϓϦέʔγϣϯͷϦϦʔεͱϑΥʔϧόοΫ アプローチ 概要 3PMMJOH %FQMPZNFOU l ΞϓϦέʔγϣϯͷ৽͍͠όʔδϣϯΛஈ֊తʹஔ͖׵͑Δ

    l ·ͣ৽͍͠ΞϓϦέʔγϣϯͷ1PEΛσϓϩΠޙɺͦͷ1PEΛϦ ΫΤετͷϧʔςΟϯάର৅ʹ௥Ճɻطଘ1PEΛͭϦΫΤετ ͷϧʔςΟϯάର৅͔Β֎ͯ͠ఀࢭ l ͜ΕΒΛॱ൪ʹɺࣗಈతʹߦ͏ l 0QFO4IJGUͷσϑΥϧτ #MVF(SFFO %FQMPZNFOU l શϢʔβʔ͕ΞΫηε͢ΔطଘͷΞϓϦ (SFFO ͱϢʔβʔ͔Β ΞΫηε͞Εͳ͍ΞΠυϧঢ়ଶͷΞϓϦ #MVF Λ༻ҙ͢Δ l ػೳςετ΍ύϑΥʔϚϯεςετΛऴ͑ͯ໰୊͕ͳ͚Ε͹ɺ ϦΫΤετͷϧʔςΟϯάΛ(SFFO͔Β#MVFʹ੾Γସ͑Δ खಈ $BOBSZ %FQMPZNFOU l #MVF͔Β(SFFO΁ͷ੾Γସ͑Λ̍εςοϓͰ͸ͳ͘ɺஈ֊తʹ ߦ͏Ξϓϩʔν l ৽͍͠ΞϓϦέʔγϣϯͷҰ෦ͷػೳΛগ਺ͷϢʔβʔʹͷΈ ެ։͠ɺΤϥʔ΍໰୊͕ͳ͚Ε͹ϧʔςΟϯάͷׂ߹Λ खಈͰ มߋ͠ɺ৽͍͠ΞϓϦέʔγϣϯΛஈ֊తʹ࢒ΓͷϢʔβʔʹ ެ։͢Δ l ಛఆͷϦΫΤετݩͷϧʔςΟϯάઌΛݻఆ͢Δ৔߹͸4FSWJDF .FTI *TUJP Λར༻͢Δ route V2.0 V1.0 route V2.0(Blue) V1.0(Green) route V2.0 V1.0 70% 30%
  31. ࢀߟ 0QFO4IJGUίϚϯυૢ࡞ © 2021 IBM Corporation 46 0QFO4IJGU΁ϩάΠϯ > oc

    login -u <Ϣʔβʔ*%> -p <ύεϫʔυ> ϓϩδΣΫτ৽ن࡞੒ > oc new-project <ϓϩδΣΫτ໊> ΞϓϦέʔγϣϯ࡞੒ > oc new-app <ίϯςφΠϝʔδ> ΞϓϦέʔγϣϯΛެ։ > oc expose svc/<ΞϓϦέʔγϣϯ໊> ΞϓϦέʔγϣϯΛ࡟আ > oc delete all -lapp=<ΞϓϦέʔγϣϯ໊> ϓϩδΣΫτΛ࡟আ > oc delete project <ϓϩδΣΫτ໊> 0QFO4IJGU͔ΒϩάΞ΢τ > oc logout
  32. ࢀߟ 0QFO4IJGUίϚϯυूʢओͳ΋ͷʣ © 2021 IBM Corporation 47 ֓ཁ ίϚϯυ Φϓγϣϯ

    ϩάΠϯ PDMPHJOVEFWFMPQFSQIPHF ϩάΠϯ PDMPHJOVEFWFMPQFSQIPHF ϓϩδΣΫτͷ࡞੒ PD OFXQSPKFDUQSPKFDUOBNF ϓϩδΣΫτͷ࡞੒ PD OFXQSPKFDUQSPKFDUOBNF ΞϓϦέʔγϣϯͷ࡞੒ PD OFXBQQBQQOBNF ΞϓϦέʔγϣϯͷ࡞੒ PD OFXBQQBQQOBNF αʔϏεͷެ։ PD FYQPTFTWDBQQOBNF αʔϏεͷެ։ PD FYQPTFTWDBQQOBNF εςʔλεදࣔ PD TUBUVT εςʔλεදࣔ PD TUBUVT ΦϒδΣΫτͷৄࡉදࣔ PD HFUBMM ΦϒδΣΫτͷৄࡉදࣔ PD HFUBMM σϓϩΠϝϯτߏ੒ ED ͷৄࡉදࣔ PD EFTDSJCFEDPQFOMJCFSUZ σϓϩΠϝϯτߏ੒ ED ͷ ৄࡉදࣔ PD EFTDSJCFEDPQFOMJCFSUZ ΞϓϦέʔγϣϯҰࣜͷ ࡟আ PD EFMFUF BMMMBQQBQQOBNF ΞϓϦέʔγϣϯҰࣜͷ࡟ আ PD EFMFUF BMMMBQQBQQOBNF ϓϩδΣΫτͷ࡟আ PD EFMFUFQSPKFDUQSPKFDUOBNF ϓϩδΣΫτͷ࡟আ PD EFMFUFQSPKFDUQSPKFDUOBNF ϓϩδΣΫτͷϦετ PD QSPKFDUT ϓϩδΣΫτͷϦετ PD QSPKFDUT ϩάΞ΢τ PD MPHPVU ϩάΞ΢τ PD MPHPVU ϩάΠϯ PDMPHJOVEFWFMPQFSQIPHF ϩάΠϯ PD MPHJOVEFWFMPQFS QIPHF ϓϩδΣΫτͷ࡞੒ PD OFXQSPKFDUQSPKFDUOBNF ϓϩδΣΫτͷ࡞੒ PD OFXQSPKFDUQSPKFDUOBNF
  33. ࢀߟࢿྉ © 2021 IBM Corporation 48 Kubernetesͱ͸ https://www.redhat.com/ja/topics/containers/what-is-kubernetes OpenShift 4.7

    ੡඼υΩϡϝϯτ https://access.redhat.com/documentation/ja-jp/openshift_container_platform/4.7 OpenShift Countainer Platform 4.7 ΞʔΩςΫνϟʔ https://access.redhat.com/documentation/ja-jp/openshift_container_platform/4.7/html/architecture/index Red Hat OpenShift on IBM Cloud֓આ https://cloud.ibm.com/docs/openshift?topic=openshift-getting-started OpenShiftͱKubernetesͷҧ͍ͱՁ஋ https://www.ibm.com/blogs/think/jp-ja/differences-values-openshift-and-kubernetes/ Kubernetes and OpenShift: What's the Difference? https://youtu.be/cTPFwXsM2po