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

『マネージドMySQL提供に向けた挑戦』@ CIU Tech Meetup#1

『マネージドMySQL提供に向けた挑戦』@ CIU Tech Meetup#1

hidenobu goto

June 07, 2023
Tweet

More Decks by hidenobu goto

Other Decks in Technology

Transcript

  1. ޙ౻ल৴ • גࣜձࣾαΠόʔΤʔδΣϯτ 
 ɹɹɹάϧʔϓITਪਐຊ෦ CIU Development Div • 2016೥9݄

    த్ೖࣾ (લ৬͸SIer) • ϓϥΠϕʔτΫϥ΢υͷίϯϙʔωϯτ։ൃ • Go, Kubernetes, Linux, Python, DB 

  2. ར༻ٕज़ • Kubernetes ؅ཧίϯϙʔωϯτσϓϩΠɹ • Custom Resource / Controllerɹɹ 


    CDBϦιʔεͱͯ͠ఆٛ • MySQL Orchestrator MySQLͷF/Oʹར༻ • OpenStack DBΠϯελϯεͷ࡞੒ • Terraform ίϯτϩʔϥʔ಺Ͱ࣮ߦ
  3. ར༻ٕज़ • Kubernetes ؅ཧίϯϙʔωϯτσϓϩΠɹ • Custom Resource / Controllerɹɹ 


    CDBϦιʔεͱͯ͠ఆٛ • MySQL Orchestrator MySQLͷF/Oʹར༻ • OpenStack DBΠϯελϯεͷ࡞੒ • Terraform ίϯτϩʔϥʔ಺Ͱ࣮ߦ
  4. Custom Resource / Controller • Custom Resource •Kubernetes APIͷ֦ு •ಛఆͷAPIΦϒδΣΫτͷίϨΫγϣϯΛอ࣋

    • Custom Controller •ϦιʔεΛ͋Δ΂͖ঢ়ଶʹಉظ͠؅ཧ • Custom Resourceͱ૊Έ߹ΘͤͯCDBͷػೳΛఏڙ https://github.com/kubernetes-sigs/kubebuilder
  5. ར༻ٕज़ • Kubernetes ؅ཧίϯϙʔωϯτσϓϩΠɹ • Custom Resource / Controllerɹɹ 


    CDBϦιʔεͱͯ͠ఆٛ • MySQL Orchestrator MySQLͷF/Oʹར༻ • OpenStack DBΠϯελϯεͷ࡞੒ • Terraform ίϯτϩʔϥʔ಺Ͱ࣮ߦ
  6. ར༻ٕज़ • Kubernetes ؅ཧίϯϙʔωϯτσϓϩΠɹ • Custom Resource / Controllerɹɹ 


    CDBϦιʔεͱͯ͠ఆٛ • MySQL Orchestrator MySQLͷF/Oʹར༻ • OpenStack DBΠϯελϯεͷ࡞੒ • Terraform ίϯτϩʔϥʔ಺Ͱ࣮ߦ
  7. OpenStack • Cycloud ͷ IaaSج൫ • όʔδϣϯ͸ Queensʹ৭ʑͱύονద༻ • VM

    / ϘϦϡʔϜͷ࡞੒࡟আ΍Ξλον/ σλονૢ࡞ • αʔϏεଆͷΤϯδχΞ΋IaaSͱͯ͠࢖͍ͬͯΔج൫ https://github.com/openstack

  8. ར༻ٕज़ • Kubernetes ؅ཧίϯϙʔωϯτσϓϩΠɹ • Custom Resource / Controllerɹɹ 


    CDBϦιʔεͱͯ͠ఆٛ • MySQL Orchestrator MySQLͷF/Oʹར༻ • OpenStack DBΠϯελϯεͷ࡞੒ • Terraform ίϯτϩʔϥʔ಺Ͱ࣮ߦ
  9. ࡞੒ϑϩʔ gateway mysql controller instance controller setting controller܈ gRPC ೝূ

    apiVersion: cdb.cycloud.io/v1 kind: MysqlCon fi g metadata: name: xxxxxxxxx namespace: xxxxxxxxx spec: connect_timeout: 100 engine_version: 8 expire_log_days: 10
  10. ࡞੒ϑϩʔ gateway mysql controller܈ instance controller setting controller܈ gRPC ೝূ

    apiVersion: v1 kind: Con fi gMap metadata: name: xxxxxxxxx namespace: xxxxxxxxx data: connect_timeout: "100" expire_log_days: "10"
  11. ࡞੒ϑϩʔ gateway mysql controller܈ instance controller setting controller gRPC ೝূ

    apiVersion: cdb.cycloud.io/v1 kind: MySQL metadata: name: xxxxxxxxx namespace: xxxxxxxx spec: fl avor: large replica: 1 storage: kind: xxxxxxxx size_gib: 45
  12. ࡞੒ϑϩʔ gateway mysql controller܈ instance controller setting controller gRPC ೝূ

    apiVersion: cdb.cycloud.io/v1 kind: Instance metadata: name: xxxxxxxxx namespace: xxxxxxxx spec: dataVolume: size: 45 volumeType: xxxxx version: 8.0.28 fl avor: xxxxxxxxxx ༷ʑͳIaaSج൫ʹ
 ରԠͰ͖ΔΑ͏ʹந৅Խ
  13. CDBͷΧελϜϦιʔεʢΫϥελܥʣ • MySQL • DBΫϥελϦϯάͷͨΊͷϝΠϯϦιʔε • Instance • ΠϯελϯεߏஙͷͨΊͷϦιʔε •

    Connector • F/OΛ୲౰͢ΔϦιʔε • Orchestrator • MySQL OrchestratorΛ؅ཧ͢ΔϦιʔε
  14. CDBͷΧελϜϦιʔεʢઃఆܥʣ • LoggingConfig • MySQLͷϩάؔ࿈ͷอଘઃఆ • LoginRootUser • RootϢʔβͷઃఆ •

    MetricsConfig • ϝτϦΫεؔ࿈ͷઃఆ • MysqlBackup / MysqlSnapshot • σʔλͷόοΫΞοϓܥͷઃఆ • MysqlConfig • MySQLͷઃఆؔ܎
  15. apiVersion: cdb.cycloud.io/v1 kind: MySQL metadata: name: xxxxxxxxx namespace: xxxxxxxx spec:

    fl avor: large replica: 1 storage: kind: xxxxxxxx size_gib: 45 VMىಈޙ Mysqllet Mysqllet ओͳ΍ΓͱΓ ɹDBઃఆ৘ใͷऔಘ ɹϓϩδΣΫτ৘ใͷऔಘ ɹϓϥΠϚϦɺηΧϯμϦ৘ใͷऔಘ ɹߏஙঢ়گͷใࠂ DNSaaS
  16. apiVersion: cdb.cycloud.io/v1 kind: MySQL metadata: name: xxxxxxxxx namespace: xxxxxxxx spec:

    fl avor: large replica: 1 storage: kind: xxxxxxxx size_gib: 45 VMىಈޙ Mysqllet Mysqllet DNSaaS ɹConnectorϦιʔεΛར༻
 ɹϓϥΠϚϦɺηΧϯμϦ౳Λ൓ө
  17. apiVersion: cdb.cycloud.io/v1 kind: MySQL metadata: name: xxxxxxxxx namespace: xxxxxxxx spec:

    fl avor: large replica: 1 storage: kind: xxxxxxxx size_gib: 45 VMىಈޙ Mysqllet Mysqllet DNSaaS
  18. F/O࣌ͷಈ࡞ ϔϧενΣοΫ apiVersion: cdb.cycloud.io/v1 kind: Connector metadata: name: xxxxxxxxx namespace:

    xxxxxxxx spec: owner: meetup rw: dummy.record.hoge.io rw_ip: XXX.XXX.XXX.XXX mysql controller
  19. F/O࣌ͷಈ࡞ ϔϧενΣοΫ apiVersion: cdb.cycloud.io/v1 kind: Connector metadata: name: xxxxxxxxx namespace:

    xxxxxxxx spec: owner: meetup rw: dummy.record.hoge.io rw_ip: XXX.XXX.XXX.XXX mysql controller DNSaaS