Building a Sovereign DBaaS on K8s OpenInfra Summit Asia 2024.pdf

Severalnines 94 views 28 slides Sep 17, 2024
Slide 1
Slide 1 of 28
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28

About This Presentation

Our CTO, Johan Andersson, delivered a talk on implementing a scalable, public DBaaS for open-source databases on OpenStack for Lintasarta Cloudeka.


Slide Content

1
Building a Sovereign
DBaaS [on K8s]
supporting OpenStack
Webinar
Johan Andersson Reski Rukmantio

2
1.Introduction
2.Architecture
3.OpenStack integration
4.Day 2 Operations

33
Business problem
●Indonesian Cloud provider
●Competition from hyperscalers
●Data sovereignty / data privacy
●Data gravity
●Needs to broaden beyond IaaS
●DBaaS is foundational service

44
DBaaS Options
●Trove
●Custom / DIY e.g
Ansible/TF/OpenTofu
●Work with a DBaaS provider

55
Solution
●Leverage Severalnines CCX DBaaS
with Lintasarta Cloudeka infra
●Controlplane in K8s
●Dataplane in Openstack VMs
●Supporting multiple databases
○MySQL, MariaDB, Postgres,
Redis, MS SQL Server

6
Architecture
& Overview

7
Stack
7
Observability Prometheus
AlertManager
Loki/ElasticSearch
Fluentbit
Grafana
DNS ExternalDNS
RBAC Keycloak
Security At rest (LUKS)
In-transit (TLS)
Message queue NATS
Database Postgres (zalando patroni operator)
MySQL (mysql innodb cluster operator)

8
Helm install CCX
Installation steps
Setup OpenStack
credentials and
config
Specify flavors
and volumes that
should be
exposed
3 21
https://artifacthub.io/packages/helm/clustercontrol/ccx

9
OpenStack integration options
9
White-label
the CCX frontend
Full API
integration
Your branding here

10
Integration options

JWT
(White label UI)

Service Account
(Full API Integration)
CCX DBaaS
Controlplane
User auth
(Web UI)

11
OpenStack integration
11

12
JWT

Login request
Create JWT

- PROJECTID
- USERID
- ORGID
- EMAIL

Sign with
private key
Receive JWT
Public Key
User exists?
Provision user
Control
Plane
CSP
Create SessionLoad UI

13
Now what?!
13
Our DBaaS is up and running

14
Now what?!
14
Our DBaaS is up and running
Create infra and databases

15
Now what?!
15
Lifecycle management
Our DBaaS is up and running
Create infra and databases

1616
Day 2 Operations
●State handing
●Database Configuration management
●Backup and Restore
●Scaling
●Failover
●Automatic Failure Handling
●Upgrades

1717
Day 2 Operations
●State handing
●Database Configuration management
●Backup and Restore
●Scaling
●Failover
●Automatic Failure Handling
●Upgrades
… while operating at scale
… while requiring no human interaction

18
ControllerControl loop
Controlplane Dataplane

datastore state
FAILED
STARTED
etc.
PRIMARY
1.1.2.4
REPLICA
1.1.2.5
OpenStack VM
OpenStack VM
datastore
State handling

19
DNS - Application Failover
ExternalDNS
Controlplane Dataplane

End-user Apps
replica.datastore.example.com
1.1.2.4datastore.example.com
1.1.2.5replica.datastore.example.com
REPLICA
1.1.2.5
OpenStack
VM
PRIMAR
Y 1.1.2.4
OpenStack
VM
datastore.example.com

20
DNS - Application Failover
ExternalDNS
Controlplane Dataplane

End-user Apps
replica.datastore.example.com
1.1.2.4datastore.example.com
1.1.2.5replica.datastore.example.com
REPLICA
1.1.2.5
OpenStack
VM
PRIMAR
Y 1.1.2.4
OpenStack
VM
datastore.example.com

21
DNS - Application Failover: Failover and update DNS
ExternalDNS
Controlplane Dataplane

End-user Apps
datastore.example.com
replica.datastore.example.com
1.1.2.4datastore.example.com
1.1.2.5replica.datastore.example.com
1.1.2.5datastore.example.com
PRIMAR
Y 1.1.2.5
OpenStack
VM
PRIMAR
Y 1.1.2.4
OpenStack
VM

2222
Immutable
infrastructure principle

●Error handling
●Do not attempt to login to the servers
and fix things. No SSH.
●No agent that intelligently tries to do
things on the datastore

→ Rely on simple procedures.

23
How does CCX resolve this?
ExternalDNS
Controlplane Dataplane

End-user Apps
datastore.example.com
replica.datastore.example.com
1.1.2.4datastore.example.com
1.1.2.5replica.datastore.example.com
1.1.2.5datastore.example.com
PRIMAR
Y 1.1.2.5
OpenStack
VM
PRIMAR
Y 1.1.2.4
OpenStack
VM

24
Add new infrastructure
ExternalDNS
Controlplane Dataplane

End-user Apps
datastore.example.com
replica.datastore.example.com
1.1.2.4datastore.example.com
1.1.2.6replica.datastore.example.com
1.1.2.5datastore.example.com
REPLICA
1.1.2.6
OpenStack
VM
PRIMAR
Y 1.1.2.5
OpenStack
VM
PRIMAR
Y 1.1.2.4
OpenStack
VM

25
Remove broken infrastructure & clean up
ExternalDNS
Controlplane Dataplane

End-user Apps
datastore.example.com
1.1.2.6replica.datastore.example.com
1.1.2.5datastore.example.com
REPLICA
1.1.2.6
OpenStack
VM
PRIMAR
Y 1.1.2.5
OpenStack
VM
replica.datastore.example.com

26 26
Observability/logging is key for troubleshooting

Deployment of datastores is easy

Day 2 operations needs to be completely automated

Immutable infrastructure

Keep it simple



Summary
https://artifacthub.io/packages/helm/clustercontrol/ccx

27 27
www.severalnines.com/ccx

e-mail: [email protected]

Learn more?
https://artifacthub.io/packages/helm/clustercontrol/ccx

28
Johan Andersson
CTO at Severalnines
@severalnines
Reski Rukmantiyo
Vice President of Cloud Solutions
Lintasarta Cloudeka