Skip to content

Commit e918622

Browse files
authored
[stable-24-4] Enable kafka port for local ydb docker container (#19221)
2 parents 880217d + b7dc593 commit e918622

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

.github/docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ COPY --from=builder \
4444
EXPOSE ${GRPC_TLS_PORT:-2135}
4545
EXPOSE ${GRPC_PORT:-2136}
4646
EXPOSE ${MON_PORT:-8765}
47+
EXPOSE ${YDB_KAFKA_PROXY_PORT:-9092}
4748

4849
HEALTHCHECK --start-period=60s --interval=1s CMD sh ./health_check
4950

.github/docker/files/initialize_local_ydb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export YDB_GRPC_ENABLE_TLS="true"
88
export GRPC_TLS_PORT=${GRPC_TLS_PORT:-2135}
99
export GRPC_PORT=${GRPC_PORT:-2136}
1010
export YDB_GRPC_TLS_DATA_PATH="/ydb_certs"
11+
export YDB_KAFKA_PROXY_PORT=${YDB_KAFKA_PROXY_PORT:-9092}
1112

1213
/local_ydb deploy --ydb-working-dir /ydb_data --ydb-binary-path /ydbd --fixed-ports --dont-use-log-files;
1314

ydb/public/tools/lib/cmds/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ def deploy(arguments):
349349
if 'YDB_EXPERIMENTAL_PG' in os.environ:
350350
optionals['pg_compatible_expirement'] = True
351351

352+
kafka_api_port = int(os.environ.get("YDB_KAFKA_PROXY_PORT", "0"))
353+
if kafka_api_port != 0:
354+
optionals['kafka_api_port'] = kafka_api_port
355+
352356
configuration = KikimrConfigGenerator(
353357
parse_erasure(arguments),
354358
arguments.ydb_binary_path,

ydb/tests/library/harness/kikimr_config.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ def __init__(
166166
pg_compatible_expirement=False,
167167
generic_connector_config=None, # typing.Optional[TGenericConnectorConfig]
168168
pgwire_port=None,
169+
kafka_api_port=None,
169170
):
170171
if extra_feature_flags is None:
171172
extra_feature_flags = []
@@ -430,6 +431,13 @@ def __init__(
430431
self.yaml_config["feature_flags"]["enable_external_data_sources"] = True
431432
self.yaml_config["feature_flags"]["enable_script_execution_operations"] = True
432433

434+
if kafka_api_port is not None:
435+
kafka_proxy_config = dict()
436+
kafka_proxy_config["enable_kafka_proxy"] = True
437+
kafka_proxy_config["listening_port"] = kafka_api_port
438+
439+
self.yaml_config["kafka_proxy_config"] = kafka_proxy_config
440+
433441
@property
434442
def pdisks_info(self):
435443
return self._pdisks_info

0 commit comments

Comments
 (0)