SlideShare a Scribd company logo
冉⼩⻰ 俄⼴宁
使⽤ pulsarctl 和 pulsar-manager
管理 pulsar 集群
2019/11/16
Who am I
• Go programmer
• PingCAP > Bitmain > StreamNative
• Pulsar committer
◦ pulsar-client-go
◦ Go Functions
◦ …
• https://github.com/wolfstudy
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
Pulsarctl
Why develop pulsarctl
• Apache Pulsar 是云原⽣的分布式系统
• pulsar admin 存在的问题
• 依赖多,需要加载JVM环境
• 描述信息不全
• 不易于 debug
基于 REST API 使⽤ Go 语⾔开发的⼀个 CTL ⼯具
What is pulsarctl
Go Admin API
Command-cli tools
pulsarctl
How to use Admin Api
https://godoc.org/github.com/streamnative/pulsarctl
How to use Admin Api
Cluster.List()
instantiate a admin object
Call interface
1
2
https://github.com/streamnative/pulsarctl/blob/master/examples.go
How to use CLI
• Used for : 对该命令的使⽤场景进⾏描述
• Required Permission:使⽤该命令所需要的
权限
• Output:列出使⽤该命令所有的输出信息,包
括正确的输出和错误的输出
• Examples:列出命令的使⽤示例
• Flags: 该命令所需要的所有参数列表
https://streamnative.io/docs/pulsarctl/v0.1.0/
pulsarctl VS pulsar admin
废弃 json string, 使⽤特殊字符代替
pulsarctl VS pulsar admin
拆分 topics commands
subscriptions
topics
pulsarctl VS pulsar admin
整合 topics commands
partition topic
topic
How to contribute
https://github.com/streamnative/pulsarctl/blob/master/docs/zh/developer-guide.md
https://github.com/streamnative/pulsarctl/blob/master/CONTRIBUTING.md
https://github.com/streamnative/pulsarctl/
Feature
https://github.com/streamnative/pulsarctl/issues
• Add pulsarctl to Homebrew
• Add context for pulsarctl
• Add bookkeeper cli
• Separate policies from subscriptions
• Support different ways to dump result
• …
Thanks
Q & A
Who am I
• Java && Python programmer
• Creditease > Meituan > StreamNative
• Pulsar committer
◦ Pulsar Connector
◦ Pulsar Manager
◦ …
• https://github.com/tuteng
01 Motivation 02 Operation
03 Doing 04 Future
Contents
Motivation
01
Motivation
Dashboard Pulsar-managerVS
• Focus on simple monitoring
• Weak management
• Multi-cluster is not
supported
• Focus on management
• Simple monitoring
• Multi-cluster, multi-environment
management
• More suitable for cloud
• JWT authentication authorization and
management
• Deployment simple
Operation
02
Operation
Multiple environments
Multiple clusters
• Geo replication
• Global tenants, namespace
• Topics management by cluster
Clusters management
• Set basic configuration
• Set failure domains
• Isolation policies
Clusters management
Tenants management
• Create Tenant
• Delete Tenant
• Update Configuration
Tenants management
Namespaces management
• Create Namespace
• Delete Namespace
• Update Policies
Namespaces management
Topics management
• More info(Storage, segment, cursor)
• Create Topic(Persistent, non-persistent)
• Delete Topic
• Update Configuration
• Topics monitor(Aggregated data)
Topics management
Topics monitor
Subscription management
• Consumer information
• Backlog skip
• Backlog clear
• Backlog expire
• Reset cursor
Subscription management
Authentication and authorization
• JWT tokens management
• Namespace grant permission
• Topic grant permission
Authentication and authorization
Deployment
• Docker
• K8s
• Self build
Doing
03
Authentication and authorization
Authentication and authorization
• User management
• Role management
• Deep into with multi tenant
• More detailed permission design
Authentication and authorization
Future
04
Future
• Aggregated data for tenants, namespaces
• Support large of topics(search, query, page)
• Bookies management
Thanks

More Related Content

Pulsarctl & Pulsar Manager