Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
5e92ed2
Add JVM Docker image
VedarthConfluent Oct 13, 2023
7e7f8e0
Refactor build test and setup proper directory structure
VedarthConfluent Oct 16, 2023
2e5f9b2
Merge branch 'trunk' of github.com:apache/kafka into docker-image
VedarthConfluent Oct 16, 2023
0623435
Refactor scripts running in Dockerfile
VedarthConfluent Oct 16, 2023
eef401b
Refactor bash scripts
VedarthConfluent Oct 16, 2023
45c2272
Remove redundant files
VedarthConfluent Oct 16, 2023
12534a3
Add licence to the files
VedarthConfluent Oct 16, 2023
3eaef7a
Updated to 21-jre and fix typos
VedarthConfluent Oct 17, 2023
0c3b65a
Add a release script for pushing docker images to dockerhub
VedarthConfluent Oct 18, 2023
f75cc5f
Update release script to support registry and add error handling
VedarthConfluent Oct 18, 2023
6f64ce5
Remove confluent artifacts from sanity test
VedarthConfluent Oct 30, 2023
72a9765
Remove redundant files
VedarthConfluent Oct 30, 2023
6a151bf
Merge branch 'trunk' of github.com:apache/kafka into docker-image
VedarthConfluent Oct 30, 2023
82775b3
Fix tests
VedarthConfluent Oct 30, 2023
1c0d3c5
Use CDS to start kafka
VedarthConfluent Oct 30, 2023
a9faadb
Resolve PR comments
VedarthConfluent Oct 30, 2023
6289c19
Add github actions workflow for build and test of jvm docker image
VedarthConfluent Nov 2, 2023
c018f54
Add description to kafka url link
VedarthConfluent Nov 2, 2023
8df9b59
Refactors jsa launch script with error handling and timeouts
VedarthConfluent Nov 2, 2023
ee53281
Remove static sleep from sanity tests
VedarthConfluent Nov 2, 2023
58aa37e
Rely on scripts to detect when server is up
VedarthConfluent Nov 2, 2023
24863bb
Removed redundant wait in jsa generation
VedarthConfluent Nov 2, 2023
c784793
Merge branch 'trunk' of github.com:apache/kafka into docker-image
VedarthConfluent Nov 3, 2023
ff31062
Add promotion script
VedarthConfluent Nov 6, 2023
9a24709
Add requirements.txt for promotion script
VedarthConfluent Nov 6, 2023
042e770
Merge branch 'trunk' of github.com:apache/kafka into docker-image
VedarthConfluent Nov 6, 2023
e658298
Fix property file location
VedarthConfluent Nov 6, 2023
9cbec87
Add support for supplying properties through file mounting
VedarthConfluent Nov 8, 2023
108ab85
Ensure that environment variable configs are always appended in newline
VedarthConfluent Nov 8, 2023
ed2f94f
Add missing brackets in template
VedarthConfluent Nov 8, 2023
7a7c33c
Add test for file input
VedarthConfluent Nov 9, 2023
64d47d7
Merge branch 'trunk' of github.com:apache/kafka into docker-image
VedarthConfluent Nov 9, 2023
1c8ada4
Bubble up test errors to root build test script
VedarthConfluent Nov 9, 2023
10b85b9
Add license comment and refactor ub scripts to remove redundant code
VedarthConfluent Nov 10, 2023
625376e
Add readme file and refactor the python scripts
VedarthConfluent Nov 10, 2023
ffe523c
Merge branch 'trunk' of github.com:apache/kafka into docker-image
VedarthConfluent Nov 10, 2023
d9cbdd8
Add local setup section in Readme
VedarthConfluent Nov 15, 2023
7d6852a
Merge branch 'trunk' of github.com:apache/kafka into docker-image
VedarthConfluent Nov 15, 2023
3dcdf2d
Update file input test and readme file
VedarthConfluent Nov 15, 2023
01619a0
Add test for broker metrics
VedarthConfluent Nov 16, 2023
6a1f038
Remove potential flakiness from the test
VedarthConfluent Nov 16, 2023
c81e63a
Remove redundant paths in chown and chmod
VedarthConfluent Nov 20, 2023
3677b08
Fix build by adding license and excluding files where it cannot be added
VedarthConfluent Nov 20, 2023
5193ca1
Update documentation to include docker image in the release process
VedarthConfluent Nov 20, 2023
d155e3c
Add initial documentation and quick start
VedarthConfluent Nov 21, 2023
ad3687b
Add documentation for ssl and example compose files
VedarthConfluent Nov 22, 2023
da06043
Add CDS for storage format
VedarthConfluent Nov 23, 2023
d5f2d55
Resolve comments
VedarthConfluent Nov 24, 2023
29251ff
Refactor release script
VedarthConfluent Nov 24, 2023
de4bf5b
Make RC release script non interactive
VedarthConfluent Nov 27, 2023
bc2237c
Remove the confirmation check from RC release script
VedarthConfluent Nov 27, 2023
a4694f8
Fix test report path in workflow and fix inline docs
VedarthConfluent Nov 27, 2023
26f460f
Handle error to ensure files get deleted while running tests
VedarthConfluent Nov 27, 2023
b262984
Update readme file to reflect the change
VedarthConfluent Nov 27, 2023
b536088
Remove redundant configs from tests
VedarthConfluent Nov 28, 2023
bdb31aa
Remove advertised.listeners from server properties in controller mode
VedarthConfluent Nov 28, 2023
1ac48a1
Copy property files instead of move to fix errors on restart
VedarthConfluent Nov 28, 2023
ed418cf
Remove redundant checks and improve script documentation
VedarthConfluent Nov 29, 2023
fa38733
Add test for isolated mode kafka cluster
VedarthConfluent Nov 30, 2023
7cefb7f
Fix directory naming
VedarthConfluent Nov 30, 2023
0e2f29d
Add examples
VedarthConfluent Nov 30, 2023
e066f81
Merge branch 'docker-image' of github.com:VedarthConfluent/kafka into…
VedarthConfluent Nov 30, 2023
570cce4
Rename ub to utility and fix test compose files
VedarthConfluent Dec 1, 2023
8b49978
Fix gradle
VedarthConfluent Dec 1, 2023
c44b1c4
Fix build error
VedarthConfluent Dec 1, 2023
1eec583
Merge branch 'trunk' of github.com:apache/kafka into docker-image
VedarthConfluent Dec 1, 2023
a5cc724
Fix typo errors and remove redundant client config
VedarthConfluent Dec 2, 2023
93bbf1a
Resolve comments
VedarthConfluent Dec 4, 2023
228c9e7
Update config handling logic
VedarthConfluent Dec 4, 2023
4e6ed3d
Make python scripts executable and add detailed examples in README
VedarthConfluent Dec 4, 2023
ce2d921
Remove redundant fix for controller flow
VedarthConfluent Dec 4, 2023
3936397
Update readme docs and minor change in github actions workflow
VedarthConfluent Dec 5, 2023
e4cebd7
Add empty line at end of all files
VedarthConfluent Dec 5, 2023
4a6e61d
Merge branch 'docker-image' of github.com:VedarthConfluent/kafka into…
VedarthConfluent Dec 5, 2023
d0c8d45
Fix examples
VedarthConfluent Dec 5, 2023
3dd5b08
Update the docs with updated config handling
VedarthConfluent Dec 5, 2023
fd1bae4
Merge branch 'trunk' of github.com:apache/kafka into docker-image-doc…
VedarthConfluent Dec 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ if (repo != null) {
'**/generated/**',
'clients/src/test/resources/serializedData/*',
'docker/resources/utility/go.sum',
'docker/test/fixtures/secrets/*'
'docker/test/fixtures/secrets/*',
'docker/examples/fixtures/secrets/*'
])
}
} else {
Expand Down
31 changes: 31 additions & 0 deletions docker/examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Kafka Docker Image Examples
---------------------------

- This directory contains docker compose files for some example configs to run docker image.

- Run the commands from root of the repository.

- To bring up the docker compose examples, use docker compose command.

For example:-
```
# This command brings up JVM cluster
$ docker compose -f docker/examples/jvm/cluster/docker-compose.yml up
```

- Kafka server can be accessed using cli scripts or your own client code.
Make sure jars are built for the code, if cli scripts are being used.

For example:-
```
# Produce messages to kafka broker
$ bin/kafka-console-producer.sh --topic quickstart-events --bootstrap-server localhost:29092
```

- Use `./docker/examples/fixtures/client-secrets` for connecting with Kafka when running SSL example. `./docker/examples/fixtures/client-secrets/client-ssl.properties` file can be used as client config.

For example:-
```
# Produce message to SSL Kafka example
$ bin/kafka-console-producer.sh --topic test_topic_ssl --bootstrap-server localhost:9093 --producer.config ./docker/examples/fixtures/client-secrets/client-ssl.properties
```
26 changes: 26 additions & 0 deletions docker/examples/fixtures/client-secrets/client-ssl.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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
#
# 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.

security.protocol=SSL
# Provide path to the truststore file
ssl.truststore.location=./docker/examples/fixtures/secrets/kafka.truststore.jks
# This the password for the example keystores and truststores
ssl.truststore.password=abcdefgh
# Provide path to the keystore file
ssl.keystore.location=./docker/examples/fixtures/client-secrets/client.keystore.jks
ssl.keystore.password=abcdefgh
ssl.key.password=abcdefgh
ssl.client.auth=required
ssl.endpoint.identification.algorithm=
Binary file not shown.
31 changes: 31 additions & 0 deletions docker/examples/fixtures/file-input/server.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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
#
# 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.

advertised.listeners=PLAINTEXT://localhost:9092,SSL://localhost:9093
controller.listener.names=CONTROLLER
group.initial.rebalance.delay.ms=0
inter.broker.listener.name=PLAINTEXT
listener.security.protocol.map=PLAINTEXT:PLAINTEXT,SSL:SSL,CONTROLLER:PLAINTEXT
log.dirs=/tmp/kraft-combined-logs
offsets.topic.replication.factor=1
process.roles=broker
ssl.client.auth=required
ssl.key.password=abcdefgh
ssl.keystore.location=/etc/kafka/secrets/kafka01.keystore.jks
ssl.keystore.password=abcdefgh
ssl.truststore.location=/etc/kafka/secrets/kafka.truststore.jks
ssl.truststore.password=abcdefgh
transaction.state.log.min.isr=1
transaction.state.log.replication.factor=1
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions docker/examples/fixtures/secrets/kafka_keystore_creds
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
abcdefgh
1 change: 1 addition & 0 deletions docker/examples/fixtures/secrets/kafka_ssl_key_creds
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
abcdefgh
1 change: 1 addition & 0 deletions docker/examples/fixtures/secrets/kafka_truststore_creds
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
abcdefgh
110 changes: 110 additions & 0 deletions docker/examples/jvm/cluster/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# 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
#
# 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.

---
version: '1'
services:
controller-1:
image: apache/kafka:latest
ports:
- 19093:9093
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: 'controller'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@controller-1:9093,2@controller-2:9093,3@controller-3:9093'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_LISTENERS: 'CONTROLLER://controller-1:9093'
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'

controller-2:
image: apache/kafka:latest
ports:
- 29093:9093
environment:
KAFKA_NODE_ID: 2
KAFKA_PROCESS_ROLES: 'controller'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@controller-1:9093,2@controller-2:9093,3@controller-3:9093'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_LISTENERS: 'CONTROLLER://controller-2:9093'
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'

controller-3:
image: apache/kafka:latest
ports:
- 39093:9093
environment:
KAFKA_NODE_ID: 3
KAFKA_PROCESS_ROLES: 'controller'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@controller-1:9093,2@controller-2:9093,3@controller-3:9093'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_LISTENERS: 'CONTROLLER://controller-3:9093'
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'

kafka-1:
image: apache/kafka:latest
ports:
- 29092:9092
environment:
KAFKA_NODE_ID: 4
KAFKA_PROCESS_ROLES: 'broker'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@controller-1:9093,2@controller-2:9093,3@controller-3:9093'
KAFKA_LISTENERS: 'PLAINTEXT://kafka-1:9092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:29092
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'
depends_on:
- controller-1
- controller-2
- controller-3

kafka-2:
image: apache/kafka:latest
ports:
- 39092:9092
environment:
KAFKA_NODE_ID: 5
KAFKA_PROCESS_ROLES: 'broker'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@controller-1:9093,2@controller-2:9093,3@controller-3:9093'
KAFKA_LISTENERS: 'PLAINTEXT://kafka-2:9092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:39092
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'
depends_on:
- controller-1
- controller-2
- controller-3

kafka-3:
image: apache/kafka:latest
ports:
- 49092:9092
environment:
KAFKA_NODE_ID: 6
KAFKA_PROCESS_ROLES: 'broker'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@controller-1:9093,2@controller-2:9093,3@controller-3:9093'
KAFKA_LISTENERS: 'PLAINTEXT://kafka-3:9092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:49092
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'
depends_on:
- controller-1
- controller-2
- controller-3
37 changes: 37 additions & 0 deletions docker/examples/jvm/file-input/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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
#
# 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.

---
version: '2'
services:
broker:
image: apache/kafka:latest
hostname: broker
container_name: broker
ports:
- "9092:9092"
- "9093:9093"
volumes:
- ../../fixtures/secrets:/etc/kafka/secrets
- ../../fixtures/file-input:/mnt/shared/config
environment:
# Environment variables used by kafka scripts will be needed in case of File input.
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'
# Set properties not provided in the file input
KAFKA_NODE_ID: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@broker:29093'
KAFKA_LISTENERS: 'PLAINTEXT://0.0.0.0:19093,SSL://0.0.0.0:9094,CONTROLLER://broker:29093'
# Override an existing property
KAFKA_PROCESS_ROLES: 'broker,controller'
34 changes: 34 additions & 0 deletions docker/examples/jvm/single-node/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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
#
# 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.

---
version: '2'
services:
broker:
image: apache/kafka:latest
hostname: broker
container_name: broker
ports:
- '9092:9092'
environment:
KAFKA_NODE_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092'
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@broker:29093'
KAFKA_LISTENERS: 'CONTROLLER://broker:29093,PLAINTEXT://0.0.0.0:9092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'
47 changes: 47 additions & 0 deletions docker/examples/jvm/ssl/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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
#
# 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.

---
version: '2'
services:
broker:
image: apache/kafka:latest
hostname: broker
container_name: broker
ports:
- '9093:9093'
volumes:
- ../../fixtures/secrets:/etc/kafka/secrets
environment:
KAFKA_NODE_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'SSL:SSL,CONTROLLER:PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: 'SSL://localhost:9093'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@broker:29093'
KAFKA_LISTENERS: 'SSL://0.0.0.0:9093,CONTROLLER://broker:29093'
KAFKA_INTER_BROKER_LISTENER_NAME: 'SSL'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs'
CLUSTER_ID: '4L6g3nShT-eMCtK--X86sw'
KAFKA_SSL_KEYSTORE_FILENAME: 'kafka01.keystore.jks'
KAFKA_SSL_KEYSTORE_CREDENTIALS: 'kafka_keystore_creds'
KAFKA_SSL_KEY_CREDENTIALS: 'kafka_ssl_key_creds'
KAFKA_SSL_TRUSTSTORE_FILENAME: 'kafka.truststore.jks'
KAFKA_SSL_TRUSTSTORE_CREDENTIALS: 'kafka_truststore_creds'
KAFKA_SSL_CLIENT_AUTH: 'required'
Loading