Skip to content

Commit 9426c31

Browse files
authored
Documentation update for Tansen (#2)
* Updated the documentation.
1 parent b083fd3 commit 9426c31

23 files changed

+473
-239
lines changed

README.md

Lines changed: 34 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -1,166 +1,49 @@
1-
# Tansen
1+
<p align="center">
2+
<picture>
3+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ideasbucketlabs/tansen/main/documentation/images/logo-dark.svg">
4+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/ideasbucketlabs/tansen/main/documentation/images/logo-light.svg">
5+
<img alt="Tansen" src="https://raw.githubusercontent.com/ideasbucketlabs/tansen/main/documentation/images/logo-light.svg" width="144" height="58" style="max-width: 100%;">
6+
</picture>
7+
</p>
28

3-
Easy way to inspect, analyze and visualize Kafka Cluster, Topics and Schema
9+
<p align="center">
10+
Tansen is a light and fast web UI for visualizing Kafka clusters, managing Kafka topic, viewing Kafka topic messages, manage topic schema, view consumer groups and much more.
11+
</p>
412

5-
---
6-
## Configuration
7-
8-
> **Note:** Only `TANSEN.KAFKA-CLUSTERS.0.BOOTSTRAP_SERVERS` and `TANSEN.KAFKA-CLUSTERS.0.NAME` is a mandatory configuration that must be configured. Others are all optional.
9-
10-
### Endpoints
11-
12-
By default, Tansen listens and uses `HTTP` protocol. However, you can use the `HTTPS` protocol by using the following configuration.
13-
14-
```shell
15-
docker run -d \
16-
-v somepath/with-certificates:/etc/tansen/secrets \
17-
-e 'TANSEN.KAFKA-CLUSTERS.0.NAME=local' \
18-
-e 'TANSEN.KAFKA-CLUSTERS.0.LABEL=Local' \
19-
-e 'TANSEN.KAFKA-CLUSTERS.0.BOOTSTRAP_SERVERS=localhost:9092,localhost:9101' \
20-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA_REGISTRY_URL=http://localhost:8081' \
21-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SERVER_SSL_KEY-ALIAS=tansen' \
22-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SERVER_SSL_KEY-PASSWORD=password' \
23-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SERVER_SSL_KEY-STORE=/etc/tansen/secrets/tansen.p12' \
24-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SERVER_SSL_KEY-STORE-PASSWORD=password' \
25-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SERVER_SSL_KEY-STORE-TYPE=PKCS12' \
26-
-e 'SPRING_PROFILES_ACTIVE=prod' \
27-
ideasbucket/tansen:tag
28-
```
29-
30-
### Kafka broker connection
31-
32-
#### PLAIN (no SSL and authentication)
33-
34-
```shell
35-
docker run -d -e 'TANSEN.KAFKA-CLUSTERS.0.BOOTSTRAP_SERVERS=broker:9092' \
36-
-e 'TANSEN.KAFKA-CLUSTERS.0.NAME=local' \
37-
-e 'SPRING_PROFILES_ACTIVE=prod' \
38-
ideasbucket/tansen:tag
39-
```
40-
41-
#### 2-WAY-SSL
42-
43-
```shell
44-
docker run -d \
45-
-v somepath/with-certificates:/etc/kafka/secrets \
46-
-e 'TANSEN.KAFKA-CLUSTERS.0.NAME=local' \
47-
-e 'TANSEN.KAFKA-CLUSTERS.0.BOOTSTRAP_SERVERS=broker:9092' \
48-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SECURITY_PROTOCOL=SSL' \
49-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SSL_TRUSTSTORE_LOCATION=/etc/kafka/secrets/kafka.tansen.truststore.jks' \
50-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SSL_TRUSTSTORE_PASSWORD=confluent' \
51-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SSL_KEYSTORE_LOCATION=/etc/kafka/secrets/kafka.tansen.keystore.jks' \
52-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SSL_KEYSTORE_PASSWORD=confluent' \
53-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SSL_KEY_PASSWORD=confluent' \
54-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM=HTTPS' \
55-
-e 'SPRING_PROFILES_ACTIVE=prod' \
56-
ideasbucket/tansen:tag
57-
```
5813

59-
#### SASL-PLAIN
14+
<p align="center">
15+
<a href="https://github.com/ideasbucketlabs/tansen/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License"></a>
16+
<a href="https://hub.docker.com/r/ideasbucket/tansen"><img src="https://img.shields.io/docker/pulls/ideasbucket/tansen" alt="Total Docker Pulls"></a>
17+
</p>
6018

61-
```shell
62-
docker run -d \
63-
-e 'TANSEN.KAFKA-CLUSTERS.0.BOOTSTRAP_SERVERS=broker:9092' \
64-
-e 'TANSEN.KAFKA-CLUSTERS.0.NAME=local' \
65-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA_REGISTRY_URL=http://schema-registry:8081' \
66-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SECURITY_PROTOCOL=SASL_PLAINTEXT' \
67-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SASL_JAAS_CONFIG="org.apache.kafka.common.security.plain.PlainLoginModule required username=\"client\" password=\"client-secret\";' \
68-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SASL_MECHANISM=PLAIN' \
69-
-e 'SPRING_PROFILES_ACTIVE=prod' \
70-
ideasbucket/tansen:tag
71-
```
72-
73-
#### SASL-SCRAM
74-
75-
```shell
76-
docker run -d \
77-
-e 'TANSEN.KAFKA-CLUSTERS.0.BOOTSTRAP_SERVERS=broker:9092' \
78-
-e 'TANSEN.KAFKA-CLUSTERS.0.NAME=local' \
79-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA_REGISTRY_URL=http://schema-registry:8081' \
80-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SECURITY_PROTOCOL=SASL_PLAINTEXT' \
81-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SASL_JAAS_CONFIG="org.apache.kafka.common.security.scram.ScramLoginModule required username=\"client\" password=\"client-secret\";' \
82-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SASL_MECHANISM=SCRAM-SHA-256' \
83-
-e 'SPRING_PROFILES_ACTIVE=prod' \
84-
ideasbucket/tansen:tag
85-
```
86-
87-
#### SASL-SSL
88-
89-
```shell
90-
docker run -d \
91-
-v somepath/with-certificates:/etc/kafka/secrets \
92-
-e 'TANSEN.KAFKA-CLUSTERS.0.NAME=local' \
93-
-e 'TANSEN.KAFKA-CLUSTERS.0.BOOTSTRAP_SERVERS=broker:9092' \
94-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA_REGISTRY_URL=http://schema-registry:8081' \
95-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SECURITY_PROTOCOL=SASL_SSL' \
96-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SASL_JAAS_CONFIG="org.apache.kafka.common.security.plain.PlainLoginModule required username=\"client\" password=\"client-secret\";' \
97-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SASL_MECHANISM=PLAIN' \
98-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SSL_TRUSTSTORE_LOCATION=/etc/kafka/secrets/kafka.tansen.truststore.jks' \
99-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SSL_TRUSTSTORE_PASSWORD=confluent' \
100-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SSL_KEYSTORE_LOCATION=/etc/kafka/secrets/kafka.tansen.keystore.jks' \
101-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SSL_KEYSTORE_PASSWORD=confluent' \
102-
-e 'TANSEN.KAFKA-CLUSTERS.0.KAFKA-OPTIONS_SSL_KEY_PASSWORD=confluent' \
103-
-e 'SPRING_PROFILES_ACTIVE=prod' \
104-
ideasbucket/tansen:tag
105-
```
19+
---
20+
## Features
10621

107-
### Kafka schema registry
22+
* Multi-Cluster Management — see all your clusters in one place
23+
* Light and Dark theme based on your device preference
24+
* View Kafka Brokers — view topic and partition assignments, controller status
25+
* View Kafka Topics — view partition count, replication status, and custom configuration
26+
* Topic schema Management for key and message - view, edit and delete your schema
27+
* View Consumer Groups — view per-partition parked offsets, combined and per-partition lag
28+
* Browse Messages — browse messages with JSON, plain text, Protobuf, and Avro encoding
29+
* Topic Configuration — create and configure new topics and edit existing one
10830

109-
#### PLAIN (no SSL and authentication)
31+
---
11032

111-
```shell
112-
docker run -d -e 'TANSEN.KAFKA-CLUSTERS.0.BOOTSTRAP_SERVERS=broker:9092' \
113-
-e 'TANSEN.KAFKA-CLUSTERS.0.NAME=local' \
114-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA_REGISTRY=localhost:8081' \
115-
-e 'SPRING_PROFILES_ACTIVE=prod' \
116-
ideasbucket/tansen:tag
117-
```
118-
#### 2-WAY-SSL
33+
## Getting started ##
11934

120-
```shell
121-
docker run -d \
122-
-v somepath/with-certificates:/etc/kafka/secrets \
123-
-e 'TANSEN.KAFKA-CLUSTERS.0.BOOTSTRAP_SERVERS=broker:9092' \
124-
-e 'TANSEN.KAFKA-CLUSTERS.0.NAME=local' \
125-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA_REGISTRY=localhost:8081' \
126-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA-REGISTRY-OPTIONS_TRUSTSTORE_LOCATION=/etc/kafka/secrets/kafka.tansen.truststore.jks' \
127-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA-REGISTRY-OPTIONS_TRUSTSTORE_PASSWORD=confluent' \
128-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA-REGISTRY-OPTIONS_KEYSTORE_LOCATION=/etc/kafka/secrets/kafka.tansen.keystore.jks' \
129-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA-REGISTRY-OPTIONS_KEYSTORE_PASSWORD=confluent'
130-
-e 'SPRING_PROFILES_ACTIVE=prod' \
131-
ideasbucket/tansen:tag
132-
```
35+
To run Tansen for Apache Kafka, you can use either a pre-built Docker image or build it (or a jar file) yourself. For more information regarding configuration please visit [configuration page](https://github.com/ideasbucketlabs/tansen/blob/main/documentation/configuration.md).
13336

134-
#### Username/Password
37+
---
13538

136-
```shell
137-
docker run -d \
138-
-v somepath/with-certificates:/etc/kafka/secrets \
139-
-e 'TANSEN.KAFKA-CLUSTERS.0.BOOTSTRAP_SERVERS=broker:9092' \
140-
-e 'TANSEN.KAFKA-CLUSTERS.0.NAME=local' \
141-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA_REGISTRY=localhost:8081' \
142-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA_REGISTRY_USERNAME=username' \
143-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA_REGISTRY_PASSWORD=very_secure_password' \
144-
-e 'SPRING_PROFILES_ACTIVE=prod' \
145-
ideasbucket/tansen:tag
146-
```
39+
## Contributing
40+
If you're interested in contributing to Tansen, please read our [contributing docs](https://github.com/ideasbucketlabs/tansen/blob/main/documentation/CONTRIBUTING.md) **before submitting a pull request**.
14741

148-
#### Disable Topic Add/Edit/Delete
42+
---
43+
## Community
44+
* Follow us on [Github](https://github.com/ideasbucketlabs/tansen), [Twitter](https://twitter.com/myideasbucket)
14945

150-
```shell
151-
docker run -d \
152-
-v somepath/with-certificates:/etc/kafka/secrets \
153-
-e 'TANSEN.KAFKA-CLUSTERS.0.BOOTSTRAP_SERVERS=broker:9092' \
154-
-e 'TANSEN.KAFKA-CLUSTERS.0.NAME=local' \
155-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA_REGISTRY=localhost:8081' \
156-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA_REGISTRY_USERNAME=username' \
157-
-e 'TANSEN.KAFKA-CLUSTERS.0.SCHEMA_REGISTRY_PASSWORD=very_secure_password' \
158-
-r 'TANSEN.KAFKA-CLUSTERS.0.TOPIC_DELETE_ALLOWED=false' \
159-
-e 'TANSEN.KAFKA-CLUSTERS.0.TOPIC_ADD_ALLOWED=false' \
160-
-e 'TANSEN.KAFKA-CLUSTERS.0.TOPIC_EDIT_ALLOWED=false' \
161-
-e 'SPRING_PROFILES_ACTIVE=prod' \
162-
ideasbucket/tansen:tag
163-
```
46+
---
16447
## License
16548
Copyright © Nirmal Poudyal
16649

backend/main/java/com/ideasbucket/tansen/entity/MessageSelectionCriteria.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import com.fasterxml.jackson.annotation.*;
1010
import jakarta.validation.constraints.AssertFalse;
11-
1211
import java.time.Instant;
1312

1413
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -61,7 +60,6 @@ private boolean hasValidPartition() {
6160

6261
@JsonIgnore
6362
public String getCase() {
64-
6563
if (this.partition == null) {
6664
return "";
6765
}

backend/main/java/com/ideasbucket/tansen/entity/TopicCreateRequest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ private boolean hasValidRetentionBytes() {
318318
@AssertFalse(message = "Minimum in-sync replica must be equal or less than replication factor.")
319319
@JsonIgnore
320320
private boolean hasMinInsyncReplicas() {
321-
322321
return (this.replicationFactor < this.minInsyncReplicas);
323322
}
324323

backend/main/kotlin/com/ideasbucket/tansen/TansenApplication.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66
*/
77
package com.ideasbucket.tansen
88

9+
import io.swagger.v3.oas.annotations.OpenAPIDefinition
10+
import io.swagger.v3.oas.annotations.info.Info
911
import org.springframework.boot.autoconfigure.SpringBootApplication
1012
import org.springframework.boot.context.properties.ConfigurationPropertiesScan
1113
import org.springframework.boot.runApplication
1214

13-
@SpringBootApplication @ConfigurationPropertiesScan
15+
@SpringBootApplication
16+
@ConfigurationPropertiesScan
17+
@OpenAPIDefinition(info = Info(title = "Tansen", version = "1.0", description = "Documentation Tansen APIs v1.0"))
1418
class TansenApplication
1519

1620
fun main(args: Array<String>) {

backend/main/resources/application.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ spring.kafka.properties.schema.registry.url = ${SCHEMA_REGISTRY_URL:}
1010
spring.kafka.properties.auto.register.schemas = false
1111
spring.kafka.properties.use.latest.version = true
1212

13+
springdoc.api-docs.groups.enabled = true
14+
springdoc.swagger-ui.path = /api-documentation.html
15+
springdoc.swagger-ui.enabled = true
16+
springdoc.swagger-ui.tagsSorter = alpha
1317
#spring.kafka.consumer.properties.offsets.retention.minutes = 10
1418

1519
management.endpoints.web.base-path = /insight

0 commit comments

Comments
 (0)