data mobility for kubernetes persistent volumes€¦ · data mobility for kubernetes persistent...

32
Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang

Upload: others

Post on 16-Jun-2020

15 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Data Mobility for Kubernetes Persistent VolumesXing Yang, Principal Architect, Huawei

@2000Xyang

Page 2: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Agenda

• Kubernetes Persistent Volumes and Snapshots

• Container Storage Interface (CSI)

• Why Data Mobility - Use Cases

• Policy Based Data Mobility using OpenSDS

• Multi-Cloud Data Control Architecture

• Demo

• OpenSDS Community

• OpenSDS Roadmap

• Getting Involved

Page 3: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Kubernetes Persistent Volumes and Snapshots

Page 4: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Kubernetes Persistent Volumes

• Persistent Volume• Persistent Volume

Claim• Storage Class• Dynamic and

Static Provisioning

Pod 1 Pod2Pod 1 Pod2

Storage

Container 1

Container 2

Container 1

Container 2

Volume 1 Volume 2

Container 1

Container 2

Container 1

Container 2

Volume 3 Volume 4

Kubernetes Node 1 Kubernetes Node 2

Page 5: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Kubernetes Volume Snapshots

• Volume Snapshot• Volume Snapshot Content• Volume Snapshot Class• Dynamic and Static

Provisioning• Supports CSI Drivers

User

Admin

PodContainer

Container Container

Container

StorageClass

PersistentVolumeClaim

Dynamic Provisioning

VolumeSnapshot

VolumeSnapshotClass

PersistentVolume VolumeSnapshotContent

PodContainer

Container Container

Container

iSCSI Ceph RBD

GCE Cinder

NFS Hostpath

FC

AWS

3rd Party Storage

Page 6: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Container Storage Interface (CSI)

Storage

CSI Plugin

K8S

Page 7: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

CSI Functions

Operation based on Volume Lifecycle

Create Volume

Detach from node

Mount on node

Unmount from node

Attach to node

Delete Volume

ControllerCreateVolume

ControllerPublishVolume

NodePublishVolume

NodeUnpublishVolume

ControllerUnpublishVolume

ControllerDeleteVolume

Create Snapshot

Delete Snapshot

NodeStageVolume

NodeUnstageVolume

Create Volume from Snapshot

ControllerDeleteSnapshotControllerCreateSnapshot

Page 8: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Deploy CSI Plugin on Kubernetes

Source: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/storage/container-storage-interface.md

KubeController Manager

API Server

etcd

MasterNode

CSI Volume Driver Container

external-snapshotterexternal-provisionerexternal-attacher(1 or more sidecar containers)

EmptyDir Volume

gRPC (UDS)

StatefulSet (replica: 1)

CSI Volume Driver Container

driver-registrar sidecar container

Host /var/lib/kubelet

UDS

DaemonSet PodKubelet

/…/sockets

UDS

UDS

Mountpropagation

Page 9: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Why Data Mobility

Page 10: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Why do we need Data Mobility

• Data mobility allows data to be accessible any time, any where, on premise or in the cloud.

• Use cases for data mobility by OpenSDSmulti-cloud data control– High availability– Data analytics– Data lifecycle management– ……

Page 11: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Use Case: High Availability

• Make data available at different geographic location.

• Make data available and accessible all the time without downtime.

Page 12: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Use Case: Data Analytics

• Upload datasets to pubic cloud for data analytics.

• Utilize compute resources in public cloud to do CPU intensive work.

0

1

2

3

4

5

6

Category1

Category2

Category3

Category4

Series 1 Series 2 Series 3

Page 13: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Use Case: Data Lifecycle Management• Frequently accessed data

stored on-premise.• Data not accessed for a long

time can be stored in archival storage in public cloud.

• Data can be moved to different location depending on usage, age, access frequency.

• Data can be deleted automatically based on policy.

Block StorageOn-Premise

Object Storage

Migration Policy

SnapshotPolicy:

Topology

Archive Policy

RetentionPolicy

On-Premise -> Public Cloud Archive DeleteUpload Snapshot

Page 14: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Policy-basedData Mobilityusing OpenSDS

Page 15: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

OpenSDS Projects – Sushi and Hotpot

SUSHI The Northbound Plug-ins ProjectCommon plug-ins to enable OpenSDS storage services for cloud and application frameworks

HOTPOTThe Storage Controller Project

Single control for block, file, and object services across storage on premise and in clouds

OpenSDS HotpotDiscover, Pool, Provision, Orchestrate

D O C K – S T O R A G E D R I V E R S

SwordfishManilaNative Cinder Multi-Cloud

C O N T R O L L E R - S E R V I C E A P I

Block File Object

Direct AttachedStorage

Software-Defined Storage

EnterpriseStorage

CloudStorage

CLOUD ENTERPRISE

Plug-inPlug-inPlug-inPlug-inPlug-inPlug-in Plug-in Plug-in

Page 16: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

OpenSDS Project - Gelato

App

X

Local CloudStorage(Object)

Replicator XX

X

X

X

X

Gelato The Multi-Cloud ProjectPolicy based multi-cloud data control to enable data mobility across clouds

Page 17: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Profiles and StorageClass/VolumeSnapshotClass

Enterprise Storage

Create PVC &VolumeSnapshot

K8S calls OpenSDSCSI Plugin

OpenSDS CSI Plugin callsOpenSDS controller to provisionvolume & snapshot

OpenSDS chooses storagebackend to create volume (PV) and

snapshot (VolumeSnapshotContent)

CommodityStorage

Cloud Storage

User

AdminCSI PluginOpenSDSCreate profiles Create StorageClass &

VolumeSnapshotClass

Admin

Page 18: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

CSI Plugin and Policy-based Data Mobility• Create snapshot using OpenSDS CSI

plugin• Upload snapshot based on snapshot

topology• Migrate snapshot based on migration

policyOpenSDS Controller

Dock

Driver

Block Storage

Snapshot Profile

Object Storage

CSI PluginOpenSDS

Migration Policy

Snapshot Class

Migration Policy

Snapshot Topology

Page 19: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Volume Snapshot Example

Upload SnapshotCut Snapshot

Create Snapshot

apiVersion: snapshot.storage.k8s.io/v1alpha1kind: VolumeSnapshotmetadata:

name: new-snapshot-demonamespace: demo-namespace

spec:snapshotClassName: csi-opensds-snapclasssource:

name: opensdspvckind: PersistentVolumeClaim

apiVersion: snapshot.storage.k8s.io/v1alpha1kind: VolumeSnapshotClassmetadata:

name: csi-opensds-snapclasssnapshotter: csi-opensdspluginparameters:

profile: upload-snapshot-to-cloud

Note: Profile can be uuid or name of the profile in OpenSDS.

Page 20: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Multi-Cloud Data Control Architecture

Page 21: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Multi-Cloud Data Control Architecture

S3 Service Backend Service Dataflow Service

Database

Backend Adapters

GUI API Gateway

Data Mover

Identity Service

Page 22: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Multi-Cloud Backend Service

Backend Manager

API Handler

Backend

DB

Keystone

create/update/delete/get backend

auth

update metadata

check bucket

Page 23: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Multi-Cloud S3 Service

S3 Controller

API Handler

Backend

Location Mapper

DB

Backend Adapter

Keystone

get locationsearch

create/update/delete/get object/bucket

auth

update metadata

Page 24: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Multi-Cloud Dataflow Service

Connector Manager

API Handler

Migration Data Mover

Policy Manager

Job Manager

Plan Manager

Other Data Mover …

DB

Scheduler

Apache Kafka

DataFlow Manager

Keystone

put jobs

pull jobs

run plan

create/delete/update/getpolicy

create/delete/update/getconnector

create/delete/update/getplan

get jobsrestart/cancel job

get plancreate jobsupdate plan

auth

update job

Page 25: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Multi-Cloud Dashboard

Page 26: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Multi-Cloud Dashboard – Register Backend

Page 27: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Multi-Cloud Dashboard - Migration

Page 28: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Demo

• Take snapshot using OpenSDS CSI plugin• Snapshot uploaded to AWS S3• Migrate data from AWS S3 to Huawei

Cloud object store

Page 29: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

OpenSDS Roadmap

Page 30: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

OpenSDS Community

Page 31: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent

Getting Involved

• Repos: https://github.com/opensds• Slack: https://opensds.slack.com• Mailing list: https://lists.opensds.io• Weekly meetings:

https://github.com/opensds/design-specs/blob/master/README.md#opensds-technical-meetings

Page 32: Data Mobility for Kubernetes Persistent Volumes€¦ · Data Mobility for Kubernetes Persistent Volumes Xing Yang, Principal Architect, Huawei @2000Xyang. Agenda • Kubernetes Persistent