Fixing docker documentation in README.md. Adding docker-compose.md to the documentation

This commit is contained in:
andormarkus 2021-02-01 20:11:53 +01:00
parent 3c843e1266
commit 026ac89ac9
2 changed files with 83 additions and 34 deletions

View file

@ -1,91 +1,112 @@
![Kafka UI logo](images/kafka-ui-logo.png) Kafka UI Free Web UI for Kafka  
![Kafka UI logo](images/kafka-ui-logo.png) Kafka UI Free Web UI for Kafka  
------------------
![Kafka UI Price Free](images/free-open-source.svg)
<em>Kafka UI is a free open-source web UI for monitoring and management of Apache Kafka clusters. </em>
<em>Kafka UI is a free open-source web UI for monitoring and management of Apache Kafka clusters. </em>
Kafka UI is a simple tool that makes your data flows observable, helps find and troubleshoot issues faster and deliver optimal performance. Its lightweight dashboard makes it easy to track key metrics of your Kafka clusters - Brokers, Topics, Partitions, Production, and Consumption.
Kafka UI is a simple tool that makes your data flows observable, helps find and troubleshoot issues faster and deliver
optimal performance. Its lightweight dashboard makes it easy to track key metrics of your Kafka clusters - Brokers,
Topics, Partitions, Production, and Consumption.
Set up Kafka UI with just a couple of easy commands to visualize your Kafka data in a comprehensible way. You can run the tool locally or in the cloud.
Set up Kafka UI with just a couple of easy commands to visualize your Kafka data in a comprehensible way. You can run
the tool locally or in the cloud.
![Kafka UI interface dashboard screenshot](images/kafka-ui-interface-dashboard.png)
# Features
* **Multi-Cluster Management** — monitor and manage all your clusters in one place
* **Performance Monitoring with Metrics Dashboard** track key Kafka metrics with a lightweight dashboard
* **Performance Monitoring with Metrics Dashboard** — track key Kafka metrics with a lightweight dashboard
* **View Kafka Brokers** — view topic and partition assignments, controller status
* **View Kafka Topics** — view partition count, replication status, and custom configuration
* **View Consumer Groups** — view per-partition parked offsets, combined and per-partition lag
* **Browse Messages** — browse messages with JSON, plain text and Avro encoding
* **Dynamic Topic Configuration** — create and configure new topics with dynamic configuration
* **Configurable Authentification** — secure your installation with optional Github/Gitlab/Google OAuth 2.0
# Getting Started
To run Kafka UI, you can use a pre-built Docker image or build it locally.
To run Kafka UI, you can use a pre-built Docker image or build it locally.
## Running From Docker Image
The official Docker image for Kafka UI is hosted here: [hub.docker.com/r/provectuslabs/kafka-ui](https://hub.docker.com/r/provectuslabs/kafka-ui).
The official Docker image for Kafka UI is hosted
here: [hub.docker.com/r/provectuslabs/kafka-ui](https://hub.docker.com/r/provectuslabs/kafka-ui).
Launch Docker container in the background:
```sh
docker run -d provectuslabs/kafka-ui:latest
-e KAFKA_CLUSTERS_0_NAME=local
-e KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
docker run -d
-e KAFKA_CLUSTERS_0_NAME=local
-e KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
-e KAFKA_CLUSTERS_0_ZOOKEEPER=localhost:2181
-p 9000:8080
provectuslabs/kafka-ui:latest
```
Then access the web UI at [http://localhost:9000](http://localhost:9000).
### Docker Compose
If you prefer to use `docker-compose` please refer to the [documentation](docker-compose.md).
## Building With Docker
Steps to build Kafka UI locally with Docker:
Steps to build Kafka UI locally with Docker:
1. Install prerequisites: Java and Docker
2. Clone this repository and open a terminal in the directory of the project
3. Build a Docker container with Kafka UI
4. Start Kafka UI with your Kafka clusters
5. Navigate to Kafka UI
5. Navigate to Kafka UI
### Prerequisites
* Java 13 or newer
* Docker
* Docker
### Installing Prerequisites on Mac
1. Install Homebrew Cask:
```sh
> brew update
> brew cask
```
2. Install JAVA 13 with Homebrew Cask:
```sh
> brew tap homebrew/cask-versions
> brew cask install java (or java13 if 13th version is not the latest one)
```
### Building
Once you installed the prerequisites and cloned the repository, run the following commands in your project directory:
Once you installed the prerequisites and cloned the repository, run the following commands in your project directory:
Build a Docker container with Kafka UI:
Build a Docker container with Kafka UI:
```sh
./mvnw clean install -Pprod
```
Start Kafka UI with your Kafka clusters:
Start Kafka UI with your Kafka clusters:
```sh
docker-compose -f ./docker/kafka-ui.yaml up
```
To see Kafka UI, navigate to http://localhost:8080.
If you want to start only kafka-clusters:
If you want to start only kafka-clusters:
```sh
docker-compose -f ./docker/kafka-clusters-only.yaml up
```
Then start Kafka UI with a **local** profile.
Then start Kafka UI with a **local** profile.
## Running Locally Without Docker
@ -93,8 +114,8 @@ Then start Kafka UI with a **local** profile.
./mvnw spring-boot:run -Pprod
```
## Running in Kubernetes
To be done
# Guides
@ -103,16 +124,19 @@ To be done
## Connecting to a Secure Broker
Kafka UI supports TLS (SSL) and SASL connections for [encryption and authentication](http://kafka.apache.org/090/documentation.html#security). This can be configured by providing a combination of the following files (placed into the Kafka root directory):
Kafka UI supports TLS (SSL) and SASL connections
for [encryption and authentication](http://kafka.apache.org/090/documentation.html#security). This can be configured by
providing a combination of the following files (placed into the Kafka root directory):
To be continued
# Configuration
## Configuration File
Example of how to configure clusters in the [application-local.yml](https://github.com/provectus/kafka-ui/blob/master/kafka-ui-api/src/main/resources/application-local.yml) configuration file:
Example of how to configure clusters in
the [application-local.yml](https://github.com/provectus/kafka-ui/blob/master/kafka-ui-api/src/main/resources/application-local.yml)
configuration file:
```sh
kafka:
@ -138,17 +162,17 @@ Configure as many clusters as you need by adding their configs below separated w
## Environment Variables
Alternatively, each variable of of the .yml file can be set with an environment variable.
For example, if you want to use an environment variable to set the `name` parameter, you can write it like this: `KAFKA_CLUSTERS_2_NAME`
Alternatively, each variable of of the .yml file can be set with an environment variable. For example, if you want to
use an environment variable to set the `name` parameter, you can write it like this: `KAFKA_CLUSTERS_2_NAME`
|Name |Description
|Name |Description
|-----------------------|-------------------------------
|`KAFKA_CLUSTERS_0_NAME` | Cluster name
|`KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS` |Address where to connect
|`KAFKA_CLUSTERS_0_ZOOKEEPER` | Zookeper service address
|`KAFKA_CLUSTERS_0_SCHEMAREGISTRY` |SchemaRegistry's address
|`KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS` |Address where to connect
|`KAFKA_CLUSTERS_0_ZOOKEEPER` | Zookeper service address
|`KAFKA_CLUSTERS_0_SCHEMAREGISTRY` |SchemaRegistry's address
|`KAFKA_CLUSTERS_0_SCHEMANAMETEMPLATE` |How keys are saved to schemaRegistry
|`KAFKA_CLUSTERS_0_JMXPORT` |Open jmxPosrts of a broker
|`KAFKA_CLUSTERS_0_JMXPORT` |Open jmxPosrts of a broker

25
docker-compose.md Normal file
View file

@ -0,0 +1,25 @@
# Quick Start with docker-compose
* Add a new service in docker-compose.yml
```yaml
version: '2'
services:
kafka-ui:
image: provectuslabs/kafka-ui
container_name: kafka-ui
ports:
- "9000:8080"
restart: always
environment:
-e KAFKA_CLUSTERS_0_NAME=local
-e KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
-e KAFKA_CLUSTERS_0_ZOOKEEPER=localhost:2181
```
* Start OpenVPN server process
```bash
docker-compose up -d kafka-ui
```