Skip to content

Enable kafka port for local ydb container #19218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ COPY --from=builder \
EXPOSE ${GRPC_TLS_PORT:-2135}
EXPOSE ${GRPC_PORT:-2136}
EXPOSE ${MON_PORT:-8765}
EXPOSE ${YDB_KAFKA_PROXY_PORT:-9092}

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

Expand Down
1 change: 1 addition & 0 deletions .github/docker/files/initialize_local_ydb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export YDB_GRPC_ENABLE_TLS="true"
export GRPC_TLS_PORT=${GRPC_TLS_PORT:-2135}
export GRPC_PORT=${GRPC_PORT:-2136}
export YDB_GRPC_TLS_DATA_PATH="/ydb_certs"
export YDB_KAFKA_PROXY_PORT=${YDB_KAFKA_PROXY_PORT:-9092}

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

Expand Down
4 changes: 4 additions & 0 deletions ydb/public/tools/lib/cmds/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,10 @@ def deploy(arguments):
if 'YDB_EXPERIMENTAL_PG' in os.environ:
optionals['pg_compatible_expirement'] = True

kafka_api_port = int(os.environ.get("YDB_KAFKA_PROXY_PORT", "0"))
if kafka_api_port != 0:
optionals['kafka_api_port'] = kafka_api_port

configuration = KikimrConfigGenerator(
parse_erasure(arguments),
arguments.ydb_binary_path,
Expand Down
8 changes: 8 additions & 0 deletions ydb/tests/library/harness/kikimr_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def __init__(
pg_compatible_expirement=False,
generic_connector_config=None, # typing.Optional[TGenericConnectorConfig]
pgwire_port=None,
kafka_api_port=None,
):
if extra_feature_flags is None:
extra_feature_flags = []
Expand Down Expand Up @@ -430,6 +431,13 @@ def __init__(
self.yaml_config["feature_flags"]["enable_external_data_sources"] = True
self.yaml_config["feature_flags"]["enable_script_execution_operations"] = True

if kafka_api_port is not None:
kafka_proxy_config = dict()
kafka_proxy_config["enable_kafka_proxy"] = True
kafka_proxy_config["listening_port"] = kafka_api_port

self.yaml_config["kafka_proxy_config"] = kafka_proxy_config

@property
def pdisks_info(self):
return self._pdisks_info
Expand Down
Loading