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
Copy file name to clipboardExpand all lines: README.md
+55-35Lines changed: 55 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,58 +64,78 @@ First you need a [configuration files](#configuration) in order to configure Kaf
64
64
```sh
65
65
docker run -d \
66
66
-p 8080:8080 \
67
-
-v /tmp/application.conf:/app/application.conf \
67
+
-v /tmp/application.yml:/app/application.yml \
68
68
tchiotludo/kafkahq
69
69
```
70
-
* With `-v /tmp/application.conf` must be an absolute path to configuration file
70
+
* With `-v /tmp/application.yml` must be an absolute path to configuration file
71
71
* Go to http://localhost:8080
72
72
73
73
74
74
### Stand Alone
75
75
76
76
* Install Java 8
77
77
* Download the latest jar on [release page](https://github.com/tchiotludo/kafkahq/releases)
78
-
* Create an `application.conf` in the same directory
79
-
* Launch the application with `java -jar kafkahq.jar prod`
78
+
* Create an [configuration files](#configuration)
79
+
* Launch the application with `java -Dmicronaut.config.files=/path/to/application.yml -jar kafkahq.jar`
80
80
* Go to http://localhost:8080
81
81
82
82
83
83
## Configuration
84
-
Configuration file is a [HOCON configuration](https://github.com/lightbend/config/blob/master/HOCON.md) file with an example below :
85
-
```
86
-
{
87
-
kafka {
88
-
connections {
89
-
my-cluster-1 {
90
-
properties {
91
-
bootstrap.servers: "kafka:9092"
92
-
}
93
-
registry: "http://schema-registry:8085"
94
-
}
95
-
my-cluster-2 {
96
-
properties {
97
-
bootstrap.servers: "kafka:9093"
98
-
security.protocol: SSL
99
-
ssl.truststore.location: /app/truststore.jks
100
-
ssl.truststore.password: password
101
-
ssl.keystore.location: /app/keystore.jks
102
-
ssl.keystore.password: password
103
-
ssl.key.password: password
104
-
}
105
-
}
106
-
}
107
-
}
108
-
}
84
+
Configuration file can by default be provided in either Java properties, YAML, JSON or Groovy files.
85
+
Configuration file example in YML :
86
+
87
+
```yml
88
+
kafkahq:
89
+
server:
90
+
# if behind a reverse proxy, path to kafkahq with trailing slash
91
+
base-path: ""
92
+
93
+
# default kafka properties for each clients, available for admin / producer / consumer (optionnal)
94
+
clients-defaults:
95
+
consumer:
96
+
properties:
97
+
isolation.level: read_committed
98
+
99
+
# list of kafka cluster available for kafkahq
100
+
connections:
101
+
# url friendly name for the cluster
102
+
my-cluster-1:
103
+
# standard kafka properties (optionnal)
104
+
properties:
105
+
bootstrap.servers: "kafka:9092"
106
+
# schema registry url (optionnal)
107
+
schema-registry: "http://schema-registry:8085"
108
+
109
+
my-cluster-2:
110
+
properties:
111
+
bootstrap.servers: "kafka:9093"
112
+
security.protocol: SSL
113
+
ssl.truststore.location: /app/truststore.jks
114
+
ssl.truststore.password: password
115
+
ssl.keystore.location: /app/keystore.jks
116
+
ssl.keystore.password: password
117
+
ssl.key.password: password
118
+
119
+
topic-data:
120
+
# default sort order (OLDEST, NEWEST)
121
+
sort: OLDEST
122
+
# max record per page
123
+
size: 50
109
124
```
110
125
111
-
`kafka.connections` is a key value configuration with :
112
-
*`key`: must be an url friendly string the identify your cluster (`my-cluster-1` and `my-cluster-2` is the example above)
113
-
*`properties`: all the configurations found on [Kafka consumer documentation](https://kafka.apache.org/documentation/#consumerconfigs). Most important is `bootstrap.servers` that is a list of host:port of your Kafka brokers.
114
-
*`registry`: the schema registry url *(optional)*
126
+
* `kafkahq.server.base-path`: if behind a reverse proxy, path to kafkahq with trailing slash
127
+
* `kafkahq.clients-defaults.{{admin|producer|consumer}}.properties`: if behind a reverse proxy, path to kafkahq with trailing slash
128
+
* `kafkahq.connections` is a key value configuration with :
129
+
* `key`: must be an url friendly string the identify your cluster (`my-cluster-1` and `my-cluster-2` is the example above)
130
+
* `properties`: all the configurations found on [Kafka consumer documentation](https://kafka.apache.org/documentation/#consumerconfigs). Most important is `bootstrap.servers` that is a list of host:port of your Kafka brokers.
131
+
* `schema-registry`: the schema registry url *(optional)*
115
132
116
-
KafkaHQ docker image support 1 environment variables to handle configuraiton :
117
-
*`KAFKAHQ_CONFIGURATION`: a string that contains the full configuration that will be written on /app/configuration.conf on container.
133
+
> Since KafkaHQ is based on [Micronaut](https://micronaut.io/), you can customize configurations (server port, ssl, ...) with [Micronaut configuration](https://docs.micronaut.io/snapshot/guide/configurationreference.html#io.micronaut.http.server.HttpServerConfiguration).
134
+
> More information can be found on [Micronaut documentation](https://docs.micronaut.io/snapshot/guide/index.html#config)
118
135
136
+
KafkaHQ docker image support 2 environment variables to handle configuraiton :
137
+
* `MICRONAUT_APPLICATION_JSON`: a string that contains the full configuration in JSON format
138
+
* `MICRONAUT_CONFIG_FILES`: a path to to a configuration file on container. Default path is `/app/application.yml`
119
139
120
140
## Development Environment
121
141
A docker-compose is provide to start a development environnement.
0 commit comments