使用 Pulsarctl 和 Pulsar-manager 管理 Pulsar 集群

展开查看详情

1.使⽤ pulsarctl 和 pulsar-manager 管理 pulsar 集群 冉⼩⻰ 俄⼴宁 2019/11/16

2.Who am I • Go programmer • PingCAP > Bitmain > StreamNative • Pulsar committer ◦ pulsar-client-go ◦ Go Functions ◦ … • https://github.com/wolfstudy

3. Pulsarctl 01 Why develop pulsarctl 02 What is pulsarctl 03 How to use Admin Api 04 How to use CLI 05 How to contribute 06 Future

4.Why develop pulsarctl • Apache Pulsar 是云原⽣的分布式系统 • pulsar admin 存在的问题 • 依赖多,需要加载JVM环境 • 描述信息不全 • 不易于 debug

5.What is pulsarctl 基于 REST API 使⽤ Go 语⾔开发的⼀个 CTL ⼯具 Go Admin API pulsarctl Command-cli tools

6.How to use Admin Api https://godoc.org/github.com/streamnative/pulsarctl

7. How to use Admin Api instantiate a admin object 1 Cluster.List() 2 Call interface https://github.com/streamnative/pulsarctl/blob/master/examples.go

8.How to use CLI • Used for : 对该命令的使⽤场景进⾏描述 • Required Permission:使⽤该命令所需要的 权限 https://streamnative.io/docs/pulsarctl/v0.1.0/ • Output:列出使⽤该命令所有的输出信息,包 括正确的输出和错误的输出 • Examples:列出命令的使⽤示例 • Flags: 该命令所需要的所有参数列表

9.pulsarctl VS pulsar admin 废弃 json string, 使⽤特殊字符代替

10.pulsarctl VS pulsar admin topics 拆分 topics commands subscriptions

11.pulsarctl VS pulsar admin topic 整合 topics commands partition topic

12.How to contribute https://github.com/streamnative/pulsarctl/ https://github.com/streamnative/pulsarctl/blob/master/CONTRIBUTING.md https://github.com/streamnative/pulsarctl/blob/master/docs/zh/developer-guide.md

13.Feature • Add pulsarctl to Homebrew • Add context for pulsarctl • Add bookkeeper cli • Separate policies from subscriptions • Support different ways to dump result • … https://github.com/streamnative/pulsarctl/issues

14.Thanks Q&A

15.Who am I • Java && Python programmer • Creditease > Meituan > StreamNative • Pulsar committer ◦ Pulsar Connector ◦ Pulsar Manager ◦ … • https://github.com/tuteng

16. Contents 01 Motivation 02 Operation 03 Doing 04 Future

17. 01 Motivation

18.Motivation Dashboard VS Pulsar-manager • Focus on management • Focus on simple monitoring • Simple monitoring • Weak management • Multi-cluster, multi-environment • Multi-cluster is not management • More suitable for cloud supported • JWT authentication authorization and management • Deployment simple

19. 02 Operation

20.Operation

21.Multiple environments

22.Multiple clusters • Geo replication • Global tenants, namespace • Topics management by cluster

23.Clusters management • Set basic configuration • Set failure domains • Isolation policies

24.Clusters management

25.Tenants management • Create Tenant • Delete Tenant • Update Configuration

26.Tenants management

27.Namespaces management • Create Namespace • Delete Namespace • Update Policies

28.Namespaces management

29.Topics management • More info(Storage, segment, cursor) • Create Topic(Persistent, non-persistent) • Delete Topic • Update Configuration • Topics monitor(Aggregated data)