Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
5 changes: 3 additions & 2 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ TC_PATHS="tests/kafkatest/tests/streams/streams_upgrade_test.py::StreamsUpgradeT
```
* Run tests with a specific image name
```
image_name="ducker-ak-openjdk:17-buster" bash tests/docker/run_tests.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for another, perhaps we could use openjdk:17 for this example to avoid using the explicit os version.

image_name="ducker-ak-openjdk:17" bash tests/docker/run_tests.sh
```
* Run tests with a different JVM
```
bash tests/docker/ducker-ak up -j 'openjdk:17-buster'; tests/docker/run_tests.sh
bash tests/docker/ducker-ak up -j '<JDK_IMAGE>'; tests/docker/run_tests.sh
```
You can customize the OpenJDK base image using the `-j` or `--jdk` parameter, otherwise a default value will be used.
* Remove ducker-ak containers
```
bash tests/docker/ducker-ak down -f
Expand Down
4 changes: 1 addition & 3 deletions tests/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# The base image of openjdk:17 is typically oraclelinux:8-slim, which doesn't include apt-get.
# Therefore, use openjdk:17-buster instead.
ARG jdk_version=openjdk:17-buster
ARG jdk_version
FROM $jdk_version AS build-native-image

WORKDIR /build
Expand Down
9 changes: 7 additions & 2 deletions tests/docker/ducker-ak
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ docker_run_memory_limit="2000m"
default_num_nodes=14

# The default OpenJDK base image.
default_jdk="openjdk:17-buster"
# The base image of openjdk:17 is typically oraclelinux:8-slim, which doesn't include apt-get.
# Therefore, use openjdk:17-bullseye instead.
default_jdk="openjdk:17-bullseye"

# The default ducker-ak image name.
default_image_name="ducker-ak"
Expand All @@ -70,7 +72,7 @@ help|-h|--help
Display this help message

up [-n|--num-nodes NUM_NODES] [-f|--force] [docker-image]
[-C|--custom-ducktape DIR] [-e|--expose-ports ports] [--ipv6]
[-C|--custom-ducktape DIR] [-e|--expose-ports ports] [-j|--jdk JDK_VERSION] [--ipv6]
Bring up a cluster with the specified amount of nodes (defaults to ${default_num_nodes}).
The docker image name defaults to ${default_image_name}. If --force is specified, we will
attempt to bring up an image even some parameters are not valid.
Expand All @@ -84,6 +86,9 @@ up [-n|--num-nodes NUM_NODES] [-f|--force] [docker-image]
or a combination of port/port-range separated by comma (like 2181,9092 or 2181,5005-5008).
By default no port is exposed. See README.md for more detail on this option.

If -j|--jdk is specified, you can customize the OpenJDK base image used for building
the ducker container. Defaults to ${default_jdk}. Example: -j openjdk:11-bullseye
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since current Kafka versions no longer support JDK 11, it would be better to use JDK 17 in this example.


If --ipv6 is specified, we will create a Docker network with IPv6 enabled.

Note that port 5678 will be automatically exposed for ducker01 node and will be mapped to 5678
Expand Down
Loading