+ All Categories
Home > Documents > Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference....

Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference....

Date post: 11-Aug-2020
Category:
Upload: others
View: 3 times
Download: 0 times
Share this document with a friend
35
2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 1 Simplifying Stateful Apps On Kubernetes: A Git Like Workflow Jagadish Mukku, Robin.io Dhanashankar Venkatesan, Robin.io
Transcript
Page 1: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 1

Simplifying Stateful Apps On Kubernetes: A Git Like Workflow

Jagadish Mukku, Robin.ioDhanashankar Venkatesan, Robin.io

Page 2: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 2

Agenda

§ Stateful Application§ Background on Containers and Kubernetes§ Data Management of Stateful App§ Challenges and Solutions§ Q & A

Page 3: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 3

Spectrum Of Applications

Web Apps

SQL Databases

NoSQL Databases Big Data

StatelessApplications

StatefulApplications

Page 4: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 4

Traditional Deployment

Hardware

Operating System

App App App

Page 5: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5

Virtualized Deployment

Hardware

Operating System

Hypervisor

Operating System

Bin/Library

App App

Operating System

Bin/Library

App App

Virtual Machine Virtual Machine

Page 6: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 6

Containerized Deployment

Hardware

Operating System

Container Runtime

Bin/Library

App

Container

Bin/Library

App

ContainerBin/Library

App

Container

Page 7: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 7

Kubernetes Overview

§ Portable, Extensible, Open-Source platform for managing containerized workloads and services

§ Agile§ Modularity and Scalability

§ Life Cycle Management§ Health Checks, Automated Rollouts, Canary Deployment, Load

Balancing§ Reduces Costs

§ Containerize apps and consolidate resources

Page 8: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 8

Simple Stateful App (mysql)

Server

Traditional Cloud Native

Page 9: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 9

Distributed Stateful App (Cassandra)

P1-replica1

P2-replica1P3-replica1

Node 1

P4-replica2

P5-replica2P6-replica2

P1-replica2

P2-replica2P3-replica2

Node 2

P4-replica1

P5-replica1P6-replica1

P1-replica3

P2-replica3P3-replica3

Node 3

P4-replica3

P5-replica3P6-replica3

What makes it complex?• Multiple volumes• Multiple nodes• Large data

Page 10: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 10

Node 1

Distributed Stateful App (Cassandra)

Node 2

Node 3

Page 11: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 11

Storage Allocation Challenges

data2 data3

Software Defined Storage

data1Replica-1

Replica-2Replica-3

Still resilient to disk failure ???

Page 12: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 12

Let us fix it …

data2 data3

Software Defined Storage

data1

Replica-1

Replica-2Replica-3

Page 13: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 13

Storage Allocation Challenges

pvc

pvc

redo data

PODSoftware Defined Storage

Page 14: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 14

Let us fix it ..

pvc

pvc

redo data

PODSoftware Defined Storage

Page 15: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 15

Challenges of running Stateful Apps on Kubernetes

§ Servers/Disks fail and humans make errors à Apps become unavailable, Data is lost

§ Data must be protected and secured à Expects users to become storage experts

§ Unpredictable performance from sharing resources à Application SLAs not met, unhappy users

§ Unable to share data between prod and dev/test à Low productivity and slower innovation

§ Data gravity prevents app mobility across environments à Cloud or Infrastructure Lock-in

Page 16: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 16

Node Node Node Node Node Node

Node Node Node Node Node Node

Distributed Stateful App (Cassandra)

snapshot snapshot

Page 17: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 17

Git Operations

$ git commit –m ”[descriptive message]”$ git reset [commit]$ git branch [branch-name]$ git push [branch]$ git clone [url]

Page 18: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 18

Manage App As If Its In Git…

Database App

Snapshots

revert/rollback

commit/snapshotThin Clones

Cloud Storage

branch

clone/import

push

Page 19: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 19

Robin Architecture Overview

VirtualNetworking

App-awareStorage

Robin’s built-in enterprise-grade

storage stackSnapshots, Clones, QoS,

Replication, Backup,Data rebalancing, Tiering,

Thin-provisioning,Encryption, Compression

Built-in flexible networkingOVS, Calico,VLAN, Overlay networking,Persistent IPs

Application Workflow Manager

Kubernetes

1-click application Deploy, Snapshot, Clone, Scale, Upgrade, BackupApplication workflows configure Kubernetes, Storage & Networking

Works any where

GoogleCloud Platform

Page 20: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 20

Robin Architecture Overview

ROBIN

R O B I N C O N T A I N E R - A W A R E S C A L E - O U T B L O C K S T O R A G E

XFS ext4 XFS ext4 XFS ext4XFS ext4

Node Node Node

ROBINROBIN

Page 21: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 21

Logical Volume AllocationVolume

EXT4

Virtual Block Driver

1 2 3 4 5 6Volume comprises of logical 1GiB slices

NODE NODE NODE

Page 22: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 22

Physical Space provisioning

§ Multiple volumes of app§ Affinity requirements§ Anti-affinity requirements§ Latency sensitive, Bandwidth intensive§ Node, Rack, Datacenter awareness

Page 23: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 23

Log Structured Data Layout

1 2 3 4 5 6

segment 1

segments segment 2

segment 3

segment 4

Volume

32MB

volume: collection of slicesslice: collection of segmentssegment: log structured data blocks

Page 24: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 24

Robin IO path

BLOCK INTERFACE

DEVICE DRIVER

RDVM

FILE SYSTEM(ext4, xfs)

BLOCK INTERFACE

Virtual Block Driver

APPLICATION RIOFEATURES

› High performance IO stack

› IO tagging helps with end-to-end QoS enforcement

› Application-aware data placement

› Supports multi-node volume access (clustered volume manager)

› Block-level data management (Snapshots, Clones, Compression, Encryption, Tiering etc) enables a common workflow for any and all applications

BLOCK INTERFACE

DEVICE DRIVER

RDVM

BLOCK INTERFACE

DEVICE DRIVER

RDVMCOMPONENTS

› RIO – Robin IO Manager

› RDVM – Robin Distributed Volume Manager

Page 25: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 25

Volume Time Travel

1 2 3 4 5 6

segment 1

segments segment 2

segment 3

segment 4

Volume

segment 1

segment 2

segment 3

segment 4

segment 1

segment 2

segment 1

segment 2

segment 3

segment 1

segment 2

segment 3

segment 4

segment 1

segment 5

time

Page 26: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 26

ROBIN

Any Kubernetes Distro

Protect An entire Application, Not Just Storage Volumes

app2-snap2app1-snap2app1-snap1

APP 1

LocalBackup Target

Remote (Cloud)Backup Target

APP 2

1

2

4

$ robin snapshot app1 snap1

1 Maintain periodic checkpoints of your entire app with data

$ robin rollback snap1 app1

2 Rollback entire app+data to healthy state to recover from corruptions or user errors

$ robin push snap1 target

3 Backup entire app+data as into external backup targets

$ robin pull target snap1

4 Restore entire app+data to healthy state from catastrophic hardware and datacenter failures

3 ›ROBIN Backups are fully self-contained

›Entire app resources can be restoredin the same or different data centeror cloud even if the source iscompletely destroyed

1 DATA PersistentVolumeClaims

2 CONFIG ConfigMap, Secret, Labels, …

3 METADATA Pods, StatefulSets, Services, …

Page 27: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 27

CLOUD OBJECT STORE(S3, GCS, AzureBlob)

On-prem

Kubernetes Cluster 1

Make DevOps Productive With Stateful Apps

Snapshot 13 months ago

Snapshot 23 days ago

Snapshot 3yesterday

ROBIN

Google Cloud Platform

Kubernetes Cluster 2

ROBIN

AWS

Kubernetes Cluster 3

ROBIN

STEP1: robin snapshot mysqlmysql-snap

STEP3: robin push mysql-snap gcs://bucket

STEP4: robin pull gcs://bucket/mysql-snap mysql

APP

APP

APP

STEP2: robin clone mysql-snap testdev-mysql

CLONE

Use Cases:• Clone databases from prod to dev/test for running reports• Validate upgrades before applying to production• Enable git like push/pull for geo-dispersed teams to

collaborate

Page 28: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 28

App Snapshot$ git commit –m ”[descriptive message]”

$ robin snapshot <snapname> <appname> –m ”[descriptive message]”

§ Application Consistent§ Quiesce/Unquiesce volumes§ Complete app state snapshotted

§ Kubernetes Objects (Metadata)§ Volumes (Data)

Page 29: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 29

App Rollback/Reset$ $ git reset [commit] $ robin app rollback <snapname> <appname>

§ App config and data restored§ Handle scale-in/scale-out scenarios§ Revert on corruption, user errors, upgrade

failures

Page 30: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 30

Thin Clone$ git branch [branch-name] $ robin app create <appname> <snapname>

§ Instant app deployment from snapshot§ No data copied§ Customize cloned app config§ Blue/Green deployment§ Test upgrades§ Run analytics

Page 31: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 31

Push to Cloud$ git push [branch] $ robin app push <snapname> <reponame>

§ Uses app snapshot§ Self sufficient copy of app§ Incremental transfer to repos

§ AWS S3, Google GCS, Azure Block blob, NFS share

§ Encrypted and Compressed

Page 32: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 32

Pull from Cloud$ git clone <url> $ robin app pull/create <snapname> <reponame>

§ Repair app from repo copy§ Create new app from repo copy§ App mobility

§ Run app in the cloud§ Protect from site failures

§ Use cloud copy as backup

Page 33: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 33

Demo

Page 34: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 34

Q & A

Page 35: Simplifying Stateful Apps On Kubernetes: A Git Like Workflow · 2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 5 Virtualized Deployment Hardware Operating System

2019 Storage Developer Conference. © Robin.io, All Rights Reserved. 35

Thank You

Please visit robin.io for more informationDownload the software at get.robin.io and

try it out


Recommended