-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/v2.1.11' into main
- Loading branch information
Showing
89 changed files
with
3,198 additions
and
325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,7 @@ EDAs | |
enSidebar | ||
enum | ||
etag | ||
Fargate | ||
fas | ||
gitea | ||
Grafana | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Release Cookbook Artifacts | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Tar all cookbooks | ||
run: for i in src/cookbooks/*/; do tar -zcvf "${i%/}.tar.gz" "$i"; done | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
src/cookbooks/*.tar.gz | ||
LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ dist | |
src/.vuepress/.cache/ | ||
src/.vuepress/.temp/ | ||
.idea/ | ||
src/cookbooks/quickstart/live-demo-deploy/.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"text":"Latest","icon":"fas fa-home","key":"latest","tag":"v2.1.10"}] | ||
[{"text":"Latest","icon":"fas fa-home","key":"latest","tag":"v2.1.11"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# http.kafka.sasl.scram | ||
|
||
Listens on http port `7114` or https port `7143` and will produce messages to the `events` topic in `SASL/SCRAM` enabled Kafka, synchronously. | ||
|
||
## Running locally | ||
|
||
This cookbook runs using Docker compose. | ||
|
||
### Setup | ||
|
||
The `setup.sh` script will: | ||
|
||
- installs Zilla, Kafka and Zookeeper to the Kubernetes cluster with helm and waits for the pods to start up | ||
- creates the `events` topic in Kafka | ||
- creates SCRAM credential `user` (the default implementation of SASL/SCRAM in Kafka stores SCRAM credentials in ZooKeeper) | ||
- starts port forwarding | ||
|
||
```bash | ||
./setup.sh | ||
``` | ||
|
||
### Verify behavior | ||
|
||
Send a `POST` request with an event body. | ||
|
||
```bash | ||
curl -v \ | ||
-X "POST" http://localhost:7114/events \ | ||
-H "Content-Type: application/json" \ | ||
-d "{\"greeting\":\"Hello, world\"}" | ||
``` | ||
|
||
output: | ||
|
||
```text | ||
... | ||
> POST /events HTTP/1.1 | ||
> Content-Type: application/json | ||
... | ||
< HTTP/1.1 204 No Content | ||
``` | ||
|
||
Verify that the event has been produced to the `events` Kafka topic. | ||
|
||
```bash | ||
docker compose -p zilla-http-kafka-sync exec kafkacat \ | ||
kafkacat -C -b kafka:9092 -t events -J -u | jq . | ||
``` | ||
|
||
output: | ||
|
||
```json | ||
{ | ||
"topic": "events", | ||
"partition": 0, | ||
"offset": 0, | ||
"tstype": "create", | ||
"ts": 1652465273281, | ||
"broker": 1001, | ||
"headers": [ | ||
"content-type", | ||
"application/json" | ||
], | ||
"payload": "{\"greeting\":\"Hello, world\"}" | ||
} | ||
% Reached end of topic events [0] at offset 1 | ||
``` | ||
|
||
### Teardown | ||
|
||
The `teardown.sh` script stops port forwarding, uninstalls Zilla, Kafka and Zookeeper and deletes the namespace. | ||
|
||
```bash | ||
./teardown.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: ${NAMESPACE:-zilla-http-kafka-sasl-scram} | ||
services: | ||
zilla: | ||
image: ghcr.io/aklivity/zilla:${ZILLA_VERSION:-latest} | ||
pull_policy: always | ||
restart: unless-stopped | ||
ports: | ||
- 7114:7114 | ||
healthcheck: | ||
interval: 5s | ||
timeout: 3s | ||
retries: 5 | ||
test: ["CMD", "bash", "-c", "echo -n '' > /dev/tcp/127.0.0.1/7114"] | ||
environment: | ||
KAFKA_BOOTSTRAP_SERVER: kafka:29092 | ||
SASL_USERNAME: user | ||
SASL_PASSWORD: bitnami | ||
volumes: | ||
- ./zilla.yaml:/etc/zilla/zilla.yaml | ||
command: start -v -e | ||
|
||
kafka: | ||
image: bitnami/kafka:3.5 | ||
restart: unless-stopped | ||
ports: | ||
- 9092:9092 | ||
healthcheck: | ||
test: /opt/bitnami/kafka/bin/kafka-cluster.sh cluster-id --bootstrap-server kafka:29092 || exit 1 | ||
interval: 1s | ||
timeout: 60s | ||
retries: 60 | ||
environment: | ||
ALLOW_PLAINTEXT_LISTENER: "yes" | ||
KAFKA_CFG_NODE_ID: "1" | ||
KAFKA_CFG_BROKER_ID: "1" | ||
KAFKA_CFG_GROUP_INITIAL_REBALANCE_DELAY_MS: "0" | ||
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: "[email protected]:9093" | ||
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "CLIENT:PLAINTEXT,INTERNAL:SASL_PLAINTEXT,DOCKER:PLAINTEXT,CONTROLLER:PLAINTEXT" | ||
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: "CONTROLLER" | ||
KAFKA_CFG_LOG_DIRS: "/tmp/logs" | ||
KAFKA_CFG_PROCESS_ROLES: "broker,controller" | ||
KAFKA_CFG_LISTENERS: "CLIENT://:9092,INTERNAL://:29092,CONTROLLER://:9093" | ||
KAFKA_CFG_INTER_BROKER_LISTENER_NAME: "INTERNAL" | ||
KAFKA_CFG_ADVERTISED_LISTENERS: "CLIENT://localhost:9092,INTERNAL://kafka:29092" | ||
KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "true" | ||
|
||
kafka-init: | ||
image: bitnami/kafka:3.5 | ||
user: root | ||
depends_on: | ||
kafka: | ||
condition: service_healthy | ||
restart: true | ||
deploy: | ||
restart_policy: | ||
condition: none | ||
max_attempts: 0 | ||
entrypoint: ["/bin/sh", "-c"] | ||
command: | ||
- | | ||
echo -e "Creating kafka topic"; | ||
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic items-requests | ||
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server kafka:29092 --create --if-not-exists --topic items-responses --config cleanup.policy=compact | ||
echo -e "Successfully created the following topics:"; | ||
/opt/bitnami/kafka/bin/kafka-topics.sh --bootstrap-server kafka:29092 --list; | ||
kafka-ui: | ||
image: ghcr.io/kafbat/kafka-ui:latest | ||
restart: unless-stopped | ||
ports: | ||
- 8080:8080 | ||
depends_on: | ||
kafka: | ||
condition: service_healthy | ||
restart: true | ||
environment: | ||
KAFKA_CLUSTERS_0_NAME: local | ||
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:29092 | ||
|
||
kafkacat: | ||
image: confluentinc/cp-kafkacat:7.1.9 | ||
command: "bash" | ||
stdin_open: true | ||
tty: true | ||
|
||
networks: | ||
default: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
KafkaServer { | ||
org.apache.kafka.common.security.scram.ScramLoginModule required | ||
username="user" | ||
password="bitnami"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
# Start or restart Zilla | ||
if [ -z "$(docker compose ps -q zilla)" ]; then | ||
docker compose up -d | ||
else | ||
docker compose up -d --force-recreate --no-deps zilla | ||
fi |
Oops, something went wrong.