Confluent:修订间差异

来自Gea-Suan Lin's Wiki
跳到导航 跳到搜索
此页面具有访问限制。如果您看见此消息,则说明您没有权限访问此页面。
(未显示同一用户的18个中间版本)
第1行: 第1行:
'''Confluent'''是一家公司,也是該公司的[[Apache Kafka]]產品名。
'''Confluent'''是一家公司,也是該公司的[[Apache Kafka]] 產品線的 產品名
 
== 簡介 ==
 
Confluent是[[Apache Kafka]]發明人出來開的公司,也是目前最知名的Kafka商業支援服務。同時Confluent也是該公司推出的軟體品牌,提供了眾多的Open Source套件用以管理Kafka Cluster(即社群版本元件),另外提供商用版本,包括Control Center(提供三十天試用)。
 
== 硬體 ==
 
在PoC時我使用了三台<code>t3.small</code>(2 GB RAM,另外手動設定加上512 MB Swap),三台都安裝完整的套件並且跑起來,一開始不會有問題,但跑一陣子後會因為記憶體不足而異常。
 
建議在正式環境下ZooKeeper部分建議使用<code>m5.large</code>(8 GB RAM)或是更好的機器執行


== 安裝 ==
== 安裝 ==
第19行: 第29行:
== 設定ZooKeeper ==
== 設定ZooKeeper ==


修改<code>/etc/kafka/zookeeper.properties</code>:
{{See also|Confluent/ZooKeeper}}
 
<syntaxhighlight lang="ini">
#
tickTime=2000
dataDir=/var/lib/zookeeper/
clientPort=2181
initLimit=5
syncLimit=2
server.1=1.2.3.4:2888:3888
server.2=5.6.7.8:2888:3888
server.3=9.10.11.12:2888:3888
autopurge.snapRetainCount=3
autopurge.purgeInterval=24
</syntaxhighlight>
 
新增<code>/var/lib/zookeeper/myid</code>,每一台都需要不同,<code>1</code>或<code>2</code>或<code>3</code>:
 
<syntaxhighlight lang="ini">
1
</syntaxhighlight>
 
然後修改檔案擁有人:
 
<syntaxhighlight lang="bash">
sudo chown cp-kafka:confluent /var/lib/zookeeper/myid
</syntaxhighlight>
 
理論上就可以啟動了:
 
<syntaxhighlight lang="bash">
sudo service confluent-zookeeper start
sudo service confluent-zookeeper status
</syntaxhighlight>
 
接下來可以將TCP Port 2181建立對應的TCP Load Balancer(像是用ELB)。


== 設定Kafka ==
== 設定Kafka ==
第117行: 第92行:
* {{Official|https://www.confluent.io/}} {{en}}
* {{Official|https://www.confluent.io/}} {{en}}
* [https://docs.confluent.io/current/installation/installing_cp/deb-ubuntu.htmlManual Install using Systemd on Ubuntu and Debian] {{en}}
* [https://docs.confluent.io/current/installation/installing_cp/deb-ubuntu.htmlManual Install using Systemd on Ubuntu and Debian] {{en}}
* [https://cwiki.apache.org/confluence/display/ZOOKEEPER/Client-Server+mutual+authentication Client-Server mutual authentication] {{en}}
* [https://medium.com/@johny.urgiles/overcoming-zookeeper-acls-1b205cfdc301 Overcoming Zookeeper ACLs] {{en}}


[[Category:軟體]]
[[Category:軟體]]

2019年3月13日 (三) 03:13的版本

Confluent是一家公司,也是该公司的Apache Kafka产品线的产品名。

简介

Confluent是Apache Kafka发明人出来开的公司,也是目前最知名的Kafka商业支援服务。同时Confluent也是该公司推出的软件品牌,提供了众多的Open Source套件用以管理Kafka Cluster(即社群版本元件),另外提供商用版本,包括Control Center(提供三十天试用)。

硬件

在PoC时我使用了三台t3.small(2 GB RAM,另外手动设定加上512 MB Swap),三台都安装完整的套件并且跑起来,一开始不会有问题,但跑一阵子后会因为内存不足而异常。

建议在正式环境下ZooKeeper部分建议使用m5.large(8 GB RAM)或是更好的机器执行。

安装

当然要先装Java

sudo apt install -y default-jre

这边只安装社群版本:

wget -qO - https://packages.confluent.io/deb/5.1/archive.key | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.confluent.io/deb/5.1 stable main"
sudo apt install -y confluent-community-2.11

设定ZooKeeper

设定Kafka

如果ZooKeeperKafka不同服务器,需要修改/etc/kafka/server.propertieszookeeper.connect的值,像是这样:

#zookeeper.connect=localhost:2181
zookeeper.connect=internal-test-gslin-confluent-xxxxxxxxx.us-east-1.elb.amazonaws.com:2181

修改/etc/kafka/server.propertiesbroker.id设定,让他自动产生而不需要自己指定:

#broker.id=0
broker.id.generation.enable=true

理论上就可以启动了:

sudo service confluent-confluent start
sudo service confluent-confluent status

设定其他套件

启动Schema Registry:

sudo service confluent-schema-registry start
sudo service confluent-schema-registry status

启动Kafka Connect:

sudo service confluent-kafka-connect start
sudo service confluent-kafka-connect status

启动Kafka REST Proxy:

sudo service confluent-kafka-rest start
sudo service confluent-kafka-rest status

启动KSQL:

sudo service confluent-ksql start
sudo service confluent-ksql status

相关连结

外部链接