You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running a supported version of the application which is listed here and the feature is not present there
Is your proposal related to a problem?
I think that we can make easier to configure and run an application container in our local environment. Here's an ideia about providing a shell command with basic configurations and easier way to start using the app.
Describe the feature you're interested in
I created this script to run the containers easily and it was helpful to me, so I'm sharing here to maybe help another developers. If you guys think it will be good to document it or incorporate in the repository, it's your decision.
Script:
#!/bin/bash# Define a function to display usage informationfunctionusage() {
echo"Usage: $0 [-n container_name] [-p host_port] [-c cluster_name] [-b bootstrap_servers] [-c cluster_name -b bootstrap_servers...] [-h]"echo" -n Specify the name of the Docker container (default: kafka-ui)"echo" -p Specify the host port to expose (default: 8080)"echo" -c Specify the name of a Kafka cluster (required)"echo" -b Specify the comma-separated list of bootstrap servers for the Kafka cluster (required)"echo" -h Display this help message"exit 1
}
# Parse command-line argumentswhilegetopts"n:p:c:b:h" opt;docase$optin
n)
container_name="$OPTARG"
;;
p)
host_port="$OPTARG"
;;
c)
cluster_name+=("$OPTARG")
;;
b)
bootstrap_servers+=("$OPTARG")
;;
h)
usage
;;
\?)
echo"Invalid option: -$OPTARG">&2
usage
;;
:)
echo"Option -$OPTARG requires an argument.">&2
usage
;;
esacdone# Verify that required arguments are specifiedif [ ${#cluster_name[@]}-eq 0 ] || [ ${#bootstrap_servers[@]}-eq 0 ];thenecho"Error: -c and -b must be specified at least once.">&2
usage
fi# Set default values if not specified
container_name=${container_name:-"kafka-ui"}
host_port=${host_port:-"8080"}# Build a list of cluster configurations
i=0
while [ $i-lt${#cluster_name[@]} ] && [ $i-lt${#bootstrap_servers[@]} ];do
clusters_args="$clusters_args -e KAFKA_CLUSTERS_${i}_NAME=${cluster_name[$i]} -e KAFKA_CLUSTERS_${i}_BOOTSTRAP_SERVERS=${bootstrap_servers[$i]}"
i=$((i+1))doneecho"${clusters_args}"# Run the docker command
sudo docker run -d \
--name $container_name \
-p $host_port:8080 \
$clusters_args \
provectuslabs/kafka-ui
Usage:
./start-kafka-ui.sh -h
Usage: ./start-kafka-ui.sh [-n container_name] [-p host_port] [-c cluster_name] [-b bootstrap_servers] [-c cluster_name -b bootstrap_servers...] [-h]
-n Specify the name of the Docker container (default: kafka-ui)
-p Specify the host port to expose (default: 8080)
-c Specify the name of a Kafka cluster (required)
-b Specify the comma-separated list of bootstrap servers for the Kafka cluster (required)
Describe alternatives you've considered
No response
Version you're running
v0.7.1
Additional context
No response
The text was updated successfully, but these errors were encountered:
Issue submitter TODO list
Is your proposal related to a problem?
I think that we can make easier to configure and run an application container in our local environment. Here's an ideia about providing a shell command with basic configurations and easier way to start using the app.
Describe the feature you're interested in
I created this script to run the containers easily and it was helpful to me, so I'm sharing here to maybe help another developers. If you guys think it will be good to document it or incorporate in the repository, it's your decision.
Script:
Usage:
Describe alternatives you've considered
No response
Version you're running
v0.7.1
Additional context
No response
The text was updated successfully, but these errors were encountered: