Skip to content

Added a new functionality which now enables us to add broker ports #22

Open
poushalibanik wants to merge 1 commit intoedenhill:masterfrom
poushalibanik:master
Open

Added a new functionality which now enables us to add broker ports #22
poushalibanik wants to merge 1 commit intoedenhill:masterfrom
poushalibanik:master

Conversation

@poushalibanik
Copy link

I have added a functionality that now enables us to add broker ports in the terminal via args. Constant broker ports are helpful in scenarios where automation comes up. The various scenarios covered are listed below:

  1. When no broker ports and no broker count is provided and this command is ran "python3 -m trivup.clusters.KafkaCluster --version 3.1.0" it works as usual -> gives us port randomly that are assigned by TcpPortAllocator logic.
  2. python3 -m trivup.clusters.KafkaCluster --version 3.1.0 --help -> we can see the broker port arg being added.
  3. python3 -m trivup.clusters.KafkaCluster --version 3.1.0 --brokers 2 --broker-ports 1111,2222,3333 -> we can see an error stating ValueError: The number of ports :(3) does not match broker_cnt : (2)
  4. python3 -m trivup.clusters.KafkaCluster --version 3.1.0 --brokers 2 -> we can see 2 brokers that are being assigned using TcpPortAllocator logic/the ones given by kernel.
  5. python3 -m trivup.clusters.KafkaCluster --version 3.1.0 --brokers 3 --broker-ports 1111,2222,3333 -> allocates broker ports as 1111,2222,3333.
  6. python3 -m trivup.clusters.KafkaCluster --version 3.1.0 --broker-ports 1111,2222,3333 -> it allocates the broker ports specified, if broker count is not mentioned, no. of broker ports becomes the count of brokers.
    Along with the above things, it now displays whether the broker ports being specified are available or not.
    trivup2
    trivup1-image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments