Skip to content

Commit 82b8f2f

Browse files
authored
AK 4.1 updates (#727)
1 parent b73c197 commit 82b8f2f

File tree

1,343 files changed

+358576
-48
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,343 files changed

+358576
-48
lines changed

Dockerfile.multiplatform

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
FROM alpine:3.19
2+
3+
# Install runtime dependencies
4+
RUN apk add --no-cache \
5+
curl \
6+
git \
7+
nodejs \
8+
npm \
9+
bash \
10+
ca-certificates \
11+
libc6-compat
12+
13+
# Install Go 1.22.2 (required by go.mod)
14+
ARG TARGETARCH
15+
RUN if [ "$TARGETARCH" = "arm64" ]; then \
16+
GO_ARCH="arm64"; \
17+
else \
18+
GO_ARCH="amd64"; \
19+
fi && \
20+
curl -L "https://go.dev/dl/go1.22.2.linux-${GO_ARCH}.tar.gz" -o go.tar.gz && \
21+
tar -C /usr/local -xzf go.tar.gz && \
22+
rm go.tar.gz
23+
24+
# Set Go environment variables
25+
ENV GOPATH="/go"
26+
ENV PATH="/usr/local/go/bin:${PATH}"
27+
ENV PATH="${GOPATH}/bin:${PATH}"
28+
29+
# Download Hugo binary directly (much more space efficient than compiling)
30+
ARG TARGETARCH
31+
RUN if [ "$TARGETARCH" = "arm64" ]; then \
32+
HUGO_ARCH="arm64"; \
33+
else \
34+
HUGO_ARCH="amd64"; \
35+
fi && \
36+
echo "Downloading Hugo for architecture: ${HUGO_ARCH}" && \
37+
curl -L "https://github.com/gohugoio/hugo/releases/download/v0.123.7/hugo_extended_0.123.7_linux-${HUGO_ARCH}.tar.gz" -o hugo.tar.gz && \
38+
echo "Extracting Hugo..." && \
39+
tar -xzf hugo.tar.gz && \
40+
echo "Contents after extraction:" && \
41+
ls -la && \
42+
echo "Hugo binary details:" && \
43+
ls -la hugo && \
44+
echo "Moving Hugo binary..." && \
45+
cp hugo /usr/local/bin/hugo && \
46+
chmod +x /usr/local/bin/hugo && \
47+
echo "Hugo binary location and permissions:" && \
48+
ls -la /usr/local/bin/hugo && \
49+
echo "Testing Hugo binary:" && \
50+
ldd /usr/local/bin/hugo && \
51+
/usr/local/bin/hugo version && \
52+
rm hugo.tar.gz hugo
53+
54+
# Install global dependencies
55+
RUN npm install -g postcss postcss-cli autoprefixer
56+
57+
# Copy entrypoint script
58+
COPY scripts/entrypoint.sh /usr/local/bin/
59+
RUN chmod +x /usr/local/bin/entrypoint.sh
60+
61+
# Create working directory
62+
WORKDIR /src
63+
64+
# Configure Git to trust the working directory
65+
RUN git config --global --add safe.directory /src
66+
67+
# Verify installations
68+
RUN node --version && \
69+
npm --version && \
70+
npx --version && \
71+
hugo version && \
72+
go version
73+
74+
EXPOSE 1313
75+
76+
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

Makefile

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
11
# Hugo configuration
22
OUTPUT_DIR := output
3-
DOCKER_IMAGE := hvishwanath/hugo:v0.123.7-ext
3+
HUGO_BASE_IMAGE := hvishwanath/hugo:v0.123.7-ext-multiplatform
4+
DOCKER_IMAGE := $(HUGO_BASE_IMAGE)
45
#PROD_IMAGE := hvishwanath/kafka-site-md:1.2.0
56
PROD_IMAGE := us-west1-docker.pkg.dev/play-394201/kafka-site-md/kafka-site-md:1.6.0
67

7-
.PHONY: build serve clean docker-image prod-image prod-run buildx-setup
8+
.PHONY: build serve clean docker-image hugo-base-multi-platform prod-image prod-run buildx-setup ghcr-prod-image
89

910
# Setup buildx for multi-arch builds
1011
buildx-setup:
1112
docker buildx create --name multiarch --driver docker-container --use || true
1213
docker buildx inspect multiarch --bootstrap
1314

14-
# Build the Docker image
15+
# Build the Docker image (single platform)
1516
docker-image:
1617
docker build -t $(DOCKER_IMAGE) . --push
1718

19+
# Build and push multi-platform Hugo base image
20+
hugo-base-multi-platform: buildx-setup
21+
docker buildx build \
22+
--platform linux/amd64,linux/arm64 \
23+
--tag $(HUGO_BASE_IMAGE) \
24+
--file Dockerfile.multiplatform \
25+
--build-arg BUILDKIT_INLINE_CACHE=1 \
26+
--push \
27+
.
28+
1829
# Build the static site using Docker
1930
build:
2031
docker pull $(DOCKER_IMAGE)
@@ -48,8 +59,19 @@ prod-run: prod-image
4859
docker pull $(PROD_IMAGE)
4960
docker run --rm -p 8080:80 $(PROD_IMAGE)
5061

62+
# Build and push production image to GHCR
63+
ghcr-prod-image: build buildx-setup
64+
docker buildx build \
65+
--platform linux/amd64,linux/arm64 \
66+
--tag ghcr.io/$(shell basename $(shell git rev-parse --show-toplevel))/kafka-site-md:prod-$(shell git rev-parse --abbrev-ref HEAD) \
67+
--tag ghcr.io/$(shell basename $(shell git rev-parse --show-toplevel))/kafka-site-md:prod-$(shell git rev-parse --short HEAD) \
68+
--tag ghcr.io/$(shell basename $(shell git rev-parse --show-toplevel))/kafka-site-md:prod-$(shell date +%Y%m%d-%H%M%S) \
69+
--file Dockerfile.prod \
70+
--push \
71+
.
72+
5173
# Clean the output directory and remove Docker images
5274
clean:
5375
rm -rf $(OUTPUT_DIR)
54-
docker rmi $(DOCKER_IMAGE) $(PROD_IMAGE)
76+
docker rmi $(DOCKER_IMAGE) $(HUGO_BASE_IMAGE) $(PROD_IMAGE)
5577
docker buildx rm multiarch || true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,4 @@ make clean
167167
4. Test locally using `make serve`
168168
5. Submit a pull request
169169

170-
For more details about the migration to Markdown and the overall architecture, see [KIP-1133](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1133%3A+AK+Documentation+and+Website+in+Markdown).
170+
For more details about the migration to Markdown and the overall architecture, see [KIP-1133](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1133%3A+AK+Documentation+and+Website+in+Markdown).

content/en/0110/streams/core-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Kafka Streams allows direct read-only queries of the state stores by methods, th
8080

8181
# Processing Guarantees
8282

83-
In stream processing, one of the most frequently asked question is "does my stream processing system guarantee that each record is processed once and only once, even if some failures are encountered in the middle of processing?" Failing to guarantee exactly-once stream processing is a deal-breaker for many applications that cannot tolerate any data-loss or data duplicates, and in that case a batch-oriented framework is usually used in addition to the stream processing pipeline, known as the [Lambda Architecture](http://lambda-architecture.net/). Prior to 0.11.0.0, Kafka only provides at-least-once delivery guarantees and hence any stream processing systems that leverage it as the backend storage could not guarantee end-to-end exactly-once semantics. In fact, even for those stream processing systems that claim to support exactly-once processing, as long as they are reading from / writing to Kafka as the source / sink, their applications cannot actually guarantee that no duplicates will be generated throughout the pipeline. Since the 0.11.0.0 release, Kafka has added support to allow its producers to send messages to different topic partitions in a [transactional and idempotent manner](/#semantics), and Kafka Streams has hence added the end-to-end exactly-once processing semantics by leveraging these features. More specifically, it guarantees that for any record read from the source Kafka topics, its processing results will be reflected exactly once in the output Kafka topic as well as in the state stores for stateful operations. Note the key difference between Kafka Streams end-to-end exactly-once guarantee with other stream processing frameworks' claimed guarantees is that Kafka Streams tightly integrates with the underlying Kafka storage system and ensure that commits on the input topic offsets, updates on the state stores, and writes to the output topics will be completed atomically instead of treating Kafka as an external system that may have side-effects. To read more details on how this is done inside Kafka Streams, readers are recommended to read [KIP-129](https://cwiki.apache.org/confluence/display/KAFKA/KIP-129%3A+Streams+Exactly-Once+Semantics). In order to achieve exactly-once semantics when running Kafka Streams applications, users can simply set the `processing.guarantee` config value to **exactly_once** (default value is **at_least_once**). More details can be found in the [**Kafka Streams Configs**](/0110/documentation#streamsconfigs) section.
83+
In stream processing, one of the most frequently asked question is "does my stream processing system guarantee that each record is processed once and only once, even if some failures are encountered in the middle of processing?" Failing to guarantee exactly-once stream processing is a deal-breaker for many applications that cannot tolerate any data-loss or data duplicates, and in that case a batch-oriented framework is usually used in addition to the stream processing pipeline, known as the [Lambda Architecture](https://en.wikipedia.org/wiki/Lambda_architecture). Prior to 0.11.0.0, Kafka only provides at-least-once delivery guarantees and hence any stream processing systems that leverage it as the backend storage could not guarantee end-to-end exactly-once semantics. In fact, even for those stream processing systems that claim to support exactly-once processing, as long as they are reading from / writing to Kafka as the source / sink, their applications cannot actually guarantee that no duplicates will be generated throughout the pipeline. Since the 0.11.0.0 release, Kafka has added support to allow its producers to send messages to different topic partitions in a [transactional and idempotent manner](/#semantics), and Kafka Streams has hence added the end-to-end exactly-once processing semantics by leveraging these features. More specifically, it guarantees that for any record read from the source Kafka topics, its processing results will be reflected exactly once in the output Kafka topic as well as in the state stores for stateful operations. Note the key difference between Kafka Streams end-to-end exactly-once guarantee with other stream processing frameworks' claimed guarantees is that Kafka Streams tightly integrates with the underlying Kafka storage system and ensure that commits on the input topic offsets, updates on the state stores, and writes to the output topics will be completed atomically instead of treating Kafka as an external system that may have side-effects. To read more details on how this is done inside Kafka Streams, readers are recommended to read [KIP-129](https://cwiki.apache.org/confluence/display/KAFKA/KIP-129%3A+Streams+Exactly-Once+Semantics). In order to achieve exactly-once semantics when running Kafka Streams applications, users can simply set the `processing.guarantee` config value to **exactly_once** (default value is **at_least_once**). More details can be found in the [**Kafka Streams Configs**](/0110/documentation#streamsconfigs) section.
8484

8585
[Previous](/0110/streams/developer-guide) [Next](/0110/streams/architecture)
8686

content/en/10/streams/core-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Kafka Streams allows direct read-only queries of the state stores by methods, th
8282

8383
# Processing Guarantees
8484

85-
In stream processing, one of the most frequently asked question is "does my stream processing system guarantee that each record is processed once and only once, even if some failures are encountered in the middle of processing?" Failing to guarantee exactly-once stream processing is a deal-breaker for many applications that cannot tolerate any data-loss or data duplicates, and in that case a batch-oriented framework is usually used in addition to the stream processing pipeline, known as the [Lambda Architecture](http://lambda-architecture.net/). Prior to 0.11.0.0, Kafka only provides at-least-once delivery guarantees and hence any stream processing systems that leverage it as the backend storage could not guarantee end-to-end exactly-once semantics. In fact, even for those stream processing systems that claim to support exactly-once processing, as long as they are reading from / writing to Kafka as the source / sink, their applications cannot actually guarantee that no duplicates will be generated throughout the pipeline. Since the 0.11.0.0 release, Kafka has added support to allow its producers to send messages to different topic partitions in a [transactional and idempotent manner](/#semantics), and Kafka Streams has hence added the end-to-end exactly-once processing semantics by leveraging these features. More specifically, it guarantees that for any record read from the source Kafka topics, its processing results will be reflected exactly once in the output Kafka topic as well as in the state stores for stateful operations. Note the key difference between Kafka Streams end-to-end exactly-once guarantee with other stream processing frameworks' claimed guarantees is that Kafka Streams tightly integrates with the underlying Kafka storage system and ensure that commits on the input topic offsets, updates on the state stores, and writes to the output topics will be completed atomically instead of treating Kafka as an external system that may have side-effects. To read more details on how this is done inside Kafka Streams, readers are recommended to read [KIP-129](https://cwiki.apache.org/confluence/display/KAFKA/KIP-129%3A+Streams+Exactly-Once+Semantics). In order to achieve exactly-once semantics when running Kafka Streams applications, users can simply set the `processing.guarantee` config value to **exactly_once** (default value is **at_least_once**). More details can be found in the [**Kafka Streams Configs**](/10/documentation#streamsconfigs) section.
85+
In stream processing, one of the most frequently asked question is "does my stream processing system guarantee that each record is processed once and only once, even if some failures are encountered in the middle of processing?" Failing to guarantee exactly-once stream processing is a deal-breaker for many applications that cannot tolerate any data-loss or data duplicates, and in that case a batch-oriented framework is usually used in addition to the stream processing pipeline, known as the [Lambda Architecture](https://en.wikipedia.org/wiki/Lambda_architecture). Prior to 0.11.0.0, Kafka only provides at-least-once delivery guarantees and hence any stream processing systems that leverage it as the backend storage could not guarantee end-to-end exactly-once semantics. In fact, even for those stream processing systems that claim to support exactly-once processing, as long as they are reading from / writing to Kafka as the source / sink, their applications cannot actually guarantee that no duplicates will be generated throughout the pipeline. Since the 0.11.0.0 release, Kafka has added support to allow its producers to send messages to different topic partitions in a [transactional and idempotent manner](/#semantics), and Kafka Streams has hence added the end-to-end exactly-once processing semantics by leveraging these features. More specifically, it guarantees that for any record read from the source Kafka topics, its processing results will be reflected exactly once in the output Kafka topic as well as in the state stores for stateful operations. Note the key difference between Kafka Streams end-to-end exactly-once guarantee with other stream processing frameworks' claimed guarantees is that Kafka Streams tightly integrates with the underlying Kafka storage system and ensure that commits on the input topic offsets, updates on the state stores, and writes to the output topics will be completed atomically instead of treating Kafka as an external system that may have side-effects. To read more details on how this is done inside Kafka Streams, readers are recommended to read [KIP-129](https://cwiki.apache.org/confluence/display/KAFKA/KIP-129%3A+Streams+Exactly-Once+Semantics). In order to achieve exactly-once semantics when running Kafka Streams applications, users can simply set the `processing.guarantee` config value to **exactly_once** (default value is **at_least_once**). More details can be found in the [**Kafka Streams Configs**](/10/documentation#streamsconfigs) section.
8686

8787
[Previous](/10/streams/tutorial) [Next](/10/streams/architecture)
8888

0 commit comments

Comments
 (0)