Skip to content

Commit

Permalink
bump all stacks to docker compose v3
Browse files Browse the repository at this point in the history
  • Loading branch information
fhussonnois committed Oct 9, 2023
1 parent 1e35ca3 commit 4e77546
Show file tree
Hide file tree
Showing 35 changed files with 629 additions and 485 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Sets environment variables used in docker-compose.yml

# Set to specific version needed
CONFLUENT_VERSION=7.1.0
CONFLUENT_VERSION=7.5.0
ZOONAVIGATOR_VERSION=1.1.2
AKHQ_VERSION=0.20.0
AKHQ_VERSION=0.24.0
GRAFANA_VERSION=8.4.5
PROMETHEUS_VERSION=v2.34.0

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
build
*.swp

.idea/
22 changes: 11 additions & 11 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,36 +45,36 @@ Start/Stop with:

[source,bash]
----
$ ./single-node-stack-start.sh
$ ./single-node-stack-stop.sh
$ ./zk-kafka-single-node-stack-start.sh
$ ./zk-kafka-single-node-stack-stop.sh
# or directly
$ docker-compose -f zk-kafka-single-node-stack.yml up -d
$ docker-compose -f zk-kafka-single-node-stack.yml down
$ docker-compose -f zk-kafka-single-node-stack.yml up -d
$ docker-compose -f zk-kafka-single-node-stack.yml down
----

=== Single Zookeeper / Multiple Kafka with Prometheus/Grafana

[source,bash]
----
$ docker-compose -f zk-kafka-multiple-nodes-stack.yml up -d
$ docker-compose -f zk-kafka-multiple-nodes-stack.yml down
$ docker-compose -f zk-kafka-multiple-nodes-stack.yml up -d
$ docker-compose -f zk-kafka-multiple-nodes-stack.yml down
----

=== Single Zookeeper/Kafka with Prometheus/Grafana (SASL/PLAINTEXT)

[source,bash]
----
$ ./sasl-single-node-stack-start.sh
$ ./sasl-single-node-stack-stop.sh
$ ./zk-kafka-single-node-sasl-stack-start.sh
$ ./zk-kafka-single-node-sasl-stack-stop.sh
----

=== Single Zookeeper / Multiple Kafka with Prometheus/Grafana (SASL/PLAINTEXT)

[source,bash]
----
$ docker-compose -f zk-kafka-multiple-nodes-secured-stack.yml up -d
$ docker-compose -f zk-kafka-multiple-nodes-secured-stack.yml down
$ docker-compose -f zk-kafka-multiple-nodes-sasl-stack.yml up -d
$ docker-compose -f zk-kafka-multiple-nodes-sasl-stack.yml down
----

=== Full Stack (single node Kafka Cluster)
Expand Down Expand Up @@ -175,7 +175,7 @@ Any feedback, bug reports and PRs are greatly appreciated!

== Licence

Copyright 2020 StreamThoughts.
Copyright 2020-2023 StreamThoughts.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Expand Down
23 changes: 11 additions & 12 deletions bin/create-admin-scram-users
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# Copyright 2023 The original authors
#
# http://www.apache.org/licenses/LICENSE-2.0
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e;

Expand Down
23 changes: 11 additions & 12 deletions bin/kafka-configs
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# Copyright 2023 The original authors
#
# http://www.apache.org/licenses/LICENSE-2.0
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e;

Expand Down
23 changes: 11 additions & 12 deletions bin/kafka-consumer-perf-test
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# Copyright 2023 The original authors
#
# http://www.apache.org/licenses/LICENSE-2.0
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e;

Expand Down
23 changes: 11 additions & 12 deletions bin/kafka-producer-perf-test
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# Copyright 2023 The original authors
#
# http://www.apache.org/licenses/LICENSE-2.0
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e;

Expand Down
23 changes: 11 additions & 12 deletions bin/kafka-topics
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# Copyright 2023 The original authors
#
# http://www.apache.org/licenses/LICENSE-2.0
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e;

Expand Down
24 changes: 11 additions & 13 deletions bin/list-acls
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# Copyright 2023 The original authors
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e;

configDir=$(readlink -f $0 | xargs dirname)/../etc
Expand Down
27 changes: 27 additions & 0 deletions down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
# Copyright 2023 The original authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

BASEDIR=$(dirname "$(readlink -f $0)")
DOCKERDIR="$BASEDIR"

echo -e "\n🐳 Stopping previous Kafka Docker-Compose stacks..."
for COMPOSE in "$DOCKERDIR/"*.yml; do
echo "Removing stack for $COMPOSE"
(cd "$BASEDIR"; docker compose -f "$COMPOSE" down --remove-orphans --volumes)
done

exit 0;
35 changes: 0 additions & 35 deletions full-single-node-stack-start.sh

This file was deleted.

27 changes: 0 additions & 27 deletions full-single-node-stack-stop.sh

This file was deleted.

29 changes: 14 additions & 15 deletions generate-jmx-configs.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# Copyright 2023 The original authors
#
# http://www.apache.org/licenses/LICENSE-2.0
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

DIR=$(dirname "$0")
CONFIG_DIR=$(dirname "$0")/etc

rm -rf $CONFIG_DIR/jmx_exporter && mkdir -p $CONFIG_DIR/jmx_exporter
rm -rf "$CONFIG_DIR/jmx_exporter" && mkdir -p "$CONFIG_DIR/jmx_exporter"

generate_jmx_exporter_cfg (){
service="$1"
echo -e "\n⏳ Generate JMX exporter configuration for $service"
name=`echo $service | awk -F ":" '{ print $1'} `
cat template/jmx_exporter_kafka_broker.yml | sed s,%HOST_PORT%,$service,g > $CONFIG_DIR/jmx_exporter/config_$name.yml
name=$(echo "$service" | awk -F ":" '{ print $1}')
cat "template/jmx_exporter_kafka_broker.yml" | sed s,%HOST_PORT%,$service,g > "$CONFIG_DIR/jmx_exporter/config_$name.yml"
}

for i in kafka101:9992 kafka102:9993 kafka103:9994; do
Expand Down
Loading

0 comments on commit 4e77546

Please sign in to comment.