for stateful applications on containers container attached ... - mayadata...blue green deployment of...

33
2018 Storage Developer Conference India © All Rights Reserved. 1 Container Attached Storage (CAS) for stateful applications on containers Uma Mukkara @umamukkara @openebs MayaData Inc.

Upload: others

Post on 23-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 1

Container Attached Storage (CAS)for stateful applications on containers

Uma Mukkara@umamukkara @openebs

MayaData Inc.

Page 2: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 2

Agenda

❒ Who❒ Container Attached Storage❒ What ?❒ Why ?❒ How ?

❒ Reference implementation of CAS❒ Example of Blue Green Deployment

Page 3: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 3

Who ?❒ MayaData delivers Data Agility❒ Formerly known as CloudByte❒ Sponsor of OpenEBS and Litmus

projects❒ Large Bangalore based OSS

contributor❒ https://mayaonline.io is SaaS

software used to manage stateful workloads on Kubernetes

Page 4: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 4

Who ?❒ Popular open source storage project for

stateful applications on Kubernetes❒ Team of 50+ hackers with storage and

DevOps experience

❒ Leading project in CAS category

❒ 110+ contributors❒ 5K+ github stars❒ 1M+ docker pulls

slack.openebs.io

Page 5: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 5

Who ?

❒ Chaos engineering for stateful applications❒ Extends your CI/CD pipelines

Page 6: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 6

Introduction to CAS

❒ CAS - Container Attached Storage❒ It is a new architecture in storage domain❒ Applicable only to containers

Page 7: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 7

Genesis of CAS

What if storage for container native applications was itself

container native?

Page 8: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 8

Storage trendsMicroservices / DevOps / Cloud / Kubernetes / incredible acceleration of storage media have changed everything about shared storage.

Shared storage is not optimal now:

❏ It used to accelerate your storage❏ now it is slower than DAS

❏ It used to be how you kept your app resilient❏ now it increases your blast radius

❏ It used to be run by one of many IT silos❏ now those silos are fading away

Page 9: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 9

DAS vs Distributed DAS

Benefits: SimpleTies application to storagePredictable for capacity planningApp deals with resiliencyCan be faster

Concerns:Under-utilized hardware

○ 10% or less utilizationWastes data centerDifficult to manageLacks storage featuresCannot be repurposed - made for one workloadDoes not support mobility of workloads via containersCross cloud impossible

“We have ~100k nodes of Cassandra alone, and use DAS because it is easier even if it burns energy and capEx.”

Other example DAS users moving to Kubernetes:

Page 10: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 10

DAS vs Distributed DAS

Benefits: SimpleTies application to storagePredictable for capacity planningApp deals with resiliencyCan be faster

Concerns:Under-utilized hardware

○ 10% or less utilizationWastes data centerDifficult to manageLacks storage featuresCannot be repurposed - made for one workloadDoes not support mobility of workloads via containersCross cloud impossible

“We have ~100k nodes of Cassandra alone, and use DAS because it is easier even if it burns energy and capEx.”

Other example DAS users moving to Kubernetes:

Page 11: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 11

DAS vs Distributed DAS

Benefits: SimpleTies application to storagePredictable for capacity planningApp deals with resiliencyCan be faster

Concerns:Under-utilized hardware

○ 10% or less utilizationWastes data centerDifficult to manageLacks storage featuresCannot be repurposed - made for one workloadDoes not support mobility of workloads via containersCross cloud impossible

DistributedBenefits:

Centralized managementGreater density and efficiencyStorage features such as:

○ Data protection○ Snapshots for versioning

Concerns:Additional complexityEnormous blast radiusExpensiveRequires storage engineeringChallenged by container dynamismNo per microservice storage policyI/O blender impairs performanceLocks customers into vendorCross cloud impossible

Page 12: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 12

DAS vs Distributed DAS

Benefits: SimpleTies application to storagePredictable for capacity planningApp deals with resiliencyCan be faster

Concerns:Under-utilized hardware

○ 10% or less utilizationWastes data centerDifficult to manageLacks storage featuresCannot be repurposed - made for one workloadDoes not support mobility of workloads via containersCross cloud impossible

DistributedBenefits:

Centralized managementGreater density and efficiencyStorage features such as:

○ Data protection○ Snapshots for versioning

Concerns:Additional complexityEnormous blast radiusExpensiveRequires storage engineeringChallenged by container dynamismNo per microservice storage policyI/O blender impairs performanceLocks customers into vendorCross cloud impossible

Page 13: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 13

YASSS

Huge blast radius

Latency & Big 0

Not tunable for

containersLock-in & not

x-cloud

Monolithic mess

Page 14: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 14

!YASSS

Yet Another Scale Out Storage

System

Page 15: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 15

What is needed ?

❒ Like DAS❒ No blast radius ❒ Container friendly

CAS

Page 16: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 16

CAS = Containers & DAS+ & Distributed-

CAS

DASDISTRIBUTED

Page 17: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 17

CAS

No special skills needed!

Tunable per

container

Low

latency

Cross cloud

portability

Cross SAN

portability

Page 18: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 18

CAS feature comparison

DASBenefits:

SimpleTies application to storagePredictable for capacity planningApp deals with resiliencyCan be faster

Concerns:Under-utilized hardware

○ 10% or less utilizationWastes data centerDifficult to manageLacks storage featuresCannot be repurposed - made for one workloadDoes not support mobility of workloads via containersCross cloud impossible

OpenEBS = “CAS”✓ Simple✓ No new skills required✓ Per microservice storage policy✓ Data protection & snapshots✓ Reduces cloud vendor lock-in ✓ Eliminates storage vendor lock-in✓ Highest possible efficiency ✓ Large & growing OSS community✓ Natively cross cloud

DistributedBenefits:

Centralized managementGreater density and efficiencyStorage features such as:

○ Data protection○ Snapshots for versioning

Concerns:Additional complexityEnormous blast radiusExpensiveRequires storage engineeringChallenged by container dynamismNo per microservice storage policyI/O blender impairs performanceLocks customers into vendorCross cloud impossible

CAS

DASDistribute

d

Page 19: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 19

Why CAS ?❒ Truly Cloud Native (Storage is a microservice)❒ Enables cloud native blue-green deployment of storage (no need to

upgrade all volumes at once)❒ Highest granularity of storage policies (assume one storage

controller handles only one type of workload)

Pod 1

OR

Pod 1VS

cloud native

Page 20: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 20

CAS benefits

1. Workloads much smaller2. Ephemeral duration3. 10-100x increase in quantity4. Mobile workloads5. Immutable not tunable6. Developers responsible for

operations7. Easiest solutions lead to cloud

lock-in

1. Keep data local2. Run controller in the POD3. 10-100x more controllers4. Follow the workloads5. Stateless control of state6. Make storage just another

microservice each team controls. No YASSS needed!

7. Cross cloud cMotion - thanks to OpenEBS & MayaOnline

Cloud Native challenges CAS Answers

Page 21: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 21

CAS architecture example

❒ Each volume has a controller and three replica pods

Page 22: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 22

Blue Green Deployment example with CAS

OpenEBS Maya Operator

Upgrade List volumes

# volume name ctrl ver rep1 ver rep2 ver rep3 ver

1 mysql-vol1 1.2 1.2 1.2 1.2

2 postgre-vol1 1.1 1.1 1.1 1.1

3 postgre-vol2 1.2 1.2 1.2 1.2

4 mongoDB-vol1 1.2 1.2 1.2 1.2

Page 23: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 23

Blue Green Deployment example with CAS

OpenEBS Maya Operator

Upgrade

Upgrade to 1.3

# volume name ctrl ver rep1 ver rep2 ver rep3 ver

1 mysql-vol1 1.2 1.2 1.2 1.2

2 postgre-vol1 1.1 1.1 1.1 1.1

3 postgre-vol2 1.2 1.2 1.2 1.2

4 mongoDB-vol1 1.2 1.2 1.2 1.2

Page 24: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 24

Blue Green deployment of mysql-vol1

mysql k8s service load balancer (target service)

mysql-vol1-ctrl-pod1.2

mysql-vol1-repl-1-pod

mysql-vol1-repl-2-pod

mysql-vol1-repl-3-pod

OpenEBS Maya Operator

mysql-vol1-ctrl-pod1.3

spin 1.3 ctrl pod

Page 25: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 25

Blue Green deployment of mysql-vol1

mysql k8s service load balancer (target service)

mysql-vol1-ctrl-pod1.2

mysql-vol1-repl-1-pod

mysql-vol1-repl-2-pod

mysql-vol1-repl-3-pod

OpenEBS Maya Operator

mysql-vol1-ctrl-pod1.3 ● switch data traffic to blue

(1.3)● Point replicas to blue

(1.3)● Analyze / observe the

traffic● Retain if okay● Revert if not okay

Page 26: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 26

Blue Green deployment of mysql-vol1

mysql k8s service load balancer (target service)

mysql-vol1-repl-1-pod

mysql-vol1-repl-2-pod

mysql-vol1-repl-3-pod

OpenEBS Maya Operator

mysql-vol1-ctrl-pod1.3 ● Controller pod is

upgraded to 1.3● Upgrade repl-1 pod to

1.3 and observe (revert to 1.2 if needed )

● rebuild repl-1

mysql-vol1-repl-1-pod

Page 27: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 27

Blue Green deployment of mysql-vol1

mysql k8s service load balancer (target service)

mysql-vol1-repl-1-pod

mysql-vol1-repl-2-pod

mysql-vol1-repl-3-pod

OpenEBS Maya Operator

mysql-vol1-ctrl-pod1.3 ● Controller pod is

upgraded to 1.3● repl-1 pod is upgraded

to 1.3● Upgrade repl-2 pod to

1.3 and observe (revert to 1.2 if needed)

● rebuild repl-2

mysql-vol1-repl-2-pod

Page 28: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 28

Blue Green deployment of mysql-vol1

mysql k8s service load balancer (target service)

mysql-vol1-repl-1-pod

mysql-vol1-repl-2-pod

mysql-vol1-repl-3-pod

OpenEBS Maya Operator

mysql-vol1-ctrl-pod1.3 ● Controller pod is

upgraded to 1.3● repl-1 pod is upgraded

to 1.3● repl-2 pod is upgraded

to 1.3● Upgrade repl-3 pod to

1.3 and observe (revert to 1.2 if needed)

● rebuild repl-3 mysql-vol1-repl-3-pod

Page 29: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 29

Blue Green Deployment example with CAS

OpenEBS Maya Operator

Upgrade

mysql-vol1 is upgraded to 1.3Now upgrade postgre-vol1 to 1.3

# volume name ctrl ver rep1 ver rep2 ver rep3 ver

1 mysql-vol1 1.3 1.3 1.3 1.3

2 postgre-vol1 1.1 1.1 1.1 1.1

3 postgre-vol2 1.2 1.2 1.2 1.2

4 mongoDB-vol1 1.2 1.2 1.2 1.2

Page 30: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 30

Upgrade operations - B/G

❒ With CAS architecture, the upgrade process can be automated without human intervention. Something that is unheard of in the storage world.

Page 31: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 31

What about speeds and feeds?

❒ The bottleneck is often now the Linux kernel❒ User space I/O and networking is the future

❒ You already know about SPDK, FD.io, VPP❒ You might find interesting:

❒ https://github.com/openebs/vhost-user❒ We are looking for collaboration in this area

as well

Page 32: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 32

CAS - References

Storage just fades away as a concern

https://www.cncf.io/blog/2018/04/19/container-attached-storage-a-primer/

Blog published by CNCF on CAS

Page 33: for stateful applications on containers Container Attached ... - Mayadata...Blue Green deployment of mysql-vol1 mysql k8s service load balancer (target service) mysql-vol1-ctrl-pod

2018 Storage Developer Conference India © All Rights Reserved. 33

Thank you !!

slack.openebs.io

Q&A