-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Set configuration for a Zk cluster and broker cluster using groups #28
Conversation
@rpelisse I have been working in this PR to improve the way to deploy a distribute cluster (following the most common patterns). This is an approach from my older Ansible Playbook created many time ago, but as the initial draft of a more complex one. https://github.com/rmarting/amq-streams-rhel-ansible-playbook That playbook includes some well configurations and just refactored into this repo, but maybe I am not following the best approaches or common standards of Ansible or this collection. Please, feel free to review, update, comment, or improve it. IMHO the roles must cover the most common deployment topology of Kafka clusters, that it is using more than one instance per component (usually 3 per ZK, and 2,3,4 or more for BK). I tested for a single case, and it is working too. Looking forward to hearing your feedback and comments. |
It looks pretty good and worked right away (or almost) on my laptop! Kudos! Honestly, it's gold, thank you so much :) The only thing is that, right now, the use must have a group of machine called "zookeepers". We probably need to change that. A default value using this approach, that can be overriden, should do the the trick, but I'll do it in later commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you so much @rpelisse for your comment and feedback! It is moving to a good shape and position this collection to automate a kafka cluster. |
Looking forward how you are implementing it! (I will learn more things about best Ansible practices) 😄 |
This PR is a proposal to fix the #7 including the extension of create the zookeeper (ZK) and broker (BK) cluster successfuly. The current status of the
main
branch does not include the right configuration in thezookeeper.properties
andserver.properties
file to set up each cluster. These files must include a set of properties to identify each member of the ZK and BK cluster to establish the connectivy between members and then have a complete topology working as expected.For example, the current status of the
main
branch defines some properties as standalone, so it is great, when you want to have a one-to-one topology (one ZK instance and a single BK instance):broker.id=0
in theserver.properties
filezookeeper.connect
property in theserver.properties
fileserver.X
properties in thezookeeper.properties
(and other properties to create the cluster)Checking the ZK Admin Server, the instance is defined as standalone:
Another way to check that it is not a distributed cluster is creating a topic with more replicas. Then the following exception will raise:
This PR includes a set of configurations and templates for these files allowing to define the different members of the ZK and BK clusters. Using the
zookeeper
andbrokers
groups in the inventory the roles will use them to set up everything in the right way.After seeting that, it is easy to check the status of a ZK instance using the Admin Server endpoint, and identify the status of each member, as
leader
orfollower
. Here an example of a leader node:Bonus track
This PR also includes a set of properties to enable the ZK Admin Server (including the port). Very useful to check the status of the ZK nodes.