Skip to content

Commit a185d0c

Browse files
authored
Merge pull request #48 from tchiotludo/dev
Release 0.5.3
2 parents 3455cde + 71a03fb commit a185d0c

File tree

20 files changed

+197
-62
lines changed

20 files changed

+197
-62
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ cache:
2222

2323
script:
2424
- set -e
25-
# Docker Login
26-
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
2725
# Gradle
2826
- ./gradlew --console=plain test
2927
- ./gradlew --console=plain shadowJar
@@ -32,14 +30,17 @@ script:
3230
- docker build . -t $TRAVIS_COMMIT
3331
# Docker Tag
3432
- if [ ! -z "$TRAVIS_TAG" ]; then
33+
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin;
3534
docker tag $TRAVIS_COMMIT tchiotludo/kafkahq:$TRAVIS_TAG;
3635
docker push tchiotludo/kafkahq:$TRAVIS_TAG;
3736
fi
3837
# Docker Branch
3938
- if [ "$TRAVIS_BRANCH" == "master" ]; then
39+
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin;
4040
docker tag $TRAVIS_COMMIT tchiotludo/kafkahq:latest;
4141
docker push tchiotludo/kafkahq:latest;
42-
elif [ "$TRAVIS_BRANCH" == "develop" ]; then
42+
elif [ "$TRAVIS_BRANCH" == "dev" ]; then
43+
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin;
4344
docker tag $TRAVIS_COMMIT tchiotludo/kafkahq:$TRAVIS_BRANCH;
4445
docker push tchiotludo/kafkahq:$TRAVIS_BRANCH;
4546
fi

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
FROM openjdk:8-jre-alpine
2+
3+
RUN apk add --update \
4+
libc6-compat \
5+
java-snappy-native \
6+
&& rm -rf /var/cache/apk/*
7+
28
WORKDIR /app
39
COPY docker /
410
ENV MICRONAUT_CONFIG_FILES=/app/application.yml

Dockerfile-dev

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM gradle:5.3.1-jdk-alpine
2+
3+
USER root
4+
5+
RUN apk add --update \
6+
libc6-compat \
7+
java-snappy-native \
8+
&& rm -rf /var/cache/apk/*
9+
10+
USER gradle

application.example.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
kafkahq:
22
server:
3-
base-path: "" # if behind a reverse proxy, path to kafkahq with trailing slash (optionnal)
4-
access-log: # Access log configuration (optionnal)
3+
base-path: "" # if behind a reverse proxy, path to kafkahq with trailing slash (optional). Example: kafkahq is
4+
# behind a reverse proxy with url http://my-server/kafkahq, set base-path: "/kafkahq/".
5+
# Not needed if you're behind a reverse proxy with subdomain http://kafkahq.my-server/
6+
access-log: # Access log configuration (optional)
57
enabled: true # true by default
68
name: org.kafkahq.log.access # Logger name
79
format: "[Date: {}] [Duration: {} ms] [Url: {} {} {}] [Status: {}] [Ip: {}] [Length: {}] [Port: {}]" # Logger format
810

9-
# default kafka properties for each clients, available for admin / producer / consumer (optionnal)
11+
# default kafka properties for each clients, available for admin / producer / consumer (optional)
1012
clients-defaults:
1113
consumer:
1214
properties:
@@ -15,9 +17,9 @@ kafkahq:
1517
# list of kafka cluster available for kafkahq
1618
connections:
1719
my-cluster-1: # url friendly name for the cluster
18-
properties: # standard kafka properties (optionnal)
20+
properties: # standard kafka properties (optional)
1921
bootstrap.servers: "kafka:9092"
20-
schema-registry: "http://schema-registry:8085" # schema registry url (optionnal)
22+
schema-registry: "http://schema-registry:8085" # schema registry url (optional)
2123

2224
my-cluster-2:
2325
properties:
@@ -41,12 +43,13 @@ kafkahq:
4143
ssl.keystore.password: password
4244
ssl.key.password: password
4345

44-
# Topic display data options (optionnal)
46+
# Topic display data options (optional)
4547
topic-data:
4648
sort: OLDEST # default sort order (OLDEST, NEWEST) (default: OLDEST)
4749
size: 50 # max record per page (default: 50)
50+
poll-timeout: 1000 # The time, in milliseconds, spent waiting in poll if data is not available in the buffer.
4851

49-
# Auth & Roles (optionnal)
52+
# Auth & Roles (optional)
5053
security:
5154
default-roles: # Roles available for all the user even unlogged user
5255
- topic/read

assets/modules/templates/sidebar.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
font-size: $font-size-lg;
99
border-right: 1px solid $nav-tabs-border-color;
1010
z-index: 2;
11+
display: flex;
12+
flex-direction: column;
1113

1214
.sidebar-header {
1315
padding: 5px 10px;
@@ -21,6 +23,7 @@
2123
}
2224

2325
ul {
26+
flex-grow: 2;
2427
p {
2528
color: #fff;
2629
padding: 10px;
@@ -79,6 +82,18 @@
7982
background: $tertiary;
8083
}
8184

85+
.sidebar-log {
86+
padding: 5px 10px;
87+
background: $tertiary;
88+
border-top: 1px solid $yellow;
89+
a {
90+
color: white;
91+
&:hover {
92+
text-decoration: none;
93+
}
94+
}
95+
}
96+
8297
@include media-breakpoint-down(sm) {
8398
& {
8499
margin-left: -$menu-width;

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
buildscript {
22
ext {
3-
micronautVersion = "1.1.+"
3+
micronautVersion = "1.1.0"
44
confluentVersion = "5.1.+"
55
kafkaVersion = "2.2.+"
66
}
@@ -83,7 +83,11 @@ configurations {
8383

8484
run.classpath += configurations.developmentOnly
8585
test.classpath += configurations.developmentOnly
86-
run.jvmArgs('-noverify', '-XX:TieredStopAtLevel=1', '-Dmicronaut.environments=dev')
86+
run.jvmArgs('-noverify',
87+
'-XX:TieredStopAtLevel=1',
88+
'-Dmicronaut.environments=dev',
89+
'-Dorg.xerial.snappy.use.systemlib=true'
90+
)
8791

8892
tasks.withType(JavaCompile){
8993
options.encoding = "UTF-8"

docker-compose-dev.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ volumes:
1010

1111
services:
1212
kafkahq:
13-
image: gradle:5.3.1-jdk-alpine
13+
build:
14+
context: .
15+
dockerfile: Dockerfile-dev
1416
command: "gradle run --continuous"
1517
working_dir: /app
1618
volumes:

docker/app/jvm.options

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
###########################################################################
2+
# jvm.options #
3+
# #
4+
# - all flags defined here will be used to startup the JVM #
5+
# - one flag should be specified per line #
6+
# - lines that do not start with '-' will be ignored #
7+
# - only static flags are accepted (no variables or parameters) #
8+
# - dynamic flags will be appended to these on cassandra-env #
9+
###########################################################################
10+
11+
# Server Hotspot JVM
12+
-server
13+
14+
# ensure UTF-8 encoding by default (e.g. filenames)
15+
-Dfile.encoding=UTF-8
16+
17+
# set to headless, just in case
18+
-Djava.awt.headless=true
19+
20+
# generate a heap dump when an allocation from the Java heap fails
21+
# heap dumps are created in the working directory of the JVM
22+
-XX:+HeapDumpOnOutOfMemoryError
23+
-XX:HeapDumpPath=/tmp/heapdump.log
24+
25+
# GC logs
26+
-XX:+PrintGCDetails
27+
-XX:+PrintGCDateStamps
28+
-XX:+PrintTenuringDistribution
29+
-XX:+PrintGCApplicationStoppedTime
30+
-Xloggc:/tmp/gc.log
31+
-XX:+UseGCLogFileRotation
32+
-XX:NumberOfGCLogFiles=32
33+
-XX:GCLogFileSize=64m
34+
35+
# Docker aware cpu/memory otions
36+
-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
37+
38+
# Do not rely on the system configuration
39+
-Dfile.encoding=UTF-8
40+
-Duser.timezone=UTC
41+
42+
# tells the Java library to use the preinstalled native library
43+
-Dorg.xerial.snappy.use.systemlib=true
44+
45+
# Jmx Remote
46+
-Dcom.sun.management.jmxremote
47+
-Dcom.sun.management.jmxremote.port=8686
48+
-Dcom.sun.management.jmxremote.local.only=false
49+
-Dcom.sun.management.jmxremote.authenticate=false
50+
-Dcom.sun.management.jmxremote.ssl=false

docker/app/kafkahq

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
#!/usr/bin/env sh
22

3+
# Read user-defined JVM options from jvm.options file
4+
JVM_OPTS_FILE=${JVM_OPTS_FILE:-/app/jvm.options}
5+
for JVM_OPT in `grep "^-" ${JVM_OPTS_FILE}`
6+
do
7+
JAVA_OPTS="${JAVA_OPTS} ${JVM_OPT}"
8+
done
9+
310
/usr/bin/java ${JAVA_OPTS} -jar /app/kafkahq.jar

src/main/java/org/kafkahq/App.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,6 @@
33
import io.micronaut.runtime.Micronaut;
44

55
public class App {
6-
// route
7-
{
8-
/*
9-
use(new Whoops());
10-
11-
use("*", new RequestLogger()
12-
.latency()
13-
.extended()
14-
);
15-
16-
assets("/favicon.ico");
17-
});
18-
*/
19-
}
20-
216
public static void main(String[] args) {
227
Micronaut.run(App.class);
238
}

0 commit comments

Comments
 (0)