@testcontainers/kafka 10.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.d.ts +1 -0
- package/build/index.js +7 -0
- package/build/index.js.map +1 -0
- package/build/kafka-container.d.ts +41 -0
- package/build/kafka-container.js +157 -0
- package/build/kafka-container.js.map +1 -0
- package/package.json +21 -0
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { KafkaContainer, StartedKafkaContainer } from "./kafka-container";
|
package/build/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StartedKafkaContainer = exports.KafkaContainer = void 0;
|
|
4
|
+
var kafka_container_1 = require("./kafka-container");
|
|
5
|
+
Object.defineProperty(exports, "KafkaContainer", { enumerable: true, get: function () { return kafka_container_1.KafkaContainer; } });
|
|
6
|
+
Object.defineProperty(exports, "StartedKafkaContainer", { enumerable: true, get: function () { return kafka_container_1.StartedKafkaContainer; } });
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAA0E;AAAjE,iHAAA,cAAc,OAAA;AAAE,wHAAA,qBAAqB,OAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AbstractStartedContainer, Content, GenericContainer, InspectResult, StartedTestContainer } from "@testcontainers/testcontainers";
|
|
2
|
+
export declare const KAFKA_IMAGE = "confluentinc/cp-kafka:7.2.2";
|
|
3
|
+
interface SaslSslListenerOptions {
|
|
4
|
+
sasl: SaslOptions;
|
|
5
|
+
port: number;
|
|
6
|
+
keystore: PKCS12CertificateStore;
|
|
7
|
+
truststore?: PKCS12CertificateStore;
|
|
8
|
+
}
|
|
9
|
+
interface SaslOptions {
|
|
10
|
+
mechanism: "SCRAM-SHA-256" | "SCRAM-SHA-512";
|
|
11
|
+
user: User;
|
|
12
|
+
}
|
|
13
|
+
interface User {
|
|
14
|
+
name: string;
|
|
15
|
+
password: string;
|
|
16
|
+
}
|
|
17
|
+
interface PKCS12CertificateStore {
|
|
18
|
+
content: Content;
|
|
19
|
+
passphrase: string;
|
|
20
|
+
}
|
|
21
|
+
export declare class KafkaContainer extends GenericContainer {
|
|
22
|
+
private readonly uuid;
|
|
23
|
+
private isZooKeeperProvided;
|
|
24
|
+
private zooKeeperHost?;
|
|
25
|
+
private zooKeeperPort?;
|
|
26
|
+
private saslSslConfig?;
|
|
27
|
+
constructor(image?: string);
|
|
28
|
+
withZooKeeper(host: string, port: number): this;
|
|
29
|
+
withSaslSslListener(options: SaslSslListenerOptions): this;
|
|
30
|
+
protected beforeContainerCreated(): Promise<void>;
|
|
31
|
+
start(): Promise<StartedKafkaContainer>;
|
|
32
|
+
protected containerStarted(container: StartedTestContainer, inspectResult: InspectResult): Promise<void>;
|
|
33
|
+
private addPlaintextAndSecureListener;
|
|
34
|
+
private addPlaintextListener;
|
|
35
|
+
private updateAdvertisedListeners;
|
|
36
|
+
private createUser;
|
|
37
|
+
}
|
|
38
|
+
export declare class StartedKafkaContainer extends AbstractStartedContainer {
|
|
39
|
+
constructor(startedTestContainer: StartedTestContainer);
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StartedKafkaContainer = exports.KafkaContainer = exports.KAFKA_IMAGE = void 0;
|
|
4
|
+
const testcontainers_1 = require("@testcontainers/testcontainers");
|
|
5
|
+
const KAFKA_PORT = 9093;
|
|
6
|
+
const KAFKA_BROKER_PORT = 9092;
|
|
7
|
+
const DEFAULT_ZOOKEEPER_PORT = 2181;
|
|
8
|
+
exports.KAFKA_IMAGE = "confluentinc/cp-kafka:7.2.2";
|
|
9
|
+
class KafkaContainer extends testcontainers_1.GenericContainer {
|
|
10
|
+
uuid = new testcontainers_1.RandomUuid();
|
|
11
|
+
isZooKeeperProvided = false;
|
|
12
|
+
zooKeeperHost;
|
|
13
|
+
zooKeeperPort;
|
|
14
|
+
saslSslConfig;
|
|
15
|
+
constructor(image = exports.KAFKA_IMAGE) {
|
|
16
|
+
super(image);
|
|
17
|
+
this.withExposedPorts(KAFKA_PORT).withStartupTimeout(180000).withEnvironment({
|
|
18
|
+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "BROKER:PLAINTEXT,PLAINTEXT:PLAINTEXT",
|
|
19
|
+
KAFKA_INTER_BROKER_LISTENER_NAME: "BROKER",
|
|
20
|
+
KAFKA_BROKER_ID: "1",
|
|
21
|
+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1",
|
|
22
|
+
KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: "1",
|
|
23
|
+
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: "1",
|
|
24
|
+
KAFKA_LOG_FLUSH_INTERVAL_MESSAGES: "9223372036854775807",
|
|
25
|
+
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: "0",
|
|
26
|
+
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: "false",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
withZooKeeper(host, port) {
|
|
30
|
+
this.isZooKeeperProvided = true;
|
|
31
|
+
this.zooKeeperHost = host;
|
|
32
|
+
this.zooKeeperPort = port;
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
withSaslSslListener(options) {
|
|
36
|
+
this.saslSslConfig = options;
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
async beforeContainerCreated() {
|
|
40
|
+
const network = this.networkMode && this.networkAliases.length > 0 ? this.networkAliases[0] : "localhost";
|
|
41
|
+
this.withEnvironment({ KAFKA_ADVERTISED_LISTENERS: `BROKER://${network}:${KAFKA_BROKER_PORT}` });
|
|
42
|
+
if (this.saslSslConfig) {
|
|
43
|
+
this.addPlaintextAndSecureListener(this.saslSslConfig);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
this.addPlaintextListener();
|
|
47
|
+
}
|
|
48
|
+
let command = "#!/bin/bash\n";
|
|
49
|
+
if (this.isZooKeeperProvided) {
|
|
50
|
+
this.withEnvironment({ KAFKA_ZOOKEEPER_CONNECT: `${this.zooKeeperHost}:${this.zooKeeperPort}` });
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this.zooKeeperHost = this.uuid.nextUuid();
|
|
54
|
+
this.zooKeeperPort = DEFAULT_ZOOKEEPER_PORT;
|
|
55
|
+
this.withExposedPorts(this.zooKeeperPort);
|
|
56
|
+
this.withEnvironment({ KAFKA_ZOOKEEPER_CONNECT: `localhost:${this.zooKeeperPort}` });
|
|
57
|
+
command += "echo 'clientPort=" + this.zooKeeperPort + "' > zookeeper.properties\n";
|
|
58
|
+
command += "echo 'dataDir=/var/lib/zookeeper/data' >> zookeeper.properties\n";
|
|
59
|
+
command += "echo 'dataLogDir=/var/lib/zookeeper/log' >> zookeeper.properties\n";
|
|
60
|
+
command += "zookeeper-server-start zookeeper.properties &\n";
|
|
61
|
+
}
|
|
62
|
+
command += "echo '' > /etc/confluent/docker/ensure \n";
|
|
63
|
+
command += "/etc/confluent/docker/run \n";
|
|
64
|
+
this.withCommand(["sh", "-c", command]);
|
|
65
|
+
}
|
|
66
|
+
async start() {
|
|
67
|
+
return new StartedKafkaContainer(await super.start());
|
|
68
|
+
}
|
|
69
|
+
async containerStarted(container, inspectResult) {
|
|
70
|
+
await this.updateAdvertisedListeners(container, inspectResult);
|
|
71
|
+
if (this.saslSslConfig) {
|
|
72
|
+
await this.createUser(container, this.saslSslConfig.sasl);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
addPlaintextAndSecureListener({ port, sasl, keystore, truststore }) {
|
|
76
|
+
this.withEnvironment({
|
|
77
|
+
KAFKA_LISTENERS: `SECURE://0.0.0.0:${port},PLAINTEXT://0.0.0.0:${KAFKA_PORT},BROKER://0.0.0.0:${KAFKA_BROKER_PORT}`,
|
|
78
|
+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "BROKER:PLAINTEXT,PLAINTEXT:PLAINTEXT,SECURE:SASL_SSL",
|
|
79
|
+
KAFKA_SSL_PROTOCOL: "TLSv1.2",
|
|
80
|
+
KAFKA_SSL_KEYSTORE_LOCATION: "/etc/kafka/secrets/server.keystore.pfx",
|
|
81
|
+
KAFKA_SSL_KEYSTORE_PASSWORD: keystore.passphrase,
|
|
82
|
+
KAFKA_SSL_KEYSTORE_TYPE: "PKCS12",
|
|
83
|
+
KAFKA_SASL_ENABLED_MECHANISMS: sasl.mechanism,
|
|
84
|
+
[`KAFKA_LISTENER_NAME_SECURE_${sasl.mechanism}_SASL_JAAS_CONFIG`]: "org.apache.kafka.common.security.scram.ScramLoginModule required;",
|
|
85
|
+
})
|
|
86
|
+
.withCopyContentToContainer([{ content: keystore.content, target: "/etc/kafka/secrets/server.keystore.pfx" }])
|
|
87
|
+
.withExposedPorts(KAFKA_PORT, port);
|
|
88
|
+
if (truststore) {
|
|
89
|
+
this.withCopyContentToContainer([
|
|
90
|
+
{ content: truststore.content, target: "/etc/kafka/secrets/server.truststore.pfx" },
|
|
91
|
+
]).withEnvironment({
|
|
92
|
+
KAFKA_SSL_TRUSTSTORE_LOCATION: "/etc/kafka/secrets/server.truststore.pfx",
|
|
93
|
+
KAFKA_SSL_TRUSTSTORE_PASSWORD: truststore.passphrase,
|
|
94
|
+
KAFKA_SSL_TRUSTSTORE_TYPE: "PKCS12",
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
addPlaintextListener() {
|
|
99
|
+
this.withEnvironment({
|
|
100
|
+
KAFKA_LISTENERS: `PLAINTEXT://0.0.0.0:${KAFKA_PORT},BROKER://0.0.0.0:${KAFKA_BROKER_PORT}`,
|
|
101
|
+
}).withExposedPorts(KAFKA_PORT);
|
|
102
|
+
}
|
|
103
|
+
async updateAdvertisedListeners(container, inspectResult) {
|
|
104
|
+
const brokerAdvertisedListener = `BROKER://${inspectResult.hostname}:${KAFKA_BROKER_PORT}`;
|
|
105
|
+
let bootstrapServers = `PLAINTEXT://${container.getHost()}:${container.getMappedPort(KAFKA_PORT)}`;
|
|
106
|
+
if (this.saslSslConfig) {
|
|
107
|
+
if (this.networkMode) {
|
|
108
|
+
bootstrapServers = `${bootstrapServers},SECURE://${inspectResult.hostname}:${this.saslSslConfig.port}`;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
bootstrapServers = `${bootstrapServers},SECURE://${container.getHost()}:${container.getMappedPort(this.saslSslConfig.port)}`;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const { output, exitCode } = await container.exec([
|
|
115
|
+
"kafka-configs",
|
|
116
|
+
"--alter",
|
|
117
|
+
"--bootstrap-server",
|
|
118
|
+
brokerAdvertisedListener,
|
|
119
|
+
"--entity-type",
|
|
120
|
+
"brokers",
|
|
121
|
+
"--entity-name",
|
|
122
|
+
this.environment["KAFKA_BROKER_ID"],
|
|
123
|
+
"--add-config",
|
|
124
|
+
`advertised.listeners=[${bootstrapServers},${brokerAdvertisedListener}]`,
|
|
125
|
+
]);
|
|
126
|
+
if (exitCode !== 0) {
|
|
127
|
+
throw new Error(`Kafka container configuration failed with exit code ${exitCode}: ${output}`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
async createUser(container, { user: { name, password }, mechanism }) {
|
|
131
|
+
const { output, exitCode } = await container.exec([
|
|
132
|
+
"kafka-configs",
|
|
133
|
+
"--alter",
|
|
134
|
+
// At the time of writing kafka-configs displays a warning stating that the 'zookeeper' flag is deprecated in favor of 'bootstrap-server'.
|
|
135
|
+
// Unfortunately, 'bootstrap-server' can only be used to set quotas and not to create a user.
|
|
136
|
+
"--zookeeper",
|
|
137
|
+
this.environment["KAFKA_ZOOKEEPER_CONNECT"],
|
|
138
|
+
"--entity-type",
|
|
139
|
+
"users",
|
|
140
|
+
"--entity-name",
|
|
141
|
+
`${name}`,
|
|
142
|
+
"--add-config",
|
|
143
|
+
`${mechanism}=[password=${password}]`,
|
|
144
|
+
]);
|
|
145
|
+
if (exitCode !== 0) {
|
|
146
|
+
throw new Error(`Kafka container configuration failed with exit code ${exitCode}: ${output}`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
exports.KafkaContainer = KafkaContainer;
|
|
151
|
+
class StartedKafkaContainer extends testcontainers_1.AbstractStartedContainer {
|
|
152
|
+
constructor(startedTestContainer) {
|
|
153
|
+
super(startedTestContainer);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
exports.StartedKafkaContainer = StartedKafkaContainer;
|
|
157
|
+
//# sourceMappingURL=kafka-container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kafka-container.js","sourceRoot":"","sources":["../src/kafka-container.ts"],"names":[],"mappings":";;;AAAA,mEAQwC;AAExC,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAC/B,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAEvB,QAAA,WAAW,GAAG,6BAA6B,CAAC;AAwBzD,MAAa,cAAe,SAAQ,iCAAgB;IACjC,IAAI,GAAS,IAAI,2BAAU,EAAE,CAAC;IAEvC,mBAAmB,GAAG,KAAK,CAAC;IAC5B,aAAa,CAAU;IACvB,aAAa,CAAU;IACvB,aAAa,CAA0B;IAE/C,YAAY,KAAK,GAAG,mBAAW;QAC7B,KAAK,CAAC,KAAK,CAAC,CAAC;QAEb,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,kBAAkB,CAAC,MAAO,CAAC,CAAC,eAAe,CAAC;YAC5E,oCAAoC,EAAE,sCAAsC;YAC5E,gCAAgC,EAAE,QAAQ;YAC1C,eAAe,EAAE,GA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AC;CACF;AAJD,sDAIC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@testcontainers/kafka",
|
|
3
|
+
"version": "10.0.0-beta.4",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"main": "build/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"build"
|
|
8
|
+
],
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc --project tsconfig.build.json"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"kafkajs": "^2.2.4"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@testcontainers/testcontainers": "*"
|
|
20
|
+
}
|
|
21
|
+
}
|