Slide 1

Slide 1 text

0QFSBUPSͰͲ͏มΘΔʁ ͜Ε͔Βͷσʔλϕʔεӡ༻ $MPVE/BUJWF%BZT5PLZP :VLJ,JSJJ ,VCFSOFUFT

Slide 2

Slide 2 text

"CPVU.F :VLJ,JSJJ *OGSBTUSVDUVSF&OHJOFFS ZVLJSJJ@ ZVLJSJJ $FSUJpFE,VCFSOFUFT"ENJOJTUSBUPS $," גࣜձࣾαΠόʔΤʔδΣϯτ ٕज़ຊ෦4FSWJDF3FMJBCJMJUZ(SPVQ 43( "NFCBͷը૾഑৴γεςϜ΍ج൫γεςϜͷΠϯϑϥΛ୲౰

Slide 3

Slide 3 text

ࠓ೔͓࿩͢͠Δ͜ͱ ˒ ,VCFSOFUFT0QFSBUPSΛ࢖͏ͱͲΜͳࣄ͕Ͱ͖Δͷ͔ ˒ ͲΜͳ఺͕͏Ε͍͠ͷ͔ ࣮ྫͱͯ͠σʔλϕʔεΛಈ͔͢ྫΛަ͑ͳ͕Βղઆ͍͖ͯ͠·͢ ·ͣ͸࢖ͬͯݟΔͱ͜Ζ͔Β͸͡ΊͯΈ·͠ΐ͏ʂ ͠ͳ͍͜ͱ ˒ ,VCFSOFUFT0QFSBUPSͷ࡞Γํ ຊ೔ͷࢿྉ͸ެ։͠·͢ͷͰ
 ࣸਅऔΒͳͯ͘΋େৎ෉Ͱ͢Ϥʂ

Slide 4

Slide 4 text

"NFCBͷΦϯϓϨ,VCFSOFUFTΫϥελ "NFCBϢʔβͷϓϩϑΟʔϧγεςϜ
 ࡮৽ϓϩδΣΫτ ‣ ೥຤ ‣ ྺ࢙తܦҢͰ෼அ͞Ε͍ͯͨͭͷγεςϜΛ
 ౷߹͠ϦχϡʔΞϧʂ ʮϦχϡʔΞϧΛظʹ%PDLFSԽʂʯ ʮίϯςφΦʔέετϨʔγϣϯʹ͸
 ɹ,VCFSOFUFTΛ࢖͏ͧʂʂʯ ϓϥΠϕʔτΫϥ΢υ্ʹ
 ,VCFSOFUFTΫϥελ͕ര஀

Slide 5

Slide 5 text

"NFCBͷΦϯϓϨ,VCFSOFUFTΫϥελ 0QFO4UBDL্ʹߏங ‣ σϓϩΠ͸,VCFTQSBZͰ .Z42-σʔλϕʔε ‣ LTΫϥελͷ֎ʹ7.Ͱߏங ‣ .BTUFS4MBWF
 
 .)"GPS.Z42- 7. 7. 7. 7. .BTUFS 7. 4MBWF ˞Πϯλʔωοτ޿ࠂࣄۀ෦ͷ,VCFSOFUFT ",& ͱ͸ผͷ؀ڥͰ͢ ࠓͳΒ%#Λ,VCFSOFUFTʹ
 ͷͤΔ͜ͱ΋Ͱ͖Δʁ ͲΜͳํ๏͕͋ΔͩΖ͏ʁʁ

Slide 6

Slide 6 text

5PEBZ`T"HFOEB ίϯςφͰεςʔτϑϧͳΞϓϦέʔγϣϯΛಈ͔͢ ,VCFSOFUFT0QFSBUPSͱ͸ ࣮ྫ.Z42-0QFSBUPSΛಈ͔ͯ͠ΈΑ͏ ,VCFSOFUFT0QFSBUPSͷ͜Ε͔Β ߟྀ͢΂͖ϙΠϯτͱ,VCFSOFUFT্Ͱͷղܾํ๏ʹ͍ͭͯ஌Δ $VTUPN3FTPVSDFΛ׆༻ͨ͠ӡ༻ࣗಈԽͷύλʔϯʹ͍ͭͯ஌Δ 0QFSBUPSͷ࢖༻ײ͸ʁ࣮ࡍʹLT্Ͱ.Z42-Λಈ͔ͯ͠ΈΔ ؔ࿈ϓϩδΣΫτͷ঺հͱ0QFSBUPSͷࠓޙʹ͍ͭͯ

Slide 7

Slide 7 text

ίϯςφͰεςʔτϑϧͳΞϓϦΛಈ্͔͢ͰͷͭͷϙΠϯτ ΞϓϦέʔγϣϯݻ༗ͷ
 ӡ༻φϨοδ Ӭଓతͳσʔλͷѻ͍

Slide 8

Slide 8 text

εςʔτϨεͳΞϓϦέʔγϣϯͷ৔߹ 8FCαʔό΍"1*αʔόʜΞϓϦέʔγϣϯ͸ঢ়ଶΛ࣋ͨͳ͍ OPEF OPEF OPEF ͲͷϗετͰ΋ىಈͰ͖Δ 㾎 ϙʔλϏϦςΟ͕ߴ͍ ૿΍͠΍͍͢ݮΒ͠΍͍͢ 㾎 εέʔϥϏϦςΟ͕ߴ͍ ໰୊ͷ͋Δίϯςφ͸ࣺͯΔ͜ͱ͕Ͱ͖Δ 㾎 ճ෮ྗ͕ߴ͍

Slide 9

Slide 9 text

εςʔτϑϧͳΞϓϦέʔγϣϯͷ৔߹ σʔλϕʔε΍෼ࢄγεςϜʜΞϓϦέʔγϣϯ͸ঢ়ଶΛ࣋ͭ ΞϓϦέʔγϣϯͷϥΠϑαΠΫϧͱͷΪϟοϓ 4UBSUFE 4UPQQFE $SFBUFE ,JMMFE ίϯςφ಺ͷσʔλͷอ࣋ظؒ ίϯςφͷϥΠϑαΠΫϧ σϓϩΠͷ୯Ґ ΞϓϦέʔγϣϯͷ ϥΠϑαΠΫϧ ίϯςφΠϯελϯεͷ֎΁
 σʔλͷӬଓԽ͕ඞཁ ΞϓϦέʔγϣϯ͕
 σʔλΛඞཁͱ͢Δظؒ

Slide 10

Slide 10 text

εςʔτϑϧͳΞϓϦέʔγϣϯͷ৔߹ σʔλϕʔε΍෼ࢄγεςϜʜΞϓϦέʔγϣϯ͸ঢ়ଶΛ࣋ͭ ࠶ىಈ΍ผϗετͰىಈ͢Δέʔεͷߟྀ΋ඞཁ ‣ ಉ͡σʔλ͕࠶ͼར༻ՄೳͰͳ͚Ε͹ͳΒͳ͍
 ྫ%#ͷ߸ػ༻1PEͰ͸ɺҎલͱಉ͡
 ɹ1PE༻ͷϘϦϡʔϜΛϚ΢ϯτͯ͠΄͍͠ OPEF OPEF OPEF ʁ SFSFTDIFEVMJOH

Slide 11

Slide 11 text

εςʔτϑϧͳΞϓϦέʔγϣϯͷ৔߹ σʔλϕʔε΍෼ࢄγεςϜˠΞϓϦέʔγϣϯ͸ঢ়ଶΛ࣋ͭ ݻఆͷ໊લΛ࢖͍͍ͨ ‣ ଟ਺ͷϊʔυͰߏ੒͞ΕΔγεςϜͷ৔߹
 ϗετ໊*1͕มΘΔͱϝϯόͷಛఆ͕೉͘͠ͳΔ OPEF OPEF OPEF %#$MVTUFS $POpH'JMF .FNCFST OPEFT[DQʜ/PU'PVOE OPEFUIW[ʜ/PU'PVOE ʁ OPEFIUIC OPEFQMTT

Slide 12

Slide 12 text

4UBUFGVM4FU εςʔτϑϧͳΞϓϦέʔγϣϯΛಈ͔ͨ͢Ίͷ,VCFSOFUFT૊ΈࠐΈͷϦιʔε ‣ 1PEͰ࢖༻͢ΔӬଓσʔλͷऔΓѻ͍ͱωʔϛϯάͷ՝୊Λղܾ NZTRM NZTRM NZTRM NZTRM ॱ൪ʹ
 σϓϩΠ ॱ൪ʹ
 ऴྃ࡟আ ֤1PEʹઐ༻ͷετϨʔδϘϦϡʔϜΛ
 ׂΓ౰ͯΔ ରԠؔ܎΋ҡ࣋͞ΕΔ 1PEʹݻఆͷࣝผࢠΛׂΓ౰ͯΔ

Slide 13

Slide 13 text

ίϯςφͰεςʔτϑϧͳΞϓϦΛಈ্͔͢ͰͷͭͷϙΠϯτ ΞϓϦέʔγϣϯݻ༗ͷ
 ӡ༻φϨοδ Ӭଓతͳσʔλͷѻ͍ ʁʁʁ 4UBUFGVM4FU ,VCFSOFUFTͷඪ४ػೳ ඪ४ػೳ͕αϙʔτ͠ͳ͍ྖҬ

Slide 14

Slide 14 text

εςʔτϑϧͳΞϓϦέʔγϣϯͷ৔߹ σʔλϕʔε΍෼ࢄγεςϜˠΞϓϦέʔγϣϯ͸ঢ়ଶΛ࣋ͭ ΞϓϦέʔγϣϯݻ༗ͷૢ࡞͕ඞཁ ‣ ,VCFSOFUFT্Ͱ͸ࣗ཯ಈ࡞͕લఏ ‣ ىಈޙʹԿΒ͔ͷΦϖϨʔγϣϯ͕ඞཁͳ৔߹
 ࣗಈԽͰߦ͏࢓૊Έ͕΄͍͠ ‣ ྫ৽ن%#ϊʔυͷΫϥελ΁ͷKPJOૢ࡞ ‣ ྫো֐͔Βͷ෮چʹΦϖϨʔγϣϯ͕ඞཁ OPEF OPEF OPEF ʁ %#$MVTUFS +PJOJOHBOPEF Ͳ͏ରॲ͢Δʜʁ

Slide 15

Slide 15 text

5PEBZ`T"HFOEB ίϯςφͰεςʔτϑϧͳΞϓϦέʔγϣϯΛಈ͔͢ ,VCFSOFUFT0QFSBUPSͱ͸ ࣮ྫ.Z42-0QFSBUPSΛಈ͔ͯ͠ΈΑ͏ ,VCFSOFUFT0QFSBUPSͷ͜Ε͔Β ߟྀ͢΂͖ϙΠϯτͱ,VCFSOFUFT্Ͱͷղܾํ๏ʹ͍ͭͯ஌Δ $VTUPN3FTPVSDFΛ׆༻ͨ͠ӡ༻ࣗಈԽͷύλʔϯʹ͍ͭͯ஌Δ 0QFSBUPSͷ࢖༻ײ͸ʁ࣮ࡍʹLT্Ͱ.Z42-Λಈ͔ͯ͠ΈΔ ؔ࿈ϓϩδΣΫτͷ঺հͱ0QFSBUPSͷࠓޙʹ͍ͭͯ

Slide 16

Slide 16 text

,VCFSOFUFT0QFSBUPS ಛఆͷΞϓϦέʔγϣϯΛ,VCFSOFUFT্Ͱ࣮ߦɾ؅ཧ͢ΔͨΊͷιϑτ΢ΣΞ $POUSPMMFS ‣ ೥$PSF04͕ఏএͨ͠ख๏ ‣ ӡ༻্ͷφϨοδ͕ιϑτ΢ΣΞͱ࣮ͯ͠૷͞Ε͍ͯΔ ‣ 0QFSBUPSࣗମ΋,VCFSOFUFTͰ؅ཧ͞ΕΔίϯςφͱͯ͠ಈ࡞ IUUQTDPSFPTDPNCMPHJOUSPEVDJOHPQFSBUPSTIUNM 㾎 ΞϓϦέʔγϣϯͷόʔδϣϯΞοϓ 㾎 ෳࡶͳো֐ճ෮ͷखॱͷ࣮ߦ 㾎 ఆظతͳσʔλͷόοΫΞοϓ 㾎 εςʔτϑϧͳΞϓϦέʔγϣϯͷ
 εέʔϧΞοϓμ΢ϯ 0QFSBUPS $SFBUF/FX1PE #BDLVQ ΞϓϦέʔγϣϯݻ༗ͷӡ༻खॱΛ
 ιϑτ΢ΣΞԽ

Slide 17

Slide 17 text

͓͞Β͍ ,VCFSOFUFTͷಛ௃ͱಈ࡞ ಛ௃%FDMBSBUJWF એݴతͳ "1* ‣ Ϣʔβ͸ͳʹΛୡ੒͍ͨ͠ͷ͔ EFTJSFETUBUF ΛγεςϜʹ఻͑Δ apiVersion: extensions/v1beta1 kind: ReplicaSet metadata: name: nginx spec: replicas: 3 template: spec:
 containers:
 - name: nginx image: nginx:latest Ϣʔβ͸"1*Λ௨ͯ͠
 3FTPVSDFΛొ࿥͢Δ $POUSPMMFS͸"1*Λ௨ͯ͠
 3FTPVSDFͷΦϒδΣΫτΛ؅ཧ͢Δ 8BUDI "QQMZ 3FQMJDB4FU3FTPVSDF
 OBNFOHJOY 3FQMJDB4FU
 $POUSPMMFS

Slide 18

Slide 18 text

͓͞Β͍ ,VCFSOFUFTͷಛ௃ͱಈ࡞ ಛ௃$POUSPMMFSʹΑΔ3FDPODJMJBUJPOMPPQ ௐ੔ϧʔϓ ‣ ,VCFSOFUFT͸ෳ਺ͷಠཱͨ͠$POUSPMMFSͷू߹ମ ‣ ֤$POUSPMMFS͕୲౰͢Δ3FTPVSDFͷΦϒδΣΫτΛl๬·͍͠ঢ়ଶ EFTJSFETUBUF zʹҡ࣋͢Δ 3FQMJDB4FU$POUSPMMFS 0CTFSWF "OBMZ[F l3FQMJDB4FU9z͕ߋ৽͞Εͨ %FTJSFETUBUFSFQMJDBT
 $VSSFOUTUBUFSFQMJDBT kubectl apply -f replicaset.yaml "DU $SFBUFOFX1PE
 $VSSFOUTUBUFSFQMJDBT 3FQMJDB4FU9 VQEBUFE 6QEBUF
 DVSSFOUTUBUF $SFBUF ྫ 3FQMJDB4FU

Slide 19

Slide 19 text

,VCFSOFUFT0QFSBUPSͷߏ੒ Ϣʔβ͸,VCFSOFUFTΛಠࣗͷ3FTPVSDFͱ$POUSPMMFSͰ֦ுͰ͖Δ ‣ 0QFSBUPS͸͜ͷ࢓૊ΈΛ׆༻ $VTUPN3FTPVSDF ‣ ϢʔβʹΑͬͯಠࣗʹఆٛ͞Εͨ3FTPVSDF ‣ ྫԿͷσʔλϕʔεγεςϜΛɺԿ୆Ͱߏ੒͢Δ͔Λఆٛ ‣ $VTUPN3FTPVSDF%FpOJUJPOT $3% ʹΑͬͯLT"1*Λ֦ு͢Δͱѻ͑ΔΑ͏ʹͳΔ $VTUPN$POUSPMMFS ‣ ϢʔβʹΑͬͯಠࣗʹఆٛ͞Εͨ$POUSPMMFS ‣ $VTUPN3FTPVSDFͷΦϒδΣΫτΛlEFTJSFETUBUFlʹҡ࣋͢Δ ‣ ྫ৽͍͠1PEΛΫϥελʹ૊ΈࠐΉॲཧΛߦ͏ ‣ ྫ1PEͷεςʔλεΛऔಘ͠ɺඞཁʹԠͯ͡෮چखॱΛ࣮ࢪ͢Δ

Slide 20

Slide 20 text

,VCFSOFUFT0QFSBUPSͷಈ࡞ $VTUPN$POUSPMMFS 0CTFSWF "OBMZ[F l%BUBCBTF9z͕ߋ৽͞Εͨ %FTJSFETUBUFWFSTJPOW
 $VSSFOUTUBUFWFSTJPOW kubectl apply -f database.yaml "DU 3PMMJOH6QEBUF
 $VSSFOUTUBUFWFSTJPOW %BUBCBTF9 VQEBUFE 6QEBUF
 DVSSFOUTUBUF 6QEBUF $VTUPN3FTPVSDFʹج͖ͮ$VTUPN$POUSPMMFS͕ඞཁͳଞͷ3FTPVSDFΛૢ࡞͢Δ ྫ σʔλϕʔεΛ
 ɹ؅ཧ͢Δ0QFSBUPSͷྫ

Slide 21

Slide 21 text

5PEBZ`T"HFOEB ίϯςφͰεςʔτϑϧͳΞϓϦέʔγϣϯΛಈ͔͢ ߟྀ͢΂͖ϙΠϯτͱ,VCFSOFUFT্Ͱͷղܾํ๏ʹ͍ͭͯ஌Δ ,VCFSOFUFT0QFSBUPSͱ͸ $VTUPN3FTPVSDFΛ׆༻ͨ͠ӡ༻ࣗಈԽͷύλʔϯʹ͍ͭͯ஌Δ ࣮ྫ.Z42-0QFSBUPSΛಈ͔ͯ͠ΈΑ͏ 0QFSBUPSͷ࢖༻ײ͸ʁ࣮ࡍʹLT্Ͱ.Z42-Λಈ͔ͯ͠ΈΔ ,VCFSOFUFT0QFSBUPSͷ͜Ε͔Β ؔ࿈ϓϩδΣΫτͷ঺հͱ0QFSBUPSͷࠓޙʹ͍ͭͯ

Slide 22

Slide 22 text

PSBDMFNZTRMPQFSBUPS .Z42-*OOP%#$MVTUFSΛ,VCFSOFUFT্Ͱಈ࡞ͤ͞ΔͨΊͷ0QFSBUPS ‣ 0SBDMFͷ044ϓϩδΣΫτ ‣ ݱࡏW ‣ .Z42-WdΛαϙʔτ ‣ ίϚϯυͭͰՄ༻ੑͷߴ͍.Z42-ΫϥελΛ,VCFSOFUFT্ʹσϓϩΠ ‣ ߏங΍ӡ༻ʹඞཁͳφϨοδ͕ιϑτ΢ΣΞͱ࣮ͯ͠૷͞Ε͍ͯΔ ‣ Ϋϥελͷ࡞੒ɾ࡟আ ‣ ΫϥελͷϦαΠζ ‣ ো֐ͷݕ஌ͱ෮چ ‣ όοΫΞοϓͱϦετΞ IUUQTHJUIVCDPNPSBDMFNZTRMPQFSBUPS

Slide 23

Slide 23 text

ࢀߟ .Z42-*OOP%#$MVTUFS .Z42-޲͚ͷߴՄ༻ੑιϦϡʔγϣϯ .Z42-(SPVQ3FQMJDBUJPO ෳ਺ͷ.BTUFSؒͰϨϓϦέʔγϣϯΛߏ੒
 ϝϯόγοϓ؅ཧɾϑΣΠϧΦʔόʔɾ੔߹ੑҡ࣋Λࣗಈతʹߦ͏ ‣ 4JOHMF1SJNBSZ EFGBVMU 
 ࣗಈͰબ͹Εͨ୆ͷαʔό͕ߋ৽Λड͚෇͚Δ
 1SJNBSZͷো֐࣌͸4FDPOEBSZ͕ࣗಈతͰ1SJNBSZʹঢ֨ ‣ .VMUJ1SJNBSZ
 શαʔόͰߋ৽Λड͚෇͚Δ .Z42-3PVUFS ΞϓϦέʔγϣϯ͔Βͷ3FB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چ͕ߦΘΕΔ 8SJUF 3FBE ΫϥελϝϯόΛ੍ޚ͢Δ.Z42-"HFOUͱ
 ҰॹʹσϓϩΠ͞ΕΔ

Slide 28

Slide 28 text

NZTRMPQFSBUPSͷΠϯετʔϧ # ωʔϜεϖʔεΛ࡞੒ $ kubectl create ns mysql-operator # mysql-operator ϦϙδτϦΛऔಘ (helm chart ؚ͕·ΕΔ) $ git clone https://github.com/oracle/mysql-operator.git $ cd mysql-operator # mysql-operator Λ helm ͰΠϯετʔϧ $ helm install --namespace mysql-operator \ --name mysql-operator \ mysql-operator $ kubectl get crd --selector=release=mysql-operator NAME AGE mysqlbackups.mysql.oracle.com 18d mysqlbackupschedules.mysql.oracle.com 18d mysqlclusters.mysql.oracle.com 18d mysqlrestores.mysql.oracle.com 18d $ kubectl get pods --selector=app=mysql-operator NAME READY STATUS RESTARTS AGE mysql-operator-65475db5-tdchf 1/1 Running 0 9d $3%ͱ$VTUPN$POUSPMMFS͕ Πϯετʔϧ͞Εɺ
 $VTUPN3FTPVSDF͕ར༻
 ՄೳʹͳΔ

Slide 29

Slide 29 text

.Z42-Ϋϥελͷ࡞੒ $ kubectl get mysqlcluster,sts,pods NAME AGE cluster.mysql.oracle.com/mysql 4m NAME DESIRED CURRENT AGE statefulset.apps/mysql 3 3 4m NAME READY STATUS RESTARTS AGE pod/mysql-0 2/2 Running 0 4m pod/mysql-1 2/2 Running 0 3m pod/mysql-2 2/2 Running 0 2m apiVersion: mysql.oracle.com/v1alpha1 kind: Cluster metadata: name: mysql spec: members: 3 DMVTUFSZBNM $MVTUFS
 lNZTRMz 4UBUFGVM4FU
 lNZTRMz LVCFDUMBQQMZ .Z42- 0QFSBUPS

Slide 30

Slide 30 text

.Z42-Ϋϥελͷεέʔϧ $ kubectl get sts,pods NAME DESIRED CURRENT AGE statefulset.apps/mysql 5 5 8m NAME READY STATUS RESTARTS AGE pod/mysql-0 2/2 Running 0 8m pod/mysql-1 2/2 Running 0 8m pod/mysql-2 2/2 Running 0 7m pod/mysql-3 2/2 Running 0 1m pod/mysql-4 2/2 Running 0 50s apiVersion: mysql.oracle.com/v1alpha1 kind: Cluster metadata: name: mysql spec: members: 5ϝϯό਺Λมߋ ˠ DMVTUFSZBNM $MVTUFS
 lNZTRMz 4UBUFGVM4FU
 lNZTRMz LVCFDUMBQQMZ .Z42- 0QFSBUPS

Slide 31

Slide 31 text

όοΫΞοϓͱϦετΞ apiVersion: mysql.oracle.com/v1alpha1 kind: Backup metadata: name: mysql-cluster-backup spec: executor: mysqldump: databases: - name: employees storageProvider: s3: endpoint: s3.ap-northeast-1.amazonaws.com region: ap-northeast-1 bucket: mysql-operator-test forcePathStyle: true credentialsSecret: name: s3-credentials cluster: name: mysql CBDLVQZBNM #BDLVQϦιʔεఆٛ͠BQQMZ͢Δ ‣ 4ޓ׵"1*͕࢖༻Մೳ "844 0$*0CKFDU4UPSBHF ($1($4 ‣ NZTRMEVNQΛαϙʔτ ‣ #BDLVQ4DIFEVMFϦιʔεͰఆظ࣮ߦ΋Մೳ $ kubectl get mysqlbackup NAME AGE mysql-cluster-backup 13m

Slide 32

Slide 32 text

όοΫΞοϓͱϦετΞ 3FTUPSFϦιʔεఆٛ͠BQQMZ͢Δ ‣ ࢖༻͢Δ#BDLVQͱ
 ϦετΞઌͷ$MVTUFSΛࢦఆ apiVersion: mysql.oracle.com/v1alpha1 kind: Restore metadata: name: mysql-cluster-restore spec: cluster: name: mysql-restore backup: name: mysql-cluster-backup SFTUPSFZBNM mysql> show databases; +-------------------------------+ | Database | +-------------------------------+ | information_schema | | mysql | | mysql_innodb_cluster_metadata | | performance_schema | | sys | +-------------------------------+ 5 rows in set (0.01 sec) mysql> show databases; +-------------------------------+ | Database | +-------------------------------+ | employees | | information_schema | | mysql | | mysql_innodb_cluster_metadata | | performance_schema | | sys | +-------------------------------+ 6 rows in set (0.00 sec) 3FTUPSFલ 3FTUPSFޙ

Slide 33

Slide 33 text

4JOHMF.BTUFSߏ੒Ͱ1SJNBSZͷ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TRM SPMFQSJNBSZ Binary Log

Slide 37

Slide 37 text

4JOHMF.BTUFSߏ੒Ͱ1SJNBSZͷ1PE͕མͪͨ৔߹ ͦͷޙʜ ো֐ൃੜ࣌͸Ͳ͏ͳΔʁ 4UBUFGVM4FU %FTJSFETUBUFSFQMJDBT $VSSFOUTUBUFSFQMJDBT NZTRM SPMFTFDPOEBSZ NZTRM SPMFTFDPOEBSZ 4FDPOEBSZͱͯ͠Ϋϥελʹ
 ࠶ࢀՃ NZTRM SPMFQSJNBSZ

Slide 38

Slide 38 text

ো֐ൃੜ࣌͸Ͳ͏ͳΔʁ LTOPEF͕མͪͨ৔߹1PEͷεςʔλε͸6OLOPXOʹͳΔ 4UBUFGVM4FUͷ1PE͸ࣗಈͰ࠶εέδϡʔϦϯά͞Εͳ͍ ‣ ಛఆͷ໊લͷ1PE͕Ϋϥελ಺ʹ࠷େͰͭଘࡏ͢Δ͜ͱΛอূ͢Δ ‣ TQSJUCSBJOʹΑΔো֐Λ๷͙ͨΊ࠶࡞੒͸ߦΘΕͳ͍ % kubernetes get node k8s-node02 NAME STATUS ROLES AGE VERSION k8s-node02 NotReady 8d v1.12.7 % kubectl get pods -l v1alpha1.mysql.oracle.com/cluster=mysql -o wide NAME READY STATUS RESTARTS AGE NODE mysql-0 2/2 Running 0 3d k8s-node01 mysql-1 2/2 Unknown 0 3d k8s-node02 1PE4UBUVT͕6OLOPXOͷ৔߹ɺ
 ίϯςφࣗମ͸·ͩಈ͍͍ͯΔՄೳੑ͕͋Δ mysql> SELECT MEMBER_HOST, MEMBER_STATE, MEMBER_ROLE FROM performance_schema.replication_group_members ORDER BY MEMBER_HOST; +---------------+--------------+-------------+ | MEMBER_HOST | MEMBER_STATE | MEMBER_ROLE | +---------------+--------------+-------------+ | mysql-0.mysql | ONLINE | SECONDARY | | mysql-1.mysql | ONLINE | SECONDARY | | mysql-2.mysql | ONLINE | SECONDARY | (SPVQ3FQMJDBUJPOͷϝϯόҰཡʹ͸
 ର৅ͷ1PE͕·ؚͩ·Ε͍ͯΔʂ

Slide 39

Slide 39 text

ো֐ൃੜ࣌͸Ͳ͏ͳΔʁ LTOPEF͕མͪͨ৔߹1PEͷεςʔλε͸6OLOPXOʹͳΔ ࠶εέδϡʔϦϯά͢Δʹ͸ ‣ ݱঢ়ͩͱ1PEΛڧ੍࡟আ͢Δ͔͠ͳͦ͞͏ʜʁ $ kubectl delete pod —force —grace-period=0 ঢ়ଶ֬ೝˠ੾Γ཭͠ˠ෮چͷखॱ΋0QFSBUPSʹ೚͍ͤͨʜʂ ‣ ݱࡏ ࣮૷͸͞Ε͍ͯͳ͍ 1PEͷ࠶εέδϡʔϦϯά
 GPSDFEFMFUF (SPVQ3FQMJDBUJPO͔Β
 ੾Γ཭͞ΕͯΔ͜ͱΛ֬ೝ 1PEͷεςʔλεΛ֬ೝ 4UBUFGVM4FU1PEXBTOFWFSFWJDUFEGSPNUIFGBJMVSFOPEF

Slide 40

Slide 40 text

ϞχλϦϯά .Z42-0QFSBUPSͷίϯϙʔωϯτ΋1SPNFUIFVTΤϯυϙΠϯτΛ͍࣋ͬͯΔ ‣ Ϋϥελͷߏ੒มߋʹؔ͢ΔϝτϦΫε͕ऩूՄೳ *OOP%#$MVTUFS .Z42-0QFSBUPS
 $POUSPMMFS &YQPSUFS NZTRMBHFOU NZTRM .POJUPSJOH "HFOU

Slide 41

Slide 41 text

ίϯςφͰεςʔτϑϧͳΞϓϦΛಈ্͔͢ͰͷͭͷϙΠϯτ ΞϓϦέʔγϣϯݻ༗ͷ
 ӡ༻φϨοδ Ӭଓతͳσʔλͷѻ͍ ,VCFSOFUFT 0QFSBUPS 4UBUFGVM4FU ,VCFSOFUFTͷඪ४ػೳ ඪ४ػೳ͕αϙʔτ͠ͳ͍ྖҬ εςʔτϑϧͳϫʔΫϩʔυ΋,VCFSOFUFTͷίϯηϓτΛར༻ͯ͠ ࣗ཯ಈ࡞ͤ͞Δ͜ͱ͕ՄೳʹͳΔ

Slide 42

Slide 42 text

5PEBZ`T"HFOEB ίϯςφͰεςʔτϑϧͳΞϓϦέʔγϣϯΛಈ͔͢ ,VCFSOFUFT0QFSBUPSͱ͸ ࣮ྫ.Z42-0QFSBUPSΛಈ͔ͯ͠ΈΑ͏ ,VCFSOFUFT0QFSBUPSͷ͜Ε͔Β ߟྀ͢΂͖ϙΠϯτͱ,VCFSOFUFT্Ͱͷղܾํ๏ʹ͍ͭͯ஌Δ $VTUPN3FTPVSDFΛ׆༻ͨ͠ӡ༻ࣗಈԽͷύλʔϯʹ͍ͭͯ஌Δ 0QFSBUPSͷ࢖༻ײ͸ʁ࣮ࡍʹLT্Ͱ.Z42-Λಈ͔ͯ͠ΈΔ ؔ࿈ϓϩδΣΫτͷ঺հͱ0QFSBUPSͷࠓޙʹ͍ͭͯ

Slide 43

Slide 43 text

%#PO,VCFSOFUFTؔ࿈ϓϩδΣΫτ IUUQTHJUIVCDPNQSFTTMBCTNZTRMPQFSBUPS QSFTTMBCTNZTRMPQFSBUPS ‣ .BTUFS4MBWFߏ੒ͷ.Z42-Λαϙʔτ ‣ ো֐ݕ஌ͱϑΣΠϧΦʔόʔ͸ PSDIFTUSBUPSΛ࢖༻ IUUQTWJUFTTJP 7JUFTT ‣ େن໛ͳ.Z42-ΫϥελΛσϓϩΠ͠
 ؅ཧ͢ΔͨΊͷιϦϡʔγϣϯ ‣ γϟʔσΟϯάػߏΛ಺ଂ ‣ ϑΣΠϧΦʔόʔ΍όοΫΞοϓͷࣗಈԽ .Z42-ʹؔ࿈ͨ͠ϓϩδΣΫτ 0QFSBUPS͕ଘࡏ͢Δσʔλϕʔε "FSPTQJLF $BTTBOESB $PVDICBTF &MBTUJDTFBSDI FUDE *OqVY%# .FNDBDIFE .POHP%# 1PTUHSF42- 3FEJT 5J%# ʜͳͲ

Slide 44

Slide 44 text

,VCFSOFUFT0QFSBUPSͷ͜Ε͔Β %#Ҏ֎΋ؚΊɺ༷ʑͳ0QFSBUPS͕ެ։͞Ε͍ͯΔ PQFSBUPSGSBNFXPSLBXFTPNFPQFSBUPST ‣ ެ։͞Ε͍ͯΔ0QFSBUPSΛΞϓϦ͝ͱʹ
 ·ͱΊͨϦετ 0QFSBUPS)VCJP ‣ 0QFSBUPSͷҰཡΛఏڙ͢ΔϙʔλϧαΠτ ‣ "84 (PPHMF$MPVE .JDSPTPGU"[VSFͱڞಉͰ
 3FE)BUʹΑΓެ։ ӡ༻λεΫΛ0QFSBUPSͱͯ͠ύοέʔδԽ͠
 ϢʔβؒͰڞ༗͢Δ͜ͱ͕Ͱ͖Δ

Slide 45

Slide 45 text

,VCFSOFUFT0QFSBUPSͰ/P0QTΛ࣮ݱʁ /P0QT/P6ODPNGPSUBCMF0QT ‣ γεςϜӡ༻อकʹؔ͢Δʮخ͘͠ͳ͍΋ͷʯΛऔΓআ͘׆ಈ ‣ औΓ૊ΈͷͭγεςϜʹࣗ཯ӡ༻ೳྗΛ࣋ͨͤਓؒʹΑΔӡ༻Λ࠷খԽ͢Δ ࣗ཯ӡ༻ʹඞཁͳlճ෮ྗ 4FMG)FBMJOH
 ো֐ൃੜ࣌ͷʮαʔϏεແӨڹࣗݾम෮ʯ *OqJHIUSFOFXJOH
 มߋɾߋ৽ʹର͢Δʮແఀࢭϝϯςφϯεʯ "EBQUJWF4DBMF
 ෛՙมಈʹ஄ྗతʹదԠ͢Δʮࣗ཯తϦιʔεௐ੔ʯ IUUQTHJUIVCDPNOPPQTKBQBODPNNVOJUZCMPCNBTUFS%&'*/*5*0/NE 4FMG)FBMJOH 㾎 %FDMBSBUJWF$POpHVSBUJPO 㾎 -JWFOFTT3FBEJOFTT1SPCF *OqJHIUSFOFXJOH 㾎 3PMMJOH6QEBUF "EBQUJWF4DBMF 㾎 )PSJ[POUBM1PE"VUPTDBMFS 㾎 $MVTUFS"VUPTDBMFS ,VCFSOFUFTͷ࣋ͭճ෮ྗ /P0QT%FpOJUJPOW

Slide 46

Slide 46 text

,VCFSOFUFT0QFSBUPSͰ/P0QTΛ࣮ݱʁ 1MBUGPSN "QQMJDBUJPO ,VCFSOFUFT0QFSBUPS ,VCFSOFUFTͷίϯηϓτͱ֦ுੑΛ׆༻͠ γεςϜશମͷճ෮ྗΛߋʹߴ͍΋ͷʹͰ͖Δ 8FC4FSWFS %BUBCBTF .FTTBHF2VFVF $BDIF ΞϓϦΛؚΊͨγεςϜશମͰճ෮ྗΛ࣋ͭ͜ͱ͕ॏཁ ‣ ো֐͔Βͷ෮چ͕࣌ؒ௕͍ ‣ ෮چͷͨΊͷखॱ͕ෳࡶ ‎ ճ෮ྗͷ௿Լʹ
 ͭͳ͕ͬͯ͠·͏

Slide 47

Slide 47 text

͜Ε͔Βͷσʔλϕʔεߏஙɾӡ༻͸͜͏ͳΔ͸ͣʜ 130#-&. EBUBCBTF%08/ ࠓ೔ϦϦʔεͨ͠ࢪࡦͰ
 ϦΫΤετ૿͑ΔΒ͍͠ʜ
 %#΋૿΍͞ͳ͍ͱʜʂ ։ൃ؀ڥʹσʔλϕʔε
 ͙͢ʹ༻ҙͯ͠΄͍͠ͳ

Slide 48

Slide 48 text

͜Ε͔Βͷσʔλϕʔεߏஙɾӡ༻͸͜͏ͳΔ͸ͣʜ ಥൃతͳ࡞ۀͷෛՙ͕Լ͕Δ ਓखʹΑΔΦϖϛε΋ݮΔ 130#-&. EBUBCBTF%08/ ࠓ೔ϦϦʔεͨ͠ࢪࡦͰ
 ϦΫΤετ૿͑ΔΒ͍͠ʜ
 %#΋૿΍͞ͳ͍ͱʜʂ ։ൃ؀ڥʹσʔλϕʔε
 ͙͢ʹ༻ҙͯ͠΄͍͠ͳ LVCFDUMBQQMZGDMVTUFSZBNM

Slide 49

Slide 49 text

͜Ε͔Βͷσʔλϕʔεߏஙɾӡ༻͸͜͏ͳΔ͸ͣʜ ಥൃతͳ࡞ۀͷෛՙ͕Լ͕Δ ਓखʹΑΔΦϖϛε΋ݮΔ Ϗδωεͷεϐʔυ͕Ճ଎͢Δ ਫ਼ਆతෛ୲͕Լ͕Δ 130#-&. EBUBCBTF%08/ ࠓ೔ϦϦʔεͨ͠ࢪࡦͰ
 ϦΫΤετ૿͑ΔΒ͍͠ʜ
 %#΋૿΍͞ͳ͍ͱʜʂ LVCFDUMBQQMZGDMVTUFSZBNM ։ൃ؀ڥʹσʔλϕʔε
 ͙͢ʹ༻ҙͯ͠΄͍͠ͳ LVCFDUMBQQMZGDMVTUFSZBNM

Slide 50

Slide 50 text

͜Ε͔Βͷσʔλϕʔεߏஙɾӡ༻͸͜͏ͳΔ͸ͣʜ ෮چͷख͕ؒ࠷খԽ͞ΕΔ ۓٸରԠ΋ݮΔ ಥൃతͳ࡞ۀͷෛՙ͕Լ͕Δ ਓखʹΑΔΦϖϛε΋ݮΔ Ϗδωεͷεϐʔυ͕Ճ଎͢Δ ਫ਼ਆతෛ୲͕Լ͕Δ 130#-&. EBUBCBTF%08/ 㵺Т㵺 ţźōʜ ࠓ೔ϦϦʔεͨ͠ࢪࡦͰ
 ϦΫΤετ૿͑ΔΒ͍͠ʜ
 %#΋૿΍͞ͳ͍ͱʜʂ LVCFDUMBQQMZGDMVTUFSZBNM ։ൃ؀ڥʹσʔλϕʔε
 ͙͢ʹ༻ҙͯ͠΄͍͠ͳ LVCFDUMBQQMZGDMVTUFSZBNM

Slide 51

Slide 51 text

͜Ε͔Βͷσʔλϕʔεߏஙɾӡ༻͸͜͏ͳΔ͸ͣʜ ͨͩ͠ɺ஫ҙ͠ͳ͚Ε͹ͳΒͳ͍͜ͱ ‣ γεςϜઃܭ΍νϡʔχϯά·Ͱ΋͕ࣗಈԽ ͞ΕΔΘ͚Ͱ͸ͳ͍ ‣ ࣗಈԽ͞ΕͨγεςϜ͸ϒϥοΫϘοΫεʹ ͳΓ͕ͪ ਓؒͷӡ༻ऀ͕θϩʹͳΔΘ͚Ͱ͸ͳ͍ʂ ‣ ໰୊ൃݟղܾͷख͕͔ΓΛ࢒͓ͯ͜͠͏ ‣ ϞχλϦϯάɾϩΪϯάͷ࢓૊Έ͕ඞਢ ‣ ࣗಈԽ͕ࣦഊͨ͠৔߹ͷखஈΛ༻ҙ͓ͯ͘͠ ‣ ࠷ޙͷखஈʜਓख ো֐ൃੜ࣌ͷඋ͑͸ඞ͓ͣͯ͘͠ʂ

Slide 52

Slide 52 text

͜Ε͔Βͷσʔλϕʔεߏஙɾӡ༻͸͜͏ͳΔ͸ͣʜ "ϚωʔδυαʔϏεΛ࢖͍·͠ΐ͏ʂ ࢖͍͍ͨ%#ͷϚωʔδυαʔϏε͕ఏڙ͞Ε͍ͯΔ͚ΕͲɺ ,VCFSOFUFT0QFSBUPSΛ࢖ͬͯࣗ෼Ͱӡ༻ͨ͠΄͏͕ྑ͔ͬͨΓ͢Δʁ ‣ ಈ࡞ͤ͞ΔΞϓϦέʔγϣϯʹ͍ͭͯͷ
 ઐ໳஌ࣝ͸ඞཁ ‣ ,VCFSOFUFTࣗମͷӡ༻΋೉͍͠ εςʔτϑϧͳϫʔΫϩʔυΛಈ͔͢࢓૊Έ͸
 ੔͖͍ͬͯͯΔ͕ʜ ‣ 1BB4΍4FSWFSMFTTͷબ୒΋ݕ౼͠Α͏ ‣ ϓϥοτϑΥʔϜͱͯ͠ճ෮ੑ͕୲อ
 ͞Ε͍ͯΔ ແཧʹ,VCFSOFUFTͰಈ͔ͦ͏ͱ͠ͳ͍ LTΫϥελ্ͷσʔλϕʔεͰ͸ͳ͘ɺΫϥ΢υ্ͷϚωʔδυαʔϏεΛ ૢ࡞͢Δ0QFSBUPS΋͋Γ·͢ "844FSWJDF0QFSBUPSͳͲ ɻ ผ్*B$πʔϧͳͲͰߦ͍ͬͯͨΠϯϑϥ؀ڥͷߏஙΛ0QFSBUPSʹ೚ͤ
 ΞϓϦͱҰॹʹ3FTPVSDFఆٛΛHJU؅ཧࣗ཯ӡ༻ɺͱ͍͏͜ͱ΋Ͱ͖ͦ͏Ͱ͢ɻ ิ଍

Slide 53

Slide 53 text

·ͱΊ ,VCFSOFUFT0QFSBUPS ‣ ,VCFSOFUFTͷ࢓૊ΈΛԠ༻ͨ͠ӡ༻ࣗಈԽͷύλʔϯ ‣ $VTUPN3FTPVSDF$VTUPN$POUSPMMFS ‣ ΞϓϦέʔγϣϯݻ༗ͷӡ༻࡞ۀΛਓʹ୅ΘͬͯࣗಈԽ .Z42-0QFSBUPS ‣ ,VCFSOFUFT্ʹ.Z42-*OOP%#$MVTUFSΛߏங ‣ એݴతͳઃఆʹج͖֤ͮछӡ༻࡞ۀΛࣗಈԽ ‣ Ϋϥελߏங εέʔϧ όοΫΞοϓϦετΞ ো֐ݕ஌ͱϑΣΠϧΦʔόʔ

Slide 54

Slide 54 text

0QFSBUPSͰεςʔτϑϧͳϫʔΫϩʔυ΋,VCFSOFUFTͷࢥ૝Ͱࣗ཯ಈ࡞͕Մೳ ‣ γεςϜશମͷճ෮ྗΛΑΓߴΊΔ ‣ σʔλʔϕʔε΋ӡ༻ͷ࠷খԽΛਤΔ͜ͱ͕Ͱ͖ͦ͏ʂ ·ͱΊ "QQ "QQ "NFCBϓϩϑΟʔϧγεςϜͰͷ
 ಋೖ͕Մೳ͔ݕূ༧ఆ ‣ ࢒Δ՝୊CJOMPHϩετ࣌ͷ෮چํ๏
 ,VCFSOFUFT0QFSBUPSͷ؀ڥԼͰͷ
 ෮چखॱΛͲͷΑ͏ʹ͢Δ͔ ஌ݟ͕ͨ·ͬͨΒ
 ·ͨผͷػձͰڞ༗͠·͢ωʂ .Z42-0QFSBUPS