This repository has been archived by the owner on Mar 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAcornfile
69 lines (62 loc) · 1.6 KB
/
Acornfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: "Kafka Acorn"
description: "Acorn providing Kafka"
readme: "./README.md"
info: localData.info
icon: "./icon.png"
args: {
topic: "my-topic"
}
services: broker: {
default: true
generated: job: "setup"
}
containers: kafka: {
name: "Kafka"
description: "Container running a Kafka server"
image: "bitnami/kafka:3.4.1"
ports: publish: "9092/tcp"
env: {
KAFKA_CFG_NODE_ID: "0"
KAFKA_CFG_PROCESS_ROLES: "controller,broker"
KAFKA_CFG_LISTENERS: "PLAINTEXT://:9092,CONTROLLER://:9093,EXTERNAL://:9094"
KAFKA_CFG_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092,EXTERNAL://:9094"
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "CONTROLLER:PLAINTEXT,EXTERNAL:PLAINTEXT,PLAINTEXT:PLAINTEXT"
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: "0@kafka:9093"
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: "CONTROLLER"
}
probes: [
{
type: "readiness"
initialDelaySeconds: 5
timeoutSeconds: 5
tcp: {
url: "tcp://localhost:9092"
}
},
]
}
jobs: setup: {
name: "configure Kafka server"
image: "bitnami/kafka:3.4.1"
dirs: "/acorn/scripts/": "./scripts"
dependsOn: ["kafka"]
entrypoint: ["/acorn/scripts/init.sh"]
env: {
TOPIC: args.topic
}
events: ["create", "update"]
}
localData: info: """
## Usage
services: db: {
image: "ghcr.io/acorn-io/kafka:v#.#.#-#"
}
containers: app: {
image: "app-image"
env: {
KAFKA_HOST: "@{@{service.}kafka.address}"
KAFKA_PORT: "@{@{service.}kafka.port.9092}"
KAFKA_TOPIC: "@{@{service.}kafka.data.topicName}"
}
}
"""