Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • There will be a docker official image as an additional artifact for every Apache Kafka release. The docker files for the same will be maintained by the Apache Kafka community, but the images will be maintained by the Docker community.

  • This docker official image, like the existing OSS sponsored images, will consist of JVM based Kafka and will have support for Linux based AMD and ARM architectures. 

  • Update Add steps to the post-release process to include release of docker official image.

...

Proposed Workflow for Release Process

  1. Initial Setup:

    • Establish a new directory, docker/docker_official_images, within trunk to keep Docker Official Image assets.

    • Ensure the Dockerfile is compliant as per Docker Official Images guidelines.

...

Release Candidate (RC) Preparation:

The following steps are to be followed once there is a new major_version.minor_version.patch_version that has already been voted on and released. These actions can be carried out by the RM or any contributor post the release process.

  1. Latest major_version.minor_version.patch_version release:

    • Once a major_version.minor_version.patch_version is officially released and the binary URL for the release is available:

...

    • For all subsequent steps -

...

  1. Docker Image Preparation via GitHub Actions:

    • Implement an automated GitHub Actions workflow to:

      • Generate a version-specific folder, following the major_version.minor_version.patch_version

...

      • naming scheme, under the docker/docker_official_images directory, for housing static Dockerfile and scripts. For example 3.

...

      • 7.0

...

      • .

      • This folder will contain all static files necessary for creating the docker image.

      • The github actions workflow generates this folder which can be downloaded and verified.

    • The RM

...

    • puts this folder under the docker/docker_official_images directory in their fork of the kafka repo, and merges this change into the official kafka repo by raising

...

    • a

...

Review and Integration:

...

    • PR

...

    • .

  1. Docker Build and Release Testing:

    • Perform Docker build tests to ensure image integrity. The dockerfiles for the same will be used from the specific folder in the docker/docker_official_images directory.

...

Start the Voting for RC, which will include the Docker image, docker sanity tests report and docker official image source folder.

...

In case any docker image specific issue is detected, that will be evaluated by the community, if it’s a release blocker or not.

...

Once the vote passes, the RM will run the Docker release pipeline to publish RC images to the Docker Hub open-source software (OSS) sponsored images. The image will be pushed to OSS sponsored apache/kafka with the version as tag. For example: apache/kafka:3.8.0-rc1. Cop

...

Final Release Promotion:

  • Upon final release approval, the RM will run the Docker promote pipeline from the RC branch to the OSS Docker Hub. The latest major_version.minor_version.patch_version image will now be available on the OSS Docker Hub. For example: apache/kafka:3.8.0.

Post-Release Maintenance:

Return to the trunk to perform maintenance tasks:

    • Co

  1. Docker Hub Submission:

    • Remove unsupported version folders from the docker_official_images directory to maintain repository cleanliness

...

    • .

...

The RM will cherry pick the updated folder name commit to release branch.

...

    • Run a script from trunk to automate the creation of a file which contains all the necessary information for submission to the Docker Hub official images library.

    • The RM will manually raise the final PR to Docker Hub’s official images repository using the contents of the generated file. Following PR approval, it is now Docker’s responsibility to build and publish the Docker Official Images. For example kafka:3.8.0.

  1. Post Release Process - if Dockerhub folks suggest changes to the Dockerfiles:

    • Make the same changes in the Dockerfile present in docker/jvm/Dockerfile, so that the changes are propagated to newer

...

    • RC releases and new major, minor and patch releases

...

    • . This ensures that the source of truth is kept updated. Additionally, update the Dockerfile in the docker official image for that specific release. Commit these changes.

    • The RM will cherry pick these changes into the branch of that particular release.

...

    • Run the build and test workflow to test the images with the latest changes.

    • If the image builds successfully, and passes all tests,

...

    • follow step

...

    • 4 again to raise a new PR in the docker official images repo.

Directory Structure

A new directory named docker_official_images will be added to the /docker repository. This directory will contain all the Official Docker Images related code.

Code Block
kafka/
    - docker/
        - docker_official_images/ #Contains resources needed to create the official docker images.
            - 3.8.2-rc/           #Contains resources needed to create the docker images for the latest RC tag for the 3.8.2 version.
              - jvm/              #Contains Dockerfile for the JVM-based Apache Kafka Docker image.
                - Dockerfile + necessary scripts
            - 3.8.1/              #Contains resources needed to create the official docker images for the 3.8.1 version.
              - jvm/              #Contains Dockerfile for the JVM-based Apache Kafka Official Docker image.
                - Dockerfile + necessary scripts
            - 3.9.0/
              - jvm/
                - Dockerfile + necessary scripts
        - jvm/
            - Dockerfile          #Dockerfile for the JVM-based Apache Kafka Docker image.
        - resources/              #Contains resources needed to create the Docker image.
        - test/                   #Contains sanity tests for the Docker image.
        - docker_build_test.py    #Python script for building and testing the Docker image.
        - docker_release.py       #Python script for building the Docker image and pushing it to Docker Hub.
        - docker_build_latest_artifact.py #Python script for building the artifact for the current RC release.
        - generate-stackbrew-library-docker.sh #Shell script to automate PR template for Docker Official Images.

...

Creating a separate repository named apache-docker within the Apache GitHub organization. This strategy mirrors the practices of other Apache projects, such as Spark and Flink, where Docker-related files and scripts reside in a distinct repository. However, this move would involve transferring existing Docker resources to the new repository too, without providing any added advantage. This approach does not provide any benefit in the requirement for creating specific folders with hardcoded values for each Docker image release.

While planning how to release Docker Official Images (DOI) as part of Kafka's release process, another approach involved integrating it as part of the release process itself. However, this approach made things much harder for the RMs. There were many more manual steps needed to be done by the RM which made the release process more complicated. By handling the release of Docker Official Images (DOIs) as a post-release process, we kept the release process unchanged and simplified the DOI release. This way, releasing DOIs can be easily managed by anyone after the main release is completed.