Rook

在本次演讲中,我们将向具有任何经验的各级与会者介绍 Rook 项目。Rook 是一个用于 Kubernetes 的开源云原生存储编排器,可为各种存储解决方案提供平台、框架和支持,以便与云原生环境自然集成。Rook 将存储软件转变为自我管理、自我扩展和自我修复的存储服务。它通过自动化部署、引导、配置、扩展、升级、迁移、灾难恢复、监控和资源管理来实现此目标。我们将探讨 Rook 的优势和用例,并介绍用于构建项目的架构。Rook 是 2018 年 1 月的云原生计算基金会 (CNCF) 开展的第一个存储项目。
展开查看详情

1.Rook Project Intro Jared Watts Rook Maintainer Upbound Founding Engineer https://rook.io/ https://github.com/rook/rook

2.What is Rook? ● Cloud-Native Storage Orchestrator ● Extends Kubernetes with custom types and controllers ● Automates deployment, bootstrapping, configuration, provisioning, scaling, upgrading, migration, disaster recovery, monitoring, and resource management ● Framework for many storage providers and solutions ● Open Source (Apache 2.0) ● Hosted by the Cloud-Native Computing Foundation (CNCF)

3.Storage for Kubernetes ● Volume plugins allow external storage solutions to provide storage to your apps

4.Limitations ● Not portable: requires these services to be accessible ● Deployment burden of external solutions ● Vendor lock-in due to using provider managed services

5.Storage ON Kubernetes ● Kubernetes can manage our storage solution ● Highly portable applications (including storage dependencies) ● Dedicated K8s storage cluster also possible

6.Operator Pattern ● Codifies domain expertise to deploy and manage an application ○ Automates actions a human would normally do ● Control loop that reconciles user’s desired state and the actual system state ○ Observe - discover current actual state of cluster ○ Analyze - determine differences from desired state ○ Act - perform operations to drive actual towards desired

7.Custom Resource Definitions (CRDs) ● Teaches Kubernetes about new first-class objects ● Custom Resource Definition (CRDs) are arbitrary types that extend the Kubernetes API ○ look just like any other built-in object (e.g. Pod) ○ Enabled native kubectl experience ● A means for user to describe their desired state

8. Rook Operators ● Implements the Operator Pattern for storage solutions ● Defines desired state for the storage cluster ○ Storage Cluster, Pool, Object Store, etc. ● The Operator runs reconciliation loops ○ Watches for changes in desired state ○ Watches for changes in the cluster ○ Applies changes to the cluster to make it match desired

9.Rook Operators ● The Operators leverages the full power of K8S ○ Services, ReplicaSets, DaemonSets, Secrets, … ● Contain all the logic to manage storage systems at scale ○ Handle stateful upgrades ○ Handle rebalancing the cluster ○ Handle health and monitoring tasks ● Not on the data path – can be offline for minutes

10.Rook Architecture Objects: Deployments DaemonSets Pods Rook Services StorageClass / PV / PVC Operators kubectl ClusterRole Namespace Config Maps Management & Health API New Objects: Storage Clusters Kubernetes Rook Storage Pools API Daemons Object Store Agent File Store Kubelet New Objects: Rook Flex Volume Volume Plugin Attachments

11. Ceph on Kubernetes with Rook apiVersion: ceph.rook.io/v1beta1 kind: Cluster metadata: name: rook-ceph spec: cephVersion: MGR MON OSD OSD OSD image: ceph/ceph:v13 mon: count: 3 OSD MON network: hostNetwork: false storage: useAllNodes: true MON deviceFilter: "^sd." config: storeType: bluestore

12.Rook Framework for Storage Solutions ● Rook is more than just a collection of Operators and CRDs ● Framework for storage providers to integrate their solutions into cloud-native environments ○ Storage resource normalization ○ Operator patterns/plumbing ○ Common policies, specs, logic ○ Testing effort ● Ceph, CockroachDB, Minio, NFS, Cassandra, Nexenta, and more...

13.Demo Deploying a Ceph cluster with a Stateful Application

14.How to get involved? ● Contribute to Rook ○ https://github.com/rook/rook ○ https://rook.io/ ● Slack - https://rook-io.slack.com/ ○ #conferences now for Kubecon China ● Twitter - @rook_io ● Forums - https://groups.google.com/forum/#!forum/rook-dev ● Community Meetings

15.More Sessions ● Meet the Rook Maintainers ○ Chat with project leaders and ask questions ○ Starts in 30 minutes! Wed Nov 14th, 15:00 @ CNCF Booth ● Rook Deep Dive ○ Code & architecture specifics, storage provider integration details ○ Thurs Nov 15th, 14:20

16.Questions? https://github.com/rook/rook https://rook.io/

17.Thank you! https://github.com/rook/rook https://rook.io/